Compare commits
2 Commits
0230f76c95
...
d540f88939
Author | SHA1 | Date |
---|---|---|
huangzhen | d540f88939 | |
huangzhen | 7979dcf578 |
|
@ -16,9 +16,9 @@
|
||||||
<div id="captcha-element"></div>
|
<div id="captcha-element"></div>
|
||||||
<div id="captcha-button"></div>
|
<div id="captcha-button"></div>
|
||||||
<!-- 仅开发/测试使用 -->
|
<!-- 仅开发/测试使用 -->
|
||||||
<!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
|
<script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var vConsole = new window.VConsole();
|
var vConsole = new window.VConsole();
|
||||||
</script> -->
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,6 +1,22 @@
|
||||||
import { isObject } from "@/utils/index";
|
import { isObject } from "@/utils/index";
|
||||||
import { showConfirmDialog } from "vant";
|
import { showConfirmDialog } from "vant";
|
||||||
import Cap from "@/utils/aliyunCaptcha";
|
|
||||||
|
/**
|
||||||
|
* 获取链接参数(包括 + 号)
|
||||||
|
* @param {*} url
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function getQueryParams(url?: string): any {
|
||||||
|
const params: any = {};
|
||||||
|
const queryString = url ? url.split('?')[1] : window.location.search.slice(1);
|
||||||
|
if (queryString) {
|
||||||
|
queryString.split('&').forEach((pair) => {
|
||||||
|
const [key, value] = pair.split('=');
|
||||||
|
params[decodeURIComponent(key)] = decodeURIComponent(value || '');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 深拷贝
|
* 深拷贝
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { LOGIN } from "@/router/api";
|
import { LOGIN } from "@/router/api";
|
||||||
import { wxAuthUrl } from "@/utils/datas";
|
import { wxAuthUrl } from "@/utils/datas";
|
||||||
|
import { getQueryParams } from "@/utils/methods";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'home',
|
name: 'home',
|
||||||
|
@ -15,7 +16,7 @@ export default {
|
||||||
key: this.$route.query.key || localStorage.getItem("key") || '',
|
key: this.$route.query.key || localStorage.getItem("key") || '',
|
||||||
loginBack: this.$route.query.loginBack,
|
loginBack: this.$route.query.loginBack,
|
||||||
// jumpPath: this.$route.query.jumpPath,
|
// jumpPath: this.$route.query.jumpPath,
|
||||||
openid: this.$route.query.openid || localStorage.getItem("openid") || '', // 微信授权id
|
openid: getQueryParams().openid || localStorage.getItem("openid") || '', // 微信授权id
|
||||||
isAutoEmpower: true,
|
isAutoEmpower: true,
|
||||||
loadingText: '加载中',
|
loadingText: '加载中',
|
||||||
dialogType: '',
|
dialogType: '',
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
import { QUERY, EXCHANGE, ORDER_QUERY, GET_SMS } from "@/router/api";
|
import { QUERY, EXCHANGE, ORDER_QUERY, GET_SMS } from "@/router/api";
|
||||||
import { btnHighLight, btnMap, btnPoll, pollTimeNum, successCode } from "@/utils/datas";
|
import { btnHighLight, btnMap, btnPoll, pollTimeNum, successCode } from "@/utils/datas";
|
||||||
import { channelJudge } from "@/utils/empower";
|
import { channelJudge } from "@/utils/empower";
|
||||||
import { phoneRegex, startsWith, urlToLocal } from "@/utils/methods";
|
import { getQueryParams, phoneRegex, startsWith, urlToLocal } from "@/utils/methods";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'comProduct',
|
name: 'comProduct',
|
||||||
|
@ -138,7 +138,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
key: this.$route.query.key || localStorage.getItem("key"),
|
key: this.$route.query.key || localStorage.getItem("key"),
|
||||||
openid: this.$route.query.openid || localStorage.getItem("openid"), // 微信授权id
|
openid: getQueryParams().openid || localStorage.getItem("openid"), // 微信授权id
|
||||||
alipayuserid: this.$route.query.alipayuserid || localStorage.getItem("alipayuserid"), // 支付宝授权id
|
alipayuserid: this.$route.query.alipayuserid || localStorage.getItem("alipayuserid"), // 支付宝授权id
|
||||||
groupId: Number(this.$route.query.group_id),
|
groupId: Number(this.$route.query.group_id),
|
||||||
ids: JSON.parse(this.$route.query.ids || '[]'),
|
ids: JSON.parse(this.$route.query.ids || '[]'),
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</p>
|
</p>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<p v-if="[3].includes(orderData.status)" class="cardNo">
|
<p v-if="[3].includes(orderData.status) && orderData.card_no" class="cardNo">
|
||||||
卡号:{{ orderData.card_no }}
|
卡号:{{ orderData.card_no }}
|
||||||
<img @click="copyFunc(orderData.card_no)" class="copyIcon" v-if="orderData.card_no" :src="require('./img/copy.png')" alt="">
|
<img @click="copyFunc(orderData.card_no)" class="copyIcon" v-if="orderData.card_no" :src="require('./img/copy.png')" alt="">
|
||||||
</p>
|
</p>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
<img class="bottomCard" :src="require('./img/bottomCard.png')" alt="">
|
<img class="bottomCard" :src="require('./img/bottomCard.png')" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div v-if="orderData.status < 3" class="btn refresh" @click="refresh">刷新</div>
|
<div v-if="orderData.status < 3" class="btn refresh" @click="refresh">刷新</div>
|
||||||
<div v-if="(proType === 2) && [3].includes(orderData.status)" class="btn refresh" @click="look(orderData.card_pass)">查看卡密</div>
|
<div v-if="(proType === 2) && [3].includes(orderData.status) && orderData.card_pass" class="btn refresh" @click="look(orderData.card_pass)">查看卡密</div>
|
||||||
<div v-if="orderData.status > 3" class="btn error" @click="toHome">重新兑换</div>
|
<div v-if="orderData.status > 3" class="btn error" @click="toHome">重新兑换</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 遮罩 loading -->
|
<!-- 遮罩 loading -->
|
||||||
|
@ -58,7 +58,7 @@ export default {
|
||||||
proType: 1, // 1 直充 2 卡密
|
proType: 1, // 1 直充 2 卡密
|
||||||
orderData: {
|
orderData: {
|
||||||
status: 1 // 状态 1 待充值(充值中) 2 充值中 3 充值成功 4 充值失败 5 已过期 6 已作废
|
status: 1 // 状态 1 待充值(充值中) 2 充值中 3 充值成功 4 充值失败 5 已过期 6 已作废
|
||||||
},
|
} as any,
|
||||||
|
|
||||||
dialogType: '',
|
dialogType: '',
|
||||||
dialogTitle: '',
|
dialogTitle: '',
|
||||||
|
@ -83,6 +83,10 @@ export default {
|
||||||
this.loadingStatus = false;
|
this.loadingStatus = false;
|
||||||
this.orderData = { ...res.data };
|
this.orderData = { ...res.data };
|
||||||
this.proType = res.data.order_type;
|
this.proType = res.data.order_type;
|
||||||
|
// 接口反馈 平台下发 卡密必返(为空 默认短信下发)
|
||||||
|
if ([3].includes(res.data.status) && !res.data.card_pass) {
|
||||||
|
showToast('卡密已发送短信,请注意查收');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
showToast(res?.message || '请求失败');
|
showToast(res?.message || '请求失败');
|
||||||
}
|
}
|
||||||
|
@ -93,7 +97,7 @@ export default {
|
||||||
showToast('刷新成功');
|
showToast('刷新成功');
|
||||||
},
|
},
|
||||||
look(pass: any) {
|
look(pass: any) {
|
||||||
if (pass) { // 卡密长度 大于 4
|
// 卡密长度 大于 4
|
||||||
const num = pass.length > 10 ? 4 : 2, self = this;
|
const num = pass.length > 10 ? 4 : 2, self = this;
|
||||||
const passTM = pass.split('').map((item: any, index: number, arr: any) =>
|
const passTM = pass.split('').map((item: any, index: number, arr: any) =>
|
||||||
{
|
{
|
||||||
|
@ -111,10 +115,9 @@ export default {
|
||||||
.then(() => {
|
.then(() => {
|
||||||
self.copyFunc(pass);
|
self.copyFunc(pass);
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch((err) => {
|
||||||
} else { // 平台下发 卡密必返(为空 默认短信下发)
|
console.log(err)
|
||||||
showToast('卡密已发送短信,请注意查收');
|
})
|
||||||
}
|
|
||||||
},
|
},
|
||||||
copyFunc(item: any) {
|
copyFunc(item: any) {
|
||||||
copyFn(item);
|
copyFn(item);
|
||||||
|
|
|
@ -81,7 +81,7 @@ import "./index.scss";
|
||||||
import { DETAIL_QUERY, EXCHANGE, ORDER_QUERY } from "@/router/api";
|
import { DETAIL_QUERY, EXCHANGE, ORDER_QUERY } from "@/router/api";
|
||||||
import { btnMap, btnHighLight, btnPoll, pollTimeNum } from "@/utils/datas";
|
import { btnMap, btnHighLight, btnPoll, pollTimeNum } from "@/utils/datas";
|
||||||
import { channelJudge } from "@/utils/empower";
|
import { channelJudge } from "@/utils/empower";
|
||||||
import { phoneRegex, receiveAgain, startsWith, urlToLocal } from "@/utils/methods";
|
import { getQueryParams, phoneRegex, receiveAgain, startsWith, urlToLocal } from "@/utils/methods";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "cmsCash",
|
name: "cmsCash",
|
||||||
|
@ -89,7 +89,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
key: this.$route.query.key || localStorage.getItem("key"),
|
key: this.$route.query.key || localStorage.getItem("key"),
|
||||||
openid: this.$route.query.openid || localStorage.getItem("openid"), // 微信授权id
|
openid: getQueryParams().openid || localStorage.getItem("openid"), // 微信授权id
|
||||||
alipayuserid: this.$route.query.alipayuserid || localStorage.getItem("alipayuserid"), // 支付宝授权id
|
alipayuserid: this.$route.query.alipayuserid || localStorage.getItem("alipayuserid"), // 支付宝授权id
|
||||||
goodId: Number(this.$route.query.id),
|
goodId: Number(this.$route.query.id),
|
||||||
goods: {}, // 商品基本信息
|
goods: {}, // 商品基本信息
|
||||||
|
|
|
@ -50,14 +50,22 @@
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<img v-if="cssData.activityDescType === 1 && cssData.bottomImg.length" class="bottomImg" :src="cssData.bottomImg[0].url" alt="">
|
<!-- 优先使用 直充商品 创建配置 -->
|
||||||
|
<template v-if="pageData && pageData.degital.instruction">
|
||||||
|
<div class="description-3" v-html="pageData.degital.instruction" />
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
<img v-if="cssData.activityDescType === 2 && cssData.floatImg" @click="changePopComStatus" class="floatImg" :src="cssData.floatImg" alt="">
|
<img v-if="cssData.activityDescType === 2 && cssData.floatImg" @click="changePopComStatus" class="floatImg" :src="cssData.floatImg" alt="">
|
||||||
<div v-if="cssData.activityDescType === 3 && cssData.floatText" class="description-3" v-html="cssData.floatText" />
|
<div v-if="cssData.activityDescType === 3 && cssData.floatText" class="description-3" v-html="cssData.floatText" />
|
||||||
|
</template>
|
||||||
<img v-if="pageData && pageData.degital.detail_url" class="bottomImg" :src="pageData.degital.detail_url" alt="">
|
<img v-if="pageData && pageData.degital.detail_url" class="bottomImg" :src="pageData.degital.detail_url" alt="">
|
||||||
|
<template v-else>
|
||||||
|
<img v-if="cssData.activityDescType === 1 && cssData.bottomImg.length" class="bottomImg" :src="cssData.bottomImg[0].url" alt="">
|
||||||
|
</template>
|
||||||
<div v-if="popComStatus" class="popWrapper">
|
<div v-if="popComStatus" class="popWrapper">
|
||||||
<img @click="changePopComStatus" class="backImg" src="https://lsxdmgoss.oss-cn-chengdu.aliyuncs.com/MarketingSystem/image/front/backprepageBtn.png" alt="">
|
<img @click="changePopComStatus" class="backImg" src="https://lsxdmgoss.oss-cn-chengdu.aliyuncs.com/MarketingSystem/image/front/backprepageBtn.png" alt="">
|
||||||
<p class="title">活动说明</p>
|
<p class="title">活动说明</p>
|
||||||
<div v-if="cssData.floatText" class="description-2" v-html="cssData.floatText"></div>
|
<div v-if="cssData.floatText" class="description-2" v-html="pageData.degital.instruction || cssData.floatText"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 遮罩 loading -->
|
<!-- 遮罩 loading -->
|
||||||
|
@ -96,7 +104,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
key: this.$route.query.key || localStorage.getItem("key"),
|
key: this.$route.query.key || localStorage.getItem("key"),
|
||||||
goodId: Number(this.$route.query.id),
|
goodId: Number(this.$route.query.id),
|
||||||
pageData: null,
|
pageData: null as any,
|
||||||
inputVal: '',
|
inputVal: '',
|
||||||
inputSms: '',
|
inputSms: '',
|
||||||
inputValAgain: '',
|
inputValAgain: '',
|
||||||
|
|
|
@ -98,7 +98,7 @@ import { Swiper, SwiperSlide } from 'vue-awesome-swiper';
|
||||||
// import { Pagination, Autoplay } from 'swiper';
|
// import { Pagination, Autoplay } from 'swiper';
|
||||||
import 'swiper/swiper-bundle.css';
|
import 'swiper/swiper-bundle.css';
|
||||||
import { iconMap, btnHighLight, btnMap, btnPoll } from "@/utils/datas";
|
import { iconMap, btnHighLight, btnMap, btnPoll } from "@/utils/datas";
|
||||||
import { startsWith } from "@/utils/methods";
|
import { getQueryParams, startsWith } from "@/utils/methods";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'cmsList',
|
name: 'cmsList',
|
||||||
|
@ -156,7 +156,7 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.$props.comType === 1) {
|
if (this.$props.comType === 1) {
|
||||||
const openid = this.$route.query.openid;
|
const openid = getQueryParams().openid;
|
||||||
if (openid) {
|
if (openid) {
|
||||||
localStorage.setItem('openid', openid || '');
|
localStorage.setItem('openid', openid || '');
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ import "./index.scss";
|
||||||
import { DETAIL_QUERY, EXCHANGE, ORDER_QUERY } from "@/router/api";
|
import { DETAIL_QUERY, EXCHANGE, ORDER_QUERY } from "@/router/api";
|
||||||
import { btnMap, btnHighLight, btnPoll, pollTimeNum } from "@/utils/datas";
|
import { btnMap, btnHighLight, btnPoll, pollTimeNum } from "@/utils/datas";
|
||||||
import { channelJudge } from "@/utils/empower";
|
import { channelJudge } from "@/utils/empower";
|
||||||
import { startsWith, urlToLocal, receiveAgain } from "@/utils/methods";
|
import { startsWith, urlToLocal, receiveAgain, getQueryParams } from "@/utils/methods";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "cmsVoucher",
|
name: "cmsVoucher",
|
||||||
|
@ -66,7 +66,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
key: this.$route.query.key || localStorage.getItem("key"),
|
key: this.$route.query.key || localStorage.getItem("key"),
|
||||||
openid: this.$route.query.openid || localStorage.getItem("openid"), // 微信授权id
|
openid: getQueryParams().openid || localStorage.getItem("openid"), // 微信授权id
|
||||||
alipayuserid: this.$route.query.alipayuserid || localStorage.getItem("alipayuserid"), // 支付宝授权id
|
alipayuserid: this.$route.query.alipayuserid || localStorage.getItem("alipayuserid"), // 支付宝授权id
|
||||||
goodId: Number(this.$route.query.id),
|
goodId: Number(this.$route.query.id),
|
||||||
goods: {}, // 商品基本信息
|
goods: {}, // 商品基本信息
|
||||||
|
|
Loading…
Reference in New Issue