1.修改购物车数量超出或者乱输入的问题
2.修改领取优惠券报错问题
3.修改订单页面订单列表数据错乱问题
4.修复真机手机模式的购买页面样式对齐和二维码对齐
5.修改支付二维码接口错误问题
6.修复苹果端立即购买按钮没反应问题
This commit is contained in:
lin 2022-03-25 19:49:27 +08:00
parent 6f776b4327
commit 067d2e4b73
11 changed files with 314 additions and 228 deletions

View File

@ -672,6 +672,12 @@ export const changeCartNumber = (data) => {
} }
//获取订单支付二维码
export const getOrderQrCode = (orderNo) => {
return fetch('generateQrCode', orderNo, 'POST')
}
//支付宝支付二维码 //支付宝支付二维码
@ -690,3 +696,5 @@ export const generateOrderAlipay = (orderNo, payType) => {
//ret = JSON.parse(ret); //ret = JSON.parse(ret);
//return ret; //return ret;
} }

View File

@ -56,13 +56,14 @@ let util = {
message = '请返回支付宝继续当前订单的支付'; message = '请返回支付宝继续当前订单的支付';
break; break;
case "3": case "3":
message = '请返回手机网页端继续当前订单的支付或扫描二维码进行支付'; // message = '请返回手机网页端继续当前订单的支付或扫描二维码进行支付';
message = '请使用微信扫描下方二维码,即可完成支付!';
break; break;
default: default:
message = '订单已过期,请重新下单'; message = '订单已过期,请重新下单';
break; break;
} }
return {'result':false,'message':message}; return {'result':false,'message':message,paytype : $paytype};
}, },
getTextByPaytype(paytype){ getTextByPaytype(paytype){
//Dictionary : 1:WX native pay, 2:Alipay, 3:WX H5 pay //Dictionary : 1:WX native pay, 2:Alipay, 3:WX H5 pay

View File

@ -3,6 +3,13 @@
.usercontshow{ .usercontshow{
min-height: 70vh; min-height: 70vh;
} }
.qrcode{
display: flex;
justify-content: center;
align-items: center;
}
@media screen and (max-width:768px){ @media screen and (max-width:768px){
.online{ .online{
margin: 0; margin: 0;
@ -280,6 +287,7 @@
height: 164px; height: 164px;
.rc-usercenter{ .rc-usercenter{
width: 27%; width: 27%;
cursor : pointer;
em{ em{
font-size: 18px; font-size: 18px;
} }

View File

@ -387,7 +387,6 @@ export default {
this.loginornot = true; this.loginornot = true;
this.usermessage = this.userInfo; this.usermessage = this.userInfo;
} }
console.log('22222show');
// this.refreshMobileNav(); // this.refreshMobileNav();
/* 全局刷新 */ /* 全局刷新 */
if (isInitialized) location.reload(); if (isInitialized) location.reload();

View File

@ -8,7 +8,7 @@
let baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/' let baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/'
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/'; baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/';
// baseUrl = 'http://192.168.10.127:10086/royalcanin/royalcanin/'; // baseUrl = 'http://192.168.10.122:10086/royalcanin/royalcanin/';
} else if (process.env.NODE_ENV === 'production') { } else if (process.env.NODE_ENV === 'production') {
baseUrl = 'https://shop.royalcanin.com.cn/royalcanin/royalcanin/royalcanin/'; baseUrl = 'https://shop.royalcanin.com.cn/royalcanin/royalcanin/royalcanin/';
} }

View File

@ -142,7 +142,7 @@
<h3>温馨提示</h3> <h3>温馨提示</h3>
<span class="">{{ paytypeWarning.message }}</span> <span class="">{{ paytypeWarning.message }}</span>
</div> </div>
<div class="qrcode rc-center"><vue-qr :text="qrtext" :size="200"></vue-qr></div> <div class="qrcode rc-center" v-show="qrtext"><vue-qr :text="qrtext" :size="200"></vue-qr></div>
</div> </div>
</el-dialog> </el-dialog>
<MyFooter></MyFooter> <MyFooter></MyFooter>
@ -157,7 +157,7 @@ import MyFooter from '~/components/rc-footer.vue';
import Vue from 'vue'; import Vue from 'vue';
let vm = new Vue(); let vm = new Vue();
import formatConversion from '../../static/js/date'; import formatConversion from '../../static/js/date';
import { userin, selectaddress, canceldanhao, generateOrderWX, repayOrde } from '../../ajax/getData'; import { userin, selectaddress, canceldanhao, generateOrderWX, repayOrde,getOrderQrCode } from '../../ajax/getData';
import vueQr from 'vue-qr'; import vueQr from 'vue-qr';
import util from '@/ajax/util'; import util from '@/ajax/util';
@ -255,35 +255,16 @@ export default {
}, },
// //
async onceagain(item) { async onceagain(item) {
console.log(item);
let orderDetail = item.orderDetailList[0];
let { msg } = await generateOrderWX(
[
{
basePoint: item.basePoint,
productName: orderDetail.productName,
buyCount: orderDetail.pcs,
productCode: orderDetail.productCode,
payAmount: orderDetail.ecPrice,
memberId: this.userdata.id,
phoneNumber: item.phoneNumber,
orderAddress: {
addressPhoneNumber: item.addressPhoneNumber,
addressUserName: item.addressUserName,
addressProvinceName: item.addressProvinceName,
addressCityName: item.addressCityName,
addressCountyName: item.addressCountyName,
addressDetailInfo: item.addressDetailInfo
}
}
],
1
);
this.qrtext = msg;
this.paytypeWarning = this.util.checkPaytypeValidated(this.paytype); this.paytypeWarning = this.util.checkPaytypeValidated(this.paytype);
this.showPaytypeWarning = !this.paytypeWarning.result; this.showPaytypeWarning = !this.paytypeWarning.result;
if(this.paytypeWarning.paytype != 0){
let { msg } = await getOrderQrCode({
orderNo : item.orderNumber
}, '1');
this.qrtext = msg
}else{
this.qrtext = ''
}
if (this.paytypeWarning.result) { if (this.paytypeWarning.result) {
if (this.payorsucess == '立即支付') { if (this.payorsucess == '立即支付') {
this.getwei(item); this.getwei(item);

View File

@ -28,7 +28,8 @@
<script> <script>
import Myheader from '~/components/header.vue'; import Myheader from '~/components/header.vue';
import { memberAccount,mapState } from '../../ajax/getData'; import { memberAccount } from '../../ajax/getData';
import { mapState } from 'vuex';
export default { export default {
data() { data() {
return { return {
@ -53,31 +54,31 @@ export default {
], ],
usermessage: [ usermessage: [
{ // {
title: '2021-09-11', // title: '2021-09-11',
rccord: '+100', // rccord: '+100',
buycord: '购物积分' // buycord: ''
}, // },
{ // {
title: '2021-09-11', // title: '2021-09-11',
rccord: '+100', // rccord: '+100',
buycord: '购物积分' // buycord: ''
}, // },
{ // {
title: '2021-09-11', // title: '2021-09-11',
rccord: '+100', // rccord: '+100',
buycord: '购物积分' // buycord: ''
}, // },
{ // {
title: '2021-09-11', // title: '2021-09-11',
rccord: '+100', // rccord: '+100',
buycord: '购物积分' // buycord: ''
}, // },
{ // {
title: '2021-09-11', // title: '2021-09-11',
rccord: '+100', // rccord: '+100',
buycord: '购物积分' // buycord: ''
} // }
] ]
}; };
}, },
@ -85,23 +86,32 @@ export default {
// //
async catmessage() { async catmessage() {
// let user = JSON.parse(localStorage.getItem('userInfo')); // let user = JSON.parse(localStorage.getItem('userInfo'));
let data = await memberAccount(this.user.id); // let user = JSON.parse(localStorage.getItem('userInfo'));
let data = await memberAccount(this.userInfo.id);
if (data) { if (data) {
this.usermessage = data.data; this.usermessage = data.data;
console.log(this.usermessage.data);
} }
} }
}, },
mounted() { mounted() {
if(this.userInfo){
this.catmessage(); this.catmessage();
}
}, },
components: { components: {
Myheader Myheader
}, },
computed:{ computed: {
...mapState({ ...mapState({
userInfo : state => state.user.userInfo userInfo: state => state.user.userInfo
}) })
},
watch: {
userInfo(newVal){
if(newVal){
this.catmessage();
}
}
} }
}; };
</script> </script>

View File

@ -466,7 +466,6 @@ ul li ol li em strong i {
font-size: 16px; font-size: 16px;
cursor: pointer; cursor: pointer;
height: 48px; height: 48px;
border-radius: 30px; border-radius: 30px;
} }
} }
@ -607,7 +606,7 @@ ul li ol li em strong i {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
flex-direction: row; flex-direction: row;
align-items: self-end; align-items: center;
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
@ -617,6 +616,9 @@ ul li ol li em strong i {
div:first-child { div:first-child {
text-align: left;; text-align: left;;
} }
span{
margin-top: 0;
}
} }
} }
} }

View File

@ -681,6 +681,8 @@ export default {
// ]; // ];
let payType = this.util.pickPaytype(); let payType = this.util.pickPaytype();
let res = await generateOrderWX(postData, payType); let res = await generateOrderWX(postData, payType);
// console.log(res,'postData',postData);
// return false;
if (res.success) { if (res.success) {
let userPayData = { let userPayData = {
orderId: res.data.orderNumber, orderId: res.data.orderNumber,

View File

@ -29,27 +29,28 @@
</em> </em>
</div> </div>
</div> </div>
<div class="rc-usermain"> <div class="rc-usermain" v-for="(pro,pindex) in item.orderDetailList" :key="pindex">
<div class="rc-image"><img :src="item.picFile" alt="" /></div> <div class="rc-image"><img :src="pro.picFile" alt="" /></div>
<div class="rc-right" @click="usertiaozhuan(item)"> <div class="rc-right" @click="usertiaozhuan(item)">
<div class="rc-usercenter"> <div class="rc-usercenter">
<em>{{ item.productName }}</em> <em>{{ pro.productName }}</em>
<div class="rc-userright"> <div class="rc-userright">
<span>规格:{{ item.specifications }}</span> <span>规格:{{ pro.specifications }}</span>
</div> </div>
</div> </div>
<div class="rc-userbottom"> <div class="rc-userbottom">
<span>数量:{{ item.pcs }}</span> <span>数量:{{ pro.pcs }}</span>
<i>{{ item.ecPrice }}</i> <i>{{ pro.ecPrice }}</i>
</div> </div>
<div class="rc-userbottomm"> <div class="rc-userbottomm">
<i>{{ item.ecPrice }}</i> <i>{{ pro.ecPrice }}</i>
<span>{{ item.pcs }}</span> <span>{{ pro.pcs }}</span>
<i>{{ item.salesAmount }}</i> <i>{{ item.salesAmount }}</i>
</div> </div>
</div> </div>
<div class="pc-bottom"> <div class="pc-bottom">
<template v-if="pindex == item.orderDetailList.length -1">
<span v-if="item.status != 1" @click="userpay(item, index)"> <span v-if="item.status != 1" @click="userpay(item, index)">
{{ {{
item.status == '0' item.status == '0'
@ -76,13 +77,15 @@
: '异常订单' : '异常订单'
}} }}
</span> </span>
</template>
</div> </div>
</div> </div>
<div class="online" style="display:none"></div> <div class="online" style="display:none"></div>
<div class="rc-usermain rc-price"> <div class="rc-usermain rc-price">
<div class="rc-price priceleft"> <div class="rc-price priceleft">
<span>数量:</span> <span>数量:</span>
<em>{{ item.lengthnum }}件商品</em> <em>{{ item.orderDetailList.length }}件商品</em>
</div> </div>
<div class="rc-price priceright"> <div class="rc-price priceright">
<strong>总计:</strong> <strong>总计:</strong>
@ -110,7 +113,7 @@
<h3>温馨提示</h3> <h3>温馨提示</h3>
<span class="">{{ paytypeWarning.message }}</span> <span class="">{{ paytypeWarning.message }}</span>
</div> </div>
<div class="qrcode rc-center"><vue-qr :text="qrtext" :size="200"></vue-qr></div> <div class="qrcode rc-center" v-show="qrtext"><vue-qr :text="qrtext" :size="200"></vue-qr></div>
</div> </div>
</el-dialog> </el-dialog>
<MyFooter></MyFooter> <MyFooter></MyFooter>
@ -122,7 +125,7 @@ import Myheader from '~/components/header.vue';
import MyFooter from '~/components/rc-footer.vue'; import MyFooter from '~/components/rc-footer.vue';
import tabs from '~/components/tabs.vue'; import tabs from '~/components/tabs.vue';
import util from '@/ajax/util'; import util from '@/ajax/util';
import { customerorders, userindent, canceldanhao, repayOrde, generateOrderWX } from '../../ajax/getData'; import { customerorders, userindent, canceldanhao, repayOrde, generateOrderWX,getOrderQrCode } from '../../ajax/getData';
import { mapMutations, mapState } from 'vuex'; import { mapMutations, mapState } from 'vuex';
import vueQr from 'vue-qr'; import vueQr from 'vue-qr';
export default { export default {
@ -215,7 +218,7 @@ export default {
mounted() { mounted() {
// this.checkIsLogin(); // this.checkIsLogin();
this.userstype = this.$route.query.stype; this.userstype = this.$route.query.stype || 0;
this.resetData(); this.resetData();
// this.userdata = user.data.mobile; // this.userdata = user.data.mobile;
}, },
@ -229,56 +232,30 @@ export default {
...mapMutations(['changemessage', 'checkIsLogin']), ...mapMutations(['changemessage', 'checkIsLogin']),
async indet(mobile, stype) { async indet(mobile, stype) {
let data = await userindent(mobile, undefined, 1, 100); let data = await userindent(mobile, undefined, 1, 100);
this.activeIndex = stype; this.activeIndex = stype || 0;
this.goldmedal = data; this.goldmedal = data;
this.alllist = []; this.alllist = [];
this.allmessage = []; this.allmessage = [];
this.useralllist = []; this.useralllist = [];
this.obligation = []; this.obligation = []; //
this.receiving = []; this.receiving = []; //
this.pending = []; this.pending = []; //
for (let i = 0; i < this.goldmedal.length; i++) { // console.log(data,'22');
if (!this.goldmedal[i].orderDetailList.length) continue; // this.goldmedal = data.filter(val=> val.orderDetailList.length);
this.useralllist.push(this.goldmedal[i].orderDetailList[0]); let filterData = [];
this.alllist.push(this.goldmedal[i].orderDetailList[0]); for (var i = 0; i < data.length; i++) {
this.allmessage.push(this.goldmedal[i].orderDetailList[0]); let item = data[i];
if (this.goldmedal[i].status == 0) { if(!item.orderDetailList.length){
this.obligation.push(this.goldmedal[i].orderDetailList[0]); continue;
} else if (this.goldmedal[i].status == 1) {
this.receiving.push(this.goldmedal[i].orderDetailList[0]);
} else if (this.goldmedal[i].status == 2) {
this.pending.push(this.goldmedal[i].orderDetailList[0]);
} }
}
for (let y = 0; y < this.goldmedal.length; y++) {
if (!this.useralllist[y]) {
this.useralllist[y] = {};
}
if (!this.goldmedal[y].orderDetailList) continue;
// let item = {
// ...this.useralllist[y],
// ...this.goldmedal[y],
// phoneNumber : this.goldmedal[y].addressPhoneNumber,
// lengthnum : this.goldmedal[y].orderDetailList.length
// }
// this.useralllist[y] = item;
this.useralllist[y].orderNumber = this.goldmedal[y].orderNumber;
this.useralllist[y].status = this.goldmedal[y].status;
this.useralllist[y].addressUserName = this.goldmedal[y].addressUserName;
this.useralllist[y].phoneNumber = this.goldmedal[y].addressPhoneNumber;
this.useralllist[y].paytype = this.goldmedal[y].paytype;
this.useralllist[y].salesAmount = this.goldmedal[y].salesAmount;
this.useralllist[y].lengthnum = this.goldmedal[y].orderDetailList.length;
let item = this.goldmedal[y];
let orderDetail = item.orderDetailList[0]; let orderDetail = item.orderDetailList[0];
this.useralllist[y].payInfo = [ item.payInfo = [
{ {
basePoint: item.basePoint, basePoint: item.basePoint,
productName: orderDetail.productName, productName: orderDetail.productName,
buyCount: orderDetail.pcs, buyCount: 1,
productCode: orderDetail.productCode, productCode: orderDetail.productCode,
payAmount: orderDetail.ecPrice, payAmount: orderDetail.salesAmount,
memberId: this.userInfo.id, memberId: this.userInfo.id,
phoneNumber: item.phoneNumber, phoneNumber: item.phoneNumber,
orderAddress: { orderAddress: {
@ -291,21 +268,95 @@ export default {
} }
} }
] ]
filterData.push(item);
} }
this.goldmedal = filterData;
this.filterCurrentData();
// 0:,1:,2:,3:,4:
return false;
// for (let i = 0; i < this.goldmedal.length; i++) {
// if (!this.goldmedal[i].orderDetailList.length) continue;
// this.useralllist.push(this.goldmedal[i].orderDetailList[0]);
// this.alllist.push(this.goldmedal[i].orderDetailList[0]);
// this.allmessage.push(this.goldmedal[i].orderDetailList[0]);
// if (this.goldmedal[i].status == 0) {
// this.obligation.push(this.goldmedal[i].orderDetailList[0]);
// } else if (this.goldmedal[i].status == 1) {
// this.receiving.push(this.goldmedal[i].orderDetailList[0]);
// } else if (this.goldmedal[i].status == 2) {
// this.pending.push(this.goldmedal[i].orderDetailList[0]);
// }
// }
// for (let y = 0; y < this.goldmedal.length; y++) {
// if (!this.useralllist[y]) {
// this.useralllist[y] = {};
// }
// if (!this.goldmedal[y].orderDetailList) continue;
if (this.userstype == 1) { // // let item = {
this.useralllist = this.obligation; // // ...this.useralllist[y],
} else if (this.userstype == 2) { // // ...this.goldmedal[y],
this.useralllist = this.pending; // // phoneNumber : this.goldmedal[y].addressPhoneNumber,
} else if (this.userstype == 0) { // // lengthnum : this.goldmedal[y].orderDetailList.length
this.useralllist = this.allmessage; // // }
} else if (this.userstype == 3) { // // this.useralllist[y] = item;
this.useralllist = this.receiving; // this.useralllist[y].orderNumber = this.goldmedal[y].orderNumber;
// this.useralllist[y].status = this.goldmedal[y].status;
// this.useralllist[y].addressUserName = this.goldmedal[y].addressUserName;
// this.useralllist[y].phoneNumber = this.goldmedal[y].addressPhoneNumber;
// this.useralllist[y].paytype = this.goldmedal[y].paytype;
// this.useralllist[y].salesAmount = this.goldmedal[y].salesAmount;
// this.useralllist[y].lengthnum = this.goldmedal[y].orderDetailList.length;
// let item = this.goldmedal[y];
// let orderDetail = item.orderDetailList[0];
// if(orderDetail){
// this.useralllist[y].payInfo = [
// {
// basePoint: item.basePoint,
// productName: orderDetail.productName,
// buyCount: orderDetail.pcs,
// productCode: orderDetail.productCode,
// payAmount: orderDetail.ecPrice,
// memberId: this.userInfo.id,
// phoneNumber: item.phoneNumber,
// orderAddress: {
// addressPhoneNumber: item.addressPhoneNumber,
// addressUserName: item.addressUserName,
// addressProvinceName: item.addressProvinceName,
// addressCityName: item.addressCityName,
// addressCountyName:item.addressCountyName,
// addressDetailInfo: item.addressDetailInfo,
// }
// }
// ]
// }
// }
// if (this.userstype == 1) {
// this.useralllist = this.obligation;
// } else if (this.userstype == 2) {
// this.useralllist = this.pending;
// } else if (this.userstype == 0) {
// this.useralllist = this.allmessage;
// } else if (this.userstype == 3) {
// this.useralllist = this.receiving;
// }
// /* */
// let filterArr = this.useralllist.filter(val => {
// return val != undefined;
// });
// this.useralllist = filterArr;
},
/* 过滤当前的显示的数据 */
async filterCurrentData(){
/* 根据切换 过滤对应的数据显示 */
let filterArr = this.goldmedal.filter(val=>{
if(this.activeIndex == 0){
return val.status >= 0;
}else{
return val.status == this.activeIndex - 1;
} }
/* 过滤空的数据 */
let filterArr = this.useralllist.filter(val => {
return val != undefined;
}); });
this.useralllist = filterArr; this.useralllist = filterArr;
}, },
@ -407,51 +458,52 @@ export default {
selectGoods(item, index) { selectGoods(item, index) {
let list = []; let list = [];
this.activeIndex = index; this.activeIndex = index;
if (item.title == '待付款') { this.filterCurrentData();
list = this.obligation; // if (item.title == '') {
} else if (item.title == '待收货') { // list = this.obligation;
list = this.receiving; // } else if (item.title == '') {
} else if (item.title == '待发货') { // list = this.receiving;
this.useralllist = this.pending; // } else if (item.title == '') {
list = this.pending; // this.useralllist = this.pending;
} else if (item.title == '全部') { // list = this.pending;
list = this.alllist; // } else if (item.title == '') {
} // list = this.alllist;
this.useralllist = []; // }
for (var i = 0; i < this.useralllist.length; i++) { // this.useralllist = [];
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber; // for (var i = 0; i < this.useralllist.length; i++) {
this.useralllist[i].status = this.goldmedal[i].status; // this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
this.useralllist[i].addressUserName = this.goldmedal[i].addressUserName; // this.useralllist[i].status = this.goldmedal[i].status;
this.useralllist[i].phoneNumber = this.goldmedal[i].phoneNumber; // this.useralllist[i].addressUserName = this.goldmedal[i].addressUserName;
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount; // this.useralllist[i].phoneNumber = this.goldmedal[i].phoneNumber;
this.useralllist[i].lengthnum = this.goldmedal[i].orderDetailList.length; // this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
let item = this.goldmedal[i]; // this.useralllist[i].lengthnum = this.goldmedal[i].orderDetailList.length;
let orderDetail = item.orderDetailList[0]; // let item = this.goldmedal[i];
this.useralllist[y].payInfo = [ // let orderDetail = item.orderDetailList[0];
{ // this.useralllist[y].payInfo = [
basePoint: item.basePoint, // {
productName: orderDetail.productName, // basePoint: item.basePoint,
buyCount: orderDetail.pcs, // productName: orderDetail.productName,
productCode: orderDetail.productCode, // buyCount: orderDetail.pcs,
payAmount: orderDetail.ecPrice, // productCode: orderDetail.productCode,
memberId: this.userInfo.id, // payAmount: orderDetail.ecPrice,
phoneNumber: item.phoneNumber, // memberId: this.userInfo.id,
orderAddress: { // phoneNumber: item.phoneNumber,
addressPhoneNumber: item.addressPhoneNumber, // orderAddress: {
addressUserName: item.addressUserName, // addressPhoneNumber: item.addressPhoneNumber,
addressProvinceName: item.addressProvinceName, // addressUserName: item.addressUserName,
addressCityName: item.addressCityName, // addressProvinceName: item.addressProvinceName,
addressCountyName:item.addressCountyName, // addressCityName: item.addressCityName,
addressDetailInfo: item.addressDetailInfo, // addressCountyName:item.addressCountyName,
} // addressDetailInfo: item.addressDetailInfo,
} // }
] // }
// ]
} // }
this.useralllist = list.filter(val => { // this.useralllist = list.filter(val => {
return val != undefined; // return val != undefined;
}); // });
}, },
async userfind(item) { async userfind(item) {
// let params = [ // let params = [
@ -475,11 +527,12 @@ export default {
// ]; // ];
// console.log(item,'222'); // console.log(item,'222');
// return false; // return false;
let { msg } = await generateOrderWX(item.payInfo, 1);
this.qrtext = msg;
// return false; // return false;
this.paytypeWarning = this.util.checkPaytypeValidated(item.paytype); this.paytypeWarning = this.util.checkPaytypeValidated(item.paytype);
this.showPaytypeWarning = !this.paytypeWarning.result; this.showPaytypeWarning = !this.paytypeWarning.result;
this.qrtext = '';
let user = this.userInfo; let user = this.userInfo;
if (this.paytypeWarning.result) { if (this.paytypeWarning.result) {
if (item.status == 0) { if (item.status == 0) {
@ -502,6 +555,15 @@ export default {
}); });
} }
} else { } else {
if(item.payInfo && this.paytypeWarning.paytype != 0){
// console.log(item);
// ;
let { msg } = await getOrderQrCode({
orderNo : item.orderNumber
}, '1');
// let { msg } = await generateOrderWX(item.payInfo,1);
this.qrtext = msg;
};
_hmt.push([ _hmt.push([
'_trackCustomEvent', '_trackCustomEvent',
'order_repay', 'order_repay',

View File

@ -255,7 +255,7 @@ import tabs from '@/components/tabs.vue';
import FixRight from '~/components/fixed-right.vue'; import FixRight from '~/components/fixed-right.vue';
import unlogin from '~/components/unlogin.vue'; import unlogin from '~/components/unlogin.vue';
import Myfooter from '~/components/rc-footer.vue'; import Myfooter from '~/components/rc-footer.vue';
import { mapMutations,mapState } from 'vuex'; import { mapMutations, mapState } from 'vuex';
import util from '@/ajax/util'; import util from '@/ajax/util';
const settings = require('@/config'); const settings = require('@/config');
import { goodsmessage, getConfig, postCourseId, getdraw, alldiscount, oncequery, biaomessage, productQuery } from '../../ajax/getData'; import { goodsmessage, getConfig, postCourseId, getdraw, alldiscount, oncequery, biaomessage, productQuery } from '../../ajax/getData';
@ -359,22 +359,22 @@ export default {
productAttachmentList: [], productAttachmentList: [],
usernewlist: [ usernewlist: [
{ // {
price: '30', // price: '30',
pricestype: '新客优惠券', // pricestype: '',
special: '全场每满299-30', // special: '299-30',
period: '有效期', // period: '',
starttime: '2021.11.29-2022.01.28', // starttime: '2021.11.29-2022.01.28',
catimage: require('../../assets/image/unused.png') // catimage: require('../../assets/image/unused.png')
}, // },
{ // {
price: '30', // price: '30',
pricestype: '新客优惠券', // pricestype: '',
special: '全场每满299-30', // special: '299-30',
period: '有效期', // period: '',
starttime: '2021.11.29-2022.01.28', // starttime: '2021.11.29-2022.01.28',
catimage: require('../../assets/image/unused.png') // catimage: require('../../assets/image/unused.png')
} // }
], ],
newlist: [ newlist: [
@ -475,8 +475,20 @@ export default {
} }
]); ]);
var u = navigator.userAgent,
app = navigator.appVersion;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios
setTimeout(function() { setTimeout(function() {
if (isAndroid) {
console.log('安卓手机');
window.open(_self.curItem.curGoodUrl, '_blank'); window.open(_self.curItem.curGoodUrl, '_blank');
}
if (isIOS) {
location.href = _self.curItem.curGoodUrl
}
}, 1000); }, 1000);
}, },
// //
@ -543,11 +555,13 @@ export default {
let paramsToAPI = { let paramsToAPI = {
productCode: this.curItem.productCode productCode: this.curItem.productCode
}; };
if (storeCode) paramsToAPI.stroeCode = stroeCode; if (storeCode) {
paramsToAPI.storeCode = storeCode;
}
let data = await alldiscount(paramsToAPI); let data = await alldiscount(paramsToAPI);
let userlist = []; let userlist = [];
let menulsit = []; let menulsit = [];
if (data) { if (data.data) {
this.alldraw = data; this.alldraw = data;
// console.log(this.alldraw.data); // console.log(this.alldraw.data);
let alllist = []; let alllist = [];
@ -728,8 +742,8 @@ export default {
path: '/personal/settlement', path: '/personal/settlement',
query: { query: {
list: JSON.stringify(list), list: JSON.stringify(list),
type : 'product', type: 'product',
pathQuery : JSON.stringify(this.$route.query), pathQuery: JSON.stringify(this.$route.query)
} }
}); });
} }
@ -755,16 +769,15 @@ export default {
this.crumbs.push({ title: item.productName }); this.crumbs.push({ title: item.productName });
} }
}, },
computed:{ computed: {
...mapState({ ...mapState({
userInfo : state => state.user.userInfo, userInfo: state => state.user.userInfo
}) })
} }
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import url("../../assets/css/global.less"); @import url('../../assets/css/global.less');
@import url('../../assets/css/producted.less'); @import url('../../assets/css/producted.less');
</style> </style>