12.12 页面风格改版,增加事件详情相关概念网页跳转,增加绑定手机号功能

This commit is contained in:
尚政杰
2025-12-12 19:35:08 +08:00
parent 44842120da
commit 13c783a0ad
256 changed files with 4046 additions and 2986 deletions

View File

@@ -1,7 +1,7 @@
<template>
<view>
<navBar leftText="信息完善"></navBar>
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
<image class="topBg absolute" src="/static/image/index/conceptTopBg.png" mode="widthFix"></image>
<view class="avatarC fixed" :style="'top:'+avatarTop+'px;'">
<image class="avatar" :src="avatar?avatar:avatarUrl" mode="aspectFill"></image>
<image class="icon absolute" src="/static/icon/mine/basicInfo/edit.png" mode="widthFix"></image>
@@ -14,7 +14,10 @@
<input type="nickname" v-model="nickname" />
</view>
<view class="section">手机号</view>
<view class="selectC flex">{{mobile}}</view>
<view class="selectC flex relative">
{{mobile}}
<button class="absolute" open-type="getPhoneNumber" @getphonenumber="getPhoneNumData"></button>
</view>
<view class="section">性别</view>
<picker mode="selector" :range="sexList" @change="sexChange">
<view class="selectC flex">
@@ -33,7 +36,7 @@
<script>
import { inject } from 'vue';
import { updateBasicInfo, userInfo } from '@/request/api';
import { updateBasicInfo, userInfo, wxBindPhone } from '@/request/api';
import { uploadImg } from '@/utils/util';
export default {
@@ -75,6 +78,31 @@
let value = e.detail.value
this.sex = this.sexList[value]
},
/**
* 获取手机号
* @param {Object} e
*/
getPhoneNumData(e)
{
console.log(e)
if (e.detail.errMsg == 'getPhoneNumber:ok') {
let param = {code:e.detail.code}
wxBindPhone(param).then(res=>{
if (res.code==200) {
uni.showToast({
title:res.message,
})
this.mobile = res.data.phone
}else
uni.showToast({
title:res.message,
icon:'none'
})
}).catch(error=>{
})
}
},
/**
* 点击下一步
*/
@@ -253,6 +281,13 @@
width: 16rpx;
height: auto;
}
button
{
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
.textareaC
{