授权整合
This commit is contained in:
parent
a436e20577
commit
207c1f4d94
@ -27,6 +27,8 @@
|
||||
<div class="cloud_right_2"></div>
|
||||
<!-- 大转盘 -->
|
||||
<div class="zhuanpan"></div>
|
||||
<LuckyWheel v-if="true" />
|
||||
|
||||
<div class="icon_right_2"></div>
|
||||
<div class="icon_right_3"></div>
|
||||
<div class="cloud_left_3"></div>
|
||||
@ -76,7 +78,7 @@
|
||||
<!-- 添加专属服务人员企微弹窗 -->
|
||||
<ServiceList v-if="showServicePop" @ServicePop="hideServicePop" />
|
||||
|
||||
<LuckyWheel v-if="false" />
|
||||
<!-- <LuckyWheel v-if="true" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -120,6 +122,8 @@ const showRulesPop = ref(false);
|
||||
const showMyPrize = ref(false);
|
||||
const showServicePop = ref(false);
|
||||
|
||||
const isDraw = ref(false)
|
||||
|
||||
// 活动列表
|
||||
const activityList = reactive([
|
||||
{
|
||||
@ -192,7 +196,11 @@ const btn = () => {
|
||||
const drawBtn = () => {
|
||||
|
||||
console.log("抽奖:");
|
||||
getluckyBag(1);
|
||||
|
||||
if(!isDraw.value){
|
||||
getluckyBag(1);
|
||||
isDraw.value = true
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -159,16 +159,16 @@ const btn = () => {
|
||||
// 奖品 4 - 8.88
|
||||
// 奖品 5 - 谢谢参与
|
||||
// 第一个参数 对应奖品对应id, 第二个参数是是否多旋转一会儿 fasle旋转一圈就停止
|
||||
showDrawAni(1, true);
|
||||
showDrawAni(2, true);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.LuckyWheelCon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
height: 800px;
|
||||
position: top;
|
||||
// z-index: 10;
|
||||
top: 0;
|
||||
left: 0;
|
||||
// right: 0;
|
||||
@ -176,7 +176,8 @@ const btn = () => {
|
||||
// display: flex;
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
// background-color: rgba(0, 0, 0, 0.3);
|
||||
pointer-events: none;
|
||||
|
||||
.LuckyWheel_container {
|
||||
position: absolute;
|
||||
|
||||
@ -37,6 +37,12 @@ const authCode = ref('')
|
||||
onBeforeMount(() => {
|
||||
console.log("link:",window.location.href);
|
||||
|
||||
// 从URL中获取token等数据
|
||||
// store.commit({ type: "updateToken", token: h5plugin.getQueryString('token') });
|
||||
// store.commit({ type: "updateCardId", cardId: h5plugin.getQueryString('cardId') });
|
||||
// store.commit({ type: "updateNkh", nkh: h5plugin.getQueryString('nkh') });
|
||||
console.log("用户活动信息:", store.state.userAccount);
|
||||
|
||||
// 微信环境授权
|
||||
if (h5plugin.isWX()) {
|
||||
console.log('code:', h5plugin.getQueryString('code'));
|
||||
@ -51,12 +57,8 @@ onBeforeMount(() => {
|
||||
}
|
||||
|
||||
|
||||
// let token = h5plugin.getQueryString('token')
|
||||
// 更新openid
|
||||
store.commit({ type: "updateToken", token: h5plugin.getQueryString('token') });
|
||||
store.commit({ type: "updateCardId", cardId: h5plugin.getQueryString('cardId') });
|
||||
store.commit({ type: "updateNkh", cardId: h5plugin.getQueryString('nkh') });
|
||||
console.log("用户活动信息:", store.state.userAccount);
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
@ -98,8 +100,10 @@ const getOpenId = (code) => {
|
||||
console.log("后端返回的openid:", res.data);
|
||||
// 更新openid
|
||||
store.commit({ type: 'updateXGLOpenid', openid: res.data.data })
|
||||
console.log("用户活动信息2:", store.state.userAccount);
|
||||
|
||||
store.commit({ type: "updateToken", token: h5plugin.getQueryString('token') });
|
||||
store.commit({ type: "updateCardId", cardId: h5plugin.getQueryString('cardId') });
|
||||
store.commit({ type: "updateNkh", cardId: h5plugin.getQueryString('nkh') });
|
||||
console.log("用户活动信息:", store.state.userAccount);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,20 +1,22 @@
|
||||
import { createStore } from 'vuex';
|
||||
import h5plugin from "@/utils/plugin.js"
|
||||
|
||||
|
||||
|
||||
export default createStore({
|
||||
// 数据源
|
||||
state: {
|
||||
userAccount: {
|
||||
xglOpenid: 'openid12138', //用户openid
|
||||
token: '13f88993882b4dc0832351566c11a1eb', //用户token
|
||||
cardId: '94207', //carid
|
||||
nkh: '', //牛卡号
|
||||
xglOpenid: '', //用户openid
|
||||
token: h5plugin.getQueryString('token'), //用户token
|
||||
cardId: h5plugin.getQueryString('cardId'), //carid
|
||||
nkh: h5plugin.getQueryString('nkh'), //牛卡号
|
||||
isDraw: false, //是否抽过奖
|
||||
isHasAccount: false, //是否存在牛卡号
|
||||
isAddCustomer: false, //是否添加过服务人员
|
||||
isHasPrize: [], //是否存在奖品
|
||||
participantNum: 1213821, //活动参与人数
|
||||
prizeResult: 73.11, //中奖金额
|
||||
participantNum: 0, //活动参与人数
|
||||
prizeResult: 0, //中奖金额
|
||||
eqcodeImg: '' //二维码
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user