优化功能
This commit is contained in:
@@ -16,6 +16,7 @@ export default {
|
||||
accountPay(data) {
|
||||
return uni.api.get("/pay/accountPay", data);
|
||||
},
|
||||
|
||||
// 下单
|
||||
creatGroupOrder(data) {
|
||||
return uni.api.post("/groupOrderInfo/creatGroupOrder", data);
|
||||
@@ -142,7 +143,7 @@ export default {
|
||||
return uni.api.get("/distirict/comShopList", data);
|
||||
},
|
||||
loginOut(data) { //退出登录
|
||||
return uni.api.post("/loginOut", data);
|
||||
return uni.api.post("/login /loginOut", data);
|
||||
},
|
||||
productqueryShopIdByTableCode(data) { //通过桌码获取shopId
|
||||
return uni.api.get("/product/queryShopIdByTableCode", data);
|
||||
|
||||
@@ -51,12 +51,14 @@
|
||||
<view class="toLogins" @click="showbox = !showbox">其他手机号登录/注册</view>
|
||||
<!-- #endif -->
|
||||
<view class="agreement flex-start">
|
||||
<!-- #ifdef APP-PLUS || H5 -->
|
||||
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
|
||||
size="24"></u-checkbox></u-checkbox-group>
|
||||
<text>阅读并同意零点八零</text>
|
||||
<view class="agreement-Item" @click="Privacy(1)">《用户协议》</view>
|
||||
及
|
||||
<view class="agreement-Item" @click="Privacy(2)">《隐私政策》</view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- #ifdef APP-PLUS || H5 -->
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
console.log(e,'调试')
|
||||
if (e.type == 'list') {//从列表进来的
|
||||
this.paygetShopByMember(e.shopId_id)
|
||||
}else{
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
<view class="towcontentitemone flex-start">
|
||||
<image class="towcontentitemoneimage" :src="item.logo" mode="aspectFill"></image>
|
||||
<text class="towcontentitemonetext" style="color: #333333;">{{item.chainName}}</text>
|
||||
<!-- 余额:<text class="towcontentitemtheretext">{{userInfo.amount || '0.00'}}</text> -->
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-between">
|
||||
<text class="towcontentitemtowetext" style="color:#333333;">{{item.is_vip}}</text>
|
||||
<text class="towcontentitemtowetext" style="color:#333333;">余额:{{item.amount}}</text>
|
||||
<text>{{item.shopName}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -222,8 +222,7 @@
|
||||
// })
|
||||
},
|
||||
onLoad(e) {
|
||||
// 获取用户信息
|
||||
this.loginwxuserInfo()
|
||||
|
||||
// console.log(e, 140)
|
||||
let res = JSON.parse(e.tableId)
|
||||
this.listinfo.detailList = res
|
||||
@@ -256,14 +255,7 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
async loginwxuserInfo() {
|
||||
let res = await this.api.loginwxuserInfo({
|
||||
userId: uni.cache.get('userInfo').id
|
||||
})
|
||||
if (res.code == 0) {
|
||||
uni.cache.set('userInfo', res.data);
|
||||
}
|
||||
},
|
||||
|
||||
async getcoupon() {
|
||||
let res = await this.api.userCoupon({
|
||||
"orderNum": this.listinfo.amount,
|
||||
|
||||
@@ -122,13 +122,14 @@
|
||||
vipId: null,
|
||||
ispws: false,
|
||||
amountVIP: null,
|
||||
listinfoid: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getAount() {
|
||||
let res = await this.api.shopUserInfo({
|
||||
// shopId:店铺ID
|
||||
"shopId":this.info.shopId,
|
||||
"shopId": this.info.shopId,
|
||||
"userId": uni.cache.get('userInfo').id
|
||||
})
|
||||
if (res.code == 0) {
|
||||
@@ -138,10 +139,10 @@
|
||||
// 余额支付
|
||||
async accountPayevent(pwd) {
|
||||
this.ispws = false
|
||||
let res = await this.api.accountPay({
|
||||
let res = await this.api.payOrderPay({
|
||||
orderId: this.listinfoid,
|
||||
memberId: this.amountVIP.id,
|
||||
pwd: pwd
|
||||
payType: "deposit",
|
||||
pwd
|
||||
})
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
@@ -166,49 +167,40 @@
|
||||
},
|
||||
goRecharge() {
|
||||
uni.pro.navigateTo('/pages/member/index', {
|
||||
shopId_id: uni.cache.get('shopUser')
|
||||
shopId_id: this.info.shopId
|
||||
})
|
||||
},
|
||||
async sumbitFrom() {
|
||||
// radiovalue1:为1的时候微信支付,为2是会员卡,需要输入支付密码
|
||||
if (this.radiovalue1 == 1) {
|
||||
let payMoney = this.info.salePrice * this.Quantity
|
||||
let res = await this.api.creatGroupOrder({
|
||||
num: this.Quantity,
|
||||
proId: this.info.proId,
|
||||
shopId: this.info.shopId,
|
||||
payAmount: payMoney,
|
||||
orderAmount: payMoney
|
||||
})
|
||||
if (res.code == 0) {
|
||||
let payMoney = this.info.salePrice * this.Quantity
|
||||
let res = await this.api.creatGroupOrder({
|
||||
num: this.Quantity,
|
||||
proId: this.info.proId,
|
||||
shopId: this.info.shopId,
|
||||
payAmount: payMoney,
|
||||
orderAmount: payMoney
|
||||
})
|
||||
if (res.code == 0) {
|
||||
this.listinfoid = res.data.id
|
||||
// radiovalue1:为1的时候微信支付,为2是会员卡,需要输入支付密码
|
||||
if (this.radiovalue1 == 1) {
|
||||
// 调用支付接口
|
||||
this.payEvent(res.data.id)
|
||||
}
|
||||
} else {
|
||||
// let res = await this.api.accountPay({
|
||||
// orderId: this.orderIds,
|
||||
// memberId:this.vipId
|
||||
// })
|
||||
// if (res.code == 0) {
|
||||
// }
|
||||
|
||||
// 先判断是否设置支付密码。0是没设置。没设置的情况下跳转到设置页面。有的话输入支付密码
|
||||
let isVip = uni.cache.get('userInfo').isPwd
|
||||
if (isVip == 0) {
|
||||
uni.pro.navigateTo('/pages/user/repairpassword', {
|
||||
// shopId_id: uni.cache.get('shopUser')
|
||||
})
|
||||
} else {
|
||||
this.ispws = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.payPwd.onPayUp();
|
||||
})
|
||||
// 先判断是否设置支付密码。0是没设置。没设置的情况下跳转到设置页面。有的话输入支付密码
|
||||
let isVip = uni.cache.get('userInfo').isPwd
|
||||
if (isVip == 0) {
|
||||
uni.pro.navigateTo('/pages/user/repairpassword', {
|
||||
// shopId_id: uni.cache.get('shopUser')
|
||||
})
|
||||
} else {
|
||||
this.ispws = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.payPwd.onPayUp();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
async payEvent(id) {
|
||||
let res = await this.api.payOrderPay({
|
||||
@@ -217,7 +209,6 @@
|
||||
orderType: 'group'
|
||||
})
|
||||
if (res) {
|
||||
console.log(res, '调试1')
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay', //支付类型-固定值
|
||||
partnerid: res.data.appId, // 微信支付商户号
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</button> -->
|
||||
<!-- <image class="onecontentboximage" :src="userHeadImg" mode="" @click="uploadImg"></image> -->
|
||||
<button type="default" class="btn" open-type="chooseAvatar" @chooseavatar="uploadImg">
|
||||
<view class="" :style="'background-image:url('+userHeadImg+');'" style="width: 200rxp;height: 200rpx;"></view>
|
||||
<view class="" :style="'background-image:url('+userHeadImg+');'" style="width: 180rxp;height: 180rpx;"></view>
|
||||
</button>
|
||||
|
||||
|
||||
@@ -223,8 +223,6 @@
|
||||
border-radius: 100%;
|
||||
padding: 0;
|
||||
>view{
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
if (uni.cache.get('userInfo').isPwd != 0) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '忘记支付密码', // 标题文本,必须是字符串
|
||||
@@ -84,6 +85,14 @@
|
||||
}, 60000);
|
||||
}
|
||||
},
|
||||
async loginwxuserInfo() {
|
||||
let res = await this.api.loginwxuserInfo({
|
||||
userId: uni.cache.get('userInfo').id
|
||||
})
|
||||
if (res.code == 0) {
|
||||
uni.cache.set('userInfo', res.data);
|
||||
}
|
||||
},
|
||||
async userInfosavePayPassword() {
|
||||
|
||||
if (this.form.mobile.length != 11 && this.isPwd == 0) {
|
||||
@@ -145,6 +154,8 @@
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
// 获取用户信息
|
||||
this.loginwxuserInfo()
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1000);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<!-- #endif -->
|
||||
<view class="boxtop_top flex-between">
|
||||
<view class="boxtop_topleft">
|
||||
<view class="flex-start" v-if="userInfo.nickName">
|
||||
<view class="flex-start" v-if="userInfo.nickName" @click="clickinformation">
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.headImg"
|
||||
:src="userInfo.headImg" mode="aspectFill">
|
||||
</image>
|
||||
@@ -33,7 +33,7 @@
|
||||
<text>去登录</text>
|
||||
</view>
|
||||
</view>
|
||||
<image style="width: 44rpx; height: 42.26rpx;"
|
||||
<image style="width: 44rpx; height: 42.26rpx;" @click="clickphone()"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/user/kf.png" mode="aspectFill">
|
||||
</view>
|
||||
|
||||
@@ -99,6 +99,11 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickphone() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: uni.cache.get('userInfo').custPhone
|
||||
});
|
||||
},
|
||||
clickinformation() {
|
||||
uni.pro.navigateTo('user/information')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user