Merge pull request !87 from Admin/sit-He-v3
This commit is contained in:
Admin 2022-01-23 06:40:42 +00:00 committed by Gitee
commit e072f56de3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 321 additions and 308 deletions

View File

@ -56,7 +56,7 @@ export const getleckCourse = (name, offset) => {
* 加入购物车
*/
export const postCourseId = (productCode,buyCount,memberId, mobile,productImg,productName,productPrice,specifications) => {
export const postCourseId = (productCode, buyCount, memberId, mobile, productImg, productName, productPrice, specifications, leftAllotment) => {
var data = {
buyCount: buyCount,
memberId: memberId,
@ -65,7 +65,8 @@ export const postCourseId = (productCode,buyCount,memberId, mobile,productImg,pr
productImg: productImg,
productName: productName,
productPrice: productPrice,
specifications:specifications
specifications: specifications,
leftAllotment: leftAllotment
}
return fetch('/insertCartProductInfo', data, 'POST')
}
@ -619,9 +620,12 @@ export const getOrderList = (user, status) => {
return fetch('memberAddress?type=' + type, data, 'POST')
}
//微信支付二维码
export const updateOrderWX = (data) => {
return fetch('updateOrderWX', data, 'POST')
}
//支付宝支付二维码
export const generateOrderAlipay = (data) => {
return fetch('generateOrderAlipay', data, 'POST')
}

View File

@ -97,7 +97,12 @@
</div>
</div>
</div>
<el-dialog :visible.sync="dialogAdd" class="diallog_width" width="'100%" :title="dialogAddTitle">
<el-dialog
:visible.sync="dialogAdd"
class="diallog_width"
width="'100%"
:title="dialogAddTitle"
>
<div class="tc dl_cont" v-if="dialogAdd">
<myAddress
@isClose="dialogCtrl"
@ -111,7 +116,7 @@
width="'100%"
title="选择收货地址"
>
<div class="tc dl_cont" style="padding-bottom: 50px;position: relative;">
<div class="tc dl_cont" style="padding-bottom: 50px; position: relative">
<div class="pop_list">
<el-row
class="mypersonal"
@ -120,7 +125,10 @@
:class="item.isDefault ? 'active' : ''"
>
<el-col :span="4"
><input type="checkbox" v-model="item.checked" @click="selectPopAddress(item)"
><input
type="checkbox"
v-model="item.checked"
@click="selectPopAddress(item)"
/></el-col>
<el-col :span="16" class="tl">
<div>
@ -213,7 +221,7 @@ export default {
this.useraddress = data;
},
editAddress(item) {
this.dialogAddTitle='修改收货地址'
this.dialogAddTitle = "修改收货地址";
this.editAddressData = {
memberId: item.memberId,
name: item.recipient,
@ -231,7 +239,7 @@ export default {
this.dialogAdd = true;
},
addAddress() {
this.dialogAddTitle='新增收货地址'
this.dialogAddTitle = "新增收货地址";
this.editAddressData = {};
this.dialogAdd = true;
},
@ -239,9 +247,9 @@ export default {
this.useraddress.forEach((item) => {
if (item.id == cur.id) {
item.isDefault = true;
item.checked=true
item.checked = true;
} else {
item.checked=false
item.checked = false;
item.isDefault = false;
}
});
@ -250,9 +258,9 @@ export default {
this.useraddress.forEach((item) => {
if (item.id == cur.id) {
item.isDefault = true;
item.checked=true
item.checked = true;
} else {
item.checked=false
item.checked = false;
item.isDefault = false;
}
});
@ -344,7 +352,8 @@ export default {
postData[0].orderAddress.addressUserName +
" " +
postData[0].orderAddress.addressPhoneNumber,
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
wxPay: res.data,
};
this.$router.push({
path: "/personal/userpay",
@ -384,9 +393,7 @@ export default {
</script>
<style lang="less" scoped>
@import url("../../assets/css/global.less");
@import "./settlement.less";
// @import url("../../assets/css/settlement.less");
</style>

View File

@ -113,7 +113,8 @@ export default {
computed: {},
mounted() {
this.userPayData = JSON.parse(this.$route.query.userPayData);
this.qrtext=this.userPayData.wxPay
this.qrtext=this.userPayData.wxPay;
this.payOrderWX()
},
methods: {
closeDialogSuccess() {
@ -141,15 +142,15 @@ export default {
}
},
//
async updateOrderWX() {
async payOrderWX() {
let res = await updateOrderWX();
if (res.success) {
this.qrtext = '成功加入群的二维码';
this.dialogSuccess = true;
clearInterval(this.time);
} else {
} else if (res.fail) {
this.dialogFail = true;
clearInterval(this.time);
}else{
this.payOrderWX()
}
},
},

View File

@ -568,7 +568,8 @@ export default {
item.picFile,
item.productName,
item.basePrice,
item.specifications
item.specifications,
item.leftAllotment
);
if (data) {
this.productlist = data;