更改提交

This commit is contained in:
952108534@qq.com 2022-01-23 19:32:59 +08:00
parent 065db958c7
commit fcedb5d01e
5 changed files with 26244 additions and 917 deletions

View File

@ -56,7 +56,7 @@ export const getleckCourse = (name, offset) => {
* 加入购物车 * 加入购物车
*/ */
export const postCourseId = (productCode, buyCount, memberId, mobile, productImg, productName, productPrice, specifications, leftAllotment) => { export const postCourseId = (productCode,buyCount,memberId, mobile,productImg,productName,productPrice,specifications) => {
var data = { var data = {
buyCount:buyCount, buyCount:buyCount,
memberId: memberId, memberId: memberId,
@ -65,8 +65,7 @@ export const postCourseId = (productCode, buyCount, memberId, mobile, productImg
productImg: productImg, productImg: productImg,
productName:productName, productName:productName,
productPrice:productPrice, productPrice:productPrice,
specifications: specifications, specifications:specifications
leftAllotment: leftAllotment
} }
return fetch('/insertCartProductInfo', data,'POST') return fetch('/insertCartProductInfo', data,'POST')
} }
@ -82,6 +81,7 @@ export const isexistCart = (id, pet, address) => {
* 删除购物车 * 删除购物车
*/ */
export const deleteCart = ( productCode) => { export const deleteCart = ( productCode) => {
debugger;
var data = { var data = {
productCode productCode
} }
@ -436,19 +436,8 @@ export const getdiscount = (memberId, channelSecurity, mobile) => {
memberId:memberId, memberId:memberId,
mobile:mobile mobile:mobile
} }
return fetch('memberAddress?type=getAll', data, 'POST' )
//再次支付
export const repayOrde = (ordernumber) => {
console.log(ordernumber);
return fetch('repayOrderWX?orderNo='+ordernumber,'', 'POST' )
} }
//用户所有的优惠券
export const allConfig = (memberId,channelSecurity,mobile) => {
var data = {
}
return fetch('couponConfig?type=getAll', data, 'POST' )
}
//可用的优惠券 //可用的优惠券
export const alldiscount = (memberId,channelSecurity,mobile) => { export const alldiscount = (memberId,channelSecurity,mobile) => {
@ -477,6 +466,12 @@ export const generateOrderWX = (list) => {
}] }]
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 = {
@ -630,12 +625,9 @@ export const memberAddress = (type, data) => {
return fetch('memberAddress?type='+type, data, 'POST' ) return fetch('memberAddress?type='+type, data, 'POST' )
} }
//微信支付二维码
export const updateOrderWX = (data) => {
return fetch('updateOrderWX', data, 'POST')
}
//支付宝支付二维码 //支付宝支付二维码
export const generateOrderAlipay = (data) => { export const generateOrderAlipay = (data) => {
return fetch('generateOrderAlipay', data, 'POST' ) return fetch('generateOrderAlipay', data, 'POST' )
} }

View File

@ -77,6 +77,7 @@
font-style: normal; font-style: normal;
font-size: 12px; font-size: 12px;
display: block; display: block;
margin-left: 10px;
} }
} }
.rc-right { .rc-right {
@ -119,10 +120,10 @@
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;
float: right;
margin-right: 28px;
} }
span{ span{
@ -288,6 +289,8 @@ align-items: center;
font-size: 12px; font-size: 12px;
justify-content: center; justify-content: center;
margin-top: 8px; margin-top: 8px;
float: right;
margin-right: 28px;
} }
span{ span{

25621
rc-busness/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,12 @@
<template> <template>
<div> <div class="allmain">
<Myheader></Myheader> <Myheader></Myheader>
<div class="rc-main"> <!-- <tabs></tabs> -->
<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"
@ -14,6 +17,8 @@
</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"
@ -22,23 +27,24 @@
> >
<img :src="userimage" alt="" /> <img :src="userimage" alt="" />
<div class="rc-contair"> <div class="rc-contair">
<div class="rc-left" ref="userleft" id="userleft"> <div class="rc-left" ref="userleft" id="userleft" :style='usercolor'>
<div> <div>
<i></i><span>{{ item.couponAmount }}</span> <i></i><span>{{item.couponTypeId=='4'?parseInt(((item.discount) *10))+ '折':item.couponAmount}}</span>
</div> </div>
<strong>{{ item.couponName }}</strong> <strong>{{ item.couponName }}</strong>
</div> </div>
<div class="rc-right"> <div class="rc-right">
<i> <i :style='usercolor'>
{{ item.couponDesc }} {{ item.couponName }}
</i> </i>
<div class="rc-main" id="rc-main"> <div class="rc-userfont">
<span>有效期{{item.validFrom}}</span> <strong>有效期</strong>
<span>{{item.validFrom}}</span>
<em>{{item.validTo}}</em> <em>{{item.validTo}}</em>
</div> </div>
<nuxt-link :to="`/`"> <nuxt-link :to="`/productdetails/productlist`">
<div class="rc-footer" v-if="userload"> <div class="ts-standard-btn">
<span @click="usertiao()">立即使用</span> 立即支付
</div> </div>
</nuxt-link> </nuxt-link>
</div> </div>
@ -49,18 +55,22 @@
</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"),
@ -73,71 +83,6 @@ 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: [
{ {
@ -186,6 +131,10 @@ 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);
} }
@ -197,13 +146,17 @@ 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");
} }
@ -212,18 +165,16 @@ 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({ this.$router.push({ name: "productdetails-productlist",
path: "/",
query: { })
stype: 1,
},
});
}, },
@ -235,6 +186,18 @@ 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){
@ -253,260 +216,6 @@ import Myheader from "~/components/header.vue";
<style lang="less" scoped> <style lang="less" scoped>
// //
@media screen and(min-width: 320px) and(max-width:768px) { @import url("../../assets/css/global.less");
.active { @import url("../../assets/css/discount.less");
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;
}
}
}
}
// // /* 768px1920 *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>

View File

@ -117,18 +117,16 @@ export default {
mounted() { mounted() {
let stype=this.$route.query.stype; let stype=this.$route.query.stype;
console.log(stype) console.log(stype)
if(stype==1){ if(stype==1){
this.userData = this.$route.query.userData; this.userData = this.$route.query.userData;
this.repayOrde(this.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); console.log(this.userPayData);
this.qrtext=this.userPayData.wxPay
}else{ }else{
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
console.log(this.userData);
}, },
methods: { methods: {
@ -148,8 +146,12 @@ export default {
async repayOrde(ordernumber) { async repayOrde(ordernumber) {
let res = await repayOrde(ordernumber); let res = await repayOrde(ordernumber);
console.log(ordernumber); console.log(ordernumber);
if (res) { if (res) {
this.qrtext=res.data console.log(res)
this.qrtext=res.msg
debugger
console.log(this.qrtext);
} }
}, },