Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
wechatapp.shangjiadao.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
wechatapp.shangjiadao.com
Commits
fc01c6bf
Commit
fc01c6bf
authored
Nov 12, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
4a615296
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
189 additions
and
46 deletions
+189
-46
index.wxs
filter/index.wxs
+38
-1
definePage.js
js/definePage.js
+0
-1
index.js
src/pages/myinfluence/index.js
+3
-2
index.wxml
src/pages/myinfluence/index.wxml
+3
-3
influencelist.js
src/pages/myinfluence/influencelist.js
+115
-14
influencelist.wxml
src/pages/myinfluence/influencelist.wxml
+30
-25
No files found.
filter/index.wxs
View file @
fc01c6bf
...
...
@@ -30,6 +30,41 @@ function formatDateRemoveYearb (date) {
var minute = mi < 10 ? '0' + mi : mi;
return month + '-' + day + ' ' + hour + ':' + minute;
}
function formatDateToHourMinute (date) {
if (!date) {
return ''
};
var regexp = getRegExp('-', 'g');
var time = getDate(date.replace(regexp, '/'));
var y = time.getFullYear();
var m = time.getMonth() + 1;
var month = m < 10 ? '0' + m : m;
var d = time.getDate();
var day = d < 10 ? '0' + d : d;
var h = time.getHours();
var hour = h < 10 ? '0' + h : h;
var mi = time.getMinutes();
var minute = mi < 10 ? '0' + mi : mi;
return hour + ':' + minute;
}
function formatDate2(date) {
if (!date) {
return ''
};
var regexp = getRegExp('-', 'g');
var time = getDate(date.replace(regexp, '/'));
var y = time.getFullYear();
var m = time.getMonth() + 1;
var month = m < 10 ? '0' + m : m;
var d = time.getDate();
var day = d < 10 ? '0' + d : d;
var h = time.getHours();
var hour = h < 10 ? '0' + h : h;
var mi = time.getMinutes();
var minute = mi < 10 ? '0' + mi : mi;
return y + '-' + month + '-' + day + ' ' + hour + ':' + minute;
}
function formatDateRemoveYear (date) {
var time = getDate(date * 1000);
var y = time.getFullYear();
...
...
@@ -508,5 +543,7 @@ module.exports = {
formatGender: formatGender,
formatDateRemoveYearb: formatDateRemoveYearb,
reviewClassImgShow: reviewClassImgShow,
checkStudentSelect: checkStudentSelect
checkStudentSelect: checkStudentSelect,
formatDateToHourMinute: formatDateToHourMinute,
formatDate2: formatDate2
}
\ No newline at end of file
js/definePage.js
View file @
fc01c6bf
...
...
@@ -38,7 +38,6 @@ const definePage = function () {
})
}
function
getForQueryStudentId
(
path
,
query
)
{
console
.
log
(
query
,
'query'
);
let
returnObj
=
{};
const
pageObj
=
parameter
.
find
(
ele
=>
ele
.
root
==
path
)
||
null
;
let
queryParams
=
{};
...
...
src/pages/myinfluence/index.js
View file @
fc01c6bf
...
...
@@ -99,9 +99,10 @@ Page({
},
goInfluenceDetail
()
{
goInfluenceDetail
(
e
)
{
const
{
tab
}
=
e
.
currentTarget
.
dataset
;
wx
.
navigateTo
({
url
:
`/src/pages/myinfluence/influencelist?sid=
${
this
.
data
.
sid
}
`
,
url
:
`/src/pages/myinfluence/influencelist?sid=
${
this
.
data
.
sid
}
&tab=
${
tab
||
0
}
`
,
})
},
getdashboard
()
{
...
...
src/pages/myinfluence/index.wxml
View file @
fc01c6bf
...
...
@@ -40,7 +40,7 @@
<view class="questionicon">?</view>
</view>
<view class="innerbox">
<view class="innerboxitem border-right border-bottom">
<view class="innerboxitem border-right border-bottom"
data-tab="0" bindtap="goInfluenceDetail"
>
<view class="itemtitle">好友查看</view>
<view class="staticline">
<text class="static">{{view.now}}</text>
...
...
@@ -52,7 +52,7 @@
<text class="trendlinestatic">{{rate.getRate(view.now, view.last)}}%</text>
</view>
</view>
<view class="innerboxitem border-bottom">
<view class="innerboxitem border-bottom"
data-tab="2" bindtap="goInfluenceDetail"
>
<view class="itemtitle">留下线索</view>
<view class="staticline">
<text class="static">{{clue.now}}</text>
...
...
@@ -64,7 +64,7 @@
<text class="trendlinestatic">{{rate.getRate(clue.now, clue.last)}}%</text>
</view>
</view>
<view class="innerboxitem border-right">
<view class="innerboxitem border-right"
data-tab="1" bindtap="goInfluenceDetail"
>
<view class="itemtitle">好友转发</view>
<view class="staticline">
<text class="static">{{share.now}}</text>
...
...
src/pages/myinfluence/influencelist.js
View file @
fc01c6bf
...
...
@@ -52,9 +52,28 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
const
{
sid
}
=
options
;
const
{
sid
,
tab
}
=
options
;
this
.
setData
({
sid
,
acIndex
:
Number
(
tab
)
||
0
,
})
app
.
getCurrentSchoolStudentId
({
source_id
:
this
.
data
.
sid
,
source_type
:
10
,
}).
then
((
res
)
=>
{
switch
(
this
.
data
.
acIndex
)
{
case
0
:
this
.
getViewThumbnail
(
'init'
);
break
;
case
1
:
this
.
getShareThumbnail
(
'init'
);
break
;
case
2
:
this
.
getClueList
(
'init'
);
break
;
default
:
break
;
}
})
wx
.
setNavigationBarColor
({
frontColor
:
'#ffffff'
,
...
...
@@ -69,19 +88,7 @@ Page({
fail
:
()
=>
{},
complete
:
()
=>
{}
});
switch
(
this
.
data
.
acIndex
)
{
case
0
:
this
.
getViewThumbnail
(
'init'
);
break
;
case
1
:
this
.
getShareThumbnail
(
'init'
);
break
;
case
2
:
this
.
getClueList
(
'init'
);
break
;
default
:
break
;
}
},
/**
...
...
@@ -767,5 +774,99 @@ Page({
clueLoading
:
false
})
})
},
goViewOrigin
(
e
)
{
// 点击跳转
const
{
viewpeople
}
=
e
.
currentTarget
.
dataset
;
const
{
source_type
}
=
viewpeople
.
behavior
;
switch
(
Number
(
source_type
))
{
case
1
:
// 成长记录
wx
.
navigateTo
({
url
:
`/src/pages/growthrecord/index?consumerId=
${
viewpeople
.
behavior
.
morph_source_student
.
id
}
&sid=
${
viewpeople
.
behavior
.
morph_source_student
.
school_id
}
`
,
})
break
;
case
3
:
// 打卡详情
wx
.
navigateTo
({
url
:
`/src/pages/clockdetail/newindex?tid=
${
viewpeople
.
behavior
.
morph_source_record
.
subject_id
}
&cid=
${
viewpeople
.
behavior
.
morph_source_record
.
id
}
`
,
})
break
;
case
8
:
// 课堂点评
wx
.
navigateTo
({
url
:
`/src/pages/papersquare/reviewdetail?sid=
${
viewpeople
.
behavior
.
morph_source_class_room_review
.
school_id
}
&id=
${
viewpeople
.
behavior
.
morph_source_class_room_review
.
class_id
}
&rid=
${
viewpeople
.
behavior
.
morph_source_class_room_review
.
id
}
&type=
${
viewpeople
.
behavior
.
morph_source_class_room_review
.
review_type
}
`
})
break
;
default
:
break
;
}
},
gosharerOrigin
(
e
)
{
const
{
sharepeople
}
=
e
.
currentTarget
.
dataset
;
const
{
source_type
}
=
sharepeople
;
switch
(
Number
(
source_type
))
{
case
1
:
// 成长记录
wx
.
navigateTo
({
url
:
`/src/pages/growthrecord/index?consumerId=
${
sharepeople
.
morph_source_student
.
id
}
&sid=
${
sharepeople
.
morph_source_student
.
school_id
}
`
,
})
break
;
case
3
:
// 打卡详情
wx
.
navigateTo
({
url
:
`/src/pages/clockdetail/newindex?tid=
${
sharepeople
.
morph_source_record
.
subject_id
}
&cid=
${
sharepeople
.
morph_source_record
.
id
}
`
,
})
break
;
case
8
:
// 课堂点评
wx
.
navigateTo
({
url
:
`/src/pages/papersquare/reviewdetail?sid=
${
sharepeople
.
morph_source_class_room_review
.
school_id
}
&id=
${
sharepeople
.
morph_source_class_room_review
.
class_id
}
&rid=
${
sharepeople
.
morph_source_class_room_review
.
id
}
&type=
${
sharepeople
.
morph_source_class_room_review
.
review_type
}
`
})
break
;
default
:
break
;
}
},
goClueOrigin
(
e
)
{
const
{
clueitem
}
=
e
.
currentTarget
.
dataset
;
const
{
source_type
}
=
clueitem
.
last_behavior
;
switch
(
Number
(
source_type
))
{
case
1
:
// 成长记录
wx
.
navigateTo
({
url
:
`/src/pages/growthrecord/index?consumerId=
${
clueitem
.
last_behavior
.
morph_source_student
.
id
}
&sid=
${
clueitem
.
last_behavior
.
school_id
}
`
,
})
break
;
case
2
:
// 主题(作业和日历)
if
(
clueitem
.
last_behavior
.
morph_source_subject
.
subject_type
==
1
)
{
wx
.
navigateTo
({
url
:
`/src/pages/themeindex/index?id=
${
clueitem
.
last_behavior
.
morph_source_subject
.
class_id
}
&tid=
${
clueitem
.
last_behavior
.
morph_source_subject
.
id
}
`
,
})
}
else
if
(
clueitem
.
last_behavior
.
morph_source_subject
.
subject_type
==
2
)
{
wx
.
navigateTo
({
url
:
`/src/pages/calendarthemeindex/index?id=
${
clueitem
.
last_behavior
.
morph_source_subject
.
class_id
}
&tid=
${
clueitem
.
last_behavior
.
morph_source_subject
.
id
}
`
,
})
}
break
;
case
6
:
// 解锁模式
wx
.
navigateTo
({
url
:
`/src/pages/morethemeindex/index?id=
${
clueitem
.
last_behavior
.
morph_source_unlock_mode
.
class_id
}
&tid=
${
clueitem
.
last_behavior
.
morph_source_unlock_mode
.
id
}
`
,
})
break
;
case
3
:
// 打卡详情
wx
.
navigateTo
({
url
:
`/src/pages/clockdetail/newindex?tid=
${
clueitem
.
last_behavior
.
morph_source_record
.
subject_id
}
&cid=
${
clueitem
.
last_behavior
.
morph_source_record
.
id
}
`
,
})
break
;
case
29
:
// 学生勋章
break
;
case
4
:
// 习作广场
wx
.
navigateTo
({
url
:
`/src/pages/papersquare/index?sid=
${
clueitem
.
last_behavior
.
morph_source_school
.
id
}
`
,
})
break
;
case
5
:
// 个人中心
break
;
case
7
:
// 微官网主页
wx
.
navigateTo
({
url
:
`/src/pages/websiteindex/index?sid=
${
clueitem
.
last_behavior
.
morph_source_school
.
id
}
`
,
})
break
;
default
:
break
;
}
}
})
\ No newline at end of file
src/pages/myinfluence/influencelist.wxml
View file @
fc01c6bf
This diff is collapsed.
Click to expand it.
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