master
xy 1 year ago
parent 4c56f0b755
commit 680b9b7007

@ -2,10 +2,10 @@ const mode = 'devOnline'; //devLocal本地测试、devOnline线上测试
let ROOTPATH = ''; //域名 let ROOTPATH = ''; //域名
switch (mode) { switch (mode) {
case 'devLocal': case 'devLocal':
ROOTPATH = "http://192.168.2.5:61111" ROOTPATH = "http://yikangyang.ali251.langye.net"
break; break;
case 'devOnline': case 'devOnline':
ROOTPATH = "https://xxxxx.cn" ROOTPATH = "http://yikangyang.ali251.langye.net"
break; break;
case 'production': case 'production':
ROOTPATH = "https://xxxxx.cn" ROOTPATH = "https://xxxxx.cn"

@ -1,21 +1,18 @@
//api集合 //api集合
let apiApp = { let apiApp = {
login: '/api/login', login: '/api/mobile/user/applet-login',
getInfo: '/777/777/index',
}
let apiHome = {
hotSearchUrl: '/777/77/hot_search'
} }
// 此处第二个参数vm就是我们在页面使用的this你可以通过vm获取vuex等操作 // 此处第二个参数vm就是我们在页面使用的this你可以通过vm获取vuex等操作
const install = (Vue, vm) => { const install = (Vue, vm) => {
//api方法 //api方法
let getSearch = (params = {}) => vm.$u.get(apiHome.hotSearchUrl, params); const login = (params = {}) => vm.$u.get(apiApp.login, params)
let getInfo = (params={}) => vm.$u.post(apiApp.getInfo, params);
// 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下 // 将各个定义的接口名称统一放进对象挂载到vm.$u.api(因为vm就是this也即this.$u.api)下
vm.$u.api = {getSearch, getInfo}; vm.$u.api = {
login,
};
} }
export default { export default {

@ -1,6 +1,6 @@
{ {
"name" : "uni", "name" : "uni",
"appid" : "__UNI__3136F4B", "appid" : "__UNI__94DEB94",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",

@ -18,8 +18,7 @@
{ {
"path": "pages/me/me", "path": "pages/me/me",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "个人中心"
"enablePullDownRefresh": true
} }
}, },
{ {

@ -31,7 +31,7 @@
<image class="bottom" src="~@/static/login/bottom.png" mode="aspectFit"></image> <image class="bottom" src="~@/static/login/bottom.png" mode="aspectFit"></image>
<u-top-tips :navbar-height="navbarHeight" ref="uTips"></u-top-tips> <u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -69,8 +69,8 @@ export default {
methods: { methods: {
authLogin() { authLogin() {
if (!this.isAuth) { if (!this.isAuth) {
this.$refs.uTips.show({ this.$refs.uToast.show({
title: '请阅读《用户协议》和《隐私协议》', title: '请阅读协议',
type: 'warning', type: 'warning',
duration: '2000' duration: '2000'
}) })
@ -80,17 +80,22 @@ export default {
provider: 'weixin', //使 provider: 'weixin', //使
success: (loginRes) => { success: (loginRes) => {
console.log(loginRes); console.log(loginRes);
this.$u.route({ this.$u.api.login({
type: 'switchTab', code: loginRes.code
url: '/pages/index/index' }).then(res => {
console.log(res)
}) })
// this.$u.route({
// type: 'switchTab',
// url: '/pages/index/index'
// })
} }
}); });
}, },
mobileLogin(e) { mobileLogin(e) {
if (!this.isAuth) { if (!this.isAuth) {
this.$refs.uTips.show({ this.$refs.uToast.show({
title: '请阅读《用户协议》和《隐私协议》', title: '请阅读协议',
type: 'warning', type: 'warning',
duration: '2000' duration: '2000'
}) })

@ -1,6 +1,15 @@
<template> <template>
<view> <view class="container">
me <image class="bkg" mode="aspectFill" src="~@/static/me/bkg.png"></image>
<view class="top">
<image class="avatar" mode="aspectFit" src="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"></image>
<view class="info">
<view class="info-name">我的</view>
<view class="info-mobile">手机号18888888888</view>
</view>
</view>
<tabbar /> <tabbar />
</view> </view>
</template> </template>
@ -19,5 +28,24 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.container {
position: relative;
.bkg {
width: 100vw;
z-index: 0;
height: 550rpx;
position: absolute;
top: 0;
left: 0;
}
.top {
padding: 0 25rpx;
.avatar {
}
}
}
</style> </style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Loading…
Cancel
Save