diff --git a/common/config.js b/common/config.js index 9a977cf..4e7f758 100644 --- a/common/config.js +++ b/common/config.js @@ -2,10 +2,10 @@ const mode = 'devOnline'; //devLocal:本地测试、devOnline:线上测试 let ROOTPATH = ''; //域名 switch (mode) { case 'devLocal': - ROOTPATH = "http://192.168.2.5:61111" + ROOTPATH = "http://yikangyang.ali251.langye.net" break; case 'devOnline': - ROOTPATH = "https://xxxxx.cn" + ROOTPATH = "http://yikangyang.ali251.langye.net" break; case 'production': ROOTPATH = "https://xxxxx.cn" @@ -14,4 +14,4 @@ switch (mode) { throw new Error('未配置环境'); console.log(`未配置环境`); } -export { ROOTPATH } \ No newline at end of file +export { ROOTPATH } diff --git a/common/http.api.js b/common/http.api.js index bc74f0b..aeb5c81 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -1,23 +1,20 @@ //api集合 let apiApp = { - login: '/api/login', - getInfo: '/777/777/index', -} -let apiHome = { - hotSearchUrl: '/777/77/hot_search' + login: '/api/mobile/user/applet-login', } // 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作 const install = (Vue, vm) => { //api方法 - let getSearch = (params = {}) => vm.$u.get(apiHome.hotSearchUrl, params); - let getInfo = (params={}) => vm.$u.post(apiApp.getInfo, params); - + const login = (params = {}) => vm.$u.get(apiApp.login, params) + // 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下 - vm.$u.api = {getSearch, getInfo}; + vm.$u.api = { + login, + }; } export default { install -} \ No newline at end of file +} diff --git a/manifest.json b/manifest.json index d70fdfb..a5c9ebe 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "uni", - "appid" : "__UNI__3136F4B", + "appid" : "__UNI__94DEB94", "description" : "", "versionName" : "1.0.0", "versionCode" : "100", diff --git a/pages.json b/pages.json index a299864..9752b1d 100644 --- a/pages.json +++ b/pages.json @@ -18,8 +18,7 @@ { "path": "pages/me/me", "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": true + "navigationBarTitleText": "个人中心" } }, { diff --git a/pages/login/login.vue b/pages/login/login.vue index ff9b236..f9c582f 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -31,7 +31,7 @@ - + @@ -69,8 +69,8 @@ export default { methods: { authLogin() { if (!this.isAuth) { - this.$refs.uTips.show({ - title: '请阅读《用户协议》和《隐私协议》', + this.$refs.uToast.show({ + title: '请先阅读协议', type: 'warning', duration: '2000' }) @@ -80,17 +80,22 @@ export default { provider: 'weixin', //使用微信登录 success: (loginRes) => { console.log(loginRes); - this.$u.route({ - type: 'switchTab', - url: '/pages/index/index' + this.$u.api.login({ + code: loginRes.code + }).then(res => { + console.log(res) }) + // this.$u.route({ + // type: 'switchTab', + // url: '/pages/index/index' + // }) } }); }, mobileLogin(e) { if (!this.isAuth) { - this.$refs.uTips.show({ - title: '请阅读《用户协议》和《隐私协议》', + this.$refs.uToast.show({ + title: '请先阅读协议', type: 'warning', duration: '2000' }) diff --git a/pages/me/me.vue b/pages/me/me.vue index 167ea91..8c9ef22 100644 --- a/pages/me/me.vue +++ b/pages/me/me.vue @@ -1,6 +1,15 @@ @@ -19,5 +28,24 @@ export default { diff --git a/static/me/bkg.png b/static/me/bkg.png new file mode 100644 index 0000000..f9fd66d Binary files /dev/null and b/static/me/bkg.png differ