更新C端后端api
This commit is contained in:
parent
d097528236
commit
0d620b6a2e
|
@ -14,8 +14,8 @@
|
||||||
<link href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/siteqiexchange/css/swiper.min.css" rel="stylesheet">
|
<link href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/siteqiexchange/css/swiper.min.css" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/homepage1_1_0.css">
|
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/homepage1_1_0.css">
|
||||||
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/loading.css">
|
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/loading.css">
|
||||||
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/apitest1_1_0.js"></script>"></script>
|
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/apitest1_1_0.js"></script>
|
||||||
<style>
|
<style>
|
||||||
* {
|
* {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="bottom" id="bottom" v-show="describe.type||detailUrl">
|
<div class="bottom" id="bottom" v-show="describe.type||detailUrl">
|
||||||
<img :src="detailUrl" v-show="detailUrl">
|
<img :src="detailUrl" v-show="detailUrl">
|
||||||
<img :src="describe.bg_image" v-show="describe.type==1&&describe.bg_image">
|
<img :src="describe.bg_image" v-show="describe.type==1&&describe.bg_image">
|
||||||
<div v-html="describe.content" class="goodsTip" v-show="describe.type==3&&describe.content"></div>
|
<div v-html="describe.content" class="goodsTip" v-show="describe.type==3&&describe.content"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -145,12 +145,12 @@
|
||||||
suspension: false,
|
suspension: false,
|
||||||
popboxtype: '',
|
popboxtype: '',
|
||||||
describe: {},
|
describe: {},
|
||||||
detailUrl:'',
|
detailUrl: '',
|
||||||
successTip: '',
|
successTip: '',
|
||||||
goodInfo: '',
|
goodInfo: '',
|
||||||
bgcolor: '',
|
bgcolor: '',
|
||||||
ftcolor: '',
|
ftcolor: '',
|
||||||
backAble:true,
|
backAble: true,
|
||||||
goodsShow: [
|
goodsShow: [
|
||||||
'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220120/9bedd7af6a8a570be8f2858564f9ec6d.png'
|
'https://lsxd-yunshanfu.oss-cn-hangzhou.aliyuncs.com/common_image/20220120/9bedd7af6a8a570be8f2858564f9ec6d.png'
|
||||||
]
|
]
|
||||||
|
@ -160,17 +160,19 @@
|
||||||
let self = this;
|
let self = this;
|
||||||
document.title = sessionStorage.getItem('title');
|
document.title = sessionStorage.getItem('title');
|
||||||
let detailsConfig = JSON.parse(sessionStorage.getItem('product_detail'));
|
let detailsConfig = JSON.parse(sessionStorage.getItem('product_detail'));
|
||||||
let goodsCount=sessionStorage.getItem('goodsCount');
|
let goodsCount = sessionStorage.getItem('goodsCount');
|
||||||
this.backAble=goodsCount>1;
|
this.backAble = goodsCount > 1;
|
||||||
this.bgcolor = detailsConfig.button_color;
|
this.bgcolor = detailsConfig.button_color;
|
||||||
this.bgcolor = '#f00'
|
this.bgcolor = '#f00'
|
||||||
this.ftcolor = detailsConfig.font_color;
|
this.ftcolor = detailsConfig.font_color;
|
||||||
this.describe = detailsConfig.describe;
|
this.describe = detailsConfig.describe;
|
||||||
let goodsInform=JSON.parse(sessionStorage.getItem('goodsInfo'));//商品信息
|
let goodsInform = JSON.parse(sessionStorage.getItem('goodsInfo')); //商品信息
|
||||||
this.goodInfo = goodsInform;
|
this.goodInfo = goodsInform;
|
||||||
let goods_desc=goodsInform.describe_url;
|
let goods_desc = goodsInform.describe_url;
|
||||||
this.goodsShow = goods_desc.length>0?goods_desc:[JSON.parse(sessionStorage.getItem('goodsInfo')).show_url];
|
this.goodsShow = goods_desc.length > 0 ? goods_desc : [JSON.parse(sessionStorage.getItem('goodsInfo'))
|
||||||
this.detailUrl=goodsInform.detail_url?goodsInform.detail_url:'';
|
.show_url
|
||||||
|
];
|
||||||
|
this.detailUrl = goodsInform.detail_url ? goodsInform.detail_url : '';
|
||||||
this.productType = JSON.parse(sessionStorage.getItem('goodsInfo')).account_type;
|
this.productType = JSON.parse(sessionStorage.getItem('goodsInfo')).account_type;
|
||||||
|
|
||||||
self.$nextTick(function () {
|
self.$nextTick(function () {
|
||||||
|
@ -184,11 +186,11 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
backgoodsFn() {
|
backgoodsFn() {
|
||||||
let goodsCount=sessionStorage.getItem('goodsCount');
|
let goodsCount = sessionStorage.getItem('goodsCount');
|
||||||
if(goodsCount>1){
|
if (goodsCount > 1) {
|
||||||
// window.location.replace(document.referrer);
|
// window.location.replace(document.referrer);
|
||||||
window.location.replace('./homepage.html');
|
window.location.replace('./homepage.html');
|
||||||
}else{
|
} else {
|
||||||
history.go(-2);
|
history.go(-2);
|
||||||
}
|
}
|
||||||
// window.location.replace(document.referrer);
|
// window.location.replace(document.referrer);
|
||||||
|
@ -304,16 +306,16 @@
|
||||||
this.popboxshow = true;
|
this.popboxshow = true;
|
||||||
this.tiptext = res.message;
|
this.tiptext = res.message;
|
||||||
if (res.code == -1) {
|
if (res.code == -1) {
|
||||||
let goodsCount=sessionStorage.getItem('goodsCount');
|
let goodsCount = sessionStorage.getItem('goodsCount');
|
||||||
if(goodsCount>1){
|
if (goodsCount > 1) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// window.location.replace(document.referrer);
|
// window.location.replace(document.referrer);
|
||||||
window.location.replace('./homepage.html');
|
window.location.replace('./homepage.html');
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}else{
|
} else {
|
||||||
let backUrl=window.history.length;
|
let backUrl = window.history.length;
|
||||||
if(backUrl){
|
if (backUrl) {
|
||||||
history.go(-backUrl+1);
|
history.go(-backUrl + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<link href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/siteqiexchange/css/swiper.min.css" rel="stylesheet">
|
<link href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/siteqiexchange/css/swiper.min.css" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/homepage1_1_0.css">
|
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/homepage1_1_0.css">
|
||||||
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/loading.css">
|
<link rel="stylesheet" href="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/css/loading.css">
|
||||||
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/apitest1_1_0.js"></script>"></script>
|
<script src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/js/apitest1_1_0.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
* {
|
* {
|
||||||
|
@ -98,7 +98,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 立即兑换 -->
|
<!-- 立即兑换 -->
|
||||||
<div class="exchangeBtn" :class="gstatus!=1?describe.type&&describe.type!=2&&describe.content?'bottomBtn noexchangeBtn':'noexchangeBtn':describe.type&&describe.type!=2&&describe.content?'bottomBtn':''"
|
<div class="exchangeBtn"
|
||||||
|
:class="gstatus!=1?describe.type&&describe.type!=2&&describe.content?'bottomBtn noexchangeBtn':'noexchangeBtn':describe.type&&describe.type!=2&&describe.content?'bottomBtn':''"
|
||||||
:style="{'background': bgcolor,'color':ftcolor}" @click="exchangeBtn()">
|
:style="{'background': bgcolor,'color':ftcolor}" @click="exchangeBtn()">
|
||||||
立即兑换
|
立即兑换
|
||||||
</div>
|
</div>
|
||||||
|
@ -106,7 +107,7 @@
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<div id="list" v-if="layout=='1'">
|
<div id="list" v-if="layout=='1'">
|
||||||
<div class="topBanner">
|
<div class="topBanner">
|
||||||
<img class="backpresty" @click="backgoodsFn" v-if="goodsShow&&!iskey"
|
<img class="backpresty" @click="backgoodsFn" v-if="goodsShow&&!iskey"
|
||||||
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
||||||
<img :src="topImg" alt="">
|
<img :src="topImg" alt="">
|
||||||
</div>
|
</div>
|
||||||
|
@ -131,7 +132,7 @@
|
||||||
<!-- 矩阵 -->
|
<!-- 矩阵 -->
|
||||||
<div id="matrix" v-if="layout=='3'">
|
<div id="matrix" v-if="layout=='3'">
|
||||||
<div class="topBanner">
|
<div class="topBanner">
|
||||||
<img class="backpresty" @click="backgoodsFn" v-if="goodsShow&&!iskey"
|
<img class="backpresty" @click="backgoodsFn" v-if="goodsShow&&!iskey"
|
||||||
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/backprepageBtn.png" alt="">
|
||||||
<img :src="topImg" alt="">
|
<img :src="topImg" alt="">
|
||||||
|
|
||||||
|
@ -226,9 +227,9 @@
|
||||||
bgcolor: '',
|
bgcolor: '',
|
||||||
describe: {},
|
describe: {},
|
||||||
ftcolor: '',
|
ftcolor: '',
|
||||||
iskey:true,
|
iskey: true,
|
||||||
allgoods: [],
|
allgoods: [],
|
||||||
showType:0,
|
showType: 0,
|
||||||
tiptext: '还没开始哟,兑换时间为2021-12-05 12:12:12至2021-01-01 12:12:12',
|
tiptext: '还没开始哟,兑换时间为2021-12-05 12:12:12至2021-01-01 12:12:12',
|
||||||
successTip: '兑换成功,请直接登录app使用!'
|
successTip: '兑换成功,请直接登录app使用!'
|
||||||
}
|
}
|
||||||
|
@ -241,7 +242,7 @@
|
||||||
this.topImg = productConfig.top_image;
|
this.topImg = productConfig.top_image;
|
||||||
document.title = sessionStorage.getItem('title');
|
document.title = sessionStorage.getItem('title');
|
||||||
this.layout = productConfig.list;
|
this.layout = productConfig.list;
|
||||||
this.iskey=sessionStorage.getItem('haskey');
|
this.iskey = sessionStorage.getItem('haskey');
|
||||||
this.describe = productConfig.describe;
|
this.describe = productConfig.describe;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -256,9 +257,9 @@
|
||||||
this.gstatus = item.available;
|
this.gstatus = item.available;
|
||||||
},
|
},
|
||||||
backgoodsFn() {
|
backgoodsFn() {
|
||||||
let backUrl=window.history.length;
|
let backUrl = window.history.length;
|
||||||
if(window.history.length){
|
if (window.history.length) {
|
||||||
history.go(-backUrl+1);
|
history.go(-backUrl + 1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 单条弹框
|
// 单条弹框
|
||||||
|
@ -273,7 +274,7 @@
|
||||||
async getGoods() {
|
async getGoods() {
|
||||||
let self = this;
|
let self = this;
|
||||||
let showType = sessionStorage.getItem('showType');
|
let showType = sessionStorage.getItem('showType');
|
||||||
this.showType=showType;
|
this.showType = showType;
|
||||||
let data = {
|
let data = {
|
||||||
"last_product_id": sessionStorage.getItem('lastid') | 0,
|
"last_product_id": sessionStorage.getItem('lastid') | 0,
|
||||||
}
|
}
|
||||||
|
@ -289,16 +290,16 @@
|
||||||
it.token = item;
|
it.token = item;
|
||||||
});
|
});
|
||||||
goodsItem = res.data;
|
goodsItem = res.data;
|
||||||
}else{
|
} else {
|
||||||
self.maskshow = true;
|
self.maskshow = true;
|
||||||
self.popboxtype = '提示';
|
self.popboxtype = '提示';
|
||||||
self.popboxshow = true;
|
self.popboxshow = true;
|
||||||
self.tiptext = res.message;
|
self.tiptext = res.message;
|
||||||
if (res.code == -1) {
|
if (res.code == -1) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
window.location.href = sessionStorage.getItem('white_link');
|
window.location.href = sessionStorage.getItem('white_link');
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
goodsList = goodsList.concat(goodsItem);
|
goodsList = goodsList.concat(goodsItem);
|
||||||
|
@ -333,14 +334,14 @@
|
||||||
self.swiperDataList = goodsArr;
|
self.swiperDataList = goodsArr;
|
||||||
self.goodsShow = goodsArr.length > 1;
|
self.goodsShow = goodsArr.length > 1;
|
||||||
sessionStorage.setItem('goodsCount', goodsArr.length);
|
sessionStorage.setItem('goodsCount', goodsArr.length);
|
||||||
if (goodsArr && goodsArr.length == 1&&goodsArr[0].available==1) {
|
if (goodsArr && goodsArr.length == 1 && goodsArr[0].available == 1) {
|
||||||
sessionStorage.setItem('goodsInfo', JSON.stringify(goodsArr[0]));
|
sessionStorage.setItem('goodsInfo', JSON.stringify(goodsArr[0]));
|
||||||
sessionStorage.setItem('key',goodsArr[0].key);
|
sessionStorage.setItem('key', goodsArr[0].key);
|
||||||
sessionStorage.setItem('token',goodsArr[0].token);
|
sessionStorage.setItem('token', goodsArr[0].token);
|
||||||
// window.location.href = "./exchange.html";
|
// window.location.href = "./exchange.html";
|
||||||
window.location.replace("./exchange.html");
|
window.location.replace("./exchange.html");
|
||||||
return false;
|
return false;
|
||||||
}else if(goodsArr && goodsArr.length >= 1) {
|
} else if (goodsArr && goodsArr.length >= 1) {
|
||||||
self.goodsNum = true;
|
self.goodsNum = true;
|
||||||
self.onSelected(goodsArr[0])
|
self.onSelected(goodsArr[0])
|
||||||
self.$nextTick(function () {
|
self.$nextTick(function () {
|
||||||
|
@ -363,19 +364,19 @@
|
||||||
} else {
|
} else {
|
||||||
self.goodsNum = false;
|
self.goodsNum = false;
|
||||||
}
|
}
|
||||||
}else {//兑换码
|
} else { //兑换码
|
||||||
data.token = sessionStorage.getItem('token')
|
data.token = sessionStorage.getItem('token')
|
||||||
req.axiosPostproducts('/key/products', data).then(res => {
|
req.axiosPostproducts('/key/products', data).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
self.swiperDataList = res.data;
|
self.swiperDataList = res.data;
|
||||||
sessionStorage.setItem('goodsCount',res.data.length);
|
sessionStorage.setItem('goodsCount', res.data.length);
|
||||||
self.goodsShow = res.data.length > 1;
|
self.goodsShow = res.data.length > 1;
|
||||||
if (res.data && res.data.length == 1&&res.data[0].available==1) {
|
if (res.data && res.data.length == 1 && res.data[0].available == 1) {
|
||||||
sessionStorage.setItem('goodsInfo', JSON.stringify(res.data[0]));
|
sessionStorage.setItem('goodsInfo', JSON.stringify(res.data[0]));
|
||||||
// window.location.href = "./exchange.html";
|
// window.location.href = "./exchange.html";
|
||||||
window.location.replace("./exchange.html");
|
window.location.replace("./exchange.html");
|
||||||
return false;
|
return false;
|
||||||
}else if(res.data && res.data.length >= 1) {
|
} else if (res.data && res.data.length >= 1) {
|
||||||
self.goodsNum = true;
|
self.goodsNum = true;
|
||||||
self.onSelected(res.data[0])
|
self.onSelected(res.data[0])
|
||||||
self.$nextTick(function () {
|
self.$nextTick(function () {
|
||||||
|
@ -429,9 +430,9 @@
|
||||||
this.gstatus = gstatus;
|
this.gstatus = gstatus;
|
||||||
if (gstatus == 1) {
|
if (gstatus == 1) {
|
||||||
// 跳转商品详情页面
|
// 跳转商品详情页面
|
||||||
if(this.showType==1){//白名单
|
if (this.showType == 1) { //白名单
|
||||||
sessionStorage.setItem('token',row.token);
|
sessionStorage.setItem('token', row.token);
|
||||||
sessionStorage.setItem('key',row.key);
|
sessionStorage.setItem('key', row.key);
|
||||||
}
|
}
|
||||||
sessionStorage.setItem('goodsInfo', JSON.stringify(row));
|
sessionStorage.setItem('goodsInfo', JSON.stringify(row));
|
||||||
// window.location.href = './exchange.html';
|
// window.location.href = './exchange.html';
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
font-size: 26.66666667vw;
|
font-size: 26.66666667vw;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: .14rem;
|
font-size: .14rem;
|
||||||
|
|
Loading…
Reference in New Issue