mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 10:16:38 +08:00
commit
14bba229ea
@ -91,6 +91,7 @@ export const monitorOrderNotify = (OrderNumber) => {
|
||||
* 删除购物车
|
||||
*/
|
||||
export const deleteCart = ( productCode) => {
|
||||
debugger;
|
||||
var data = {
|
||||
productCode
|
||||
}
|
||||
@ -475,6 +476,12 @@ export const generateOrderWX = (list) => {
|
||||
}]
|
||||
return fetch('generateOrderWX', list, 'POST' )
|
||||
}
|
||||
|
||||
//再次支付
|
||||
export const repayOrde = (ordernumber) => {
|
||||
console.log(ordernumber);
|
||||
return fetch('repayOrderWX?orderNo='+ordernumber,'', 'POST' )
|
||||
}
|
||||
//用户所有的优惠券
|
||||
export const allConfig = (memberId,channelSecurity,mobile) => {
|
||||
var data = {
|
||||
@ -628,12 +635,9 @@ export const memberAddress = (type, data) => {
|
||||
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' )
|
||||
}
|
||||
|
@ -77,6 +77,7 @@
|
||||
font-style: normal;
|
||||
font-size: 12px;
|
||||
display: block;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.rc-right {
|
||||
@ -121,6 +122,8 @@ align-items: center;
|
||||
font-size: 12px;
|
||||
justify-content: center;
|
||||
margin-top: 8px;
|
||||
float: right;
|
||||
margin-right: 28px;
|
||||
|
||||
}
|
||||
span{
|
||||
@ -286,6 +289,8 @@ align-items: center;
|
||||
font-size: 12px;
|
||||
justify-content: center;
|
||||
margin-top: 8px;
|
||||
float: right;
|
||||
margin-right: 28px;
|
||||
|
||||
}
|
||||
span{
|
||||
|
@ -127,6 +127,7 @@ margin-right: 20px;
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
display: block;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
@ -416,6 +417,7 @@ margin-right: 20px;
|
||||
img {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
25621
rc-busness/package-lock.json
generated
Normal file
25621
rc-busness/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -7,23 +7,19 @@
|
||||
<em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
|
||||
<span>{{orderstatus}}</span>
|
||||
</div>
|
||||
<div class="rc-border"></div>
|
||||
<div v-if="isshow">
|
||||
<div class="delivery" v-for="(userdata,index) in delivery" :key="index" >
|
||||
|
||||
<div class="delivery" v-if="isshow" >
|
||||
<div class="to-delivery">
|
||||
<span>{{ userdata.state }}</span>
|
||||
<i>{{ userdata.time }}</i>
|
||||
<span>{{ trackingstates}}</span>
|
||||
</div>
|
||||
<div class="bo-delivery">
|
||||
<span>{{ userdata.address }}</span>
|
||||
<span>{{ logisticsCompany }}</span>
|
||||
</div>
|
||||
<div class="viewdetails">
|
||||
<span>查看详情</span>
|
||||
<img :src="leftico" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="mypersonal"
|
||||
v-for="(datddress, index) in useraddress"
|
||||
@ -37,11 +33,14 @@
|
||||
<span>{{ datddress.provinceName }}{{datddress.cityName}}{{datddress.districtName}}{{datddress.detailAddress}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div >
|
||||
<div class="rc-center">
|
||||
<div class="rc-usermain" v-for="(userlist,index) in item.orderDetailList" :key="index">
|
||||
<div class="rc-image">
|
||||
<img :src="item.catimage" alt="" />
|
||||
<img src="../../static/images/default.jpg" alt="" />
|
||||
</div>
|
||||
<div class="rc-right">
|
||||
<div class="rc-usercenter">
|
||||
@ -52,7 +51,7 @@
|
||||
</div>
|
||||
<div class="rc-userbottom">
|
||||
<span>数量:{{ item.pcs }}件</span>
|
||||
<i>¥{{ item.ecPrice }}</i>
|
||||
<i>¥{{ 10 }}</i>
|
||||
<div class="rc-bottom">
|
||||
<span @click="userpay()">{{customer}}</span>
|
||||
</div>
|
||||
@ -126,7 +125,7 @@
|
||||
<em>¥{{usersalesAmount}}</em>
|
||||
</div>
|
||||
<div style="padding-bottom:40px">
|
||||
<span @click="onceagain">再次购买</span>
|
||||
<span @click="onceagain()">再次购买</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -134,7 +133,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="rc-full-width rc-margin-y--md">
|
||||
<i class="ts-standard-btn ts-standard-btn--two center" @click="onceagain">
|
||||
<i class="ts-standard-btn ts-standard-btn--two center" @click="onceagain()">
|
||||
{{payorsucess}}
|
||||
</i>
|
||||
|
||||
@ -155,12 +154,14 @@ export default {
|
||||
return {
|
||||
goldmedal:[],
|
||||
userproductId:'',
|
||||
logisticsDate:'',
|
||||
userphone:'',
|
||||
logisticsNumber:'',
|
||||
customer:'',//联系客服或者取消订单
|
||||
payorsucess:'', //立即支付或者再次购买,
|
||||
addressstype: null,
|
||||
addressUserName:'',
|
||||
logisticsCompany:'',//物流公司
|
||||
orderstatus: '',
|
||||
goldastates:'',
|
||||
userisdelivery:'待收货',
|
||||
@ -172,6 +173,7 @@ export default {
|
||||
userdata:"",
|
||||
usermessage:null,
|
||||
userid: null,
|
||||
trackingstates:'',//运输状态
|
||||
useralllist:[],
|
||||
delivery: [
|
||||
|
||||
@ -240,6 +242,7 @@ userpay(){
|
||||
if(this.payorsucess=='立即支付'){
|
||||
console.log('----')
|
||||
this.getwei();
|
||||
|
||||
}else{
|
||||
this.$router.push({
|
||||
path: "/productdetails/producted",
|
||||
@ -259,13 +262,27 @@ userpay(){
|
||||
if(data){
|
||||
this.goldmedal=data;
|
||||
for(let i=0;i<this.goldmedal.length;i++){
|
||||
// this.goldmedal[i].status=0
|
||||
this.goldastates=this.goldmedal[i].status;
|
||||
this.userproductId=this.goldmedal[i].orderDetailList[0].productId;
|
||||
this.logisticsNumber=this.goldmedal[i].orderDetailList[0].logisticsNumber;
|
||||
this.logisticsNumber=this.goldmedal[i].orderDetailList[0].logisticsNumber; //物流单号
|
||||
this.trackingstates=this.goldmedal[i].orderDetailList[0].status//运输状态
|
||||
|
||||
if( this.trackingstates==0){
|
||||
this.trackingstates='运输中'
|
||||
}else if(this.trackingstates==1){
|
||||
this.trackingstates='已签收'
|
||||
}
|
||||
else if(this.trackingstates==2){
|
||||
this.trackingstates='未发货'
|
||||
}
|
||||
console.log(this.goldmedal[i].orderDate);
|
||||
this.logisticsDate=new Date(this.goldmedal[i].orderDate.toLocaleString())//时间戳
|
||||
console.log(this.logisticsDate);
|
||||
this.logisticsCompany=this.goldmedal[i].orderDetailList[0].logisticsCompany; //物流公司
|
||||
this.orderNumber=this.goldmedal[i].orderNumber
|
||||
this.usersalesAmount=this.goldmedal[i].salesAmount;
|
||||
this.addressUserName=this.goldmedal[i].addressUserName;
|
||||
|
||||
}
|
||||
console.log(this.goldmedal,this.userproductId,this.usersalesAmount);
|
||||
}
|
||||
@ -274,39 +291,30 @@ if(data){
|
||||
},
|
||||
//订单立即支付
|
||||
async getwei(user) {
|
||||
let postData = [];
|
||||
let oneProduct = {
|
||||
productName: item.productName,
|
||||
buyCount: item.buyCount,
|
||||
productId: item.productCode,
|
||||
payAmount: item.productPrice,
|
||||
memberId: item.memberId,
|
||||
phoneNumber: item.mobile,
|
||||
orderAddress: {
|
||||
addressPhoneNumber: orderAddress[0].recipientPhone,
|
||||
addressUserName: orderAddress[0].recipient,
|
||||
addressProvinceName: orderAddress[0].provinceName,
|
||||
addressCityName: orderAddress[0].cityName,
|
||||
addressCountyName: orderAddress[0].districtName,
|
||||
addressDetailInfo: orderAddress[0].detailAddress,
|
||||
},
|
||||
};
|
||||
let res = await generateOrderWX(postData);
|
||||
console.log(user);
|
||||
let userPayData = {
|
||||
orderId: res.data,
|
||||
userprice: this.usersalesAmount, //订单总价
|
||||
userinformation:
|
||||
this.addressUserName+ //姓名
|
||||
userprice: this.usersalesAmount,
|
||||
userinformation:this.
|
||||
addressUserName +
|
||||
" " +
|
||||
this.userphone, //电话
|
||||
this.orderNumber,
|
||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
};
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
query: {
|
||||
userData:this.orderNumber,
|
||||
stype:1,
|
||||
userPayData: JSON.stringify(userPayData),
|
||||
|
||||
},
|
||||
});
|
||||
// this.$router.push({
|
||||
// path: "/personal/userpay",
|
||||
// query: {
|
||||
|
||||
// },
|
||||
// });
|
||||
},
|
||||
async editaddress(user) {
|
||||
// user.data.id=844350;
|
||||
@ -337,6 +345,7 @@ console.log(this.userdata);
|
||||
this.userphone=this.usermessage.data.mobile;
|
||||
this.editaddress(this.userid);
|
||||
this.addressstype = this.$route.query.stype;
|
||||
|
||||
this.orderNumber=this.$route.query.orderNumber;
|
||||
this.orderquantity(this.orderNumber)
|
||||
if(this.addressstype==2){
|
||||
|
@ -49,8 +49,8 @@
|
||||
<em>{{item.validTo}}</em>
|
||||
</div>
|
||||
<nuxt-link :to="`/productdetails/productlist`">
|
||||
<div v-if="userload" class="ts-stand">
|
||||
|
||||
<div class="ts-standard-btn">
|
||||
立即使用
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
|
@ -44,7 +44,7 @@
|
||||
</div>
|
||||
<div class="rc-usermain" >
|
||||
<div class="rc-image">
|
||||
<img :src="item.catimage" alt="" />
|
||||
<img src="../../static/images/default.jpg" alt="" />
|
||||
</div>
|
||||
<div class="rc-right" @click="usertiaozhuan(item)">
|
||||
<div class="rc-usercenter">
|
||||
@ -316,7 +316,6 @@ export default {
|
||||
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;
|
||||
@ -343,37 +342,21 @@ export default {
|
||||
|
||||
//订单立即支付
|
||||
async getwei(item) {
|
||||
console.log(item);
|
||||
let postData = [];
|
||||
// let oneProduct = {
|
||||
// productName: item.productName,
|
||||
// buyCount: item.buyCount,
|
||||
// productId: item.productCode,
|
||||
// payAmount: item.productPrice,
|
||||
// memberId: item.memberId,
|
||||
// phoneNumber: item.mobile,
|
||||
// orderAddress: {
|
||||
// addressPhoneNumber: orderAddress[0].recipientPhone,
|
||||
// addressUserName: orderAddress[0].recipient,
|
||||
// addressProvinceName: orderAddress[0].provinceName,
|
||||
// addressCityName: orderAddress[0].cityName,
|
||||
// addressCountyName: orderAddress[0].districtName,
|
||||
// addressDetailInfo: orderAddress[0].detailAddress,
|
||||
// },
|
||||
// };
|
||||
// postData.push(oneProduct);
|
||||
let res = await generateOrderWX(postData);
|
||||
let userPayData = {
|
||||
orderId: res.data,
|
||||
userprice: item.salesAmount, //订单总价
|
||||
userinformation:
|
||||
item.addressUserName+ //姓名
|
||||
userprice: item.salesAmount,
|
||||
orderId:item.orderNumber,
|
||||
userinformation:item.addressUserName +
|
||||
" " +
|
||||
item.phoneNumber, //电话
|
||||
item.phoneNumber,
|
||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
};
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
query: {
|
||||
userData:item.orderNumber,
|
||||
stype:1,
|
||||
userPayData: JSON.stringify(userPayData),
|
||||
},
|
||||
});
|
||||
|
@ -87,7 +87,7 @@ import Myheader from "~/components/header.vue";
|
||||
import tabs from "@/components/tabs.vue";
|
||||
import vueQr from 'vue-qr'
|
||||
|
||||
import { generateOrderAlipay, updateOrderWX, monitorOrderNotify } from "../../ajax/getData";
|
||||
import { generateOrderAlipay, updateOrderWX, monitorOrderNotify,repayOrde } from "../../ajax/getData";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -111,15 +111,24 @@ export default {
|
||||
dialogFail: false,
|
||||
userPayData: {},
|
||||
qrtext:'',
|
||||
userData:'',
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
mounted() {
|
||||
let stype=this.$route.query.stype;
|
||||
console.log(stype)
|
||||
if(stype==1){
|
||||
this.userData = this.$route.query.userData;
|
||||
this.repayOrde(this.userData);
|
||||
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||
//this.qrtext=this.userPayData.wxPay
|
||||
this.qrtext=this.userPayData.wxPay;
|
||||
this.payOrderWX()
|
||||
|
||||
console.log(this.userPayData);
|
||||
}else{
|
||||
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||
console.log(this.userPayData);
|
||||
}
|
||||
this.qrtext=this.userPayData.wxPay
|
||||
this.payOrderWX();
|
||||
},
|
||||
methods: {
|
||||
closeDialogSuccess() {
|
||||
@ -139,6 +148,16 @@ export default {
|
||||
// });
|
||||
},
|
||||
|
||||
async repayOrde(ordernumber) {
|
||||
let res = await repayOrde(ordernumber);
|
||||
console.log(ordernumber);
|
||||
if (res) {
|
||||
console.log(res)
|
||||
this.qrtext=res.msg
|
||||
console.log(this.qrtext);
|
||||
}
|
||||
},
|
||||
|
||||
async selectGoods(item, index) {
|
||||
this.activeIndex = index;
|
||||
this.paytype = item.paytype;
|
||||
|
BIN
rc-busness/static/images/default.jpg
Normal file
BIN
rc-busness/static/images/default.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
Loading…
Reference in New Issue
Block a user