Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
d5796b54
Commit
d5796b54
authored
Apr 20, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频教学大纲
parent
7f521e97
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
272 additions
and
244 deletions
+272
-244
pages.json
src/pages.json
+2
-1
index.vue
src/pages/index/index.vue
+236
-238
course-detail.vue
src/pages/learn/course-detail.vue
+34
-5
No files found.
src/pages.json
View file @
d5796b54
...
...
@@ -6,7 +6,8 @@
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
"首页"
"navigationBarTitleText"
:
"首页"
,
"navigationStyle"
:
"custom"
}
},
{
...
...
src/pages/index/index.vue
View file @
d5796b54
<
template
>
<view
class=
"content"
>
<scroll-view
scroll-y
style=
"height: 100%; width: 100%"
@
scrolltolower=
"reachBottom"
@
scroll=
"handleScroll"
refresher-enabled
:refresher-triggered=
"triggered"
@
refresherrefresh=
"onRefresh"
scroll-anchoring
@
refresherrestore=
"onRestore"
@
refresherpulling=
"triggered = true"
>
<u-swiper
:height=
"250"
:list=
"list"
:indicator-pos=
"indicatorPos"
:mode=
"mode"
:interval=
"3000"
@
click=
"clickSwiper"
>
</u-swiper>
<view>
<text
class=
"title"
>
最新消息
</text>
<view
v-for=
"(item, index) in messageList"
:key=
"index"
>
<text
class=
"title"
>
{{
item
.
body
}}
</text>
</view>
<view
class=
"order-view"
>
<!-- 订单推荐吸顶 -->
<u-sticky>
<view
class=
"sticky"
>
<text>
订单推荐
</text>
</view>
</u-sticky>
<!-- 入驻成功之后显示推荐订单列表 -->
<view
v-if=
"status == 7 && orderList.length > 0"
>
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<OrderCell
:orderData=
"item"
>
</OrderCell>
</view>
<u-loadmore
:status=
"currentLoadStatus"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
<!-- 入驻成功之后无推荐订单 -->
<view
v-else-if=
"status == 7 && orderList.length
<
=
0
"
>
暂无订单
</view>
<!-- 入驻前-->
<view
v-else-if=
"loaded"
>
<text
class=
"title"
>
当前订单
{{
count
}}
笔\n入驻通过后,平台将向您推荐订单
</text
>
<u-button
class=
"settle-button"
type=
"primary"
shape=
"circle"
@
click=
"immediatelyIn"
:custom-style=
"buttonStyle"
>
立即入驻
</u-button>
</view>
</view>
</view>
</scroll-view>
</view>
<view
class=
"content"
>
<scroll-view
scroll-y
style=
"height: 100%; width: 100%"
@
scrolltolower=
"reachBottom"
@
scroll=
"handleScroll"
refresher-enabled
:refresher-triggered=
"triggered"
@
refresherrefresh=
"onRefresh"
scroll-anchoring
@
refresherrestore=
"onRestore"
@
refresherpulling=
"triggered = true"
>
<u-swiper
:height=
"250"
:list=
"list"
:indicator-pos=
"indicatorPos"
:mode=
"mode"
:interval=
"3000"
@
click=
"clickSwiper"
>
</u-swiper>
<view
class=
"msg-view"
>
<text
class=
"msg-title"
>
最新消息
</text>
<u-cell-group>
<u-cell-item
class=
"msg-content"
v-for=
"(item, index) in messageList"
:key=
"index"
:title=
"item.message"
>
<image
class=
"msg-icon"
slot=
"icon"
></image>
</u-cell-item>
</u-cell-group>
</view>
<view
class=
"order-view"
>
<!-- 订单推荐吸顶 -->
<u-sticky>
<view
class=
"sticky"
>
<text>
订单推荐
</text>
</view>
</u-sticky>
<!-- 入驻成功之后显示推荐订单列表 -->
<view
v-if=
"status == 7 && orderList.length > 0"
>
<view
v-for=
"(item, index) in orderList"
:key=
"index"
>
<OrderCell
:orderData=
"item"
>
</OrderCell>
</view>
<u-loadmore
:status=
"currentLoadStatus"
bgColor=
"#f2f2f2"
></u-loadmore>
</view>
<!-- 入驻成功之后无推荐订单 -->
<view
v-else-if=
"status == 7 && orderList.length
<
=
0
"
>
暂无订单
</view>
<!-- 入驻前-->
<view
v-else-if=
"loaded"
>
<text
class=
"title"
>
当前订单
{{
count
}}
笔\n入驻通过后,平台将向您推荐订单
</text>
<u-button
class=
"settle-button"
type=
"primary"
shape=
"circle"
@
click=
"immediatelyIn"
:custom-style=
"buttonStyle"
>
立即入驻
</u-button>
</view>
</view>
</scroll-view>
</view>
</
template
>
<
script
>
import
util
from
"@/utils/util.js"
;
import
util
from
"@/utils/util.js"
;
const
app
=
getApp
();
import
OrderCell
from
"@/components/order/index.vue"
;
const
app
=
getApp
();
import
OrderCell
from
"@/components/order/index.vue"
;
export
default
{
components
:
{
OrderCell
,
},
data
()
{
return
{
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
triggered
:
false
,
list
:
[
{
image
:
"https://cdn.uviewui.com/uview/swiper/1.jpg"
,
},
{
image
:
"https://cdn.uviewui.com/uview/swiper/2.jpg"
,
},
{
image
:
"https://cdn.uviewui.com/uview/swiper/3.jpg"
,
},
],
title
:
false
,
mode
:
"round"
,
indicatorPos
:
"bottomCenter"
,
title
:
"Hello"
,
loaded
:
false
,
count
:
0
,
// 推荐订单数量
messageList
:
[
{
id
:
1234
,
type
:
""
,
level
:
""
,
title
:
""
,
url
:
""
,
body
:
"好消息"
,
},
{
id
:
1234
,
type
:
""
,
level
:
""
,
title
:
""
,
url
:
""
,
body
:
"好消息"
,
},
{
id
:
1234
,
type
:
""
,
level
:
""
,
title
:
""
,
url
:
""
,
body
:
"好消息"
,
},
],
loadStatus
:
[
"more"
,
"loading"
,
"noMore"
],
currentLoadStatus
:
"loading"
,
orderList
:
[{},
{},
{},
{},
{},
{},
{},
{},
{},
{}],
bottomLoading
:
false
,
};
},
computed
:
{
buttonStyle
()
{
return
{
width
:
"300rpx"
,
};
},
},
onLoad
()
{
this
.
_freshing
=
false
;
this
.
triggered
=
false
;
},
onShow
()
{
// 每次进入页面都刷新入驻状态
if
(
app
.
globalData
.
token
)
{
// 获取是否显示入驻按钮
this
.
initSettleInfo
();
}
},
methods
:
{
async
initSettleInfo
()
{
if
(
this
.
status
==
7
)
return
;
const
callBack
=
(
vm
,
result
)
=>
{
// 后台自动判断入驻流程是否完成,前台通过status确定状态
if
(
result
&&
result
.
record
)
{
vm
.
loaded
=
true
;
vm
.
status
=
Number
(
result
.
record
.
status
);
// vm.status = 1
}
};
await
app
.
getBaseInfo
(
this
,
callBack
);
},
onRefresh
()
{
if
(
this
.
_freshing
)
return
;
this
.
_freshing
=
true
;
export
default
{
components
:
{
OrderCell
,
},
data
()
{
return
{
status
:
0
,
// 入驻状态:0=>'待提交',1=>'待审核',2=>'已通过',3=>'备选',4=>'已驳回',5=>'已签约',6=>'未支付保证金',7=>'已支付保证金',8=>'已通过考试',9=>'待提交'
triggered
:
false
,
list
:
[{
image
:
"https://cdn.uviewui.com/uview/swiper/1.jpg"
,
},
{
image
:
"https://cdn.uviewui.com/uview/swiper/2.jpg"
,
},
{
image
:
"https://cdn.uviewui.com/uview/swiper/3.jpg"
,
},
],
title
:
false
,
mode
:
"round"
,
indicatorPos
:
"bottomCenter"
,
title
:
"Hello"
,
loaded
:
false
,
count
:
0
,
// 推荐订单数量
messageList
:
[{
id
:
1234
,
type
:
""
,
level
:
""
,
title
:
""
,
url
:
""
,
body
:
"好消息"
,
},
{
id
:
1234
,
type
:
""
,
level
:
""
,
title
:
""
,
url
:
""
,
body
:
"好消息"
,
},
{
id
:
1234
,
type
:
""
,
level
:
""
,
title
:
""
,
url
:
""
,
body
:
"好消息"
,
},
],
loadStatus
:
[
"more"
,
"loading"
,
"noMore"
],
currentLoadStatus
:
"loading"
,
orderList
:
[{},
{},
{},
{},
{},
{},
{},
{},
{},
{}],
bottomLoading
:
false
,
};
},
computed
:
{
buttonStyle
()
{
return
{
width
:
"300rpx"
,
};
},
msgStyle
()
{
return
{
'1'
:
''
,
// 置顶
'2'
:
''
,
// 通知
'3'
:
''
// 消息
}
}
},
onLoad
()
{
this
.
_freshing
=
false
;
this
.
triggered
=
false
;
},
onShow
()
{
// 每次进入页面都刷新入驻状态
if
(
app
.
globalData
.
token
)
{
// 获取是否显示入驻按钮
this
.
initSettleInfo
();
}
},
methods
:
{
async
initSettleInfo
()
{
if
(
this
.
status
==
7
)
return
;
const
callBack
=
(
vm
,
result
)
=>
{
// 后台自动判断入驻流程是否完成,前台通过status确定状态
if
(
result
&&
result
.
record
)
{
vm
.
loaded
=
true
;
vm
.
status
=
Number
(
result
.
record
.
status
);
}
};
await
app
.
getBaseInfo
(
this
,
callBack
);
},
onRefresh
()
{
if
(
this
.
_freshing
)
return
;
this
.
_freshing
=
true
;
// 获取入驻状态
this
.
initSettleInfo
();
// 获取推荐订单及数量
// ....
// 获取入驻状态
this
.
initSettleInfo
();
// 获取推荐订单及数量
// ....
setTimeout
(()
=>
{
// 数据加载完成更新入驻状态和推荐列表
this
.
triggered
=
false
;
this
.
_freshing
=
false
;
},
1000
);
},
onRestore
()
{
this
.
triggered
=
"restore"
;
},
reachBottom
()
{
console
.
log
(
"-----bottom will-----"
);
if
(
this
.
bottomLoading
||
this
.
currentLoadStatus
==
this
.
loadStatus
[
2
])
{
return
;
}
console
.
log
(
"-----bottom did-----"
);
setTimeout
(()
=>
{
// 数据加载完成更新入驻状态和推荐列表
this
.
triggered
=
false
;
this
.
_freshing
=
false
;
},
1000
);
},
onRestore
()
{
this
.
triggered
=
"restore"
;
},
reachBottom
()
{
console
.
log
(
"-----bottom will-----"
);
if
(
this
.
bottomLoading
||
this
.
currentLoadStatus
==
this
.
loadStatus
[
2
])
{
return
;
}
console
.
log
(
"-----bottom did-----"
);
this
.
bottomLoading
=
true
;
this
.
bottomLoading
=
true
;
setTimeout
(()
=>
{
// 加载更多数据
// ...
this
.
orderList
.
push
(...[{},
{},
{},
{},
{},
{},
{},
{},
{},
{}]);
setTimeout
(()
=>
{
// 加载更多数据
// ...
this
.
orderList
.
push
(...[{},
{},
{},
{},
{},
{},
{},
{},
{},
{}]);
// 加载完成
this
.
currentLoadStatus
=
false
/*是否还有*/
?
this
.
loadStatus
[
1
]
:
this
.
loadStatus
[
2
];
this
.
$nextTick
(
function
()
{
this
.
bottomLoading
=
false
;
});
},
1000
);
},
clickSwiper
(
index
)
{},
handleScroll
()
{
console
.
log
(
"-----scroll-------"
);
},
immediatelyIn
()
{
if
(
util
.
getToken
())
{
uni
.
navigateTo
({
url
:
this
.
status
>
0
?
"/pages/settle/prompt"
:
"/pages/settle/index"
,
});
}
else
{
uni
.
navigateTo
({
url
:
"pages/login/index"
,
});
}
},
},
};
// 加载完成
this
.
currentLoadStatus
=
false
/*是否还有*/
?
this
.
loadStatus
[
1
]
:
this
.
loadStatus
[
2
];
this
.
$nextTick
(
function
()
{
this
.
bottomLoading
=
false
;
});
},
1000
);
},
clickSwiper
(
index
)
{},
handleScroll
()
{
console
.
log
(
"-----scroll-------"
);
},
immediatelyIn
()
{
if
(
util
.
getToken
())
{
uni
.
navigateTo
({
url
:
this
.
status
>
0
?
"/pages/settle/prompt"
:
"/pages/settle/index"
,
});
}
else
{
uni
.
navigateTo
({
url
:
"pages/login/index"
,
});
}
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.content
{
height
:
100vh
;
}
.content
{
height
:
100%
;
padding
:
30rpx
;
.logo
{
height
:
200
rpx
;
width
:
100%
;
margin
:
0
rpx
auto
50
rpx
auto
;
}
.msg-view
{
.msg-title
{
color
:
#333333
;
font-size
:
32rpx
;
font-weight
:
bold
;
}
.text-area
{
display
:
flex
;
justify-content
:
center
;
}
.msg-content
{
color
:
#333333
;
font-size
:
26rpx
;
.mas-icon
{}
}
.title
{
font-size
:
36
rpx
;
color
:
#8f8f94
;
}
}
}
.sticky
{
height
:
120
rpx
;
background-color
:
#2979ff
;
color
:
#fff
;
padding
:
24
rpx
;
text-align
:
left
;
}
.logo
{
height
:
200
rpx
;
width
:
100%
;
margin
:
0
rpx
auto
50
rpx
auto
;
}
.order-view
{
text-align
:
center
;
}
</
style
>
.text-area
{
display
:
flex
;
justify-content
:
center
;
}
.title
{
font-size
:
36
rpx
;
color
:
#8f8f94
;
}
.sticky
{
height
:
120
rpx
;
background-color
:
#2979ff
;
color
:
#fff
;
padding
:
24
rpx
;
text-align
:
left
;
}
.order-view
{
text-align
:
center
;
}
</
style
>
src/pages/learn/course-detail.vue
View file @
d5796b54
...
...
@@ -12,11 +12,10 @@
</view>
<view>
接单操作须知有助你快速了解充电桩安装业务,提高接单效率,请认真查看及学习。
</view>
</view>
<view
class=
"learn-view"
>
<view
class=
"learn-view-title"
>
内容大纲
</view>
<view
class=
"learn-list"
v-for=
"(item, key) in courseOutline"
:key=
"key"
>
<view
class=
"learn-view"
v-if=
"currentIndex >= 0"
>
<view
class=
"learn-view-title"
>
视频内容介绍
</view>
<view
class=
"learn-list"
v-for=
"(item, key) in courseOutline
s[currentIndex]
"
:key=
"key"
>
<view
class=
"learn-list-item"
>
{{
item
}}
</view>
<view
class=
"line-view"
></view>
</view>
</view>
</view>
...
...
@@ -33,8 +32,38 @@
courseSrc
:
''
,
courseTitle
:
''
,
courseDesc
:
''
,
c
ourseOutline
:
[
'1 aaa'
,
'2 bbb'
]
// 视频大纲
c
urrentIndex
:
-
1
// 第几个视频
};
},
computed
:
{
courseOutlines
()
{
return
[[
'1、考核规则:接单及时率'
,
'2、考核规则:上门及时率'
,
'3、考核规则:安装完工率'
,
'4、考核规则:资料提交及时率'
,
'5、考核规则:安装完工率'
,
'6、考核规则:客户满意度'
],
[
'1、必备材料4大类'
,
'2、施工工具准备'
],
[
'1、接线安装工艺标准'
,
'2、PVC、镀锌管电缆管明敷'
,
'3、电缆敷设的防火要求'
,
'4、电源点标识'
,
'5、配电箱接线及安装'
,
'6、管线敷设接头处理'
,
'7、充电桩内部接线'
,
'8、配电箱安装'
],
[
'1、勘测环节录单要求'
,
'2、安装环节录单要求'
]]
}
},
onLoad
(
e
)
{
if
(
e
)
{
...
...
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