mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
更改提交
This commit is contained in:
parent
065db958c7
commit
fcedb5d01e
@ -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 = {
|
||||
buyCount:buyCount,
|
||||
memberId: memberId,
|
||||
@ -65,8 +65,7 @@ export const postCourseId = (productCode, buyCount, memberId, mobile, productImg
|
||||
productImg: productImg,
|
||||
productName:productName,
|
||||
productPrice:productPrice,
|
||||
specifications: specifications,
|
||||
leftAllotment: leftAllotment
|
||||
specifications:specifications
|
||||
}
|
||||
return fetch('/insertCartProductInfo', data,'POST')
|
||||
}
|
||||
@ -82,6 +81,7 @@ export const isexistCart = (id, pet, address) => {
|
||||
* 删除购物车
|
||||
*/
|
||||
export const deleteCart = ( productCode) => {
|
||||
debugger;
|
||||
var data = {
|
||||
productCode
|
||||
}
|
||||
@ -436,19 +436,8 @@ export const getdiscount = (memberId, channelSecurity, mobile) => {
|
||||
memberId:memberId,
|
||||
mobile:mobile
|
||||
}
|
||||
|
||||
//再次支付
|
||||
export const repayOrde = (ordernumber) => {
|
||||
console.log(ordernumber);
|
||||
return fetch('repayOrderWX?orderNo='+ordernumber,'', 'POST' )
|
||||
return fetch('memberAddress?type=getAll', data, 'POST' )
|
||||
}
|
||||
//用户所有的优惠券
|
||||
export const allConfig = (memberId,channelSecurity,mobile) => {
|
||||
var data = {
|
||||
}
|
||||
return fetch('couponConfig?type=getAll', data, 'POST' )
|
||||
}
|
||||
|
||||
|
||||
//可用的优惠券
|
||||
export const alldiscount = (memberId,channelSecurity,mobile) => {
|
||||
@ -477,6 +466,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 = {
|
||||
@ -630,12 +625,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 {
|
||||
@ -119,10 +120,10 @@
|
||||
border-radius: 100px;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
float: right;
|
||||
margin-right: 27px;
|
||||
justify-content: center;
|
||||
margin-top: 8px;
|
||||
float: right;
|
||||
margin-right: 28px;
|
||||
|
||||
}
|
||||
span{
|
||||
@ -288,6 +289,8 @@ align-items: center;
|
||||
font-size: 12px;
|
||||
justify-content: center;
|
||||
margin-top: 8px;
|
||||
float: right;
|
||||
margin-right: 28px;
|
||||
|
||||
}
|
||||
span{
|
||||
|
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
@ -1,9 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="allmain">
|
||||
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-main">
|
||||
<!-- <tabs></tabs> -->
|
||||
<div class="rc-top"></div>
|
||||
<div class="rc-usermain">
|
||||
<div class="rc-header">
|
||||
|
||||
<div class="rc rc-column">
|
||||
<span
|
||||
v-for="(item, index) in discountlist"
|
||||
:key="index"
|
||||
@ -14,6 +17,8 @@
|
||||
</span>
|
||||
<!-- <span @click="tanchu()">弹出</span> -->
|
||||
</div>
|
||||
<div class="online bold"></div>
|
||||
|
||||
<div class="rs-dis">
|
||||
<div
|
||||
class="rc-discount"
|
||||
@ -22,23 +27,24 @@
|
||||
>
|
||||
<img :src="userimage" alt="" />
|
||||
<div class="rc-contair">
|
||||
<div class="rc-left" ref="userleft" id="userleft">
|
||||
<div class="rc-left" ref="userleft" id="userleft" :style='usercolor'>
|
||||
<div>
|
||||
<i>¥</i><span>{{ item.couponAmount }}</span>
|
||||
<i>¥</i><span>{{item.couponTypeId=='4'?parseInt(((item.discount) *10))+ '折':item.couponAmount}}</span>
|
||||
</div>
|
||||
<strong>{{ item.couponName }}</strong>
|
||||
</div>
|
||||
<div class="rc-right">
|
||||
<i>
|
||||
{{ item.couponDesc }}
|
||||
<i :style='usercolor'>
|
||||
{{ item.couponName }}
|
||||
</i>
|
||||
<div class="rc-main" id="rc-main">
|
||||
<span>有效期{{item.validFrom}}至</span>
|
||||
<div class="rc-userfont">
|
||||
<strong>有效期</strong>
|
||||
<span>{{item.validFrom}}至</span>
|
||||
<em>{{item.validTo}}</em>
|
||||
</div>
|
||||
<nuxt-link :to="`/`">
|
||||
<div class="rc-footer" v-if="userload">
|
||||
<span @click="usertiao()">立即使用</span>
|
||||
<nuxt-link :to="`/productdetails/productlist`">
|
||||
<div class="ts-standard-btn">
|
||||
立即支付
|
||||
</div>
|
||||
</nuxt-link>
|
||||
</div>
|
||||
@ -49,18 +55,22 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import {allConfig,getdraw} from "../../ajax/getData";
|
||||
// import tabs from "@/components/tabs.vue";
|
||||
export default {
|
||||
// middleware: 'metaTitle',
|
||||
// // middleware: 'metaTitle',
|
||||
// meta: {title: '优惠券'},
|
||||
data() {
|
||||
return {
|
||||
userload: true,
|
||||
pastdue: false,
|
||||
unused: false,
|
||||
usercolor:{color:'#e1001a'},
|
||||
usermessage:[],
|
||||
userstates:0,
|
||||
userimage: require("../../assets/image/unused.png"),
|
||||
@ -73,71 +83,6 @@ export default {
|
||||
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",
|
||||
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: [
|
||||
{
|
||||
@ -186,6 +131,10 @@ export default {
|
||||
if(data){
|
||||
console.log(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);
|
||||
}
|
||||
|
||||
@ -197,13 +146,17 @@ export default {
|
||||
this.pastdue = true;
|
||||
this.userimage = require("../../assets/image/hasused.png");
|
||||
this.userstates=1
|
||||
console.log(this.$refs.userleft);
|
||||
this.usercolor={color:'white'}
|
||||
|
||||
|
||||
this.userdraw(this.usermessage.data.mobile,1)
|
||||
}
|
||||
if (this.activeIndex == 0) {
|
||||
this.userload = true;
|
||||
this.pastdue = false;
|
||||
this.userdraw(this.usermessage.data.mobile,0)
|
||||
|
||||
this.usercolor={color:'#e1001a'}
|
||||
this.userstates=0
|
||||
this.userimage = require("../../assets/image/unused.png");
|
||||
}
|
||||
@ -212,18 +165,16 @@ export default {
|
||||
this.pastdue = true;
|
||||
this.userdraw(this.usermessage.data.mobile,2)
|
||||
this.userstates=2
|
||||
this.usercolor={color:'white'}
|
||||
this.userimage = require("../../assets/image/expired.png");
|
||||
}
|
||||
console.log(index);
|
||||
},
|
||||
|
||||
usertiao(){
|
||||
this.$router.push({
|
||||
path: "/",
|
||||
query: {
|
||||
stype: 1,
|
||||
},
|
||||
});
|
||||
this.$router.push({ name: "productdetails-productlist",
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@ -235,6 +186,18 @@ export default {
|
||||
// }
|
||||
// dis_livchat(option);
|
||||
// }
|
||||
},
|
||||
|
||||
directives: {
|
||||
'color': {
|
||||
bind: function(el, binding){
|
||||
el.style.color = binding.value
|
||||
},
|
||||
inserted: function(el){
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
if(this.usermessage!=='' ||this.usermessage.data!==undefined){
|
||||
@ -253,260 +216,6 @@ import Myheader from "~/components/header.vue";
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 手机端
|
||||
@media screen and(min-width: 320px) and(max-width:768px) {
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@import url("../../assets/css/global.less");
|
||||
@import url("../../assets/css/discount.less");
|
||||
</style>
|
@ -117,18 +117,16 @@ export default {
|
||||
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);
|
||||
console.log(this.userPayData);
|
||||
this.qrtext=this.userPayData.wxPay
|
||||
}else{
|
||||
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||
console.log(this.userPayData);
|
||||
}
|
||||
this.qrtext=this.userPayData.wxPay
|
||||
console.log(this.userData);
|
||||
|
||||
},
|
||||
methods: {
|
||||
@ -148,8 +146,12 @@ export default {
|
||||
async repayOrde(ordernumber) {
|
||||
let res = await repayOrde(ordernumber);
|
||||
console.log(ordernumber);
|
||||
|
||||
if (res) {
|
||||
this.qrtext=res.data
|
||||
console.log(res)
|
||||
this.qrtext=res.msg
|
||||
debugger
|
||||
console.log(this.qrtext);
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user