小程序跳转测试
This commit is contained in:
parent
c550251031
commit
7a282837e8
@ -33,7 +33,11 @@
|
||||
<div class="cloud_right_3"></div>
|
||||
<div class="icon_right_1"></div>
|
||||
<div class="select_box"></div>
|
||||
<div class="draw_btn" :class="isDraw ? 'is_draw' : ''" @click="drawBtn"></div>
|
||||
<div
|
||||
class="draw_btn"
|
||||
:class="isDraw ? 'is_draw' : ''"
|
||||
@click="drawBtn"
|
||||
></div>
|
||||
<div class="rule_btn" @click="showRluesBtn"></div>
|
||||
<div class="prize_btn" @click="showMyPrizePop"></div>
|
||||
<div class="rule_btn_text"></div>
|
||||
@ -77,7 +81,6 @@
|
||||
<ServiceList v-if="showServicePop" @ServicePop="hideServicePop" />
|
||||
<!-- 抽奖结果弹窗 -->
|
||||
<Draw v-if="showDrawCon" @drawCon="drawConFn" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -100,6 +103,7 @@ import { useStore } from "vuex";
|
||||
// import { get_authorize, get_jssdk } from '@/api/authorize-api'
|
||||
import service from "@/api/httpServe";
|
||||
import qs from "qs";
|
||||
import wx from "@/utils/wx-jssdk.1.6.0.js";
|
||||
import h5plugin from "@/utils/plugin";
|
||||
import Rules from "@/components/Rules";
|
||||
import MyPrize from "@/components/MyPrize";
|
||||
@ -125,7 +129,7 @@ const showServicePop = ref(false);
|
||||
const drawType = ref(1);
|
||||
const isDraw = ref(false);
|
||||
const LuckyWheelCon = ref(null);
|
||||
const showDrawCon = ref(false) //抽奖结果弹窗组件
|
||||
const showDrawCon = ref(false); //抽奖结果弹窗组件
|
||||
|
||||
// 活动列表
|
||||
const activityList = reactive([
|
||||
@ -170,7 +174,7 @@ const activityList = reactive([
|
||||
// 页面挂载前
|
||||
onBeforeMount(() => {
|
||||
if (store.state.userAccount.isHasPrize.length != 0) {
|
||||
isDraw.value = true
|
||||
isDraw.value = true;
|
||||
}
|
||||
});
|
||||
|
||||
@ -235,8 +239,6 @@ onMounted(() => {
|
||||
|
||||
// 抽奖按钮
|
||||
const drawBtn = () => {
|
||||
|
||||
|
||||
if (!isDraw.value) {
|
||||
// LuckyWheelCon.value.showDrawAni(3, true)
|
||||
|
||||
@ -255,19 +257,24 @@ const activityBtn = (item) => {
|
||||
|
||||
if (item.id == 2) {
|
||||
console.log("新客专享页面");
|
||||
let url='/subs/financial/pages/index/index'
|
||||
// let url = "/subs/financial/pages/index/index";
|
||||
// console.log(wx);
|
||||
|
||||
wx.miniProgram.navigateTo({url})
|
||||
wx.miniProgram.reLaunch({
|
||||
url: "/subs/financial/pages/index/index",
|
||||
});
|
||||
}
|
||||
|
||||
if (item.id == 3) {
|
||||
console.log("生日专享页面");
|
||||
window.location.href='https://appstatic.cmschina.com/activity/cmszhyxpt/bees/index.html?id=INT_SMKTC_8rrkjpiS'
|
||||
window.location.href =
|
||||
"https://appstatic.cmschina.com/activity/cmszhyxpt/bees/index.html?id=INT_SMKTC_8rrkjpiS";
|
||||
}
|
||||
|
||||
if (item.id == 4) {
|
||||
console.log("牛牛杯");
|
||||
window.location.href='https://appstatic.cmschina.com/activity/cmszhyxpt/bees/index.html?id=INT_SMKTC_uD5KUL2d'
|
||||
window.location.href =
|
||||
"https://appstatic.cmschina.com/activity/cmszhyxpt/bees/index.html?id=INT_SMKTC_uD5KUL2d";
|
||||
}
|
||||
|
||||
if (item.id == 5) {
|
||||
@ -275,10 +282,11 @@ const activityBtn = (item) => {
|
||||
// window.location.href='https://appstatic.cmschina.com/activity/cmszhyxpt/bees/index.html?id=INT_SMKTC_8rrkjpiS'
|
||||
}
|
||||
|
||||
|
||||
if (item.id == 6) {
|
||||
console.log("财富日报");
|
||||
window.location.href='/subs/wealthpaper/wealthpaper'
|
||||
wx.miniProgram.reLaunch({
|
||||
url: "/subs/wealthpaper/wealthpaper",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@ -302,9 +310,8 @@ const myPrizePop = () => {
|
||||
|
||||
// 关闭抽奖弹窗
|
||||
const drawConFn = () => {
|
||||
showDrawCon.value = false
|
||||
}
|
||||
|
||||
showDrawCon.value = false;
|
||||
};
|
||||
|
||||
// 企微弹窗
|
||||
const hideServicePop = () => {
|
||||
@ -378,7 +385,7 @@ const getluckyBag = (id) => {
|
||||
.then((res) => {
|
||||
console.log("抽取红包结果:", res);
|
||||
|
||||
let prizeNum = res.data.data.amount
|
||||
let prizeNum = res.data.data.amount;
|
||||
|
||||
// 判断抽奖类型drawType = 1时转动大转盘
|
||||
if (drawType.value == 1) {
|
||||
@ -406,8 +413,6 @@ const getluckyBag = (id) => {
|
||||
// 6.66元
|
||||
LuckyWheelCon.value.showDrawAni(4, true);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if (res.data.data == 0) {
|
||||
// 谢谢参与
|
||||
@ -416,7 +421,6 @@ const getluckyBag = (id) => {
|
||||
}
|
||||
} else {
|
||||
// 加企业微信奖
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -447,27 +451,25 @@ const getBrithday = () => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
const deleteNum = ref(0)
|
||||
const deleteNum = ref(0);
|
||||
// 清数据接口
|
||||
const deleteData = (type) => {
|
||||
deleteNum.value++
|
||||
deleteNum.value++;
|
||||
if (deleteNum.value == 3) {
|
||||
let type = 0;
|
||||
service
|
||||
.post(
|
||||
process.env.VUE_APP_API +
|
||||
"/cms-activity/cms88/redpacket/delete/" + type, {}
|
||||
"/cms-activity/cms88/redpacket/delete/" +
|
||||
type,
|
||||
{}
|
||||
)
|
||||
.then((res) => {
|
||||
console.log("数据已清空", res);
|
||||
deleteNum.value = 0
|
||||
deleteNum.value = 0;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -656,7 +658,6 @@ const deleteData = (type) => {
|
||||
.draw_btn {
|
||||
@include pos(216px, 252px, 273px, 810px);
|
||||
@include bg_pos("../assets/img/draw_btn.png");
|
||||
|
||||
}
|
||||
|
||||
.is_draw {
|
||||
|
||||
1
src/utils/wx-jssdk.1.6.0.js
Normal file
1
src/utils/wx-jssdk.1.6.0.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user