小程序跳转测试

This commit is contained in:
tcubic 2022-08-03 19:32:29 +08:00
parent c550251031
commit 7a282837e8
2 changed files with 43 additions and 41 deletions

View File

@ -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([
@ -170,7 +174,7 @@ 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",
});
} }
}; };
@ -302,9 +310,8 @@ 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,8 +413,6 @@ 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) {
// //
@ -416,7 +421,6 @@ const getluckyBag = (id) => {
} }
} 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,7 +658,6 @@ 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 {

File diff suppressed because one or more lines are too long