Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9aaa5146
authored
Jul 29, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
5ed7c6a8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
21 deletions
app.js
pages/tab/me/me.js
pages/tab/me/me.wxml
project.config.json
app.js
View file @
9aaa5146
...
...
@@ -37,6 +37,7 @@ function addMember(id) {
App
({
globalData
:
{
unReadMessageNum
:
0
,
token
:
wx
.
getStorageSync
(
'access_token'
),
isIPX
:
false
//是否为iphone X
},
conn
:
{
...
...
@@ -67,9 +68,9 @@ App({
success
(
res
)
{
if
(
res
.
data
){
wx
.
switchTab
({
url
:
'/pages/tab/home/home'
});
//
wx.switchTab({
//
url: '/pages/tab/home/home'
//
});
}
}
...
...
@@ -81,9 +82,9 @@ App({
success
(
res
)
{
if
(
res
.
authSetting
[
'scope.userInfo'
])
{
// 已经授权
wx
.
switchTab
({
url
:
'/pages/tab/home/home'
})
//
wx.switchTab({
//
url: '/pages/tab/home/home'
//
})
}
}
})
...
...
pages/tab/me/me.js
View file @
9aaa5146
// pages/tab/me/me.js
const
http
=
require
(
'../../../utils/util.js'
);
import
{
apis
}
from
'../../../utils/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
isShow
:
false
isShow
:
false
,
userInfo
:{
avatar
:
''
,
mobile
:
''
},
business
:
{
goods
:
''
,
inquiry
:
''
,
offer
:
''
}
},
/**
...
...
@@ -13,6 +26,27 @@ Page({
*/
onLoad
:
function
(
options
)
{
//获取数量统计
http
.
getData
(
apis
.
countBusiness
,
'GET'
,
{
token
:
wx
.
getStorageSync
(
'access_token'
)
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
business
:
res
.
data
});
}
},
true
);
http
.
getData
(
apis
.
userInfo
,
'GET'
,
{
token
:
wx
.
getStorageSync
(
'access_token'
)
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
this
.
setData
({
userInfo
:
res
.
data
});
}
},
true
);
},
/**
...
...
@@ -62,5 +96,17 @@ Page({
*/
onShareAppMessage
:
function
()
{
},
/**
* 跳转地址
*/
toUrl
:
function
(
e
)
{
if
(
e
.
target
.
dataset
.
url
)
{
wx
.
navigateTo
({
url
:
e
.
target
.
dataset
.
url
})
}
}
})
\ No newline at end of file
pages/tab/me/me.wxml
View file @
9aaa5146
<view class="mine" hover-class="none" hover-stop-propagation="false">
<view class="head row verCenter">
<view class="pic">
<cover-image class="im" src="
/res/images/imgs/test.jpg
"></cover-image>
<cover-image class="im" src="
{{userInfo.avatar ? userInfo.avatar:'/res/images/imgs/default.png'}}
"></cover-image>
</view>
<view class="text">
<text class="t1">深圳市猎芯科技有限公司</text>
...
...
@@ -20,15 +20,15 @@
</view>
<view class="tab-bar row verCenter rowCenter">
<view class="wrap">
<text class="t1">
513
</text>
<text class="t1">
{{business.goods}}
</text>
<text class="t2">商品</text>
</view>
<view class="wrap">
<text class="t1">
53
</text>
<text class="t1">
{{business.inquiry}}
</text>
<text class="t2">询价</text>
</view>
<view class="wrap">
<text class="t1">
513
</text>
<text class="t1">
{{business.offer}}
</text>
<text class="t2">报价</text>
</view>
</view>
...
...
@@ -54,7 +54,7 @@
<text class="t1">注册手机号</text>
</view>
<view>
<text class="t2">
15012479484
</text>
<text class="t2">
{{userInfo.mobile}}
</text>
</view>
</view>
<view class="boxsiz bar row bothSide verCenter">
...
...
@@ -68,7 +68,7 @@
</view>
</view>
<view class="hr"></view>
<view class="boxsiz bar row bothSide verCenter bor">
<view class="boxsiz bar row bothSide verCenter bor"
data-url="/pages/person/setting/index" bind:tap="toUrl"
>
<view>
<text class="icon iconfont iconiconcaiseshouye"></text>
<text class="t1">设置</text>
...
...
project.config.json
View file @
9aaa5146
...
...
@@ -48,12 +48,12 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
2
,
"current"
:
0
,
"list"
:
[
{
"id"
:
-1
,
"name"
:
"pages/
detail/chat
/index"
,
"pathName"
:
"pages/
detail/chat
/index"
,
"id"
:
0
,
"name"
:
"pages/
person/login
/index"
,
"pathName"
:
"pages/
person/login
/index"
,
"query"
:
""
,
"scene"
:
null
},
...
...
@@ -66,9 +66,9 @@
},
{
"id"
:
2
,
"name"
:
"pages/
list/xj/index
"
,
"pathName"
:
"pages/
list/xj/index
"
,
"query"
:
"
inquiryItemsId=156327106368454
"
,
"name"
:
"pages/
tab/me/me
"
,
"pathName"
:
"pages/
tab/me/me
"
,
"query"
:
""
,
"scene"
:
null
},
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment