This commit is contained in:
tcubic 2022-08-05 13:42:30 +08:00
parent fb0ba50d3a
commit a2e35460a1
4 changed files with 10 additions and 11 deletions

View File

@ -216,6 +216,7 @@ const activityList = reactive([
{ {
id: 3, id: 3,
show: store.state.userAccount.isBirthMon, show: store.state.userAccount.isBirthMon,
// show: 1,
banner: require("../assets/img/activity_3.png"), banner: require("../assets/img/activity_3.png"),
btnImg: require("../assets/img/li_btn_3.png"), btnImg: require("../assets/img/li_btn_3.png"),
}, },

View File

@ -141,7 +141,7 @@ const getMoney = (val) => {
// //
if (val.type == 1) { if (val.type == 1) {
if (!store.state.userAccount.nkh) { if (store.state.userAccount.nkh == '') {
// Toast(""); // Toast("");
Dialog.confirm({ Dialog.confirm({
title: "温馨提示", title: "温馨提示",

View File

@ -159,6 +159,7 @@ const apiAll = ()=>{
// //
store.commit({ type: "updateeEqcodeImg", eqcodeImg: result[0].data.data,}); store.commit({ type: "updateeEqcodeImg", eqcodeImg: result[0].data.data,});
// //
store.commit({ type: "updateeNkh", eqcodeImg: result[1].data.data,});
// //
store.commit({ type: "updatePrizeList", prizeList: result[2].data.data,}); store.commit({ type: "updatePrizeList", prizeList: result[2].data.data,});
@ -185,7 +186,7 @@ const apiAll = ()=>{
// //
onBeforeMount(() => { onBeforeMount(() => {
// apiAll() apiAll()
console.log("link", window.location.href); console.log("link", window.location.href);
console.log("用户活动信息:", store.state.userAccount); console.log("用户活动信息:", store.state.userAccount);
@ -252,10 +253,6 @@ const getOpenId = (code) => {
console.log("后端返回的openid", res.data); console.log("后端返回的openid", res.data);
// openid // openid
store.commit({ type: "updateXGLOpenid", openid: res.data.data }); store.commit({ type: "updateXGLOpenid", openid: res.data.data });
// 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);
apiAll() apiAll()
} }
}); });

View File

@ -10,7 +10,7 @@ export default createStore({
xglOpenId: 'o9B_fvjtyh2KELQYc2t9A3MEh7JQ', //用户openid xglOpenId: 'o9B_fvjtyh2KELQYc2t9A3MEh7JQ', //用户openid
token: h5plugin.getQueryString('token'), //用户token token: h5plugin.getQueryString('token'), //用户token
cardId: h5plugin.getQueryString('cardId'), //carid cardId: h5plugin.getQueryString('cardId'), //carid
nkh: h5plugin.getQueryString('nkh'), //牛卡号 nkh: '', //牛卡号
isDraw: false, //是否抽过奖 isDraw: false, //是否抽过奖
isHasAccount: false, //是否存在牛卡号 isHasAccount: false, //是否存在牛卡号
isAddCustomer: 0, //是否添加过服务人员 isAddCustomer: 0, //是否添加过服务人员
@ -38,12 +38,13 @@ export default createStore({
state.userAccount.token = val.token state.userAccount.token = val.token
}, },
updateCardId(state,val){ // 更新牛卡号
state.userAccount.cardId = val.cardId updateeNkh(state,val){
state.userAccount.nkh = val.nkh
}, },
updateNkh(state,val){ updateCardId(state,val){
state.userAccount.nkh = val.nkh state.userAccount.cardId = val.cardId
}, },
updateeEqcodeImg(state,val){ updateeEqcodeImg(state,val){