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

@@ -2,7 +2,7 @@
<!-- 店铺详情 -->
<u-popup :show="show" :round="20" overlayOpacity="0.8" mode="bottom" @close="showClose" height="500">
<view class="register-member-wrap">
<view class="register-title">欢迎加入双屿</view>
<view class="register-title">欢迎加入{{shopUserInfo.shopName?shopUserInfo.shopName:'本店'}}</view>
<view class="register-tip">请完善个人信息完成会员注册</view>
<view class="register-content">
<view class="reg-head">
@@ -16,9 +16,9 @@
<view class="lable">昵称<text style="color: #CD1A1A;">*</text></view>
<u-input class="value" v-model="nickName" fontSize="14px" type="text" input-align="left" placeholder="请输入昵称" :custom-style="{border:'none'}" placeholderStyle="color:#999;font-size: 28rpx"/>
</view>
<view class="reg-cell">
<view class="reg-cell" @click="calendarShow = true">
<view class="lable">生日</view>
<view class="value" :style="{color: birthDay ? '#333' : '#999'}" @click="calendarShow = true">{{ birthDay || '请选择日期'}}</view>
<view class="value" :style="{color: birthDay ? '#333' : '#999'}">{{ 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> -->
@@ -28,6 +28,8 @@
:show="calendarShow"
:minDate="-2208988800000"
v-model="value1"
itemHeight="66"
visibleItemCount="5"
@confirm="confirmTime"
></u-datetime-picker>
<u-icon name="arrow-down-fill" color="#000" size="23"></u-icon>
@@ -41,11 +43,11 @@
</view>
<view class="agreement">
<view class="agreement_tip">我已阅读并同意以下内容</view>
<view class="agreement_item">
<u-checkbox-group>
<u-checkbox shape="circle" activeColor="#E3AD7F" @change="radioChange" size="30"></u-checkbox>
<view class="agreement_item" @click="isProtocol = !isProtocol">
<u-checkbox-group >
<u-checkbox :checked="isProtocol" shape="circle" activeColor="#E3AD7F" @change="radioChange" size="35" iconSize="20"></u-checkbox>
</u-checkbox-group>
<text @click="viewProtocol(1)" class="agreement_item_text">用户协议/隐私条款</text>
<text @click.stop="viewProtocol(1)" class="agreement_item_text">用户协议/隐私条款</text>
</view>
<!-- <view class="agreement_item">
<u-checkbox-group>
@@ -62,7 +64,7 @@
<script>
export default {
props: ['userInfo','show',"shopId"],
props: ['show',"shopId"],
data() {
return {
value1: Number(new Date()),
@@ -73,18 +75,33 @@
telephone: "",
birthDay: "",
isProtocol: false,
shopUserInfo: null,
}
},
mounted() {
this.userInfo = uni.cache.get('userInfo')
this.userId = this.userInfo.id;
this.userHeadImg = this.userInfo.headImg;
this.nickName = this.userInfo.nickName && this.userInfo.nickName != '微信用户' ? this.userInfo.nickName : '';
this.telephone = this.userInfo.telephone;
this.birthDay = this.userInfo.birthDay
console.log(this.userInfo, '调试1113');
console.log(13)
this.init()
// console.log(this.userInfo)
// this.userId = this.userInfo.id;
// console.log(this.userInfo, '调试1113');
},
methods: {
async init() {
let res = await this.api.shopUserInfo({
"shopId": this.shopId,
"userId": uni.cache.get('userInfo').id,
})
console.log(res)
if (res.code == 0) {
this.shopUserInfo = res.data;
}
this.userHeadImg = this.shopUserInfo.headImg;
this.nickName = this.shopUserInfo.nickName && this.shopUserInfo.nickName != '微信用户' ? this.shopUserInfo.nickName : '';
this.telephone = this.shopUserInfo.telephone;
this.birthDay = this.shopUserInfo.birthDay
},
showClose (){
console.log(2)
uni.navigateBack()
@@ -188,7 +205,35 @@
* 注册会员
*/
async registerMember () {
console.log(this.userInfo)
console.log(this.birthDay)
// if ( this.userHeadImg == "" || this.userHeadImg == null ) {
// uni.showToast({
// title: '请选择会员头像',
// icon: 'none'
// });
// return;
// }
if ( this.nickName == "" || this.nickName == null ) {
uni.showToast({
title: '请输入会员昵称',
icon: 'none'
});
return;
}
// if ( this.birthDay == "" || this.birthDay == null ) {
// uni.showToast({
// title: '请选择日期',
// icon: 'none'
// });
// return;
// }
if ( this.telephone == "" || this.telephone == null ) {
uni.showToast({
title: '请获取手机号',
icon: 'none'
});
return;
}
if ( !this.isProtocol ) {
uni.showToast({
title: '请勾选协议',
@@ -197,7 +242,7 @@
return;
}
let res = await this.api.openMember({
id: this.userId,
id: uni.cache.get('userInfo').id,
shopId: this.shopId,
nickName: this.nickName,
headImg: this.userHeadImg,
@@ -221,6 +266,9 @@
</script>
<style lang="scss" scoped>
.u-datetime-picker {
height: 300px !important;
}
.register-member-wrap{
padding: 64rpx 24rpx;
display: flex;
@@ -298,11 +346,11 @@
font-weight: 400;
font-size: 24rpx;
color: #666666;
margin-bottom: 32rpx;
}
.agreement_item{
display: flex;
margin-bottom: 16rpx;
padding-top: 32rpx;
padding-bottom: 16rpx;
.agreement_item_text{
font-weight: 500;
font-size: 24rpx;