diff --git a/MP_verify_wfZF8R25IxLLUUXi.txt b/MP_verify_wfZF8R25IxLLUUXi.txt new file mode 100644 index 0000000..9f1de61 --- /dev/null +++ b/MP_verify_wfZF8R25IxLLUUXi.txt @@ -0,0 +1 @@ +wfZF8R25IxLLUUXi \ No newline at end of file diff --git a/api/model/login.js b/api/model/login.js index 952162b..86d5a67 100644 --- a/api/model/login.js +++ b/api/model/login.js @@ -5,8 +5,17 @@ const api = { // 微信登录接口 wxLogin: { + + // #ifdef H5 + url: '/login/wxLogin', + method: 'POST', + // #endif + + // #ifdef MP-WEIXIN url: '/login/login', method: 'GET', + // #endif + limit : 500, showLoading : true, }, diff --git a/components/base/navbar.vue b/components/base/navbar.vue index 7a99e31..1da6b37 100644 --- a/components/base/navbar.vue +++ b/components/base/navbar.vue @@ -1,6 +1,11 @@ @@ -76,6 +82,9 @@ } }, created() { + if(typeof document != 'undefined'){ + document.title = this.title + } }, beforeDestroy() { }, diff --git a/config.js b/config.js index d828d63..58bc17f 100644 --- a/config.js +++ b/config.js @@ -14,10 +14,14 @@ const type = 'prod' const config = { dev: { baseUrl: 'http://augcl.natapp1.cc/massage-admin/massage', + // redirect : 'http://h5.xzaiyp.top', + redirect : 'https://wwwh5.yurangongfang.com', }, prod: { baseUrl: 'https://www.yurangongfang.com/massage-admin/massage', - } + // baseUrl: 'https://www.yurangongfang.com/massage-admin/massage', + redirect : 'https://wwwh5.yurangongfang.com', + }, } @@ -40,6 +44,7 @@ const defaultConfig = { }, //商户号 mchId : '1712378227', + appId : 'wxb1c123a63736f789', } diff --git a/manifest.json b/manifest.json index cbc1ffa..56c1ff2 100644 --- a/manifest.json +++ b/manifest.json @@ -87,6 +87,8 @@ }, "devServer" : { "https" : false, + "port" : 8002, + "disableHostCheck" : true, "proxy" : { "/ws/geocoder/v1/" : { "target" : "https://apis.map.qq.com", @@ -97,6 +99,9 @@ "changeOrigin" : true } } + }, + "router" : { + "mode" : "hash" } } } diff --git a/pages/index/center.vue b/pages/index/center.vue index 6402d22..3fdabd7 100644 --- a/pages/index/center.vue +++ b/pages/index/center.vue @@ -180,7 +180,7 @@ } }, onShow() { - if(this.isLogin){ + if(uni.getStorageSync('token')){ this.$store.commit('getUserInfo') this.$store.commit('getUserCenterInfo') this.$store.commit('getRiceInfo') @@ -311,7 +311,7 @@ } .member { - width: calc(100vw - 13rpx*2); + width: calc(724rpx); position: absolute; bottom: 0; left: 13rpx; diff --git a/pages_order/auth/wxLogin.vue b/pages_order/auth/wxLogin.vue index 830d2c2..684a82e 100644 --- a/pages_order/auth/wxLogin.vue +++ b/pages_order/auth/wxLogin.vue @@ -6,9 +6,8 @@ {{ configList.config_app_name }} - - - + - + - + 已同意 《注册协议》、隐私协议 - + @@ -45,138 +36,202 @@ - + + .flex { + display: flex; + align-items: center; + } + \ No newline at end of file diff --git a/pages_order/mine/help.vue b/pages_order/mine/help.vue index 4345572..046372f 100644 --- a/pages_order/mine/help.vue +++ b/pages_order/mine/help.vue @@ -21,8 +21,8 @@ - + diff --git a/store/store.js b/store/store.js index 8d5fae3..9fb10a0 100644 --- a/store/store.js +++ b/store/store.js @@ -1,6 +1,7 @@ import Vue from 'vue' import Vuex from 'vuex' + Vue.use(Vuex); //vue的插件机制 import api from '@/api/api.js' @@ -62,6 +63,21 @@ const store = new Vuex.Store({ // }) }, login(state, config) { + // #ifdef MP-WEIXIN + this.commit('wxLogin', config) + // #endif + // #ifdef H5 + this.commit('h5Login', config) + // #endif + }, + h5Login(state, config){ + Vue.set(state, 'userInfo', config.userInfo) + uni.setStorageSync('token', config.token) + uni.reLaunch({ + url: '/pages/index/index' + }) + }, + wxLogin(state, config){ uni.showLoading({ title: '登录中...' })