|
|
@ -105,7 +105,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- <view class="loading-text">{{ loadingText }}</view> --> |
|
|
|
<!-- <view class="loading-text">{{ loadingText }}</view> --> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -117,7 +117,7 @@ |
|
|
|
getH5UserInfo |
|
|
|
getH5UserInfo |
|
|
|
} from "../../../Utils/Api.js"; //您的api路径 |
|
|
|
} from "../../../Utils/Api.js"; //您的api路径 |
|
|
|
let app = getApp(); |
|
|
|
let app = getApp(); |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
showHeader: true, |
|
|
|
showHeader: true, |
|
|
@ -174,12 +174,18 @@ |
|
|
|
// #ifdef H5 |
|
|
|
// #ifdef H5 |
|
|
|
var arr1 = window.location.href; |
|
|
|
var arr1 = window.location.href; |
|
|
|
var arr2 = arr1.split('='); |
|
|
|
var arr2 = arr1.split('='); |
|
|
|
if (!app.globalData.userInfo && arr2[1] !=undefined) { |
|
|
|
console.log(arr2); |
|
|
|
|
|
|
|
if (!app.globalData.userInfo && arr2[1] != undefined) { |
|
|
|
this.getH5UserInfo(arr2[1]); |
|
|
|
this.getH5UserInfo(arr2[1]); |
|
|
|
} |
|
|
|
} |
|
|
|
// #endif |
|
|
|
// #endif |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
onLoad() { |
|
|
|
|
|
|
|
if (this.isWeiXinLogin()) { |
|
|
|
|
|
|
|
//微信内核支付 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 1.wx获取登录用户code |
|
|
|
// 1.wx获取登录用户code |
|
|
|
// #ifdef MP |
|
|
|
// #ifdef MP |
|
|
|
uni.login({ |
|
|
|
uni.login({ |
|
|
@ -252,6 +258,15 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//微信内核浏览器 |
|
|
|
|
|
|
|
isWeiXinLogin() { |
|
|
|
|
|
|
|
var ua = navigator.userAgent.toLowerCase(); |
|
|
|
|
|
|
|
if (ua.search(/MicroMessenger/i) > -1) { |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
//获取H5用户信息 |
|
|
|
//获取H5用户信息 |
|
|
|
getH5UserInfo(item) { |
|
|
|
getH5UserInfo(item) { |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
@ -263,7 +278,6 @@ |
|
|
|
.object |
|
|
|
.object |
|
|
|
.highUser; |
|
|
|
.highUser; |
|
|
|
app.globalData.token = res.return_data.uniqueCode; |
|
|
|
app.globalData.token = res.return_data.uniqueCode; |
|
|
|
that.isShowAuth = false |
|
|
|
|
|
|
|
uni.setStorage({ |
|
|
|
uni.setStorage({ |
|
|
|
key: "user", |
|
|
|
key: "user", |
|
|
|
data: res.return_data |
|
|
|
data: res.return_data |
|
|
@ -274,7 +288,9 @@ |
|
|
|
key: "token", |
|
|
|
key: "token", |
|
|
|
data: res.return_data.uniqueCode |
|
|
|
data: res.return_data.uniqueCode |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
app.globalData.openId = res.return_data |
|
|
|
|
|
|
|
.object |
|
|
|
|
|
|
|
.highUser.openIdH5; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
uni.showToast({ |
|
|
|
title: res.return_msg |
|
|
|
title: res.return_msg |
|
|
|