1、修改密码手机号未拿到处理

2、首页/商品列表增加了广告弹窗
3、会员充值新增赠送菜品,
4、会员菜品增加最大添加数量限制
5、首页/我的/会员卡/菜品页面的图片设置
6、小程序余额支付,会员卡充值成功后增加 会员余额变动订阅(后端还未做处理,目前可以订阅不会推送)
7、多规格商品部分规格售罄/下架增加角标提示
This commit is contained in:
GaoHao
2024-08-27 14:43:15 +08:00
parent d75da8ac9f
commit 22b9726de6
19 changed files with 933 additions and 252 deletions

View File

@@ -4,6 +4,10 @@
<view class="box_item flex-between">
<text class="top_box_one_text">当前账号</text>
<input type="number" v-model="mobile" placeholder="请输入手机号" maxlength="11" disabled="disabled" />
<button v-if="!mobile" class="getPhone" open-type="getPhoneNumber" @getphonenumber="getPhone">
<view class="text">获取微信手机号</view>
</button>
</view>
<view class="box_item flex-between" style="position:relative;">
<text class="top_box_one_text"></text>
@@ -36,10 +40,10 @@
export default {
data() {
return {
isPwd: uni.cache.get('userInfo').isPwd,
mobile: uni.cache.get('userInfo').telephone.slice(0, 3)+'****'+uni.cache.get('userInfo').telephone.slice(7),
isPwd: "",
mobile: "",
form: {
mobile: uni.cache.get('userInfo').telephone,
mobile: '',
password: '',
payPassword: '',
checkCode: ''
@@ -49,16 +53,20 @@
// 注册定时器 初始值
second: 60,
showText: true,
Recapture: '获取验证码'
Recapture: '获取验证码',
shopUserInfo: null,
};
},
onLoad(e) {
// if ( e.shopUserInfo ) {
// this.shopUserInfo = JSON.parse(e.shopUserInfo);
// this.isPwd = this.shopUserInfo.isPwd;
// this.mobile = this.shopUserInfo.telephone.slice(0, 3)+'****'+this.shopUserInfo.telephone.slice(7);
// this.form.mobile = this.shopUserInfo.telephone;
// }
console.log(e)
if ( e.shopUserInfo ) {
this.shopUserInfo = JSON.parse(e.shopUserInfo);
console.log(this.shopUserInfo)
this.isPwd = this.shopUserInfo.isPwd;
this.mobile = this.shopUserInfo.telephone ? ( this.shopUserInfo.telephone.slice(0, 3)+'****'+this.shopUserInfo.telephone.slice(7) ) : '';
this.form.mobile = this.shopUserInfo.telephone;
}
},
methods: {
@@ -86,6 +94,33 @@
}, 60000);
}
},
/**
* 获取手机号
* @param {Object} d
*/
async getPhone(d) {
if (d.detail.iv) {
uni.login({
provider: 'weixin',
success: async (data) => {
console.log(data)
let res = await this.api.userwxlogins({
code: data.code,
encryptedData: d.detail.encryptedData,
iv: d.detail.iv,
})
this.form.mobile = res.data;
this.mobile = this.form.mobile ? ( this.form.mobile.slice(0, 3)+'****'+this.form.mobile.slice(7) ) : '';
let res2 = await this.api.upVipPhont({
id: this.shopUserInfo.id,
telephone: res.data,
})
}
})
}
},
async loginwxuserInfo() {
let res = await this.api.loginwxuserInfo({
userId: uni.cache.get('userInfo').id
@@ -139,6 +174,7 @@
return false;
}
let res = await this.api.loginresetPwd({
vipId: this.shopUserInfo.id,
pwd: this.form.password,
code: this.form.checkCode
})
@@ -189,6 +225,7 @@
.box_item {
border-bottom: 1rpx solid #E5E5E5;
position: relative;
.top_box_one_text {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
@@ -256,5 +293,16 @@
background-color: #E3AD7F;
}
}
.getPhone{
line-height: initial;
background-color: none;
border: 2rpx solid #E3AD7F;
color: #E3AD7F;
font-size: 28rpx;
padding: 5rpx 10rpx;
position: absolute;
right: 10rpx;
z-index: 2;
}
}
</style>