更新状态
This commit is contained in:
parent
2431ca5a89
commit
3d2c065a0f
@ -5,7 +5,7 @@ NODE_ENV = 'test'
|
||||
VUE_APP_BASE_URL = 'https://test.szxgl.cn/zszq-celebration/activity/'
|
||||
|
||||
// 业务接口
|
||||
VUE_APP_API = 'https://test.szxgl.cn/zszq-celebration'
|
||||
VUE_APP_API = 'https://wealth.newone.com.cn'
|
||||
|
||||
// CDN地址
|
||||
VUE_APP_CDN = 'https://test.szxgl.cn/zszq-celebration/activity/'
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import axios from 'axios'
|
||||
import QS from 'qs';
|
||||
|
||||
console.log("API:",process.env.VUE_APP_API);
|
||||
|
||||
// 创建axios
|
||||
const service = axios.create({
|
||||
// baseURL: 'https://hd.xglpa.com/pars-training', //生产环境
|
||||
|
||||
@ -185,27 +185,14 @@ const btn = () => {
|
||||
const drawBtn = () => {
|
||||
console.log("抽奖:");
|
||||
// console.log("授权:",getAuthorize(1));
|
||||
// let href = window.location.href;
|
||||
// let h_idx = window.location.href.indexOf("#");
|
||||
// let out_href = href.slice(0, h_idx);
|
||||
|
||||
// service.get(process.env.VUE_APP_ZS_DOMAIN + '/wxauth/official/account/authorize',{params:{
|
||||
// redirectUrl: out_href,
|
||||
// scope: 1,
|
||||
// }}).then((res) => {
|
||||
|
||||
// console.log("招商授权结果:",res);
|
||||
// })
|
||||
|
||||
if (h5plugin.getQueryString("forceauth")) {
|
||||
// H5P.getSetCookie('authState',1,{expires:0.5})
|
||||
console.log("yes-forceauth");
|
||||
getAuthorize(0);
|
||||
} else {
|
||||
// H5P.getSetCookie('authState',1,{expires:0.5})
|
||||
console.log("no-forceauth");
|
||||
getAuthorize(1);
|
||||
}
|
||||
// if (h5plugin.getQueryString("forceauth")) {
|
||||
// console.log("yes-forceauth");
|
||||
// getAuthorize(0);
|
||||
// } else {
|
||||
// console.log("no-forceauth");
|
||||
// getAuthorize(1);
|
||||
// }
|
||||
};
|
||||
|
||||
// 活动点击
|
||||
|
||||
@ -35,8 +35,7 @@ const authCode = ref('')
|
||||
|
||||
// 页面未挂载
|
||||
onBeforeMount(() => {
|
||||
console.log("用户活动信息1:", store.state.userAccount);
|
||||
console.log("授权链接:",window.location.href);
|
||||
console.log("link:",window.location.href);
|
||||
|
||||
// 微信环境授权
|
||||
// if (h5plugin.isWX()) {
|
||||
@ -49,9 +48,18 @@ onBeforeMount(() => {
|
||||
// } else {
|
||||
// getCode()
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// 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);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -7,6 +7,8 @@ export default createStore({
|
||||
userAccount: {
|
||||
xglOpenid: 'openid12138', //用户openid
|
||||
token: 'token12138', //用户token
|
||||
cardId: '', //carid
|
||||
nkh: '', //牛卡号
|
||||
isDraw: false, //是否抽过奖
|
||||
isHasAccount: false, //是否存在牛卡号
|
||||
isAddCustomer: false, //是否添加过服务人员
|
||||
@ -24,7 +26,21 @@ export default createStore({
|
||||
// 更新信广龙openid
|
||||
updateXGLOpenid(state, val) {
|
||||
state.userAccount.xglOpenid = val.openid
|
||||
}
|
||||
},
|
||||
|
||||
// 更新token
|
||||
updateToken(state,val){
|
||||
state.userAccount.token = val.token
|
||||
},
|
||||
|
||||
updateCardId(state,val){
|
||||
state.userAccount.cardId = val.cardId
|
||||
},
|
||||
|
||||
updateNkh(state,val){
|
||||
state.userAccount.nkh = val.nkh
|
||||
},
|
||||
|
||||
},
|
||||
// 改变方法:异步
|
||||
actions: {},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user