diff --git a/App.vue b/App.vue
index 6a0b248..3e2ed1e 100644
--- a/App.vue
+++ b/App.vue
@@ -5,6 +5,7 @@
console.log('App Launch')
// 1审核 默认进审核
+ // #ifdef MP-WEIXIN
uni.setStorageSync('SHFlag', false)
this.Post({id:2388},'/api/multimedia/detail').then(res => {
if (res && res.data) {
@@ -16,6 +17,7 @@
uni.setStorageSync('SHFlag', false)
}
});
+ // #endif
},
onShow: function() {
console.log('App Show')
diff --git a/mixins/myMixins.js b/mixins/myMixins.js
index aa61b53..04a1e4f 100644
--- a/mixins/myMixins.js
+++ b/mixins/myMixins.js
@@ -11,12 +11,14 @@ export const myMixins ={
if(option && option.wechat_qrcode){
uni.setStorageSync('wechat_qrcode',option.wechat_qrcode)
}
+ // #ifdef MP-WEIXIN
// 分享
uni.showShareMenu({
withShareTicket: true,
//设置下方的Menus菜单,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
menus: ["shareAppMessage", "shareTimeline"]
})
+ // #endif
},
// 分享到朋友圈
onShareTimeline() {
diff --git a/pages.json b/pages.json
index 3a2b688..cd504f8 100644
--- a/pages.json
+++ b/pages.json
@@ -38,6 +38,16 @@
"navigationBarTitleText": "登录"
}
}
+ // #ifdef H5
+ ,
+ {
+ "path": "pages/login/phoneLogin",
+ "style": {
+ "navigationBarTitleText": "登录"
+ }
+ }
+ // #endif
+
],
"subPackages": [{
"root": "subPackages",
diff --git a/pages/index/index.vue b/pages/index/index.vue
index e21fd48..d6635f7 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -163,6 +163,7 @@
initSHFlag () {
let _this = this
// 先查一遍
+ // #ifdef MP-WEIXIN
try {
_this.SHFlag = uni.getStorageSync('SHFlag')?true: false
} catch (e) {
@@ -177,6 +178,11 @@
}
console.log(_this.SHFlag)
},500)
+ // #endif
+
+ // #ifdef H5
+ _this.SHFlag = false
+ // #endif
},
initRectInfo () {
@@ -261,13 +267,13 @@
}
// 金刚区
- this.navList = res.data.nav_menu
+ this.navList = res.data.nav_menu || []
// 推荐广告
- this.recommendNav = res.data.recommend_data
+ this.recommendNav = res.data.recommend_data || []
// 下面板块
- this.moduleList = res.data.func_data
+ this.moduleList = res.data.func_data || []
})
// 头部banner
@@ -276,7 +282,7 @@
position: 0,
},"/api/adv/getAdv").then(res => {
if (res) {
- this.topBanner = res.data
+ this.topBanner = res.data || []
}
});
@@ -286,7 +292,7 @@
position: 1,
},"/api/adv/getAdv").then(res => {
if (res) {
- this.smallBanner = res.data
+ this.smallBanner = res.data || []
}
});
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 549692a..26a2f5c 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -31,12 +31,18 @@ export default {
};
},
onLoad(options) {
+ // #ifdef H5
+ window.location.replace("/pages/login/phoneLogin")
+ // #endif
+
+ // #ifdef MP-WEIXIN
// 只需授权手机号
if (options.needAuth === '1') {
setTimeout(() => {
this.$refs.popup.open('bottom');
}, 400);
}
+ // #endif
},
methods: {
// 处理手机号授权
diff --git a/pages/login/phoneLogin.vue b/pages/login/phoneLogin.vue
new file mode 100644
index 0000000..1a9b7f6
--- /dev/null
+++ b/pages/login/phoneLogin.vue
@@ -0,0 +1,190 @@
+
+
+ 时味苏州PHoneLogin 申请获得
+ 以下权限
+
+ 获得你的公开信息(昵称、头像、地区及性别)
+
+
+
+
+
+
+
+
+
+ 同意《用户服务协议》、《隐私政策》
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js
index f8ee524..5b9cf15 100644
--- a/static/js/CommonFunction.js
+++ b/static/js/CommonFunction.js
@@ -256,6 +256,10 @@ Vue.prototype.getMaxCoupon = async function (param) {
// H5小程序跳转外部链接
Vue.prototype.gotoWebUrl = url => {
+ uni.navigateTo({
+ url: '/subPackages/webPage/webPage?url=' + encodeURIComponent(url)
+ })
+
// #ifdef MP-WEIXIN
uni.navigateTo({
url: '/subPackages/webPage/webPage?url=' + encodeURIComponent(url)
diff --git a/store/modules/user.js b/store/modules/user.js
index 921a975..7dc4264 100644
--- a/store/modules/user.js
+++ b/store/modules/user.js
@@ -55,7 +55,9 @@ export default {
// #endif
// #ifdef H5
-
+ uni.navigateTo({
+ url: '/pages/login/phoneLogin'
+ })
// #endif
},
//订单数据
diff --git a/subPackages/webPage/webPage.vue b/subPackages/webPage/webPage.vue
index 7dbd8ac..5718ecf 100644
--- a/subPackages/webPage/webPage.vue
+++ b/subPackages/webPage/webPage.vue
@@ -10,9 +10,18 @@
}
},
onLoad(option) {
+ // #ifdef H5
+ if (option.url) {
+ let url = decodeURIComponent(option.url)
+ window.location.replace(url)
+ }
+ // #endif
+
+ // #ifdef MP-WEIXIN
if (option.url) {
this.url = decodeURIComponent(option.url)
}
+ // #endif
}
}