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