mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-05 03:36:39 +08:00
Merge branch 'sit-Carl' into sit-Leung
# Conflicts: # rc-busness/pages/personal/settlement.vue # rc-busness/pages/personal/userpay.vue
This commit is contained in:
commit
9b4f71074a
@ -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')
|
||||
}
|
||||
|
@ -22,8 +22,9 @@
|
||||
.rc-button{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 375px;
|
||||
justify-content: flex-end;
|
||||
width: 100%;
|
||||
|
||||
height: 80px;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
|
||||
@ -38,6 +39,7 @@ opacity: 1;
|
||||
border-radius: 30px;
|
||||
background: #E2001A;
|
||||
display: flex;
|
||||
margin-right: 20px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
|
@ -146,6 +146,7 @@
|
||||
|
||||
<script>
|
||||
import Myheader from "~/components/header.vue";
|
||||
import { mapMutations } from "vuex";
|
||||
import { userin} from "../../ajax/getData";
|
||||
import MyFooter from '~/components/rc-footer.vue'
|
||||
import {selectaddress,canceldanhao,generateOrderWX} from "../../ajax/getData";
|
||||
@ -168,6 +169,7 @@ export default {
|
||||
usersalesAmount:'',
|
||||
leftico: require("../../assets/image/rc-left.png"),
|
||||
orderNumber:'',
|
||||
userdata:"",
|
||||
usermessage:null,
|
||||
userid: null,
|
||||
useralllist:[],
|
||||
@ -196,7 +198,11 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
...mapMutations(["checkIsLogin"]),
|
||||
refreshDesktopNav:function(){
|
||||
RCDL.navigation.currentState=null;
|
||||
RCDL.navigation.rebuild();
|
||||
},
|
||||
//取消订单
|
||||
async canceldanhao(orderNumber) {
|
||||
let data = await canceldanhao(this.userphone,this.orderNumber);
|
||||
@ -221,6 +227,12 @@ userpay(){
|
||||
if(this.goldastates==0){
|
||||
this.canceldanhao();
|
||||
}
|
||||
else if( this.customer='联系客服申请售后'){
|
||||
var option = {
|
||||
customer: {id: '', name: '', email: '', mobile: '', memberId: this.userdata.data.id}
|
||||
}
|
||||
dis_livchat(option);
|
||||
}
|
||||
},
|
||||
//订单支付和再次购买
|
||||
onceagain(){
|
||||
@ -317,6 +329,9 @@ if(data){
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.checkIsLogin();
|
||||
this.userdata=this.$store.state.userInfo;
|
||||
console.log(this.userdata);
|
||||
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
||||
this.userid = this.usermessage.data.id;
|
||||
this.userphone=this.usermessage.data.mobile;
|
||||
|
@ -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,9 @@ export default {
|
||||
postData[0].orderAddress.addressUserName +
|
||||
" " +
|
||||
postData[0].orderAddress.addressPhoneNumber,
|
||||
wxPay: res.msg,
|
||||
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
wxPay: res.data,
|
||||
};
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
@ -384,9 +394,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
@import url("../../assets/css/global.less");
|
||||
//@import url("../../assets/css/global.less");
|
||||
@import "./settlement.less";
|
||||
// @import url("../../assets/css/settlement.less");
|
||||
|
||||
</style>
|
@ -54,7 +54,7 @@
|
||||
</div>
|
||||
<div class="rc-userbottom">
|
||||
<span>数量:{{ item.pcs }}件</span>
|
||||
<i>¥{{ }}</i>
|
||||
<i>¥10</i>
|
||||
</div>
|
||||
<div class="rc-userbottomm">
|
||||
<i>¥{{ item.userprice }}</i>
|
||||
@ -289,6 +289,9 @@ export default {
|
||||
this.goldmedal = data;
|
||||
this.alllist=[];
|
||||
this.useralllist=[];
|
||||
this.obligation=[];
|
||||
this.receiving=[];
|
||||
this.pending=[];
|
||||
for (let i = 0; i < this.goldmedal.length; i++) {
|
||||
this.useralllist.push(this.goldmedal[i].orderDetailList[0]);
|
||||
this.alllist.push(this.goldmedal[i].orderDetailList[0])
|
||||
@ -299,10 +302,11 @@ export default {
|
||||
}else if(this.goldmedal[i].status==1){
|
||||
this.receiving.push(this.goldmedal[i].orderDetailList[0]);
|
||||
}
|
||||
else if(this.goldmedal[i].status==4){
|
||||
else if(this.useralllist[i].status==2){
|
||||
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < this.useralllist.length; i++) {
|
||||
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
||||
this.useralllist[i].status = this.goldmedal[i].status;
|
||||
@ -346,7 +350,7 @@ export default {
|
||||
// addressDetailInfo: orderAddress[0].detailAddress,
|
||||
// },
|
||||
// };
|
||||
postData.push(oneProduct);
|
||||
// postData.push(oneProduct);
|
||||
let res = await generateOrderWX(postData);
|
||||
let userPayData = {
|
||||
orderId: res.data,
|
||||
@ -383,7 +387,7 @@ export default {
|
||||
message: "取消订单成功",
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.indet();
|
||||
this.indet(this.userdata);
|
||||
this.activeIndex=0;
|
||||
this.useralllist=[];
|
||||
}, 500);
|
||||
|
@ -104,7 +104,6 @@ export default {
|
||||
payimage: require("../../assets/pay/zfb.png"),
|
||||
},
|
||||
],
|
||||
dialogSuccess: false,
|
||||
dialogFail: false,
|
||||
userPayData: {},
|
||||
qrtext:'',
|
||||
@ -113,8 +112,10 @@ export default {
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||
this.qrtext=this.userPayData.wxPay
|
||||
this.updateOrderWX();
|
||||
//this.qrtext=this.userPayData.wxPay
|
||||
this.qrtext=this.userPayData.wxPay;
|
||||
this.payOrderWX()
|
||||
|
||||
},
|
||||
methods: {
|
||||
closeDialogSuccess() {
|
||||
@ -142,15 +143,18 @@ 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()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -328,7 +328,7 @@ export default {
|
||||
userbuy = true;
|
||||
}
|
||||
if(!curItem || curItem.productName == undefined)
|
||||
throw new Error("The id property is missing.");
|
||||
throw new Error("商品信息错误");
|
||||
let crumbs = [
|
||||
{
|
||||
path:'/productdetails/productlist/',
|
||||
@ -582,7 +582,8 @@ export default {
|
||||
item.picFile,
|
||||
item.productName,
|
||||
item.basePrice,
|
||||
item.specifications
|
||||
item.specifications,
|
||||
item.leftAllotment
|
||||
);
|
||||
if (data) {
|
||||
this.productlist = data;
|
||||
|
@ -104,23 +104,23 @@ export default {
|
||||
|
||||
register(){
|
||||
console.log(this.tel)
|
||||
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '手机号码输入有误'
|
||||
});
|
||||
return
|
||||
}else if(this.alladdress===''){
|
||||
if ( this.alladdress==='') {
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请输入详细地址 '
|
||||
});
|
||||
return
|
||||
}if(!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === ""){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '手机号码输入有误'
|
||||
});
|
||||
return
|
||||
}
|
||||
else if(this.userpeople===''){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '请输入姓名'
|
||||
message: '请填写收货人'
|
||||
});
|
||||
return
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ export default {
|
||||
if(data){
|
||||
this.$message({
|
||||
type: 'warning',
|
||||
message: '删除成功'
|
||||
message: '地址删除成功'
|
||||
});
|
||||
}
|
||||
this.editaddress();
|
||||
|
Loading…
Reference in New Issue
Block a user