INFO
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
import {
|
||||
store,
|
||||
mutations
|
||||
} from '@/uni_modules/uni-id-pages/common/store.js';
|
||||
} from '@/pages3/uni_modules/uni-id-pages/common/store.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
import {
|
||||
store,
|
||||
mutations
|
||||
} from '@/uni_modules/uni-id-pages/common/store.js';
|
||||
} from '@/pages3/uni_modules/uni-id-pages/common/store.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
+23
-22
@@ -7,11 +7,10 @@
|
||||
<view class="view-info">
|
||||
<view class="userinfo">
|
||||
<view class="flex">
|
||||
<cloud-image v-if="userInfo.avatar_file" borderRadius="50%" class="userinfo-headimg"
|
||||
:src="userInfo.avatar_file.url"></cloud-image>
|
||||
<cloud-image v-if="userInfo.avatar_file" borderRadius="50%" class="userinfo-headimg"
|
||||
:src="userInfo.avatar_file.url"></cloud-image>
|
||||
<image v-else
|
||||
|
||||
src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/static/center/avatar.png?expire_at=1741142218&er_sign=2f723854c2a07dcb5571d2ede5458f7f"
|
||||
src="https://qnycdn.mymoyu.top/static/avatar.jpg"
|
||||
class="userinfo-headimg borde-radius"></image>
|
||||
<view class="flex-one">
|
||||
<view class="flex-one-text">用户名:{{ userInfo.nickname }}</view>
|
||||
@@ -107,29 +106,29 @@
|
||||
<script>
|
||||
import uSubsection from "../../uni_modules/uview-ui/components/u-subsection/u-subsection.vue"
|
||||
import uModal from "../../uni_modules/uview-ui/components/u-modal/u-modal.vue"
|
||||
|
||||
|
||||
const uniIdCo = uniCloud.importObject("uni-id-co")
|
||||
import {
|
||||
store,
|
||||
mutations
|
||||
} from '@/uni_modules/uni-id-pages/common/store.js';
|
||||
|
||||
import {
|
||||
store,
|
||||
mutations
|
||||
} from '@/pages3/uni_modules/uni-id-pages/common/store.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
uSubsection,
|
||||
uModal
|
||||
},
|
||||
computed: {
|
||||
userInfo() {
|
||||
return store.userInfo
|
||||
},
|
||||
realNameStatus () {
|
||||
if (!this.userInfo.realNameAuth) {
|
||||
return 0
|
||||
}
|
||||
|
||||
return this.userInfo.realNameAuth.authStatus
|
||||
}
|
||||
userInfo() {
|
||||
return store.userInfo
|
||||
},
|
||||
realNameStatus() {
|
||||
if (!this.userInfo.realNameAuth) {
|
||||
return 0
|
||||
}
|
||||
|
||||
return this.userInfo.realNameAuth.authStatus
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -221,6 +220,7 @@
|
||||
<style lang="scss" scoped>
|
||||
@import '../../uni_modules/uview-ui/theme.scss';
|
||||
@import '../../uni_modules/uview-ui/index.scss';
|
||||
|
||||
::v-deep .u-modal__content {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
@@ -366,8 +366,9 @@
|
||||
height: 130rpx;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.borde-radius {
|
||||
border-radius: 50%;
|
||||
}
|
||||
@@ -523,4 +524,4 @@
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -0,0 +1,479 @@
|
||||
<template>
|
||||
<view>
|
||||
<unicloud-db ref='udb' v-slot:default="{ pagination, hasMore, loading, error, options }"
|
||||
orderby="last_view_time desc"
|
||||
@error="onqueryerror" :page-size="10"
|
||||
@onPullDownRefresh="onPullDownRefresh" @load="listLoad"
|
||||
:collection="colList" >
|
||||
<!-- 基于 uni-list 的页面布局 field="user_id.nickname"-->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<list class="uni-list" :border="false" :style="{ height: listHeight }">
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
<scroll-view
|
||||
scroll-y
|
||||
class="uni-list"
|
||||
refresher-enabled
|
||||
:refresher-triggered="loadType=== 'refresh'"
|
||||
:style="{ height: listHeight }"
|
||||
@refresherrefresh="refresh"
|
||||
@scrolltolower="loadMore"
|
||||
>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
<refresh-box :loading="loading" @refresh="refresh"></refresh-box>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- 列表渲染 -->
|
||||
<template v-for="(item, index) in followLst">
|
||||
<view class="follow-item">
|
||||
|
||||
<view class="avatar-container" @click="toPersonalpage(item)">
|
||||
<cloud-image
|
||||
:src="item.fid[0].avatar_file.url || 'https://qnycdn.mymoyu.top/static/avatar.jpg'"
|
||||
mode="aspectFill" border-radius="50%"
|
||||
height="80rpx" width="80rpx"></cloud-image>
|
||||
</view>
|
||||
|
||||
<view class="info-container" @click="toPersonalpage(item)">
|
||||
{{ item.fid[0].nickname }}
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="btn-container"
|
||||
:class="{
|
||||
'followed': item.fid[0].isFollow,
|
||||
|
||||
}"
|
||||
|
||||
>
|
||||
|
||||
<view @click="toggleFollow(item, index)">{{ item.fid[0].isFollow ? '已关注' : '关注' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 加载状态:上拉加载更多,加载中,没有更多数据了,加载错误 -->
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<uni-list-item>
|
||||
<template v-slot:body>
|
||||
<!-- #endif -->
|
||||
<uni-load-state @networkResume="refresh"
|
||||
:state="{ data: listData, pagination, hasMore, loading, error }"
|
||||
@loadMore="loadMore">
|
||||
</uni-load-state>
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
</template>
|
||||
</uni-list-item>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef APP-NVUE -->
|
||||
</scroll-view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP-NVUE -->
|
||||
</list>
|
||||
<!-- #endif -->
|
||||
</unicloud-db>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
|
||||
import translatePublishTime from "@/uni_modules/uni-cms-article/common/publish-time";
|
||||
import refreshBox from "@/uni_modules/uni-cms-article/components/refresh-box/refreshBox.nvue";
|
||||
// import cloudImage from "../../components/cloud-image.vue"
|
||||
import cloudImage from "../../components/cloud-image.vue";
|
||||
import {
|
||||
parseImageUrl
|
||||
} from "@/uni_modules/uni-cms-article/common/parse-image-url";
|
||||
|
||||
const db = uniCloud.database();
|
||||
|
||||
const uniIdCo = uniCloud.importObject("uni-id-co")
|
||||
import {
|
||||
store,
|
||||
mutations
|
||||
} from '@/pages3/uni_modules/uni-id-pages/common/store.js';
|
||||
import { follow } from "../../uniCloud-alipay/cloudfunctions/follow/index.obj";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
statusBar,
|
||||
refreshBox,
|
||||
cloudImage
|
||||
},
|
||||
computed: {
|
||||
userInfo() {
|
||||
return store.userInfo
|
||||
},
|
||||
realNameStatus() {
|
||||
if (!this.userInfo.realNameAuth) {
|
||||
return 0
|
||||
}
|
||||
|
||||
return this.userInfo.realNameAuth.authStatus
|
||||
},
|
||||
// 根据当前语言返回不同的搜索框占位符
|
||||
inputPlaceholder(e) {
|
||||
if (uni.getStorageSync('CURRENT_LANG') == "en") {
|
||||
return 'Please enter the search content' // 英文
|
||||
} else {
|
||||
return '请输入搜索内容' // 中文
|
||||
}
|
||||
},
|
||||
// 连表查询,返回两个集合的查询结果
|
||||
colList() {
|
||||
|
||||
return [
|
||||
db.collection("follow")
|
||||
.where(this.where)
|
||||
.field("_id,fid,create_time")
|
||||
.getTemp(),
|
||||
db.collection("uni-id-users")
|
||||
.field('_id,nickname,avatar_file')
|
||||
.getTemp()
|
||||
|
||||
];
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tags_v: [],
|
||||
tags: [
|
||||
|
||||
],
|
||||
|
||||
showRefresh: false, // 是否显示刷新按钮
|
||||
listHeight: 0, // 列表高度
|
||||
mpButtonLeftPlaceholderSize: 0, // 小程序左侧icon占位大小
|
||||
mpButtonPlaceholderSize: 87, // 小程序导航栏按钮占位大小
|
||||
navBarHeight: 44, // 导航栏高度
|
||||
refreshStatus: 0, // 刷新状态 0: 未刷新 1: 刷新中 2: 刷新完成
|
||||
listData: [], // 列表数据
|
||||
loadType: null,
|
||||
|
||||
followLst: [],
|
||||
|
||||
where:{},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toPersonalpage(item) {
|
||||
console.log(item)
|
||||
uni.navigateTo({
|
||||
url: "/uni_modules/zetank-personalpage/pages/personalpage/personalpage?uid=" + item.fid[0]._id
|
||||
})
|
||||
},
|
||||
async toggleFollow(item, index) {
|
||||
console.log(item)
|
||||
try {
|
||||
|
||||
if (item.fid[0].isFollow === false) {
|
||||
const res = await uniCloud.importObject("follow").follow({
|
||||
uid: this.userInfo._id,
|
||||
fid: item.fid[0]._id
|
||||
});
|
||||
if (res.code === 200) {
|
||||
console.log(res);
|
||||
this.followLst[0].fid[index].isFollow = true;
|
||||
} else {
|
||||
console.log(res.msg);
|
||||
}
|
||||
}
|
||||
else if (item.fid[0].isFollow === true) {
|
||||
const res = await uniCloud.importObject("follow").reFollow({
|
||||
uid: this.userInfo._id,
|
||||
fid: item.fid[0]._id
|
||||
});
|
||||
if (res.code === 200) {
|
||||
if (res.code === 200) {
|
||||
console.log(res);
|
||||
this.followLst[index].fid[0].isFollow = false;
|
||||
}
|
||||
} else {
|
||||
console.log(res.msg)
|
||||
}
|
||||
}
|
||||
}catch(e) {
|
||||
console.log(e.message)
|
||||
}
|
||||
},
|
||||
async listLoad(data) {
|
||||
if (!data || data.length === 0 ) return 0;
|
||||
let followLst = [];
|
||||
if (data[0].fid) {
|
||||
let item = {...data[0]};
|
||||
item.fid[0].isFollow = true;
|
||||
followLst.push(item)
|
||||
}
|
||||
console.log(followLst);
|
||||
this.followLst = this.loadType === 'loadMore' ? this.followLst.concat(followLst) : followLst
|
||||
this.loadType = null;
|
||||
|
||||
},
|
||||
// 初始化导航栏大小
|
||||
initNavBarSize() {
|
||||
// 获取小程序导航栏按钮信息
|
||||
// #ifdef MP-TOUTIAO
|
||||
let menuButtonInfo = tt.getCustomButtonBoundingClientRect()
|
||||
menuButtonInfo.width = menuButtonInfo.capsule.width // 小程序按钮区域中使用的按钮宽度
|
||||
this.mpButtonLeftPlaceholderSize = menuButtonInfo.leftIcon.width + 10
|
||||
// #endif
|
||||
// #ifndef MP-TOUTIAO
|
||||
let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
|
||||
// #endif
|
||||
// 计算小程序导航栏按钮占位大小
|
||||
this.mpButtonPlaceholderSize = menuButtonInfo.width + 10
|
||||
// 获取系统信息,判断是否为 iOS 系统,设置导航栏高度
|
||||
this.navBarHeight = uni.getSystemInfoSync().system.toLowerCase().includes('ios') ? 44 : 48
|
||||
},
|
||||
// 格式化时间戳
|
||||
publishTime(timestamp) {
|
||||
return translatePublishTime(timestamp)
|
||||
},
|
||||
// // 点击搜索框
|
||||
// searchClick(e) {
|
||||
// uni.hideKeyboard();
|
||||
// uni.navigateTo({
|
||||
// url: '/uni_modules/uni-cms-article/pages/search/search'
|
||||
// });
|
||||
// },
|
||||
// 重试
|
||||
retry() {
|
||||
this.refresh()
|
||||
},
|
||||
// 刷新
|
||||
refresh() {
|
||||
this.loadType = 'refresh'
|
||||
this.$refs.udb.loadData({
|
||||
clear: true
|
||||
}, () => {
|
||||
uni.stopPullDownRefresh()
|
||||
// #ifdef APP-NVUE
|
||||
this.showRefresh = false
|
||||
// #endif
|
||||
})
|
||||
},
|
||||
// 加载更多
|
||||
loadMore() {
|
||||
this.loadType = 'loadMore'
|
||||
this.$refs.udb.loadMore()
|
||||
},
|
||||
// 查询出错
|
||||
onqueryerror(e) {
|
||||
console.error(e);
|
||||
},
|
||||
|
||||
// #ifdef H5
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.refresh()
|
||||
},
|
||||
// #endif
|
||||
change(currentPage, type) {
|
||||
this.page.currentPage = currentPage;
|
||||
console.log("点击了" + type + ",当前页:" + currentPage);
|
||||
this.data_clear();
|
||||
},
|
||||
},
|
||||
async onReady() {
|
||||
// #ifdef MP
|
||||
this.initNavBarSize() // 初始化导航栏大小
|
||||
// #endif
|
||||
/* 可用窗口高度 - 搜索框高 - 状态栏高 */
|
||||
this.listHeight = uni.getSystemInfoSync().windowHeight - uni.getSystemInfoSync().statusBarHeight - this
|
||||
.navBarHeight + 'px'; // 计算列表高度
|
||||
|
||||
this.where = {uid: this.userInfo._id};
|
||||
console.log(this.where)
|
||||
this.$refs.udb.loadData();
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
/* #ifndef APP-NVUE */
|
||||
.pages view {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.pages {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.refresh {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nav-box {
|
||||
background-color: #FFFFFF;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
/* #ifndef APP-PLUS */
|
||||
z-index: 9;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.pages .nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.uni-search-box {
|
||||
flex: 1;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.uni-search-box ::v-deep .uni-searchbar {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.uni-search-box ::v-deep .uni-searchbar__box {
|
||||
height: 32px;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.cover-search-bar {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
/* #ifndef APP-NVUE */
|
||||
z-index: 999;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.pages .uni-list ::v-deep .uni-list-item__container {
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pages .uni-list ::v-deep .uni-list-item {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.pages .uni-list ::v-deep .uni-load-more {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.pages .uni-list ::v-deep .uni-list--border:after {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.main {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
padding-top: 24rpx;
|
||||
padding-bottom: 24rpx;
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.thumbnails {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
.img {
|
||||
flex: 1;
|
||||
/* #ifndef APP-NVUE */
|
||||
width: auto;
|
||||
/* #endif */
|
||||
height: 200rpx;
|
||||
border-radius: 8rpx;
|
||||
margin: 0 10rpx;
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.author,
|
||||
.publish_date {
|
||||
font-size: 24rpx;
|
||||
color: #bbbbbb;
|
||||
}
|
||||
|
||||
.publish_date {
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 父容器设置 */
|
||||
.follow-item {
|
||||
will-change: transform; /* 启用GPU加速 */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 24rpx;
|
||||
margin: 20rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
/* 头像区块 (占1份) */
|
||||
.avatar-container {
|
||||
flex: 1;
|
||||
min-width: 0; /* 防止内容溢出 */
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
/* 信息区块 (占3份) */
|
||||
.info-container {
|
||||
flex: 3;
|
||||
min-width: 0; /* 关键:允许文本截断 */
|
||||
overflow: hidden;
|
||||
}
|
||||
.name {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1; /* 单行显示 */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 按钮区块 (占2份) */
|
||||
.btn-container {
|
||||
flex:1.5;
|
||||
text-align: center;
|
||||
padding: 12rpx 24rpx;
|
||||
border: 1rpx solid #07C160;
|
||||
border-radius: 40rpx;
|
||||
color: #07C160;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.btn-container.followed {
|
||||
border-color: #CCCCCC;
|
||||
color: #666666;
|
||||
background: #F8F8F8;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -92,7 +92,7 @@
|
||||
import {
|
||||
store,
|
||||
mutations
|
||||
} from '@/uni_modules/uni-id-pages/common/store.js';
|
||||
} from '@/pages3/uni_modules/uni-id-pages/common/store.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
import {
|
||||
store,
|
||||
mutations
|
||||
} from '@/uni_modules/uni-id-pages/common/store.js';
|
||||
} from '@/pages3/uni_modules/uni-id-pages/common/store.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -161,7 +161,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
emptyAvatar: "https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/center/avatar.png?expire_at=1741157497&er_sign=9b8381ae7875137d28c57d502762691b",
|
||||
emptyAvatar: "https://qnycdn.mymoyu.top/static/avatar.jpg",
|
||||
tags_v: [],
|
||||
tags: [
|
||||
|
||||
|
||||
@@ -5,10 +5,15 @@
|
||||
<view class="tui-item-box align-center">
|
||||
<view class="tui-list-cell_name">头像</view>
|
||||
<view class="tui-right">
|
||||
<cloud-image v-if="userInfo.avatar_file" class="avatar"
|
||||
<cloud-image v-if="userInfo.avatar_file && checkUrlProtocol(userInfo.avatar_file.url) === 'cloud'" class="avatar"
|
||||
:src="userInfo.avatar_file.url"></cloud-image>
|
||||
<image class="cu-avatar"
|
||||
v-else-if="userInfo.avatar_file && checkUrlProtocol(userInfo.avatar_file.url) === 'http/https'"
|
||||
:src="userInfo.avatar_file.url"
|
||||
mode=""
|
||||
v-else></image>
|
||||
<image class="cu-avatar"
|
||||
src="https://env-00jxt5y29hrd.normal.cloudstatic.cn/static/center/avatar.png?expire_at=1741157497&er_sign=9b8381ae7875137d28c57d502762691b"
|
||||
src="https://qnycdn.mymoyu.top/static/avatar.jpg"
|
||||
mode=""
|
||||
v-else></image>
|
||||
</view>
|
||||
@@ -75,7 +80,7 @@
|
||||
</view>
|
||||
<tui-modal :show="modal1" :custom="true" @cancel="modal1 = !modal1" fadeIn >
|
||||
<view class="tui-modal-custom">
|
||||
<view class="tui-prompt-title">请输入昵称</view>
|
||||
<view class="tui-prompt-title">{{ getMessage(currentEdit) }}</view>
|
||||
<input v-show="currentEdit === 0" placeholder="请输入新昵称" class="tui-modal-input"
|
||||
:class="{'tui-hidden-input':!modal1}"
|
||||
v-model="updateForm.nickname" />
|
||||
@@ -104,7 +109,7 @@
|
||||
import {
|
||||
store,
|
||||
mutations
|
||||
} from '@/uni_modules/uni-id-pages/common/store.js';
|
||||
} from '@/pages3/uni_modules/uni-id-pages/common/store.js';
|
||||
|
||||
import tuiListView from "@/components/thorui/tui-list-view/tui-list-view.vue";
|
||||
import tuiListCell from "@/components/thorui/tui-list-cell/tui-list-cell.vue";
|
||||
@@ -149,12 +154,40 @@
|
||||
// this.updateForm.gender = this.loginUser.gender;
|
||||
},
|
||||
methods: {
|
||||
checkUrlProtocol(url) {
|
||||
try {
|
||||
const protocolSeparatorIndex = url.indexOf('://');
|
||||
if (protocolSeparatorIndex === -1) {
|
||||
return 'invalid';
|
||||
}
|
||||
const protocol = url.substring(0, protocolSeparatorIndex).toLowerCase();
|
||||
|
||||
if (protocol === 'http' || protocol === 'https') {
|
||||
return 'http/https';
|
||||
} else if (protocol === 'cloud') {
|
||||
return 'cloud';
|
||||
} else {
|
||||
return 'other';
|
||||
}
|
||||
} catch (error) {
|
||||
return 'invalid';
|
||||
}
|
||||
},
|
||||
getMessage(currentEdit) {
|
||||
if (currentEdit === 0) {
|
||||
return "请输入你的昵称";
|
||||
} else if (currentEdit === 1 ) {
|
||||
return "请填写你的个人简介";
|
||||
} else if (currentEdit === 2) {
|
||||
return "请选择你的性别";
|
||||
}
|
||||
},
|
||||
handleToRepassword () {
|
||||
// if (!this.userInfo.mobile) {
|
||||
// console.log("需要绑定手机号!");
|
||||
// return;
|
||||
// }
|
||||
uni.navigateTo({url: `../../uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd` })
|
||||
uni.navigateTo({url: `../../pages3/uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd` })
|
||||
},
|
||||
handleShowModal (index) {
|
||||
this.currentEdit = index
|
||||
@@ -201,7 +234,7 @@
|
||||
// 绑定手机号
|
||||
handleBindMobile () {
|
||||
uni.navigateTo({
|
||||
url: `../../uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile`
|
||||
url: `../../pages3/uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile`
|
||||
})
|
||||
},
|
||||
// 更换头像
|
||||
|
||||
Reference in New Issue
Block a user