Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
huangyi
6 years ago
Commit
311dfc1cde8fb3a219033e9938a2ba2e3d5e30e7
1 parent
d7dba2b7
修正用户标签为空
修正客服点击复制url不刷新
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
9 deletions
apps/activity/controllers/red-envelope.js
apps/activity/views/action/red-envelope/redbag-cs.hbs
apps/home/controllers/new-home.js
apps/home/router.js
public/js/home/new-home.page.js
apps/activity/controllers/red-envelope.js
View file @
311dfc1
...
...
@@ -21,6 +21,7 @@ const redbagPage = async(req, res, next) => {
userInfo
.
data
.
rewardType
=
false
;
}
}
return
res
.
render
(
'red-envelope/redbag-cs'
,
{
pageHeader
:
headerModel
.
setNav
({
navTitle
:
'添加潮流顾问'
...
...
apps/activity/views/action/red-envelope/redbag-cs.hbs
View file @
311dfc1
...
...
@@ -24,15 +24,20 @@
</div>
{{/if}}
<div
class=
"wx-account-info"
>
<div
id=
"hasCode"
style=
"display:
{{#if
userInfo
.
submitWechat
}}
block;
{{else}}
none;
{{/if}}
"
>
已提交微信号:
<span
id=
"wxCode"
>
{{
userInfo
.
userWechatCode
}}
</span></div>
<div
id=
"hasCode"
style=
"display:
{{#if
userInfo
.
submitWechat
}}
block;
{{else}}
none;
{{/if}}
"
>
已提交微信号:
<span
id=
"wxCode"
>
{{
userInfo
.
userWechatCode
}}
</span></div>
<div
id=
"noCode"
style=
"display:
{{#if
userInfo
.
submitWechat
}}
none;
{{else}}
block;
{{/if}}
"
>
未提交微信
</div>
</div>
</div>
<div
class=
"user-label"
>
<div
class=
"title"
>
用户标签
</div>
<div>
<span
class=
"label"
>
{{
userInfo
.
tag_address
}}
</span>
<span
class=
"label"
>
{{
userInfo
.
tag_createTime
}}
</span>
{{#if
userInfo
.
tag_address
}}
<span
class=
"label"
>
{{
userInfo
.
tag_address
}}
</span>
{{/if}}
{{#if
userInfo
.
tag_createTime
}}
<span
class=
"label"
>
{{
userInfo
.
tag_createTime
}}
</span>
{{/if}}
</div>
</div>
<div
class=
"relation-list"
>
...
...
apps/home/controllers/new-home.js
View file @
311dfc1
...
...
@@ -18,6 +18,19 @@ let channels = {
lifestyle
:
4
};
exports
.
getShareCode
=
async
(
req
,
res
,
next
)
=>
{
try
{
let
shareCode
=
await
req
.
ctx
(
newHomeModel
).
getShareCode
(
req
.
user
.
uid
);
let
shareUrl
=
'/activity/red-envelope/index?shareCode='
+
shareCode
.
data
;
return
res
.
json
({
result
:
true
,
code
:
200
,
data
:
shareUrl
});
}
catch
(
e
)
{
return
next
(
e
);
}
};
exports
.
index
=
async
(
req
,
res
,
next
)
=>
{
let
responseData
=
{
isLogin
:
req
.
user
.
uid
?
true
:
false
,
...
...
apps/home/router.js
View file @
311dfc1
...
...
@@ -188,7 +188,7 @@ router.get('/return/exchange/refreshDelivery', auth, exchange.refreshDelivery);
router
.
get
(
'/tide-command'
,
auth
,
tideCommand
.
tideCommand
);
// 设置潮流口令
router
.
get
(
'/'
,
newHome
.
index
);
// 新个人中心首页
router
.
get
(
'/getCodeUrl'
,
auth
,
newHome
.
getShareCode
);
router
.
get
(
'/family'
,
auth
,
disableBFCache
,
family
.
familyIndex
);
// family首页
router
.
get
(
'/family/vipDetailData'
,
auth
,
family
.
familyVip
);
// 获取VIP信息
...
...
public/js/home/new-home.page.js
View file @
311dfc1
...
...
@@ -38,19 +38,27 @@ class NewHome extends Page {
}
copyShareUrl
()
{
this
.
selector
.
$wxcs
.
click
(
function
()
{
this
.
selector
.
$wxcs
.
click
(
()
=>
{
let
clipboard
=
new
Clipboard
(
'#wxcs'
,
{
text
:
()
=>
{
return
location
.
origin
+
$
(
this
).
attr
(
'data-url'
);
text
:
()
=>
{
return
location
.
origin
+
this
.
selector
.
$wxcs
.
attr
(
'data-url'
);
}
});
clipboard
.
on
(
'success'
,
function
(
e
)
{
clipboard
.
on
(
'success'
,
(
e
)
=>
{
e
.
clearSelection
();
tip
.
show
(
'复制分享地址成功'
);
$
.
ajax
({
method
:
'get'
,
url
:
'/home/getCodeUrl'
,
success
:
(
data
)
=>
{
console
.
log
(
data
);
this
.
selector
.
$wxcs
.
attr
(
'data-url'
,
data
.
data
);
}
});
});
clipboard
.
on
(
'error'
,
function
()
{
clipboard
.
on
(
'error'
,
()
=>
{
tip
.
show
(
'复制失败'
);
});
...
...
Please
register
or
login
to post a comment