mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 10:16:38 +08:00
提交更改
This commit is contained in:
parent
7455d73e63
commit
e0d50bf974
@ -466,6 +466,12 @@ export const goodsmessage = (productCode) => {
|
|||||||
}]
|
}]
|
||||||
return fetch('generateOrderWX', list, 'POST' )
|
return fetch('generateOrderWX', list, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//再次支付
|
||||||
|
export const repayOrde = (ordernumber) => {
|
||||||
|
console.log(ordernumber);
|
||||||
|
return fetch('repayOrderWX?orderNo='+ordernumber,'', 'POST' )
|
||||||
|
}
|
||||||
//用户所有的优惠券
|
//用户所有的优惠券
|
||||||
export const allConfig = (memberId,channelSecurity,mobile) => {
|
export const allConfig = (memberId,channelSecurity,mobile) => {
|
||||||
var data = {
|
var data = {
|
||||||
|
@ -114,11 +114,13 @@
|
|||||||
|
|
||||||
width: 72px;
|
width: 72px;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
background: #E2001A;
|
background: #E2001A;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
float: right;
|
||||||
|
margin-right: 27px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
|
||||||
|
@ -7,23 +7,19 @@
|
|||||||
<em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
|
<em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
|
||||||
<span>{{orderstatus}}</span>
|
<span>{{orderstatus}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-border"></div>
|
<div class="delivery" v-if="isshow" >
|
||||||
<div v-if="isshow">
|
|
||||||
<div class="delivery" v-for="(userdata,index) in delivery" :key="index" >
|
|
||||||
|
|
||||||
<div class="to-delivery">
|
<div class="to-delivery">
|
||||||
<span>{{ userdata.state }}</span>
|
<span>{{ trackingstates}}</span>
|
||||||
<i>{{ userdata.time }}</i>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="bo-delivery">
|
<div class="bo-delivery">
|
||||||
<span>{{ userdata.address }}</span>
|
<span>{{ logisticsCompany }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="viewdetails">
|
<div class="viewdetails">
|
||||||
<span>查看详情</span>
|
<span>查看详情</span>
|
||||||
<img :src="leftico" alt="" />
|
<img :src="leftico" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
class="mypersonal"
|
class="mypersonal"
|
||||||
v-for="(datddress, index) in useraddress"
|
v-for="(datddress, index) in useraddress"
|
||||||
@ -37,11 +33,14 @@
|
|||||||
<span>{{ datddress.provinceName }}{{datddress.cityName}}{{datddress.districtName}}{{datddress.detailAddress}}</span>
|
<span>{{ datddress.provinceName }}{{datddress.cityName}}{{datddress.districtName}}{{datddress.detailAddress}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div >
|
<div >
|
||||||
<div class="rc-center">
|
<div class="rc-center">
|
||||||
<div class="rc-usermain" v-for="(userlist,index) in item.orderDetailList" :key="index">
|
<div class="rc-usermain" v-for="(userlist,index) in item.orderDetailList" :key="index">
|
||||||
<div class="rc-image">
|
<div class="rc-image">
|
||||||
<img :src="item.catimage" alt="" />
|
<img src="../../static/images/default.jpg" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<div class="rc-usercenter">
|
<div class="rc-usercenter">
|
||||||
@ -52,7 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottom">
|
<div class="rc-userbottom">
|
||||||
<span>数量:{{ item.pcs }}件</span>
|
<span>数量:{{ item.pcs }}件</span>
|
||||||
<i>¥{{ item.ecPrice }}</i>
|
<i>¥{{ 10 }}</i>
|
||||||
<div class="rc-bottom">
|
<div class="rc-bottom">
|
||||||
<span @click="userpay()">{{customer}}</span>
|
<span @click="userpay()">{{customer}}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -126,7 +125,7 @@
|
|||||||
<em>¥{{usersalesAmount}}</em>
|
<em>¥{{usersalesAmount}}</em>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-bottom:40px">
|
<div style="padding-bottom:40px">
|
||||||
<span @click="onceagain">再次购买</span>
|
<span @click="onceagain()">再次购买</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -134,7 +133,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-full-width rc-margin-y--md">
|
<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}}
|
{{payorsucess}}
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
@ -155,12 +154,14 @@ export default {
|
|||||||
return {
|
return {
|
||||||
goldmedal:[],
|
goldmedal:[],
|
||||||
userproductId:'',
|
userproductId:'',
|
||||||
|
logisticsDate:'',
|
||||||
userphone:'',
|
userphone:'',
|
||||||
logisticsNumber:'',
|
logisticsNumber:'',
|
||||||
customer:'',//联系客服或者取消订单
|
customer:'',//联系客服或者取消订单
|
||||||
payorsucess:'', //立即支付或者再次购买,
|
payorsucess:'', //立即支付或者再次购买,
|
||||||
addressstype: null,
|
addressstype: null,
|
||||||
addressUserName:'',
|
addressUserName:'',
|
||||||
|
logisticsCompany:'',//物流公司
|
||||||
orderstatus: '',
|
orderstatus: '',
|
||||||
goldastates:'',
|
goldastates:'',
|
||||||
userisdelivery:'待收货',
|
userisdelivery:'待收货',
|
||||||
@ -172,6 +173,7 @@ export default {
|
|||||||
userdata:"",
|
userdata:"",
|
||||||
usermessage:null,
|
usermessage:null,
|
||||||
userid: null,
|
userid: null,
|
||||||
|
trackingstates:'',//运输状态
|
||||||
useralllist:[],
|
useralllist:[],
|
||||||
delivery: [
|
delivery: [
|
||||||
|
|
||||||
@ -240,6 +242,7 @@ userpay(){
|
|||||||
if(this.payorsucess=='立即支付'){
|
if(this.payorsucess=='立即支付'){
|
||||||
console.log('----')
|
console.log('----')
|
||||||
this.getwei();
|
this.getwei();
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/productdetails/producted",
|
path: "/productdetails/producted",
|
||||||
@ -259,13 +262,27 @@ userpay(){
|
|||||||
if(data){
|
if(data){
|
||||||
this.goldmedal=data;
|
this.goldmedal=data;
|
||||||
for(let i=0;i<this.goldmedal.length;i++){
|
for(let i=0;i<this.goldmedal.length;i++){
|
||||||
// this.goldmedal[i].status=0
|
|
||||||
this.goldastates=this.goldmedal[i].status;
|
this.goldastates=this.goldmedal[i].status;
|
||||||
this.userproductId=this.goldmedal[i].orderDetailList[0].productId;
|
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.orderNumber=this.goldmedal[i].orderNumber
|
||||||
this.usersalesAmount=this.goldmedal[i].salesAmount;
|
this.usersalesAmount=this.goldmedal[i].salesAmount;
|
||||||
this.addressUserName=this.goldmedal[i].addressUserName;
|
this.addressUserName=this.goldmedal[i].addressUserName;
|
||||||
|
|
||||||
}
|
}
|
||||||
console.log(this.goldmedal,this.userproductId,this.usersalesAmount);
|
console.log(this.goldmedal,this.userproductId,this.usersalesAmount);
|
||||||
}
|
}
|
||||||
@ -274,39 +291,30 @@ if(data){
|
|||||||
},
|
},
|
||||||
//订单立即支付
|
//订单立即支付
|
||||||
async getwei(user) {
|
async getwei(user) {
|
||||||
let postData = [];
|
console.log(user);
|
||||||
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);
|
|
||||||
let userPayData = {
|
let userPayData = {
|
||||||
orderId: res.data,
|
userprice: this.usersalesAmount,
|
||||||
userprice: this.usersalesAmount, //订单总价
|
userinformation:this.
|
||||||
userinformation:
|
addressUserName +
|
||||||
this.addressUserName+ //姓名
|
|
||||||
" " +
|
" " +
|
||||||
this.userphone, //电话
|
this.orderNumber,
|
||||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||||
};
|
};
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
query: {
|
query: {
|
||||||
userPayData:JSON.stringify(userPayData),
|
userData:this.orderNumber,
|
||||||
|
stype:1,
|
||||||
|
userPayData: JSON.stringify(userPayData),
|
||||||
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
// this.$router.push({
|
||||||
|
// path: "/personal/userpay",
|
||||||
|
// query: {
|
||||||
|
|
||||||
|
// },
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
async editaddress(user) {
|
async editaddress(user) {
|
||||||
// user.data.id=844350;
|
// user.data.id=844350;
|
||||||
@ -337,6 +345,7 @@ console.log(this.userdata);
|
|||||||
this.userphone=this.usermessage.data.mobile;
|
this.userphone=this.usermessage.data.mobile;
|
||||||
this.editaddress(this.userid);
|
this.editaddress(this.userid);
|
||||||
this.addressstype = this.$route.query.stype;
|
this.addressstype = this.$route.query.stype;
|
||||||
|
|
||||||
this.orderNumber=this.$route.query.orderNumber;
|
this.orderNumber=this.$route.query.orderNumber;
|
||||||
this.orderquantity(this.orderNumber)
|
this.orderquantity(this.orderNumber)
|
||||||
if(this.addressstype==2){
|
if(this.addressstype==2){
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="allmain">
|
<div>
|
||||||
|
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<!-- <tabs></tabs> -->
|
<div class="rc-main">
|
||||||
<div class="rc-top"></div>
|
|
||||||
<div class="rc-usermain">
|
<div class="rc-usermain">
|
||||||
|
<div class="rc-header">
|
||||||
<div class="rc rc-column">
|
|
||||||
<span
|
<span
|
||||||
v-for="(item, index) in discountlist"
|
v-for="(item, index) in discountlist"
|
||||||
:key="index"
|
:key="index"
|
||||||
@ -17,8 +14,6 @@
|
|||||||
</span>
|
</span>
|
||||||
<!-- <span @click="tanchu()">弹出</span> -->
|
<!-- <span @click="tanchu()">弹出</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="online bold"></div>
|
|
||||||
|
|
||||||
<div class="rs-dis">
|
<div class="rs-dis">
|
||||||
<div
|
<div
|
||||||
class="rc-discount"
|
class="rc-discount"
|
||||||
@ -27,24 +22,23 @@
|
|||||||
>
|
>
|
||||||
<img :src="userimage" alt="" />
|
<img :src="userimage" alt="" />
|
||||||
<div class="rc-contair">
|
<div class="rc-contair">
|
||||||
<div class="rc-left" ref="userleft" id="userleft" :style='usercolor'>
|
<div class="rc-left" ref="userleft" id="userleft">
|
||||||
<div>
|
<div>
|
||||||
<i>¥</i><span>{{item.couponTypeId=='4'?parseInt(((item.discount) *10))+ '折':item.couponAmount}}</span>
|
<i>¥</i><span>{{ item.couponAmount }}</span>
|
||||||
</div>
|
</div>
|
||||||
<strong>{{ item.couponName }}</strong>
|
<strong>{{ item.couponName }}</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<i :style='usercolor'>
|
<i>
|
||||||
{{ item.couponName }}
|
{{ item.couponDesc }}
|
||||||
</i>
|
</i>
|
||||||
<div class="rc-userfont">
|
<div class="rc-main" id="rc-main">
|
||||||
<strong>有效期</strong>
|
<span>有效期{{item.validFrom}}至</span>
|
||||||
<span>{{item.validFrom}}至</span>
|
<em>{{ item.validTo }}</em>
|
||||||
<em>{{item.validTo}}</em>
|
|
||||||
</div>
|
</div>
|
||||||
<nuxt-link :to="`/productdetails/productlist`">
|
<nuxt-link :to="`/`">
|
||||||
<div v-if="userload" class="ts-stand">
|
<div class="rc-footer" v-if="userload">
|
||||||
|
<span @click="usertiao()">立即使用</span>
|
||||||
</div>
|
</div>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
@ -55,22 +49,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {allConfig,getdraw} from "../../ajax/getData";
|
import {allConfig,getdraw} from "../../ajax/getData";
|
||||||
// import tabs from "@/components/tabs.vue";
|
|
||||||
export default {
|
export default {
|
||||||
// middleware: 'metaTitle',
|
|
||||||
// // middleware: 'metaTitle',
|
|
||||||
// meta: {title: '优惠券'},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userload: true,
|
userload: true,
|
||||||
pastdue: false,
|
pastdue: false,
|
||||||
unused: false,
|
unused: false,
|
||||||
usercolor:{color:'#e1001a'},
|
|
||||||
usermessage:[],
|
usermessage:[],
|
||||||
userstates:0,
|
userstates:0,
|
||||||
userimage: require("../../assets/image/unused.png"),
|
userimage: require("../../assets/image/unused.png"),
|
||||||
@ -83,6 +73,71 @@ export default {
|
|||||||
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",
|
||||||
|
pricestype: "新客优惠券",
|
||||||
|
special: "全场每满299-30",
|
||||||
|
period: "有效期",
|
||||||
|
starttime: "2021.11.29-2022.01.28",
|
||||||
|
catimage: require("../../assets/image/unused.png"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
price: "30",
|
||||||
|
pricestype: "新客优惠券",
|
||||||
|
special: "全场每满299-30",
|
||||||
|
period: "有效期",
|
||||||
|
starttime: "2021.11.29-2022.01.28",
|
||||||
|
catimage: require("../../assets/image/unused.png"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
price: "30",
|
||||||
|
pricestype: "新客优惠券",
|
||||||
|
special: "全场每满299-30",
|
||||||
|
period: "有效期",
|
||||||
|
starttime: "2021.11.29-2022.01.28",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
price: "30",
|
||||||
|
pricestype: "新客优惠券",
|
||||||
|
special: "全场每满299-30",
|
||||||
|
period: "有效期",
|
||||||
|
starttime: "2021.11.29-2022.01.28",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
price: "30",
|
||||||
|
pricestype: "新客优惠券",
|
||||||
|
special: "全场每满299-30",
|
||||||
|
period: "有效期",
|
||||||
|
starttime: "2021.11.29-2022.01.28",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
price: "30",
|
||||||
|
pricestype: "新客优惠券",
|
||||||
|
special: "全场每满299-30",
|
||||||
|
period: "有效期",
|
||||||
|
starttime: "2021.11.29-2022.01.28",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
price: "30",
|
||||||
|
pricestype: "新客优惠券",
|
||||||
|
special: "全场每满299-30",
|
||||||
|
period: "有效期",
|
||||||
|
starttime: "2021.11.29-2022.01.28",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
price: "30",
|
||||||
|
pricestype: "新客优惠券",
|
||||||
|
special: "全场每满299-30",
|
||||||
|
period: "有效期",
|
||||||
|
starttime: "2021.11.29-2022.01.28",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
price: "30",
|
||||||
|
pricestype: "新客优惠券",
|
||||||
|
special: "全场每满299-30",
|
||||||
|
period: "有效期",
|
||||||
|
starttime: "2021.11.29-2022.01.28",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
discountlist: [
|
discountlist: [
|
||||||
{
|
{
|
||||||
@ -131,10 +186,6 @@ export default {
|
|||||||
if(data){
|
if(data){
|
||||||
console.log(data);
|
console.log(data);
|
||||||
this.newlist=data.data;
|
this.newlist=data.data;
|
||||||
this.newlist.forEach(element=>{
|
|
||||||
element.validFrom=element.validFrom.slice(0,10)
|
|
||||||
element.validTo=element.validTo.slice(0,10)
|
|
||||||
})
|
|
||||||
console.log(this.newlist);
|
console.log(this.newlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,17 +197,13 @@ export default {
|
|||||||
this.pastdue = true;
|
this.pastdue = true;
|
||||||
this.userimage = require("../../assets/image/hasused.png");
|
this.userimage = require("../../assets/image/hasused.png");
|
||||||
this.userstates=1
|
this.userstates=1
|
||||||
console.log(this.$refs.userleft);
|
|
||||||
this.usercolor={color:'white'}
|
|
||||||
|
|
||||||
|
|
||||||
this.userdraw(this.usermessage.data.mobile,1)
|
this.userdraw(this.usermessage.data.mobile,1)
|
||||||
}
|
}
|
||||||
if (this.activeIndex == 0) {
|
if (this.activeIndex == 0) {
|
||||||
this.userload = true;
|
this.userload = true;
|
||||||
this.pastdue = false;
|
this.pastdue = false;
|
||||||
this.userdraw(this.usermessage.data.mobile,0)
|
this.userdraw(this.usermessage.data.mobile,0)
|
||||||
this.usercolor={color:'#e1001a'}
|
|
||||||
this.userstates=0
|
this.userstates=0
|
||||||
this.userimage = require("../../assets/image/unused.png");
|
this.userimage = require("../../assets/image/unused.png");
|
||||||
}
|
}
|
||||||
@ -165,16 +212,18 @@ export default {
|
|||||||
this.pastdue = true;
|
this.pastdue = true;
|
||||||
this.userdraw(this.usermessage.data.mobile,2)
|
this.userdraw(this.usermessage.data.mobile,2)
|
||||||
this.userstates=2
|
this.userstates=2
|
||||||
this.usercolor={color:'white'}
|
|
||||||
this.userimage = require("../../assets/image/expired.png");
|
this.userimage = require("../../assets/image/expired.png");
|
||||||
}
|
}
|
||||||
console.log(index);
|
console.log(index);
|
||||||
},
|
},
|
||||||
|
|
||||||
usertiao(){
|
usertiao(){
|
||||||
this.$router.push({ name: "productdetails-productlist",
|
this.$router.push({
|
||||||
|
path: "/",
|
||||||
})
|
query: {
|
||||||
|
stype: 1,
|
||||||
|
},
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@ -186,18 +235,6 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// dis_livchat(option);
|
// dis_livchat(option);
|
||||||
// }
|
// }
|
||||||
},
|
|
||||||
|
|
||||||
directives: {
|
|
||||||
'color': {
|
|
||||||
bind: function(el, binding){
|
|
||||||
el.style.color = binding.value
|
|
||||||
},
|
|
||||||
inserted: function(el){
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if(this.usermessage!=='' ||this.usermessage.data!==undefined){
|
if(this.usermessage!=='' ||this.usermessage.data!==undefined){
|
||||||
@ -216,6 +253,260 @@ import Myheader from "~/components/header.vue";
|
|||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
// 手机端
|
// 手机端
|
||||||
@import url("../../assets/css/global.less");
|
@media screen and(min-width: 320px) and(max-width:768px) {
|
||||||
@import url("../../assets/css/discount.less");
|
.active {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #e2001a;
|
||||||
|
|
||||||
|
}
|
||||||
|
.unactive {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #444444;
|
||||||
|
|
||||||
|
}
|
||||||
|
.rc-header {
|
||||||
|
height: 64px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 23px;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-left: 32px;
|
||||||
|
|
||||||
|
}
|
||||||
|
span:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rc-discount {
|
||||||
|
margin-left: 23px;
|
||||||
|
display: flex;
|
||||||
|
margin-top: 16px;
|
||||||
|
width: 335px;
|
||||||
|
background: #ffffff;
|
||||||
|
position: relative;
|
||||||
|
height: 120px;
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.rc-contair {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.rc-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #e1001a;
|
||||||
|
padding-right: 21px;
|
||||||
|
width: 30%;
|
||||||
|
float: left;
|
||||||
|
height: 100%;
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
display: block;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-left: 36px;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #e1001a;
|
||||||
|
}
|
||||||
|
.rc-main {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
em {
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
span {
|
||||||
|
width: 72px;
|
||||||
|
height: 25px;
|
||||||
|
background: #e2001a;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 25px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
border-radius: 100px;
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// // /* 最小768px最大1920 *pc端/
|
||||||
|
@media screen and (min-width: 768px) and (max-width: 1920px) {
|
||||||
|
.rc-main {
|
||||||
|
width: 100%;
|
||||||
|
.rc-usermain {
|
||||||
|
width: 92%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.active {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #e2001a;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.unactive {
|
||||||
|
font-size: 16px;
|
||||||
|
color: #444444;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.rc-header {
|
||||||
|
height: 64px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-left: 23px;
|
||||||
|
justify-content: center;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-left: 32px;
|
||||||
|
}
|
||||||
|
span:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rs-dis {
|
||||||
|
margin-top: 70px;
|
||||||
|
}
|
||||||
|
.rc-discount {
|
||||||
|
margin-left: 50px;
|
||||||
|
display: flex;
|
||||||
|
margin-top: 40px;
|
||||||
|
width: 335px;
|
||||||
|
background: #ffffff;
|
||||||
|
position: relative;
|
||||||
|
height: 120px;
|
||||||
|
float: left;
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.rc-contair {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.rc-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #e1001a;
|
||||||
|
padding-right: 21px;
|
||||||
|
width: 30%;
|
||||||
|
float: left;
|
||||||
|
height: 100%;
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
display: block;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-left: 36px;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #e1001a;
|
||||||
|
}
|
||||||
|
.rc-main {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
em {
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-right: 10px;
|
||||||
|
span {
|
||||||
|
width: 72px;
|
||||||
|
height: 25px;
|
||||||
|
background: #e2001a;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 25px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
border-radius: 100px;
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.rc-userright {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 78px;
|
||||||
|
justify-content: center;
|
||||||
|
height: 78px;
|
||||||
|
border: 2px solid #999999;
|
||||||
|
border-radius: 50%;
|
||||||
|
span {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border: 1px solid #999999;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-usermain" >
|
<div class="rc-usermain" >
|
||||||
<div class="rc-image">
|
<div class="rc-image">
|
||||||
<img :src="item.catimage" alt="" />
|
<img src="../../static/images/default.jpg" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right" @click="usertiaozhuan(item)">
|
<div class="rc-right" @click="usertiaozhuan(item)">
|
||||||
<div class="rc-usercenter">
|
<div class="rc-usercenter">
|
||||||
@ -306,7 +306,6 @@ export default {
|
|||||||
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < this.useralllist.length; i++) {
|
for (var i = 0; i < this.useralllist.length; i++) {
|
||||||
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
||||||
this.useralllist[i].status = this.goldmedal[i].status;
|
this.useralllist[i].status = this.goldmedal[i].status;
|
||||||
@ -333,38 +332,21 @@ export default {
|
|||||||
|
|
||||||
//订单立即支付
|
//订单立即支付
|
||||||
async getwei(item) {
|
async getwei(item) {
|
||||||
|
console.log(item);
|
||||||
let postData = [];
|
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 = {
|
let userPayData = {
|
||||||
orderId: res.data,
|
userprice: item.salesAmount,
|
||||||
userprice: item.salesAmount, //订单总价
|
userinformation:item.addressUserName +
|
||||||
userinformation:
|
|
||||||
item.addressUserName+ //姓名
|
|
||||||
" " +
|
" " +
|
||||||
item.phoneNumber, //电话
|
this.orderNumber,
|
||||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||||
};
|
};
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
query: {
|
query: {
|
||||||
userPayData:JSON.stringify(userPayData),
|
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 tabs from "@/components/tabs.vue";
|
||||||
import vueQr from 'vue-qr'
|
import vueQr from 'vue-qr'
|
||||||
|
|
||||||
import { generateOrderAlipay, updateOrderWX } from "../../ajax/getData";
|
import { generateOrderAlipay, updateOrderWX,repayOrde } from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -108,12 +108,26 @@ export default {
|
|||||||
dialogFail: false,
|
dialogFail: false,
|
||||||
userPayData: {},
|
userPayData: {},
|
||||||
qrtext:'',
|
qrtext:'',
|
||||||
|
userData:'',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
mounted() {
|
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.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||||
|
console.log(this.userPayData);
|
||||||
this.qrtext=this.userPayData.wxPay
|
this.qrtext=this.userPayData.wxPay
|
||||||
|
}else{
|
||||||
|
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||||
|
}
|
||||||
|
this.qrtext=this.userPayData.wxPay
|
||||||
|
console.log(this.userData);
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeDialogSuccess() {
|
closeDialogSuccess() {
|
||||||
@ -129,6 +143,14 @@ export default {
|
|||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async repayOrde(ordernumber) {
|
||||||
|
let res = await repayOrde(ordernumber);
|
||||||
|
console.log(ordernumber);
|
||||||
|
if (res) {
|
||||||
|
this.qrtext=res.data
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
async selectGoods(item, index) {
|
async selectGoods(item, index) {
|
||||||
this.activeIndex = index;
|
this.activeIndex = index;
|
||||||
this.paytype = item.paytype;
|
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