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