Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mallapp
Project
Project
Details
Activity
Releases
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
viitto
mallapp
Commits
6c717e48
Commit
6c717e48
authored
Oct 21, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
15f45dd5
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
268 additions
and
68 deletions
+268
-68
list.vue
components/school/list.vue
+2
-2
style1.vue
components/studyArticle/style1.vue
+1
-3
style5.vue
components/studyArticle/style5.vue
+2
-3
style6.vue
components/studyArticle/style6.vue
+2
-3
pages.json
pages.json
+4
-4
component.vue
pages/school/components/u-charts/component.vue
+0
-0
u-charts.js
pages/school/components/u-charts/u-charts.js
+0
-0
u-charts.min.js
pages/school/components/u-charts/u-charts.min.js
+0
-0
course-submit.vue
pages/school/course-submit.vue
+3
-2
courseContent.vue
pages/school/courseContent.vue
+46
-8
courseInfo.vue
pages/school/courseInfo.vue
+10
-6
mystudy.vue
pages/school/mystudy/mystudy.vue
+104
-9
mycollection.vue
pages/school/personal/mycollection.vue
+4
-6
teacherDetails.vue
pages/school/teacherDetails.vue
+54
-6
search.vue
pages/search/search.vue
+33
-14
user-center.vue
pages/user-center/user-center.vue
+3
-2
No files found.
components/school/list.vue
View file @
6c717e48
...
...
@@ -33,14 +33,14 @@
<text
class=
"good-rb-text"
>
{{
cx
.
course_score
!=
null
&&
cx
.
course_score
>
0
?
cx
.
course_score
.
toFixed
(
1
):
'5.0'
}}
分
</text>
</view>
<view
class=
"good-rb-box"
v-if=
"cx.is_pay==false && cx.price!=0"
>
<
text
style=
"font-size: 10px;color: #999999;text-decoration:line-through;margin-right: 2px;margin-top: 2px;"
>
¥
{{
cx
.
original_price
}}
</text
>
<
!--
<text
style=
"font-size: 10px;color: #999999;text-decoration:line-through;margin-right: 2px;margin-top: 2px;"
>
¥
{{
cx
.
original_price
}}
</text>
--
>
<text
:style=
"
{'font-size': '11px','color': pricecolor,'margin-top':'2px'}">¥
</text>
<text
:style=
"
{'font-size': '16px','color': pricecolor}">
{{
cx
.
price
.
split
(
'.'
)[
0
]
}}
</text>
</view>
<view
class=
"good-rb-box"
v-if=
"cx.is_pay==true&& cx.price!=0"
>
<text
:style=
"
{'font-size': '14px','color': pricecolor}">已购买
</text>
</view>
<view
v-if=
"cx.price==0"
style=
"font-size: 1
2
px;color: #999999;"
>
免费
</view>
<view
v-if=
"cx.price==0"
style=
"font-size: 1
3
px;color: #999999;"
>
免费
</view>
</view>
</view>
</view>
...
...
components/studyArticle/style1.vue
View file @
6c717e48
...
...
@@ -58,9 +58,7 @@
};
this
.
showAuth
=
true
;
}
else
{
uni
.
navigateTo
({
url
:
'/pages/school/courseInfo?GoodsId='
+
item
.
id
});
uni
.
navigateTo
({
url
:
"/pages/school/articleDetails?ID="
+
item
.
id
});
}
},
reloadUserinfo
()
{
...
...
components/studyArticle/style5.vue
View file @
6c717e48
...
...
@@ -56,9 +56,8 @@
};
this
.
showAuth
=
true
;
}
else
{
uni
.
navigateTo
({
url
:
'/pages/school/courseInfo?GoodsId='
+
item
.
id
});
uni
.
navigateTo
({
url
:
"/pages/school/articleDetails?ID="
+
item
.
id
});
}
},
reloadUserinfo
()
{
...
...
components/studyArticle/style6.vue
View file @
6c717e48
...
...
@@ -59,9 +59,8 @@
};
this
.
showAuth
=
true
;
}
else
{
uni
.
navigateTo
({
url
:
'/pages/school/courseInfo?GoodsId='
+
item
.
id
});
uni
.
navigateTo
({
url
:
"/pages/school/articleDetails?ID="
+
item
.
id
});
}
},
reloadUserinfo
()
{
...
...
pages.json
View file @
6c717e48
...
...
@@ -384,10 +384,10 @@
},{
"path"
:
"personal/cardList"
//学习卡中心
},{
"path"
:
"mystudy/mystudy"
,
"style"
:
{
"navigationStyle"
:
"custom"
}
"path"
:
"mystudy/mystudy"
//
"style"
:
{
//
"navigationStyle"
:
"custom"
//
}
},{
"path"
:
"mystudy/studyrecord"
,
"style"
:
{
...
...
components/u-charts/component.vue
→
pages/school/
components/u-charts/component.vue
View file @
6c717e48
File moved
components/u-charts/u-charts.js
→
pages/school/
components/u-charts/u-charts.js
View file @
6c717e48
File moved
components/u-charts/u-charts.min.js
→
pages/school/
components/u-charts/u-charts.min.js
View file @
6c717e48
File moved
pages/school/course-submit.vue
View file @
6c717e48
...
...
@@ -582,7 +582,7 @@
.
coursesubmit
.
filed
{
display
:
flex
;
align
-
items
:
flex
-
start
;
padding
:
0
10
px
;
}
.
coursesubmit
.
filed
.
left
,
.
coursesubmit
.
filed
.
right
{
...
...
@@ -619,10 +619,11 @@
}
.
coursesubmit
.
good
{
background
:
#
fff
;
padding
:
10
px
13
px
;
padding
:
10
px
0
px
;
display
:
flex
;
flex
-
direction
:
row
;
font
-
family
:
aa
;
border
-
bottom
:
1
px
solid
#
F5F6F7
;
}
.
coursesubmit
.
good
-
img
{
...
...
pages/school/courseContent.vue
View file @
6c717e48
...
...
@@ -64,20 +64,24 @@
style=
"height: 100%;"
>
-->
<view
class=
"scrollitem"
v-for=
"(cl, ci) in courseList"
:key=
"ci"
@
click=
"gocourse(cl,ci)"
>
<view
class=
"catalog-box-l"
:style=
"
{color:index==ci?'#00D6A6':'#121212'}">
<view
class=
"cb-l-bt"
:style=
"
{border:index==ci?'0.5px solid #00D6A6':'0.5px solid #121212'}">
{{
cl
.
TypeName
}}
</view>
{{
cl
.
SortName
}}{{
cl
.
Name
}}
<view
style=
"min-width: 40px;display: flex;"
>
<view
class=
"cb-l-bt"
:style=
"
{border:index==ci?'0.5px solid #00D6A6':'0.5px solid #121212'}">
{{
cl
.
TypeName
}}
</view>
</view>
{{
cl
.
SortName
}}
:
{{
cl
.
Name
}}
</view>
<!-- IsPay 0不可看 1已付款 2已下单 -->
<view
:style=
"
{color:mc}" class="catalog-box-r" v-if="cl.IsPay!=1">
{{
cl
.
IsTrySee
==
1
?
'可试看'
:
'购买'
}}
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#FFF"
/>
<!--
</scroll-view>
-->
</view>
<!--
<view
class=
"goback"
@
click=
"goback"
:style=
"
{'padding-top':paddingHTop}">
<u-icon
name=
"arrow-left"
size=
"48"
color=
"#fff"
></u-icon>
</view>
-->
<coupon
v-if=
"showCoupons"
:coupon-message=
"couponMessage"
...
...
@@ -112,15 +116,33 @@
couponMessage
:
""
,
img
:[],
studybg
:
true
,
studytext
:
'立即试看'
studytext
:
'立即试看'
,
status
:
"nomore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多了"
,
},
cover_pic
:
''
,
count
:
0
,
learned
:
0
}
},
onLoad
(
options
)
{
console
.
log
(
options
,
'options'
)
if
(
options
&&
options
.
id
){
this
.
id
=
options
.
id
this
.
index
=
options
.
index
;
}
if
(
options
&&
options
.
index
){
this
.
index
=
options
.
index
}
if
(
options
&&
options
.
name
){
this
.
name
=
options
.
name
}
if
(
options
&&
options
.
cover_pic
){
this
.
cover_pic
=
options
.
cover_pic
}
this
.
getGoodsCourseList
()
//获取课程目录
this
.
getAppletCourseCollect
()
//获取课程是否收藏
this
.
setMyStudyTime
()
//增加课程学习时间
...
...
@@ -128,7 +150,7 @@
this
.
setMyStudyTime
(
10
)
},
10000
)
}
// 多反了个字段 IsRead 是否已学习, 1是 2否
},
created
()
{
...
...
@@ -210,11 +232,27 @@
res
=>
{
this
.
courseList
=
res
.
data
.
pageData
;
this
.
selectcourse
=
this
.
courseList
[
this
.
index
];
this
.
count
=
res
.
data
.
count
;
this
.
img
=
[];
this
.
courseList
[
this
.
index
].
ImageList
.
forEach
((
x
)
=>
{
this
.
img
.
push
(
x
.
Path
);
});
this
.
loading
=
true
;
this
.
learned
=
0
;
this
.
courseList
.
forEach
(
x
=>
{
if
(
x
.
IsRead
==
1
){
this
.
learned
++
;
}
})
let
obj
=
{
name
:
this
.
name
,
cover_pic
:
this
.
cover_pic
,
Sort
:
this
.
selectcourse
.
Sort
,
learned
:
this
.
learned
,
count
:
this
.
count
,
}
uni
.
setStorageSync
(
"laststudy"
,
obj
);
this
.
setMyCourseStudyOK
()
//课程已阅读
}
);
...
...
pages/school/courseInfo.vue
View file @
6c717e48
...
...
@@ -87,8 +87,9 @@
<text
class=
"numfont"
:style=
"
{ color: pricecolor }"
>
{{
g
.
price
}}
</text>
<text
class=
"oprice"
v-if=
"setting.is_underline_price == 1"
>
{{
g
.
original_price
}}
</text>
<text
class=
"oprice"
v-if=
"setting.is_underline_price == 1
&& (g.original_price>g.price)
"
>
{{
g
.
original_price
}}
</text>
</view>
<view
v-else
class=
"price"
:style=
"
{'font-size': '16px','color': pricecolor}">免费
</view>
<view
class=
"sell u-skeleton-rect"
>
<text
v-if=
"setting.is_sales == 1"
>
{{
g
.
sales
}}
人学习过
</text>
...
...
@@ -148,8 +149,11 @@
<view
class=
"catalog"
>
<view
class=
"catalog-box"
v-for=
"(cl, ci) in courseList"
:key=
"ci"
@
click=
"gocourse(cl,ci)"
>
<view
class=
"catalog-box-l"
>
<view
class=
"cb-l-bt"
>
{{
cl
.
TypeName
}}
</view>
{{
cl
.
SortName
}}{{
cl
.
Name
}}
<view
style=
"min-width: 40px;display: flex;"
>
<view
class=
"cb-l-bt"
>
{{
cl
.
TypeName
}}
</view>
</view>
{{
cl
.
SortName
}}
:
{{
cl
.
Name
}}
</view>
<!-- IsPay 0不可看 1已付款 2已下单 -->
<view
:style=
"
{color:mc}" class="catalog-box-r" v-if="cl.IsPay!=1">
...
...
@@ -593,7 +597,7 @@ export default {
if(item.IsPay!=1){
if(item.IsTrySee==1){
uni.navigateTo({
url:'
/
pages
/
school
/
courseContent
?
id
=
'+this.id+'
&
name
=
'+this.g.name+'
&
index
=
'+index
url:'
/
pages
/
school
/
courseContent
?
id
=
'+this.id+'
&
name
=
'+this.g.name+'
&
cover_pic
=
'+this.g.cover_pic+'
&
index
=
'+index
})
}else{
uni.showToast({
...
...
@@ -604,7 +608,7 @@ export default {
}
}else{
uni.navigateTo({
url:'
/
pages
/
school
/
courseContent
?
id
=
'+this.id+'
&
name
=
'+this.g.name+'
&
index
=
'+index
url:'
/
pages
/
school
/
courseContent
?
id
=
'+this.id+'
&
name
=
'+this.g.name+'
&
cover_pic
=
'+this.g.cover_pic+'
&
index
=
'+index
})
}
...
...
@@ -1004,7 +1008,7 @@ font-family: aa;
}
.goods
.gwuche
{
padding
:
10px
18px
;
margin-top
:
6px
;
/* margin-top: 6px; */
margin-right
:
15px
;
border-radius
:
6px
;
...
...
pages/school/mystudy/mystudy.vue
View file @
6c717e48
<
template
>
<view
class=
"mystudy"
>
<view
style=
"padding-top: 74px;"
>
<view
<view
>
<
!--
<
view
class=
"headStatus"
:style=
"[
headStyle,
...
...
@@ -14,11 +14,11 @@
<u-tabs
:list=
"list"
:is-scroll=
"false"
:current=
"current"
@
change=
"change"
:active-color=
'mc'
></u-tabs>
</view>
<view
class=
"arrow"
></view>
</view>
</view>
-->
<view
v-if=
"current==0"
class=
"studyBox"
>
<view
class=
"plot"
>
<
!-- TODO 图表--
>
<
canvas
canvas-id=
"canvasLineA"
id=
"canvasLineA"
class=
"charts"
@
touchstart=
"touchLineA"
></canvas
>
</view>
<view
class=
"studyB-b"
>
<view
class=
"s-b-time"
>
...
...
@@ -105,9 +105,14 @@
import
hParse
from
"@/components/u-parse/parse.vue"
;
import
auth
from
"@/components/auth/index.vue"
;
import
uCharts
from
'../components/u-charts/u-charts.js'
;
var
_self
;
var
canvaLineA
=
null
;
export
default
{
data
(){
return
{
pageTitle
:
'学习概况'
,
mc
:
''
,
pricecolor
:
''
,
secondary
:
''
,
...
...
@@ -120,7 +125,6 @@
windowWidth
:
0
,
scrollTop
:
0
,
headStyle
:{},
pageTitle
:
'我的学习'
,
UserId
:
0
,
u
:{},
showAuth
:
false
,
...
...
@@ -128,6 +132,10 @@
studyTime
:{},
RecentStudy
:[],
StudyRecord
:[],
cWidth
:
''
,
cHeight
:
''
,
pixelRatio
:
1
,
textarea
:
''
}
},
components
:
{
...
...
@@ -135,6 +143,9 @@
auth
},
onLoad
(
options
)
{
_self
=
this
;
this
.
cWidth
=
uni
.
upx2px
(
750
);
this
.
cHeight
=
uni
.
upx2px
(
400
);
},
created
()
{
...
...
@@ -145,7 +156,18 @@
this
.
paddingHTop
=
this
.
nav
+
'px'
;
this
.
windowWidth
=
this
.
$utils
.
SystemInfo
().
windowWidth
;
this
.
headStyle
.
paddingTop
=
this
.
nav
+
'px'
;
let
currentPages
=
getCurrentPages
();
let
u
=
"/"
+
currentPages
[
currentPages
.
length
-
1
].
route
;
let
pages
=
wx
.
getStorageSync
(
"basedata"
)
?
wx
.
getStorageSync
(
"basedata"
).
bar_title
:
[];
pages
.
forEach
((
x
)
=>
{
if
(
x
.
value
==
u
)
{
this
.
pageTitle
=
x
.
new_name
?
x
.
new_name
:
x
.
name
;
}
});
uni
.
setNavigationBarTitle
({
title
:
this
.
pageTitle
,
});
this
.
u
=
uni
.
getStorageSync
(
"mall_UserInfo"
);
if
(
!
this
.
u
)
{
this
.
u
=
{
...
...
@@ -176,6 +198,14 @@
},
res
=>
{
this
.
studyTime
=
res
.
data
let
LineA
=
{
categories
:[],
series
:[{
data
:[],
name
:
'学习时间'
}]};
//这里我后台返回的是数组,所以用等于,如果您后台返回的是单条数据,需要push进去
res
.
data
.
MyStudyTimeList
.
forEach
(
x
=>
{
let
obj
=
x
.
Date
.
split
(
'-'
)[
1
]
+
'.'
+
x
.
Date
.
split
(
'-'
)[
2
]
LineA
.
categories
.
push
(
obj
)
LineA
.
series
[
0
].
data
.
push
(
x
.
TimeFormat
.
Time
)
})
_self
.
showLineA
(
"canvasLineA"
,
LineA
);
}
);
},
...
...
@@ -217,7 +247,67 @@
uni
.
navigateTo
({
url
:
'/pages/school/mystudy/orderStudy'
})
}
},
showLineA
(
canvasId
,
chartData
){
canvaLineA
=
new
uCharts
({
$this
:
_self
,
canvasId
:
canvasId
,
type
:
'line'
,
fontSize
:
11
,
padding
:[
15
,
20
,
0
,
15
],
legend
:{
show
:
false
},
dataLabel
:
true
,
dataPointShape
:
true
,
background
:
'#FFFFFF'
,
pixelRatio
:
_self
.
pixelRatio
,
categories
:
chartData
.
categories
,
series
:
chartData
.
series
,
animation
:
true
,
xAxis
:
{
// disabled:true,
type
:
'grid'
,
gridColor
:
'#CCCCCC'
,
gridType
:
'dash'
,
dashLength
:
8
,
splitNumber
:
1
,
axisLine
:
true
,
boundaryGap
:
'justify'
,
disableGrid
:
true
,
},
yAxis
:
{
disabled
:
true
,
},
width
:
_self
.
cWidth
*
_self
.
pixelRatio
,
height
:
_self
.
cHeight
*
_self
.
pixelRatio
,
extra
:
{
line
:{
type
:
'curve'
,
//curve曲线,straight直线
}
}
});
// //下面是默认选中索引
// let cindex=5;
// //下面是自定义文案
// let textList=[{text:'我是一个标题',color:null},{text:'自定义1:值1',color:'#2fc25b'},{text:'自定义2:值2',color:'#facc14'},{text:'自定义3:值3',color:'#f04864'}];
// //下面是event的模拟,tooltip的Y坐标值通过这个mp.changedTouches[0].y控制
// let tmpevent={mp:{changedTouches:[{x: 0, y: 120}]}};
// setTimeout(()=>{
// canvaLineA.showToolTip( tmpevent , {
// index:cindex,
// // textList:textList
// });
// },200)
},
touchLineA
(
e
)
{
canvaLineA
.
touchLegend
(
e
);
canvaLineA
.
showToolTip
(
e
,
{
format
:
function
(
item
,
category
)
{
console
.
log
(
item
,
category
,
e
)
return
category
+
' '
+
item
.
name
+
':'
+
item
.
data
+
'分钟'
}
});
},
}
}
...
...
@@ -257,10 +347,15 @@
align-items
:
center
;
}
.mystudy
.plot
{
width
:
100%
;
height
:
160
px
;
width
:
750
upx
;
height
:
400
u
px
;
}
.plot
.charts
{
width
:
750
upx
;
height
:
400
upx
;
background-color
:
#FFFFFF
;
}
.mystudy
.studyB-b
{
width
:
100%
;
padding
:
15px
;
...
...
pages/school/personal/mycollection.vue
View file @
6c717e48
...
...
@@ -59,7 +59,7 @@
padding-top: 10px;
"
>
<scroll-view
:scroll-y=
"true"
:enable-back-to-top=
"true"
:enable-flex=
"true"
@
scrolltolower=
"lower"
style=
"height: 100%; padding-bottom: 0px;"
>
<view
class=
"u-collect-list"
v-for=
"(item,index) in goodslist"
:key=
"index"
>
<view
class=
"u-collect-list"
v-for=
"(item,index) in goodslist"
:key=
"index"
@
click=
"clickHandler(item)"
>
<view
class=
"collect-img"
>
<image
mode=
"aspectFill"
:src=
"item.CoverImage"
style=
"width: 100%; height: 100%;border-radius: 4px;"
></image>
</view>
...
...
@@ -75,7 +75,7 @@
</view>
</view>
</view>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#
f3f4f6
"
/>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#
FFF
"
/>
</scroll-view>
<u-empty
v-if=
"goodslist.length==0"
text=
"没有任何收藏商品哦~"
mode=
"favor"
></u-empty>
</view>
...
...
@@ -188,10 +188,8 @@
gbAuth
()
{
uni
.
navigateBack
()
},
clickHandler
(
cx
)
{
uni
.
navigateTo
({
url
:
'/pages/goods/goods?GoodsId='
+
cx
.
Id
,
});
clickHandler
(
item
)
{
uni
.
navigateTo
({
url
:
"/pages/school/courseInfo?GoodsId="
+
item
.
Id
});
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
...
...
pages/school/teacherDetails.vue
View file @
6c717e48
...
...
@@ -3,6 +3,7 @@
:scroll-y=
"true"
@
scroll=
"scrollHandler"
@
scrolltoupper=
"scrollTopHandler"
@
scrolltolower=
"lower"
style=
"height: 100vh;"
>
<view
class=
"teacherDetails"
>
...
...
@@ -68,19 +69,22 @@
<view
class=
"tiaoti-l"
></view>
<text
style=
"font-size: 16px;color: #1B1D1E;margin-left: 5px;"
>
课程目录
</text>
</view>
<view
class=
"good"
v-for=
"(cx, ci) in
teacher.goodsResult"
:key=
"ci"
@
click=
"clickHandler(cx)
"
>
<view
class=
"good"
v-for=
"(cx, ci) in
g"
:key=
"ci"
@
click=
"clickHandler(cx)"
v-if=
"g.length>0
"
>
<view
class=
"good-img"
>
<image
mode=
"aspectFill"
:src=
"cx.
CoverImage
"
style=
"width: 100%; height: 100%;border-radius: 4px;"
></image>
<image
mode=
"aspectFill"
:src=
"cx.
cover_pic
"
style=
"width: 100%; height: 100%;border-radius: 4px;"
></image>
</view>
<view
class=
"good-r"
:style=
"
{'width': (windowWidth -15 - 125 -26)+'px'}">
<view
class=
"good-name"
>
{{
cx
.
N
ame
}}
{{
cx
.
n
ame
}}
</view>
<view
class=
"good-r-b"
>
<text>
本教程共分
{{
cx
.
CourseNum
}}
个章节
</text>
</view>
</view>
</view>
<u-empty
text=
"暂无课程"
v-if=
'g.length==0'
font-size=
"36"
mode=
"list"
></u-empty>
<u-loadmore
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#FFF"
/>
</view>
<view
class=
"goback"
@
click=
"goback"
:style=
"
{'padding-top':paddingHTop}">
<u-icon
name=
"arrow-left"
size=
"48"
color=
"#121212"
></u-icon>
...
...
@@ -110,6 +114,20 @@
UserId
:
0
,
u
:{},
showAuth
:
false
,
msg
:{
pageIndex
:
1
,
pageSize
:
10
,
TeacherId
:
0
,
},
page_count
:
1
,
g
:
[],
status
:
"loadmore"
,
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多课程了"
,
},
}
},
components
:
{
...
...
@@ -119,12 +137,13 @@
onLoad
(
options
)
{
console
.
log
(
options
,
'options'
)
if
(
options
&&
options
.
ID
){
this
.
id
=
options
.
ID
this
.
id
=
options
.
ID
;
this
.
msg
.
TeacherId
=
options
.
ID
;
if
(
uni
.
getStorageSync
(
"mall_UserInfo"
)){
this
.
UserId
=
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserId
:
0
}
this
.
getTeacher
()
//根据老师id获取老师详情
this
.
init
()
//根据老师id获取老师的课程列表
}
},
created
()
{
...
...
@@ -143,6 +162,26 @@
goback
(){
uni
.
navigateBack
({})
},
init
(){
this
.
request2
({
url
:
'/api/AppletSchool/GetAppletCoursePageList'
,
data
:
this
.
msg
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
if
(
this
.
page_count
==
1
)
{
this
.
status
=
"nomore"
;
}
else
{
this
.
status
=
"loadmore"
;
}
}
uni
.
hideNavigationBarLoading
();
}
);
},
getTeacher
(){
this
.
request2
({
url
:
'/api/AppletSchool/GetTeacherModel'
,
...
...
@@ -213,7 +252,16 @@
gob
(){
this
.
showAuth
=
false
;
},
lower
(
e
)
{
if
(
this
.
msg
.
pageIndex
<
this
.
page_count
)
{
this
.
status
=
"loading"
;
this
.
msg
.
pageIndex
++
;
this
.
init
();
}
else
{
this
.
status
=
"nomore"
;
}
},
}
}
...
...
pages/search/search.vue
View file @
6c717e48
...
...
@@ -91,8 +91,9 @@
style=
"height: 100%;"
v-if=
"g.length > 0"
>
<view
style=
"padding: 12px;"
>
<goodlist
:list=
"g"
></goodlist>
<view
:style=
"{'padding': IsEducation!=1?'12px':0,}"
>
<goodlist
:list=
"g"
v-if=
"IsEducation!=1"
></goodlist>
<glist
:list=
"g"
v-if=
"IsEducation==1"
></glist>
<u-loadmore
v-if=
"showLoading"
:status=
"status"
...
...
@@ -116,11 +117,12 @@
margin-top=
"24"
padding-top=
"0"
></u-empty>
<view
style=
"padding: 12px;
"
>
<view
class=
"recommed"
>
<view
:style=
"{'padding': IsEducation!=1?'12px':0,}
"
>
<view
class=
"recommed"
:style=
"{'padding-left': IsEducation==1?'12px':0,}"
>
<view
class=
"title"
>
为你推荐
</view>
</view>
<goodlist
:list=
"recommedGoods"
></goodlist>
<goodlist
:list=
"recommedGoods"
v-if=
"IsEducation!=1"
></goodlist>
<glist
:list=
"recommedGoods"
v-if=
"IsEducation==1"
></glist>
</view>
</view>
</view>
...
...
@@ -129,9 +131,11 @@
<
script
>
import
goodlist
from
"@/components/goods/list"
;
import
glist
from
"@/components/school/list"
;
export
default
{
components
:
{
goodlist
,
glist
},
data
()
{
return
{
...
...
@@ -155,6 +159,7 @@ export default {
isover
:
false
,
loading
:
false
,
recommedGoods
:
[],
IsEducation
:
0
,
//为1的时候是校园风格
};
},
onLoad
(
option
)
{
...
...
@@ -164,6 +169,7 @@ export default {
this
.
searchHistory
=
uni
.
getStorageSync
(
"search_his"
);
}
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
IsEducation
=
uni
.
getStorageSync
(
'basedata'
)
?
uni
.
getStorageSync
(
'basedata'
).
mall
.
setting
.
mallStyle
.
IsEducation
:
0
;
},
methods
:
{
//为你推荐
...
...
@@ -250,10 +256,16 @@ export default {
this
.
isover
=
false
;
this
.
loading
=
true
;
this
.
showLoading
=
this
.
page
!=
1
;
var
UserPageType
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
var
UserPageType
=
uni
.
getStorageSync
(
"mall_UserInfo"
)?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
let
url
if
(
this
.
IsEducation
==
1
){
url
=
'/api/AppletSchool/GetAppletCoursePageList'
;
}
else
{
url
=
"/api/AppletGoods/GetAppletGoodsPageListForZY"
;
}
this
.
request2
(
{
url
:
"/api/AppletGoods/GetAppletGoodsPageListForZY"
,
url
:
url
,
data
:
{
pageIndex
:
this
.
page
,
pageSize
:
20
,
...
...
@@ -267,13 +279,20 @@ export default {
(
res
)
=>
{
console
.
log
(
res
,
'搜索ress'
);
this
.
showLoading
=
true
;
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
marketingLogo
=
JSON
.
parse
(
x
.
marketingLogo
)
x
.
totalStock
=
0
;
x
.
attr
.
forEach
(
j
=>
{
x
.
totalStock
+=
j
.
stock
})
})
if
(
res
.
data
.
pageData
.
length
>
0
){
console
.
log
(
res
.
data
.
pageData
)
res
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
marketingLogo
=
JSON
.
parse
(
x
.
marketingLogo
)
x
.
totalStock
=
0
;
if
(
x
.
attr
&&
x
.
attr
.
length
>
0
){
x
.
attr
.
forEach
(
j
=>
{
x
.
totalStock
+=
j
.
stock
})
}
})
}
this
.
g
=
this
.
g
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
...
...
pages/user-center/user-center.vue
View file @
6c717e48
...
...
@@ -63,7 +63,7 @@
</view>
</view>
<view
class=
"ReceiptAdder"
@
click=
"goUrl('/pages/address/address')"
:style=
"
{top:modelstype==0?'160rpx':(modelstype==1?'180rpx':'160rpx')}">
<view
class=
"ReceiptAdder"
v-if=
"IsEducation!=1"
@
click=
"goUrl('/pages/address/address')"
:style=
"
{top:modelstype==0?'160rpx':(modelstype==1?'180rpx':'160rpx')}">
<u-icon
name=
"location"
color=
"#fff"
size=
"23"
></u-icon>
<Text
style=
"color: #fff;font-size: 12px;margin-left: 20rpx;"
>
收货地址
</Text>
</view>
...
...
@@ -234,7 +234,7 @@ export default {
modelstype
:
0
,
//机型类型
shopBasics
:{},
mall_UserInfo
:{},
IsEducation
:
0
,
//1是0否是网课模式
};
},
components
:
{
...
...
@@ -244,6 +244,7 @@ export default {
created
()
{
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
this
.
secondary
=
this
.
$uiConfig
.
secondary
;
this
.
IsEducation
=
uni
.
getStorageSync
(
'basedata'
)
?
uni
.
getStorageSync
(
'basedata'
).
mall
.
setting
.
mallStyle
.
IsEducation
:
0
;
this
.
userinfo
();
},
onLoad
()
{
...
...
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