会员相关功能更新

This commit is contained in:
GaoHao
2024-08-14 10:47:16 +08:00
parent 05c7b85a75
commit 5550649e8a
17 changed files with 2343 additions and 197 deletions

View File

@@ -40,7 +40,7 @@
<view class="list_item">
<view class="list_item_left">生日</view>
<view class="list_item_right flex-center">
<view class="place r" @click="calendarShow = true">生日一旦填写不能修改</view>
<view class="place r" @click="calendarShow = (birthDay ? false : true)"> {{ birthDay || '生日一旦填写不能修改'}}</view>
<!-- <u-calendar @close="calendarShow = false" monthNum="99" minDate="1945-01-01" maxDate="2055-12-12" :show="calendarShow" mode="single" @confirm="confirmCalendar"></u-calendar> -->
<!-- <u-picker :show="calendarShow" ref="uPicker" :columns="columns" @confirm="confirm" @change="changeHandler"></u-picker> -->
<!-- <picker :show="calendarShow" mode="date"></picker> -->
@@ -95,7 +95,7 @@
label: '男'
},
{
value: 2,
value: 0,
label: '女'
},]
],
@@ -103,6 +103,7 @@
userInfo: uni.cache.get('userInfo'),
userHeadImg: "",
nickName: '',
birthDay: "",
phonetitle: ""
};
},
@@ -114,6 +115,10 @@
this.userHeadImg = this.userInfo.headImg;
this.nickName = this.userInfo.nickName;
this.sex = this.userInfo.sex;
if ( this.userInfo.sex != null ) {
this.sexText = this.userInfo.sex == 1 ? '男' : '女';
}
this.birthDay = this.userInfo.birthDay;
this.phonetitle = this.userInfo.telephone ? (this.userInfo.telephone.substr(0, 3) + "****" + this.userInfo.telephone.substr(7)) : ""
this.date = this.getDate({ format: true})
},
@@ -125,8 +130,8 @@
* @param {Object} e
*/
confirmTime(e) {
console.log(e);
console.log(this.getDate(e.value))
this.calendarShow = false;
this.birthDay = this.getDate(e.value);
},
/**
@@ -158,6 +163,9 @@
* @param {Object} d
*/
async getPhone(d) {
if ( this.phonetitle ) {
return;
}
if (d.detail.iv) {
uni.login({
provider: 'weixin',
@@ -202,12 +210,7 @@
* @param {Object} e
*/
uploadImg(e) {
console.log(e)
const {
avatarUrl
} = e.detail
console.log(e)
console.log(e.detail)
const { avatarUrl } = e.detail
// this.userHeadImg = avatarUrl
uni.uploadFile({
url: 'https://wxcashiertest.sxczgkj.cn/cashierService/common/upload',
@@ -239,6 +242,7 @@
headImg: this.userHeadImg,
nickName: this.nickName,
sex: this.sex,
birthDay: this.birthDay,
telephone: this.phonetitle == '请授权手机号' ? '' : this.phonetitle
})
if (res.code == 0) {