1、修改密码手机号未拿到处理
2、首页/商品列表增加了广告弹窗 3、会员充值新增赠送菜品, 4、会员菜品增加最大添加数量限制 5、首页/我的/会员卡/菜品页面的图片设置 6、小程序余额支付,会员卡充值成功后增加 会员余额变动订阅(后端还未做处理,目前可以订阅不会推送) 7、多规格商品部分规格售罄/下架增加角标提示
This commit is contained in:
@@ -3,16 +3,16 @@
|
||||
|
||||
<view class="location" @click="openLocation">
|
||||
<image class="location_icon" src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/menber/location.png" mode="aspectFill"></image>
|
||||
<view>{{ userInfo.shopName }}</view>
|
||||
<view>{{ shopUserInfo.shopName }}</view>
|
||||
<u-icon name="arrow-right" color="#575B66" size="28"></u-icon>
|
||||
</view>
|
||||
|
||||
<view class="card_info flex-colum">
|
||||
<view class="title">账户余额(元)</view>
|
||||
<view class="card_info_con flex-between">
|
||||
<view class="balance">{{userInfo.amount || '0.00'}}</view>
|
||||
<view class="balance">{{shopUserInfo.amount || '0.00'}}</view>
|
||||
<view class="card_info_con_right flex-end">
|
||||
<view class="card_info_con_right_item flex-colum" @click="handleClick(item)" v-for="(item,index) in cardManageList" :key="index">
|
||||
<view class ="card_info_con_right_item flex-colum" @click="handleClick(item)" v-for="(item,index) in cardManageList" :key="index">
|
||||
<image class="card_info_con_right_item_icon" :src="item.icon" mode="aspectFill"></image>
|
||||
<text class="card_info_con_right_item_text">{{item.name}}</text>
|
||||
</view>
|
||||
@@ -20,9 +20,19 @@
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- <view class="therecontent">
|
||||
<input type="number" v-model="amount" placeholder="自定义金额">
|
||||
</view> -->
|
||||
<view class="customAmount" v-if="shopUserInfo.isUser == 1">
|
||||
<view class="customAmount_left">
|
||||
<text class="customAmount_left_tip">¥</text>
|
||||
<u-input
|
||||
type="number"
|
||||
v-model="amount"
|
||||
inputAlign="left"
|
||||
:placeholder="`充${minNum}送${handselNum}`"
|
||||
:customStyle="{border: '0'}"
|
||||
></u-input>
|
||||
</view>
|
||||
<text class="customAmount_right">自定义金额</text>
|
||||
</view>
|
||||
<view class="rechargeList">
|
||||
<view class="rechargeList_f" @click="clickinput(item,index)" v-for="(item,index) in listdata" :key="index">
|
||||
<viwe class="rechargeList_item flex-colum " :class="index == inputshow?'active':''">
|
||||
@@ -57,7 +67,7 @@
|
||||
<view class="explain">
|
||||
<view class="explain-top flex-between">
|
||||
<text class="explain-top_title">适用门店</text>
|
||||
<text class="shopName">{{ userInfo.shopName }}</text>
|
||||
<text class="shopName">{{ shopUserInfo.shopName }}</text>
|
||||
</view>
|
||||
<view class="explain_content">
|
||||
<text class="explain_content_title">充值说明</text>
|
||||
@@ -68,20 +78,19 @@
|
||||
</view>
|
||||
|
||||
<view class="rechargeBox">
|
||||
<view class="agreement">
|
||||
<u-checkbox-group>
|
||||
<u-checkbox shape="circle" activeColor="#E3AD7F" @change="radioChange" size="30">
|
||||
<view style="width: 100rpx;height: 100rpx;"></view>
|
||||
<view class="agreement" @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>已同意</text>
|
||||
<text class="agreement_text" @click="viewProtocol">《用户隐私协议》</text>
|
||||
<text class="agreement_text" @click.stop="viewProtocol">《用户隐私协议》</text>
|
||||
<!-- <text class="agreement_text" @click="viewProtocol">《用户储值协议》</text> -->
|
||||
<!-- <text class="agreement_text" @click="viewProtocol">《用户授权协议》</text> -->
|
||||
</view>
|
||||
<view class="recharge" @tap="$u.debounce(userbalancerechangesub, 500)">立即充值</view>
|
||||
</view>
|
||||
<registermember :show="memberOpen" :shopId="shopId" :userInfo="userInfo" @getRegisterMember="getRegisterMember"></registermember>
|
||||
<registermember :show="memberOpen" :shopUserInfo="shopUserInfo" :shopId="shopId" @getRegisterMember="getRegisterMember"></registermember>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
@@ -98,8 +107,11 @@
|
||||
memberOpen: false,
|
||||
isProtocol: false,
|
||||
listdata: [],
|
||||
amount: '',
|
||||
amount: 0,
|
||||
minNum: 0,
|
||||
handselNum: 0,
|
||||
userInfo: {},
|
||||
shopUserInfo: null,
|
||||
shopId: '',
|
||||
giftList: [],
|
||||
cardManageList: [
|
||||
@@ -110,7 +122,6 @@
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
console.log(e)
|
||||
// if ( e.type == 'list' || e.type == 'index') {
|
||||
// this.shopId = e.shopId;
|
||||
// this.init();
|
||||
@@ -122,10 +133,12 @@
|
||||
// if (!uni.cache.get('token')) {
|
||||
// await this.$onLaunched;
|
||||
// }
|
||||
this.init();
|
||||
this.shopInfo();
|
||||
this.paygetActive()
|
||||
} else{
|
||||
this.shopId = e.shopId;
|
||||
this.init();
|
||||
this.shopInfo();
|
||||
this.paygetActive()
|
||||
}
|
||||
console.log(this.shopId)
|
||||
},
|
||||
@@ -133,20 +146,20 @@
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
async init() {
|
||||
async shopInfo() {
|
||||
|
||||
let res = await this.api.shopUserInfo({
|
||||
"shopId": this.shopId,
|
||||
"userId": uni.cache.get('userInfo').id,
|
||||
})
|
||||
if (res.code == 0) {
|
||||
this.usershopUserinfo = res.data
|
||||
this.shopUserInfo = res.data
|
||||
}
|
||||
if ( this.usershopUserinfo.isVip == 0 ) {
|
||||
|
||||
if ( this.shopUserInfo.isVip == 0 ) {
|
||||
this.memberOpen = true;
|
||||
return;
|
||||
}
|
||||
this.paygetShopByMember(this.shopId)
|
||||
this.paygetActive()
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -161,8 +174,10 @@
|
||||
|
||||
try {
|
||||
this.listdata = res.data.list;
|
||||
this.giftList = this.listdata[0].giftList;
|
||||
this.amount = res.data.list[0].minNum
|
||||
this.giftList = this.listdata[0].gives;
|
||||
this.amount = this.listdata[0].minNum;
|
||||
this.minNum = this.listdata[0].minNum;
|
||||
this.handselNum = this.listdata[0].handselNum
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
@@ -173,7 +188,9 @@
|
||||
* @param {Object} e
|
||||
*/
|
||||
handleClick (item) {
|
||||
uni.pro.navigateTo(item.url, this.userInfo)
|
||||
uni.navigateTo({
|
||||
url: `/pages/${item.url}?shopUserInfo=${JSON.stringify(this.shopUserInfo)}`
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -202,7 +219,7 @@
|
||||
*/
|
||||
getRegisterMember (e) {
|
||||
this.memberOpen = e;
|
||||
this.paygetShopByMember()
|
||||
this.shopInfo();
|
||||
this.paygetActive()
|
||||
},
|
||||
|
||||
@@ -212,11 +229,11 @@
|
||||
openLocation () {
|
||||
console.log('123');
|
||||
uni.openLocation({
|
||||
latitude: Number(this.usershopUserinfo.lat), // 目的地的纬度,浮点数,范围为-90~90
|
||||
longitude: Number(this.usershopUserinfo.lng), // 目的地的经度,浮点数,范围为-180~180
|
||||
latitude: Number(this.shopUserInfo.lat), // 目的地的纬度,浮点数,范围为-90~90
|
||||
longitude: Number(this.shopUserInfo.lng), // 目的地的经度,浮点数,范围为-180~180
|
||||
scale: 18, // 缩放比例,范围5~18
|
||||
name: this.usershopUserinfo.shopName, // 位置名
|
||||
address: this.usershopUserinfo.address, // 地址的详细说明
|
||||
name: this.shopUserInfo.shopName, // 位置名
|
||||
address: this.shopUserInfo.address, // 地址的详细说明
|
||||
success() {
|
||||
console.log('导航启动成功');
|
||||
|
||||
@@ -248,22 +265,6 @@
|
||||
return null;
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取门店会员信息
|
||||
* @param {Object} w
|
||||
*/
|
||||
async paygetShopByMember(w) {
|
||||
let res = await this.api.paygetShopByMember({
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
shopId: this.shopId
|
||||
})
|
||||
this.userInfo = res.data.list[0]
|
||||
},
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 充值金额切换
|
||||
* @param {Object} a
|
||||
@@ -272,14 +273,17 @@
|
||||
clickinput(a, b) {
|
||||
console.log(a, b)
|
||||
this.inputshow = b;
|
||||
this.giftList = a.gives;
|
||||
this.amount = a.minNum;
|
||||
this.giftList = a.giftList;
|
||||
this.minNum = a.minNum;
|
||||
this.handselNum = a.handselNum;
|
||||
},
|
||||
|
||||
/**
|
||||
* 充值
|
||||
*/
|
||||
async userbalancerechangesub() {
|
||||
let _this = this;
|
||||
if (!this.isProtocol) {
|
||||
uni.showToast({
|
||||
title: '请勾选协议',
|
||||
@@ -325,15 +329,22 @@
|
||||
})
|
||||
uni.hideLoading()
|
||||
let pages = getCurrentPages()
|
||||
if ( pages.length > 1) {
|
||||
this.paygetShopByMember()
|
||||
} else {
|
||||
setTimeout(res => {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds:["AV-KybUHaK3KtFVLqpy6PHccHBS7XeX__mOM4RbufnQ"],
|
||||
complete() {
|
||||
if ( pages.length > 1) {
|
||||
_this.shopInfo()
|
||||
} else {
|
||||
setTimeout(res => {
|
||||
uni.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
fail: (res) => {
|
||||
@@ -356,7 +367,7 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 16rpx 20rpx 0 20rpx;
|
||||
padding: 16rpx 20rpx 245rpx 20rpx;
|
||||
|
||||
.location{
|
||||
display: flex;
|
||||
@@ -413,6 +424,39 @@
|
||||
}
|
||||
}
|
||||
|
||||
.customAmount{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 32rpx;
|
||||
padding: 14rpx 16rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 8rpx;
|
||||
.customAmount_left{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.customAmount_left_tip{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
input{
|
||||
width: 100%;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #333;
|
||||
padding-left: 16rpx;
|
||||
}
|
||||
}
|
||||
.customAmount_right{
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.rechargeList{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@@ -533,6 +577,7 @@
|
||||
border-radius: 50%;
|
||||
background-color: #F7853D;
|
||||
margin-right: 8rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.text{
|
||||
font-weight: 400;
|
||||
@@ -549,6 +594,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 22rpx 24rpx;
|
||||
margin-bottom: 30rpx;
|
||||
.explain-top{
|
||||
// align-items: center;
|
||||
margin-bottom: 18rpx;
|
||||
@@ -583,7 +629,7 @@
|
||||
|
||||
.rechargeBox{
|
||||
width: 100%;
|
||||
padding: 16rpx 28rpx 84rpx 28rpx;
|
||||
padding: 0 28rpx 84rpx 28rpx;
|
||||
background-color: #fff;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
@@ -592,7 +638,8 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 20rpx;
|
||||
padding-top: 16rpx;
|
||||
padding-bottom: 20rpx;
|
||||
text{
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user