diff --git a/pages/login/register.vue b/pages/login/register.vue
index fc71626..ec54a3c 100644
--- a/pages/login/register.vue
+++ b/pages/login/register.vue
@@ -18,7 +18,8 @@
- 立即注册
+ 立即注册
+ 绑定手机号
@@ -172,9 +173,9 @@
key: "token",
data: res.return_data.uniqueCode
})
- uni.reLaunch({
- url: '/pages/tabBar/home/home'
- });
+ uni.navigateBack({
+ })
+
} else {
uni.showToast({
title: res.return_msg,
diff --git a/pages/order/confirmation.vue b/pages/order/confirmation.vue
index 132f96f..024a3de 100644
--- a/pages/order/confirmation.vue
+++ b/pages/order/confirmation.vue
@@ -148,8 +148,8 @@
-
-
+
+
@@ -205,11 +205,11 @@
},
onLoad(option) {
this.couponId = option.id;
- this.user = app.globalData.userInfo;
this.getCouponById();
this.getUserNormalDiscountList();
},
onShow() {
+ this.user = app.globalData.userInfo;
},
onHide() {
diff --git a/pages/pay/payment/payment.vue b/pages/pay/payment/payment.vue
index 94d65fd..76a9674 100644
--- a/pages/pay/payment/payment.vue
+++ b/pages/pay/payment/payment.vue
@@ -120,7 +120,8 @@
}
orderToPay(params).then(res => {
if (res.return_code == '000000') {
-
+
+ uni.pay
uni.requestPayment({
"appId": res.return_data.appId,
"nonceStr": res.return_data.nonceStr,
diff --git a/pages/tabBar/home/home.vue b/pages/tabBar/home/home.vue
index 5b5ba98..a697bfb 100644
--- a/pages/tabBar/home/home.vue
+++ b/pages/tabBar/home/home.vue
@@ -105,7 +105,7 @@
-
+
@@ -117,7 +117,7 @@
getH5UserInfo
} from "../../../Utils/Api.js"; //您的api路径
let app = getApp();
- export default {
+ export default {
data() {
return {
showHeader: true,
@@ -174,12 +174,18 @@
// #ifdef H5
var arr1 = window.location.href;
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]);
}
// #endif
},
onLoad() {
+ if (this.isWeiXinLogin()) {
+ //微信内核支付
+ }
+
+
// 1.wx获取登录用户code
// #ifdef MP
uni.login({
@@ -252,6 +258,15 @@
}
})
},
+ //微信内核浏览器
+ isWeiXinLogin() {
+ var ua = navigator.userAgent.toLowerCase();
+ if (ua.search(/MicroMessenger/i) > -1) {
+ return true;
+ } else {
+ return false;
+ }
+ },
//获取H5用户信息
getH5UserInfo(item) {
let params = {
@@ -263,7 +278,6 @@
.object
.highUser;
app.globalData.token = res.return_data.uniqueCode;
- that.isShowAuth = false
uni.setStorage({
key: "user",
data: res.return_data
@@ -274,7 +288,9 @@
key: "token",
data: res.return_data.uniqueCode
})
-
+ app.globalData.openId = res.return_data
+ .object
+ .highUser.openIdH5;
} else {
uni.showToast({
title: res.return_msg