This commit is contained in:
lanzhihui 2024-11-13 09:16:45 +08:00
parent 31d6a9f499
commit fd9da9e895
10 changed files with 68 additions and 22 deletions

View File

@ -35,7 +35,7 @@ wepy.app({
} }
}, },
globalData: { globalData: {
versions: 'v5.5.77', // 版本号 versions: 'v5.5.78', // 版本号
navBarHeight: 0, // 导航栏高度 navBarHeight: 0, // 导航栏高度
navRight: 0, // 胶囊距右方间距(方保持左、右间距一致) navRight: 0, // 胶囊距右方间距(方保持左、右间距一致)
navTop: 0, // 胶囊距顶部间距 navTop: 0, // 胶囊距顶部间距

View File

@ -204,7 +204,7 @@ scroll-view {
<template> <template>
<block v-for="(item,index) in list" :key="index"> <block v-for="(item,index) in list" :key="index">
<view class="~f-fl ~ui-pl-30 ~ui-pr-30 ~ui-pt-30 ~ui-relative" @tap="jumpPath(from == 'myDynamic' ? `/pages/users/myDynamicDetail?id=${item.id}` : `/pages/dynamic/dynamicDetail?id=${item.id}`)"> <view class="~f-fl ~ui-pl-30 ~ui-pr-30 ~ui-pt-30 ~ui-relative" @tap="jumpPath(from == 'myDynamic' ? `/pages/users/myDynamicDetail?id=${item.id}` : `/pages/dynamic/dynamicDetail?id=${item.id}`)">
<view class="ui-user-pic" style="{{'background-image:url(' + (item.user.photo || 'https://image.fulllinkai.com/202203/09/cc1c73eb1a4941fef25a15cd1ff2f9df.png') + ')'}}" @tap.stop="jumpPath(`/pages/home/information?id=${item.user_id}`)"></view> <view class="ui-user-pic" style="{{'background-image:url(' + (item.user.photo || 'https://image.fulllinkai.com/202203/09/cc1c73eb1a4941fef25a15cd1ff2f9df.png') + ')'}}" @tap.stop="jumpPathV2(`/pages/home/information?id=${item.user_id}`)"></view>
<view class="~color999 ~font_24 ui-time">{{ item.create_time }}</view> <view class="~color999 ~font_24 ui-time">{{ item.create_time }}</view>
<view class="~ui-pl-16"> <view class="~ui-pl-16">
<view class="~f-fc"> <view class="~f-fc">
@ -417,6 +417,21 @@ scroll-view {
} }
console.log('333--') console.log('333--')
wx.navigateTo({url: url}) wx.navigateTo({url: url})
},
jumpPathV2(url, type) {
let vm = this
// 校验是否完成注册资料
if (!vm.$signInVerify()) {
vm.$emit('signInVerify')
return
}
console.log(vm.from, url, type, '7777')
if (vm.from != 'dynamicDetail') {
console.log('44---')
return
}
console.log(vm.from, '333-13-')
wx.navigateTo({url: url})
} }
}, },
created() {} created() {}

View File

@ -358,6 +358,7 @@ wepy.page({
} }
if (!vm.value) { if (!vm.value) {
vm.$showToast('请输入动态内容') vm.$showToast('请输入动态内容')
return
} }
if (vm.throttle) { if (vm.throttle) {
vm.throttle = false vm.throttle = false

View File

@ -304,7 +304,7 @@ wepy.page({
if (!vm.belief) { if (!vm.belief) {
return vm.$showToast('请选择你的信仰') return vm.$showToast('请选择你的信仰')
} }
vm.$showLoading('') vm.$showLoading('注册中')
let data = { let data = {
photo: vm.photo, photo: vm.photo,
nickname: vm.name, nickname: vm.name,
@ -327,9 +327,12 @@ wepy.page({
console.log(userInfo, '===') console.log(userInfo, '===')
userInfo.is_base_profile = true userInfo.is_base_profile = true
wx.setStorageSync('userInfo', userInfo) wx.setStorageSync('userInfo', userInfo)
wx.switchTab({url: '/pages/tabBar/home'}) vm.$showToast('注册成功')
} setTimeout(() => {
wx.hideLoading() wx.hideLoading()
wx.switchTab({url: '/pages/tabBar/home'})
}, 1200)
}
}).catch(err => { }).catch(err => {
wx.hideLoading() wx.hideLoading()
console.log(err) console.log(err)

View File

@ -262,10 +262,10 @@ wepy.page({
getPhoneNumber({$wx: e}) { // 获取手机号 getPhoneNumber({$wx: e}) { // 获取手机号
let vm = this let vm = this
if (e.detail.iv) { if (e.detail.iv) {
getPhoneNumber(e).then(({mobile}) => { getPhoneNumber(e).then(({phone}) => {
console.log(mobile, '11111') console.log(phone, '11111')
if (mobile) { if (phone) {
vm.mobile = mobile vm.mobile = phone
console.log(vm.mobile) console.log(vm.mobile)
vm.bindMobile() vm.bindMobile()
} }

View File

@ -525,10 +525,12 @@
url: `${service.user}/center`, url: `${service.user}/center`,
data data
}).then(({code, data}) => { }).then(({code, data}) => {
// var repTime = (data.user.created_at).replace(/-/g, '/')// 用正则兼容ios console.log(wx.getStorageSync('userInfo'), 'wx.getStorageSync(\'userInfo\')=')
// var recordTime = String(parseFloat(new Date(repTime).getTime()) / 1000) let repTime = (wx.getStorageSync('userInfo').create_time).replace(/-/g, '/')// 用正则兼容ios
// self.UID = recordTime.substring(recordTime.length - 5) + String(data.id) let recordTime = String(parseFloat(new Date(repTime).getTime()) / 1000)
wx.setStorageSync('UID', self.UID) console.log(recordTime, 'recordTime')
self.UID = recordTime.substring(recordTime.length - 5) + String(data.user.id)
wx.setStorageSync('UID', self.user.UID)
self.shareConfig.images[1].url = data.share_qrcode self.shareConfig.images[1].url = data.share_qrcode
self.posterConfig = self.shareConfig self.posterConfig = self.shareConfig
console.log(self.posterConfig, '333===0999') console.log(self.posterConfig, '333===0999')
@ -640,11 +642,12 @@
wx.hideLoading() wx.hideLoading()
}, },
getPhoneNumber(e) { // 获取手机号 getPhoneNumber({$wx: e}) { // 获取手机号
let vm = this let vm = this
if (e.$wx.detail.iv) { console.log(e, 'e==')
getPhoneNumber(e).then(({phoneNumber}) => { if (e.detail.iv) {
if (phoneNumber) { getPhoneNumber(e).then(({phone}) => {
if (phone) {
vm.isShowIphoneBtn = false vm.isShowIphoneBtn = false
vm.$showToast('绑定成功') vm.$showToast('绑定成功')
} }

View File

@ -75,7 +75,18 @@
<view class="mainTitle bold font_28 color-999">个人资料</view> <view class="mainTitle bold font_28 color-999">个人资料</view>
<view class="m_section"> <view class="m_section">
<view class="u_section"> <view class="u_section">
<picker mode="date" value="1990-01-01" end="{{endDate}}" @change="typing('birthday',$event)"> <block v-if="realApproved">
<view class="m_basLst f-fbc" @tap="bindTips('认证后出生日期无法修改哦,如有需要请联系客服')">
<view>
<span class="font_28 color-333 bold">出生日期</span>
</view>
<view class="f-fc">
<text class="font_28 color-333">{{birthday}}</text>
<image class="tips_icon" src="https://image.fulllinkai.com/202108/19/1e592d8cc35396e3142d9bd40093abe9.png" mode="aspectFit"></image>
</view>
</view>
</block>
<picker v-else mode="date" value="1990-01-01" end="{{endDate}}" @change="typing('birthday',$event)">
<view class="m_secLst f-fbc"> <view class="m_secLst f-fbc">
<span class="font_28 color-333 bold">出生日期</span> <span class="font_28 color-333 bold">出生日期</span>
<view class="font_28 f-fc"> <view class="font_28 f-fc">
@ -227,6 +238,7 @@
CITY_INDEX: 0, CITY_INDEX: 0,
photos: [], photos: [],
CITY_INDEX1: 1, CITY_INDEX1: 1,
realApproved: false,
birthday: '', birthday: '',
name: '', name: '',
nickname: '', nickname: '',
@ -385,6 +397,12 @@
if (result.birthday) { if (result.birthday) {
that.birthday = result.birthday that.birthday = result.birthday
} }
if (wx.getStorageSync('userInfo')) {
console.log(wx.getStorageSync('userInfo').is_real_approved, '09')
if (wx.getStorageSync('userInfo').is_real_approved == 1) {
that.realApproved = true
}
}
if (result.province) { if (result.province) {
that.region = [result.country, result.province, result.city] that.region = [result.country, result.province, result.city]
} }

View File

@ -1100,6 +1100,9 @@
that._approveList[0].active = true that._approveList[0].active = true
} }
if (data.is_real_approved == '1') { // 真人 if (data.is_real_approved == '1') { // 真人
let userInfo = wx.getStorageSync('userInfo') // 真人认证更新后存入
userInfo.is_real_approved = data.is_real_approved
wx.setStorageSync('userInfo', userInfo)
that._approveList[1].active = true that._approveList[1].active = true
} }
if (data.is_educate_approved == '1') { // 学历 if (data.is_educate_approved == '1') { // 学历

View File

@ -69,7 +69,8 @@ const wx_login = () => {
rank_id: data.user.rank_id, rank_id: data.user.rank_id,
sex: data.user.sex, sex: data.user.sex,
id: data.user.id, id: data.user.id,
type: data.user.type type: data.user.type,
create_time: data.user.create_time
} }
console.log(userInfo, '7777------') console.log(userInfo, '7777------')
wx.setStorageSync('userInfo', userInfo) // 用户基本信息 wx.setStorageSync('userInfo', userInfo) // 用户基本信息
@ -109,8 +110,10 @@ const getPhoneNumber = ({detail}) => {
method: 'get', method: 'get',
success: ({data: res}) => { success: ({data: res}) => {
let {code, data} = res let {code, data} = res
console.log(data, 'data=')
switch (code) { switch (code) {
case 0: case 0:
wx.setStorageSync('mobile', data.phone)
resolve(data) // 返回参数 resolve(data) // 返回参数
break break
case 1: case 1: