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
bb4161fc
authored
Aug 23, 2019
by
梁建民
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
js
parent
162e35af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
12 deletions
app.js
pages/list/signin/index.js
pages/list/signin/index.wxml
app.js
View file @
bb4161fc
...
...
@@ -54,9 +54,9 @@ App({
if
(
this
.
globalData
.
auth
)
{
//是否登录
if
(
this
.
globalData
.
token
)
{
wx
.
switchTab
({
url
:
'/pages/tab/home/home'
});
//
wx.switchTab({
//
url: '/pages/tab/home/home'
//
});
}
else
{
wx
.
redirectTo
({
url
:
'/pages/person/login/index'
...
...
pages/list/signin/index.js
View file @
bb4161fc
...
...
@@ -17,7 +17,7 @@ Page({
checkList
:
[],
//最新数据
checkPopular
:
[],
//热门数据
topic_id
:
''
,
//话题id
limit
:
3
0
,
limit
:
1
0
,
p
:
1
,
total
:
1
,
isShowBottom
:
false
...
...
@@ -122,9 +122,9 @@ Page({
}
else
if
(
this
.
data
.
tabIndex
==
2
)
{
//热门
this
.
setData
({
checkPopular
:
res
.
data
,
});
this
.
setData
({
checkPopular
:
res
.
data
,
});
}
...
...
@@ -213,8 +213,12 @@ Page({
*/
praise
:
function
(
e
)
{
let
type
=
e
.
currentTarget
.
dataset
.
type
,
praise
=
''
;
let
type
=
e
.
currentTarget
.
dataset
.
type
;
let
praise
=
''
;
let
index
=
e
.
currentTarget
.
dataset
.
index
;
console
.
log
(
index
)
if
(
type
==
1
)
{
praise
=
true
;
...
...
@@ -228,8 +232,13 @@ Page({
praise
:
praise
,
id
:
e
.
currentTarget
.
dataset
.
id
},
(
res
)
=>
{
if
(
res
.
errcode
===
0
)
{
if
(
res
.
errcode
===
0
)
{
wx
.
showToast
({
title
:
'点赞成功'
,
icon
:
'none'
,
duration
:
2000
});
}
else
{
wx
.
showToast
({
title
:
res
.
errmsg
,
...
...
pages/list/signin/index.wxml
View file @
bb4161fc
...
...
@@ -34,11 +34,11 @@
<view class="item-center">{{item.content}}。</view>
<view class="item-bottom row bothSide verCenter">
<view class="up-down row verCenter">
<view class="up row verCenter" bind:tap="praise" data-id="{{item.id}}" data-type="1">
<view class="up row verCenter" bind:tap="praise" data-id="{{item.id}}" data-type="1"
data-index="{{index}}"
>
<text class="icon iconfont iconiconxiantiaoshouji31 {{item.is_praise == 1 ? 'hasup':'' }}"></text>
<text class="num">{{item.praise}}</text>
</view>
<view class="down row verCenter" bind:tap="praise" data-id="{{item.id}}" data-type="2">
<view class="down row verCenter" bind:tap="praise" data-id="{{item.id}}" data-type="2"
data-index="{{index}}"
>
<text class="icon iconfont iconiconxiantiaoshouji30 {{item.is_praise == 2 ? 'hasdown':'' }}"></text>
<text class="num">{{item.low}}</text>
</view>
...
...
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