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
d6be35e3
authored
Oct 16, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1111
parent
71d8c9e4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
6 deletions
pages/detail/company/index.js
pages/detail/company/index.wxml
pages/person/company/index.js
pages/tab/me/me.js
pages/tab/me/me.wxml
utils/chat.js
pages/detail/company/index.js
View file @
d6be35e3
...
...
@@ -24,7 +24,8 @@ Page({
xb
:
1
,
//1表示询价 2表示报价
isShowBottom
:
false
,
isShowData
:
true
,
isClick
:
""
isClick
:
""
,
headPic
:
''
,
},
/**
...
...
@@ -87,6 +88,16 @@ Page({
}
getData
(
apis
.
userInfo
,
'GET'
,
params
,
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
// 未企业认证的时候优先读取微信头像
if
(
res
.
data
.
avatar
==
''
)
{
this
.
setData
({
headPic
:
res
.
data
.
wechat_oauth
?
res
.
data
.
wechat_oauth
.
oauth_head
:
''
});
}
else
{
this
.
setData
({
headPic
:
res
.
data
.
avatar
});
}
me
.
setData
({
userInfo
:
res
.
data
});
...
...
pages/detail/company/index.wxml
View file @
d6be35e3
...
...
@@ -2,7 +2,7 @@
<view class="company-view">
<view class="company-head row verCenter">
<view class="img-view">
<image src="{{
userInfo.avatar
||'/res/images/imgs/heads.png'}}" class="company-img"></image>
<image src="{{
headPic
||'/res/images/imgs/heads.png'}}" class="company-img"></image>
</view>
<view class="text">
<view class="h3 bold">{{userInfo.company_name||'--'}}</view>
...
...
pages/person/company/index.js
View file @
d6be35e3
...
...
@@ -77,7 +77,7 @@ Page({
// 未企业认证的时候优先读取微信头像
if
(
res
.
data
.
avatar
==
''
)
{
this
.
setData
({
headPic
:
res
.
data
.
wechat_oauth
.
oauth_head
headPic
:
res
.
data
.
wechat_oauth
?
res
.
data
.
wechat_oauth
.
oauth_head
:
''
});
}
else
{
this
.
setData
({
...
...
pages/tab/me/me.js
View file @
d6be35e3
...
...
@@ -62,7 +62,7 @@ Page({
// 未企业认证的时候优先读取微信头像
if
(
res
.
data
.
avatar
==
''
)
{
this
.
setData
({
headPic
:
res
.
data
.
wechat_oauth
.
oauth_head
headPic
:
res
.
data
.
wechat_oauth
?
res
.
data
.
wechat_oauth
.
oauth_head
:
''
});
}
else
{
this
.
setData
({
...
...
pages/tab/me/me.wxml
View file @
d6be35e3
...
...
@@ -5,7 +5,7 @@
</view>
<view class="text">
<text class="t1">
{{userInfo.company_name||
userInfo.wechat_oauth.oauth_nickname||
'--'}}
{{userInfo.company_name||'--'}}
</text>
<view class="row verCenter">
<text class="t2" selectable="false" space="false" decode="false">普通会员</text>
...
...
utils/chat.js
View file @
d6be35e3
...
...
@@ -42,8 +42,14 @@ const getImUser = () => {
"token"
:
token
,
},
function
(
res
)
{
if
(
res
.
errcode
==
0
)
{
let
avatar
=
""
;
wx
.
setStorageSync
(
'user_id'
,
res
.
data
.
user_id
+
''
);
wx
.
setStorageSync
(
'avatar'
,
res
.
data
.
avatar
||
''
);
if
(
res
.
data
.
avatar
==
''
){
avatar
=
res
.
data
.
wechat_oauth
?
res
.
data
.
wechat_oauth
.
oauth_head
:
''
}
else
{
avatar
=
res
.
data
.
avatar
}
wx
.
setStorageSync
(
'avatar'
,
avatar
);
wx
.
setStorageSync
(
'company_name'
,
res
.
data
.
company_name
||
''
);
wx
.
setStorageSync
(
"myUsername"
,
res
.
data
.
im_username
);
wx
.
setStorageSync
(
"myPassword"
,
res
.
data
.
im_password
);
...
...
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