手机号修改
This commit is contained in:
parent
5005d00a48
commit
c00771ec5a
10
src/app.wpy
10
src/app.wpy
@ -35,7 +35,7 @@ wepy.app({
|
||||
}
|
||||
},
|
||||
globalData: {
|
||||
versions: 'v5.5.89', // 版本号
|
||||
versions: 'v5.5.93', // 版本号
|
||||
navBarHeight: 0, // 导航栏高度
|
||||
navRight: 0, // 胶囊距右方间距(方保持左、右间距一致)
|
||||
navTop: 0, // 胶囊距顶部间距
|
||||
@ -48,9 +48,15 @@ wepy.app({
|
||||
bottomHeight: 0 // 底部小黑条的高度
|
||||
},
|
||||
|
||||
onLaunch() {
|
||||
onLaunch(e) {
|
||||
let vm = this
|
||||
console.log(e, 'uuu=')
|
||||
vm.appLogin()
|
||||
console.log(e, 'e=')
|
||||
console.log(decodeURIComponent(e.query.scene), 'e=')
|
||||
if (e.path === 'pages/home/informationV2') {
|
||||
wx.redirectTo({ url: `/pages/home/information?${decodeURIComponent(e.query.scene)}` })
|
||||
}
|
||||
initEid()
|
||||
wx.getSystemInfo({
|
||||
success: res => {
|
||||
|
||||
@ -1344,6 +1344,7 @@ wepy.page({
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e, 'e==')
|
||||
let vm = this
|
||||
vm.userData = wx.getStorageSync('userInfo')
|
||||
vm.userId = wx.getStorageSync('user_id')
|
||||
@ -1365,6 +1366,9 @@ wepy.page({
|
||||
}
|
||||
} else {
|
||||
vm.id = e.id
|
||||
if (e.from_user_id) {
|
||||
wx.setStorageSync('from_user_id', e.from_user_id)
|
||||
}
|
||||
}
|
||||
vm.getDetail()
|
||||
vm.getDynamic()
|
||||
|
||||
@ -39,7 +39,7 @@ page {
|
||||
}
|
||||
._list{
|
||||
padding: 0 50rpx;
|
||||
margin-top: 80rpx;
|
||||
margin-top: 42rpx;
|
||||
.getMobile{
|
||||
height: 55rpx;
|
||||
padding: 0 16rpx !important;
|
||||
@ -53,6 +53,49 @@ page {
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
}
|
||||
.ui-phone-box{
|
||||
margin-top: 40rpx;
|
||||
padding: 8rpx 32rpx;
|
||||
border-radius: 32rpx;
|
||||
background: #F8F8F8;
|
||||
.ui-phone-item{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding:32rpx 0rpx;
|
||||
border-bottom: 2rpx solid rgba(221, 221, 221, .7);
|
||||
}
|
||||
.ui-phone-item:nth-child(2){
|
||||
border-bottom: 0;
|
||||
}
|
||||
.ui-phone-item-v2{
|
||||
justify-content: space-between;
|
||||
}
|
||||
.ui-phone-code{
|
||||
padding:16rpx 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color:#FF5380;
|
||||
border-radius: 20rpx;
|
||||
background: #FFE9EF;
|
||||
white-space: nowrap
|
||||
}
|
||||
.ui-phone-code-send{
|
||||
color: #ececec;
|
||||
background: #f8f8f8;
|
||||
border: 2rpx solid #ececec;
|
||||
|
||||
}
|
||||
}
|
||||
.radio-group{
|
||||
.radio-left{
|
||||
margin-right: 100rpx;
|
||||
}
|
||||
.itemRadio{
|
||||
transform: scale(.8);
|
||||
background: #f8f8f8;
|
||||
}
|
||||
}
|
||||
._listItem{
|
||||
margin-top: 30rpx;
|
||||
position: relative;
|
||||
@ -106,7 +149,7 @@ page {
|
||||
height: 88rpx;
|
||||
background: rgba(255, 83, 128, 0.6);
|
||||
border-radius: 100rpx;
|
||||
margin-top: 124rpx;
|
||||
margin-top: 82rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.btn-box.sel {
|
||||
@ -138,57 +181,85 @@ button::after{
|
||||
</view>
|
||||
</view>
|
||||
<view class="_list">
|
||||
<view class="_listItem animation-slide-bottom" style="animation-delay: 0.2s;">
|
||||
<input type="text" class="font_28 color-333 name ui-mb-12" placeholder="昵称|请输入2-10个字符" @change="typeing('name', $wx)" maxlength="10" />
|
||||
<view class="_listItem animation-slide-bottom f-fbc" style="animation-delay: 0.2s;">
|
||||
<view class="font_30 color-333">昵称</view>
|
||||
<view class="" style="flex:1">
|
||||
<input type="text" class="font_30 color-333 name ui-mb-12 text-r" placeholder="请输入2-10个字符" placeholder-class="text-r" @change="typeing('name', $wx)" maxlength="10" />
|
||||
</view>
|
||||
</view>
|
||||
<picker mode="date" :value="startDate" end="{{endDate}}" @change="typeing('birthday', $wx)">
|
||||
<view class="_listItem animation-slide-bottom f-fbc" style="animation-delay: 0.3s;">
|
||||
<view class="font_28 color-333">你的生日</view>
|
||||
<view class="f-fc">
|
||||
<input type="text" class="font_28 color-333 text inline-block" placeholder-class="font_24" v-model="birthday" disabled placeholder="真实信息提高你的自身魅力" />
|
||||
<view class="font_family icon-jiantoubeifen7 font_24 ui-mt-4"></view>
|
||||
<view class="font_30 color-333">你的生日</view>
|
||||
<view class="f-fc" style="flex:1">
|
||||
<input type="text" class="font_30 color-333 text inline-block" placeholder-class="font_30" v-model="birthday" disabled placeholder="真实信息提高你的自身魅力" />
|
||||
<view class="font_family icon-jiantoubeifen7 font_24 ui-mt-4" ></view>
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
<button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
|
||||
<view class="_listItem animation-slide-bottom f-fbc" style="animation-delay: 0.3s;">
|
||||
<view class="font_28 color-333">绑定手机</view>
|
||||
<view class="f-fc">
|
||||
<input type="text" class="font_28 color-333 text inline-block" placeholder-class="font_24" v-model="mobile" disabled placeholder="获取微信绑定手机号" />
|
||||
<view class="font_family icon-jiantoubeifen7 font_24 ui-mt-4"></view>
|
||||
</view>
|
||||
</view>
|
||||
</button>
|
||||
<view class="g_gender animation-slide-bottom" style="animation-delay: 0.4s;">
|
||||
<view class="u_gender_tt font_26 color999">性别|保存后不可更改</view>
|
||||
<view class="f-fc font_28 color333">
|
||||
<view class="u_gender f-fcc {{sex == '男' ? 'male' : ''}}" @tap="changeSex('男')">男</view>
|
||||
<view class="u_gender f-fcc {{sex == '女' ? 'female' : ''}}" @tap="changeSex('女')">女</view>
|
||||
<view class="ui-phone-box">
|
||||
<div class="ui-phone-item">
|
||||
<input type="number" class="font_30 color-333 text inline-block" placeholder-class="font_30" v-model="mobile" placeholder="填写手机号" />
|
||||
</div>
|
||||
<div class="ui-phone-item-v2 ui-phone-item" >
|
||||
<input type="number" class="font_30 color-333 text inline-block" maxlength="6" placeholder-class="font_30" v-model="code" placeholder="请输入验证码" />
|
||||
<view class="ui-phone-code font_30 {{time == 0 ? '' : ''}}" style="flex:1" @tap="getCode">{{time == 0 ? '获取验证码' : btnText}}</view>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <button class="btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">-->
|
||||
<!-- <view class="_listItem animation-slide-bottom f-fbc" style="animation-delay: 0.3s;">-->
|
||||
<!-- <view class="font_28 color-333">绑定手机</view>-->
|
||||
<!-- <view class="f-fc">-->
|
||||
<!-- <input type="text" class="font_28 color-333 text inline-block" placeholder-class="font_24" v-model="mobile" disabled placeholder="获取微信绑定手机号" />-->
|
||||
<!-- <view class="font_family icon-jiantoubeifen7 font_24 ui-mt-4"></view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </button>-->
|
||||
<view class="_listItem animation-slide-bottom f-fbc" style="animation-delay: 0.3s;">
|
||||
<view class="font_30 color-333">性别</view>
|
||||
<view class="f-fec text-r" style="flex:1">
|
||||
<radio-group class="radio-group" bindchange="sexChange">
|
||||
<label class="radio radio-left">
|
||||
<radio value="男" class="itemRadio mainColor ui-mr-20" color="#f8f8f8" :checked="sex=='男'" />男
|
||||
</label>
|
||||
<label class="radio">
|
||||
<radio value="女" class="itemRadio mainColor ui-mr-20" color="#f8f8f8" :checked="sex=='女'" />女
|
||||
</label>
|
||||
</radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u_gender_tt font_26 color999 ui-mt-12 animation-slide-bottom f-fbc" style="animation-delay: 0.3s;">保存后不可更改</view>
|
||||
<!-- <view class="g_gender animation-slide-bottom" style="animation-delay: 0.4s;">-->
|
||||
<!-- <view class="u_gender_tt font_26 color999">性别|保存后不可更改</view>-->
|
||||
<!-- <view class="f-fc font_28 color333">-->
|
||||
<!-- <view class="u_gender f-fcc {{sex == '男' ? 'male' : ''}}" @tap="changeSex('男')">男</view>-->
|
||||
<!-- <view class="u_gender f-fcc {{sex == '女' ? 'female' : ''}}" @tap="changeSex('女')">女</view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<view class="_listItem animation-slide-bottom f-fbc" style="animation-delay: 0.5s;">
|
||||
<view class="f-fbc m_ct" @tap="residenceShow = true">
|
||||
<view class="font_28 color-333">目前居住地</view>
|
||||
<view class="f-fc">
|
||||
<input type="text" class="font_28 color-333 text inline-block" placeholder-class="font_24" disabled placeholder="匹配度提高90%" value="{{displayCity}}"/>
|
||||
<view class="font_30 color-333">目前居住地</view>
|
||||
<view class="f-fc" style="flex:1">
|
||||
<input type="text" class="font_30 color-333 text inline-block" placeholder-class="font_24" disabled placeholder="匹配度提高90%" value="{{displayCity}}"/>
|
||||
<view class="font_family icon-jiantoubeifen7 font_24"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<picker :value="emotionIndex" range="{{emotionList}}" @change="typeListing('emotion', 'emotionList', $wx)" >
|
||||
<view class="_listItem animation-slide-bottom f-fbc" style="animation-delay: 0.6s;">
|
||||
<view class="font_28 color-333">情感状况</view>
|
||||
<view class="f-fc">
|
||||
<input type="text" class="font_28 color-333 text inline-block" disabled placeholder="请选择你的情感状况" v-model="emotion" />
|
||||
<view class="font_30 color-333">情感状况</view>
|
||||
<view class="f-fc" style="flex:1">
|
||||
<input type="text" class="font_30 color-333 text inline-block" disabled placeholder="请选择你的情感状况" v-model="emotion" />
|
||||
<view class="font_family icon-jiantoubeifen7 font_24"></view>
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
<picker :value="beliefIndex" range="{{beliefList}}" @change="typeListing('belief', 'beliefList', $wx)" >
|
||||
<view class="_listItem animation-slide-bottom f-fbc" style="animation-delay: 0.7s;">
|
||||
<view class="font_28 color-333">信仰</view>
|
||||
<view class="f-fc">
|
||||
<input type="text" class="font_28 color-333 text inline-block" disabled placeholder="请选择你的信仰" v-model="belief" />
|
||||
<view class="font_30 color-333">信仰</view>
|
||||
<view class="f-fc" style="flex:1">
|
||||
<input type="text" class="font_30 color-333 text inline-block" disabled placeholder="请选择你的信仰" v-model="belief" />
|
||||
<view class="font_family icon-jiantoubeifen7 font_24"></view>
|
||||
</view>
|
||||
</view>
|
||||
@ -226,6 +297,11 @@ wepy.page({
|
||||
endDate: '', // 出生日期结束时间
|
||||
|
||||
mobile: '',
|
||||
code: '',
|
||||
time: 0,
|
||||
timer: null,
|
||||
loading: false,
|
||||
btnText: '',
|
||||
sex: '',
|
||||
|
||||
address: {country: '', province: '', city: ''},
|
||||
@ -259,6 +335,11 @@ wepy.page({
|
||||
vm.endDate = `${Y - 12}-01-01`
|
||||
vm.beginData = `${Y - 120}-01-01`
|
||||
},
|
||||
computed: {
|
||||
btnText() {
|
||||
return +this.time > 0 ? `${this.time}s` : `获取验证码`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hideCut(e) {
|
||||
wx.showTabBar({
|
||||
@ -266,6 +347,48 @@ wepy.page({
|
||||
})
|
||||
this.chooseShow = e.chooseShow
|
||||
},
|
||||
// 获取验证码
|
||||
getCode() {
|
||||
let vm = this
|
||||
if (!vm.mobile) {
|
||||
vm.$showToast('请输入手机号')
|
||||
return
|
||||
}
|
||||
// 防抖
|
||||
if (vm.loading || vm.time > 0) return
|
||||
// 开防抖
|
||||
vm.loading = true
|
||||
// 根据业务接口处理:发送验证码
|
||||
let data = {
|
||||
mobile: vm.mobile
|
||||
}
|
||||
vm.$showLoading('加载中...')
|
||||
vm.$post({url: `${service.host}/register/sms/code`, data}).then(res => {
|
||||
wx.hideLoading()
|
||||
if (res.code === 1) {
|
||||
return
|
||||
}
|
||||
// 开倒计时
|
||||
vm.timing(60)
|
||||
vm.$showToast(`发送成功`)
|
||||
})
|
||||
},
|
||||
timing(time) {
|
||||
this.time = time
|
||||
this.timer = setTimeout(() => {
|
||||
if (time > 0) {
|
||||
this.timing(time - 1)
|
||||
} else {
|
||||
this.loading = false
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
// 选择性别
|
||||
sexChange(e) {
|
||||
console.log(e, 'e===')
|
||||
this.sex = e.$wx.detail.value
|
||||
console.log(this.sex, 'sex==')
|
||||
},
|
||||
complete() {
|
||||
let vm = this
|
||||
console.log(this.photo, vm.photo, 'vm.photo==')
|
||||
@ -292,6 +415,9 @@ wepy.page({
|
||||
if (!vm.mobile) {
|
||||
return vm.$showToast('请选择绑定手机号')
|
||||
}
|
||||
if (!vm.code) {
|
||||
return vm.$showToast('请输入验证码')
|
||||
}
|
||||
if (!vm.birthday) {
|
||||
return vm.$showToast('请选择你的生日')
|
||||
}
|
||||
@ -315,7 +441,8 @@ wepy.page({
|
||||
country: vm.address.country,
|
||||
province: vm.address.province,
|
||||
city: vm.address.city,
|
||||
birthday: vm.birthday
|
||||
birthday: vm.birthday,
|
||||
code: vm.code
|
||||
// userInfo: vm.userInfo,
|
||||
// openid: vm.openid,
|
||||
// unionid: vm.unionid,
|
||||
@ -327,6 +454,7 @@ wepy.page({
|
||||
console.log(userInfo, '===')
|
||||
userInfo.is_base_profile = true
|
||||
wx.setStorageSync('userInfo', userInfo)
|
||||
wx.setStorageSync('mobile', vm.mobile) // 用户手机号
|
||||
vm.$showToast('注册成功')
|
||||
setTimeout(() => {
|
||||
wx.hideLoading()
|
||||
|
||||
@ -299,12 +299,12 @@ page {
|
||||
.ui-adv-box{
|
||||
position: fixed;
|
||||
bottom: 270rpx;
|
||||
right: 0rpx;
|
||||
right: 8rpx;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
height: 144rpx;
|
||||
color:#ffffff;
|
||||
z-index: 1000;
|
||||
background: url('https://image.fulllinkai.com/202501/07/92fabd6990d6c166d3352cf95987049f.png');
|
||||
background: url('https://images.health.ufutx.com/202502/21/5f8a2d1d65bec51b00ff04f268b93e16.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.ui-adv-message{
|
||||
@ -372,7 +372,7 @@ page {
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
.ui-adv-modal{
|
||||
width: 750rpx;
|
||||
width: 600rpx;
|
||||
height: auto;
|
||||
}
|
||||
.loginCancelIcon {
|
||||
@ -398,7 +398,7 @@ page {
|
||||
</block>
|
||||
</swiper>
|
||||
<view :class="{'ui-fade-out': isScroll,'ui-fade-in': !isScroll}" class="ui-adv-box" v-if="!isClickClose" @tap="goToShop">
|
||||
<view class="ui-adv-message ui--message-fade"></view>
|
||||
<!-- <view class="ui-adv-message ui--message-fade"></view>-->
|
||||
<div class="ui-adv-close" @tap.stop="isClickClose = true"></div>
|
||||
</view>
|
||||
<view class="f-fbc ui-pl-30 ui-pt-40 ui-pr-30">
|
||||
@ -561,9 +561,8 @@ page {
|
||||
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
|
||||
<view :class="{'show':modalName=='showAdv'}" class="cu-modal">
|
||||
<view class="login_prompt_box">
|
||||
<image class="ui-adv-modal" src="https://images.health.ufutx.com/202501/20/74741729fde432c9f29a0012885d1d43.png"
|
||||
mode="widthFix" @tap="goToShop">
|
||||
|
||||
<image class="ui-adv-modal" :src="advModal.pic"
|
||||
mode="widthFix" @tap="goToShop(advModal)">
|
||||
</image><image class="loginCancelIcon" src="https://image.fulllinkai.com/202501/07/3a14b8cc539285e3ba96b0977749bfc5.png"
|
||||
mode="widthFix" @tap="hideModal"></image>
|
||||
</view>
|
||||
@ -609,6 +608,11 @@ wepy.page({
|
||||
{url: 'https://health.ufutx.com/go_html/store_common#/agentHome', img: 'https://images.health.ufutx.com/202412/20/68a61ecd8f5255ab557747d95cf2cae6.jpeg'}
|
||||
],
|
||||
modalName: '', //
|
||||
advModal: {
|
||||
id: 0,
|
||||
pic: '',
|
||||
shop_id: null
|
||||
}, //
|
||||
url: 'other/user/square' // 精准推荐
|
||||
|
||||
},
|
||||
@ -808,9 +812,37 @@ wepy.page({
|
||||
let vm = this
|
||||
vm.loginShow = false
|
||||
},
|
||||
getBannerList() {
|
||||
let vm = this
|
||||
vm.$get({url: `${service.host}/dma/carousel/list`}).then(({code, data}) => {
|
||||
if (code === 0) {
|
||||
vm.swiperList = data.map(item => {
|
||||
return {
|
||||
img: item.icon,
|
||||
shop_id: item.shop_id,
|
||||
program: item.program
|
||||
}
|
||||
}).filter((item) => {
|
||||
return !item.program
|
||||
})
|
||||
}
|
||||
wx.hideLoading()
|
||||
}).catch(err => {
|
||||
wx.hideLoading()
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
goToShop(item) {
|
||||
let name = wx.getStorageSync('userInfo').name || ''
|
||||
let mobile = wx.getStorageSync('mobile') || ''
|
||||
console.log(item, 'ite-==')
|
||||
if (item && item.shop_id) {
|
||||
wx.navigateToMiniProgram({
|
||||
appId: 'wxe486777f4379507e',
|
||||
path: `/pages/sub_page/shopDetail?id=${item.shop_id}&name=${name}&mobile=${mobile}`
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateToMiniProgram({
|
||||
appId: 'wxe486777f4379507e',
|
||||
path: `/pages/sub_page/shopListV2?name=${name}&mobile=${mobile}`
|
||||
@ -852,7 +884,11 @@ wepy.page({
|
||||
vm.getEveryday()
|
||||
vm.getSquare()
|
||||
vm.applyTopUpState()
|
||||
// vm.modalName = 'showAdv'
|
||||
vm.getBannerList()
|
||||
vm.advModal = wx.getStorageSync('adv')
|
||||
if ((vm.advModal.id - 0) > 0) {
|
||||
vm.modalName = 'showAdv'
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -205,7 +205,7 @@
|
||||
content: '请先绑定手机号后再真人认证',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
vm.$goto('/pages/users/setTing')
|
||||
vm.$goto('/pages/home/information')
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消')
|
||||
}
|
||||
|
||||
@ -5,22 +5,12 @@
|
||||
<view class="u_lst f-fbc" >
|
||||
<view class="u_lst f-fbc">
|
||||
<view class="f-fc">
|
||||
<view class="font_30 " >手机号绑定</view>
|
||||
<view class="font_30 " >手机号</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="color-999 font_28">{{phoneNumber}}</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<button class="u_lst f-fbc btn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
|
||||
<view class="u_lst f-fbc">
|
||||
<view class="f-fc">
|
||||
<view class="font_30 " >手机号绑定</view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="u_lst_you" mode="widthFix" src="https://images.ufutx.com/202012/23/f9713dc39b5d236067834ea0f1a6edaf.png"></image>
|
||||
</button>
|
||||
</block>
|
||||
</view>
|
||||
<view class="m_lst" v-for="(itemV1,indexV1) in lists" :key="indexV1">
|
||||
<block v-for="(item,index) in itemV1" :key="index">
|
||||
|
||||
@ -52,6 +52,7 @@ const wx_login = () => {
|
||||
wx.setStorageSync('openid', (data.openid))
|
||||
wx.setStorageSync('user_id', data.user.id) // 用户id
|
||||
wx.setStorageSync('mobile', data.user.mobile) // 用户手机号
|
||||
wx.setStorageSync('adv', data.adv) // 首页弹窗广告
|
||||
if (data.user.hidden_profile == 'ALLSEX') { // 资料是否关闭
|
||||
wx.setStorageSync('logoutCode', 1)
|
||||
wx.redirectTo({url: '/pages/users/logoutDefault'})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user