Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
train_vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
train
train_vue
Commits
1147dfc1
Commit
1147dfc1
authored
Feb 14, 2022
by
不吃草的咩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加课程简介,修改是否登录跳转方式
parent
e5918b66
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
346 additions
and
184 deletions
+346
-184
app.js
app.js
+1
-0
app.json
app.json
+162
-159
pages/document/coursedetails/coursedetails.js
pages/document/coursedetails/coursedetails.js
+86
-0
pages/document/coursedetails/coursedetails.json
pages/document/coursedetails/coursedetails.json
+3
-0
pages/document/coursedetails/coursedetails.wxml
pages/document/coursedetails/coursedetails.wxml
+30
-0
pages/document/coursedetails/coursedetails.wxss
pages/document/coursedetails/coursedetails.wxss
+15
-0
pages/document/subsign/subsign.js
pages/document/subsign/subsign.js
+22
-21
pages/document/subsign/subsign.wxml
pages/document/subsign/subsign.wxml
+1
-1
pages/home/home.wxml
pages/home/home.wxml
+7
-2
pages/my/home.js
pages/my/home.js
+6
-0
pages/signup/signup.js
pages/signup/signup.js
+13
-1
No files found.
app.js
View file @
1147dfc1
...
...
@@ -5,6 +5,7 @@ App({
colorUI
,
//挂载到app上
colorUISdk
,
information
:{},
phone
:
'
13520051245
'
,
onLaunch
()
{
//console.log(colorUISdk.isRandom.getRandom(6))
//console.log(colorUISdk.version)
...
...
app.json
View file @
1147dfc1
{
"pages"
:
[
"pages/home/home"
,
"pages/my/home"
,
"pages/demo/background/background"
,
"pages/demo/avatar/avatar"
,
"pages/demo/wallpaper/wallpaper"
,
"pages/demo/login/login"
,
"pages/demo/set/set"
,
"pages/signup/signup"
,
"pages/uploadcard/uploadcard"
,
"pages/seeSignup/seeSignup"
],
"subpackages"
:
[
{
"root"
:
"packageA"
,
"name"
:
"packTemplate"
,
"pages"
:
[
"home/home"
]
},
{
"root"
:
"pages/document"
,
"pages"
:
[
"system/system"
,
"theme/theme"
,
"navbar/navbar"
,
"background/background"
,
"text/text"
,
"icon/icon"
,
"shadow/shadow"
,
"border/border"
,
"avatar/avatar"
,
"title/title"
,
"tag/tag"
,
"button/button"
,
"image/image"
,
"code/code"
,
"progress/progress"
,
"loading/loading"
,
"flex/flex"
,
"menu/menu"
,
"fixed/fixed"
,
"card/card"
,
"list/list"
,
"grid/grid"
,
"timeline/timeline"
,
"table/table"
,
"popover/popover"
,
"modal/modal"
,
"toast/toast"
,
"drawer/drawer"
,
"collapse/collapse"
,
"tab/tab"
,
"swiper/swiper"
,
"steps/steps"
,
"input/input"
,
"radio/radio"
,
"checkbox/checkbox"
,
"switch/switch"
,
"picker/picker"
,
"text-color/text-color"
,
"iconfont/iconfont"
,
"subsign/subsign"
,
"qyDetail/qyDetail"
]
},
{
"root"
:
"packageB"
,
"name"
:
"packTest"
,
"pages"
:
[
"list/fictitious-list/index"
,
"list/old-list/index"
,
"fixed-tools/index"
,
"dot-tag/dot-tag"
,
"layout/layout"
,
"stepper/stepper"
,
"notify/notify"
,
"divider/divider"
,
"search-bar/search-bar"
]
}
],
"window"
:
{
"backgroundTextStyle"
:
"light"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"navigationBarTitleText"
:
"MP-CU (ColorUI)"
,
"navigationBarTextStyle"
:
"black"
,
"navigationStyle"
:
"custom"
"pages"
:
[
"pages/home/home"
,
"pages/my/home"
,
"pages/demo/background/background"
,
"pages/demo/avatar/avatar"
,
"pages/demo/wallpaper/wallpaper"
,
"pages/demo/login/login"
,
"pages/demo/set/set"
,
"pages/signup/signup"
,
"pages/uploadcard/uploadcard"
,
"pages/seeSignup/seeSignup"
],
"subpackages"
:
[
{
"root"
:
"packageA"
,
"name"
:
"packTemplate"
,
"pages"
:
[
"home/home"
]
},
"usingComponents"
:
{
"ui-sys"
:
"mp-cu/colorUI/components/ui-sys/ui-sys"
,
"ui-title"
:
"mp-cu/colorUI/components/ui-title/ui-title"
,
"ui-code"
:
"mp-cu/colorUI/components/ui-code/ui-code"
,
"ui-loading"
:
"mp-cu/colorUI/components/ui-loading/ui-loading"
,
"ui-menu"
:
"mp-cu/colorUI/components/ui-menu/ui-menu"
,
"ui-menu-item"
:
"mp-cu/colorUI/components/ui-menu-item/ui-menu-item"
,
"ui-avatar"
:
"mp-cu/colorUI/components/ui-avatar/ui-avatar"
,
"ui-avatar-stack"
:
"mp-cu/colorUI/components/ui-avatar-stack/ui-avatar-stack"
,
"ui-modal"
:
"mp-cu/colorUI/components/ui-modal/ui-modal"
,
"ui-toast"
:
"mp-cu/colorUI/components/ui-toast/ui-toast"
,
"ui-switch"
:
"mp-cu/colorUI/components/ui-switch/ui-switch"
,
"ui-radio-group"
:
"mp-cu/colorUI/components/ui-radio-group/ui-radio-group"
,
"ui-radio"
:
"mp-cu/colorUI/components/ui-radio/ui-radio"
,
"ui-card"
:
"mp-cu/colorUI/components/ui-card/ui-card"
,
"ui-fixed"
:
"mp-cu/colorUI/components/ui-fixed/ui-fixed"
,
"ui-img"
:
"mp-cu/colorUI/components/ui-img/ui-img"
,
"ui-navbar"
:
"/mp-cu/colorUI/components/ui-navbar/ui-navbar"
,
"ui-swiper"
:
"/mp-cu/colorUI/components/ui-swiper/ui-swiper"
,
"ui-text-size"
:
"/mp-cu/colorUI/components/ui-text-size/ui-text-size"
,
"ui-tag"
:
"/mp-cu/colorUI/components/ui-tag/ui-tag"
,
"ui-progress"
:
"/mp-cu/colorUI/components/ui-progress/ui-progress"
,
"ui-tab"
:
"/mp-cu/colorUI/components/ui-tab/ui-tab"
,
"ui-popover"
:
"/mp-cu/colorUI/components/ui-popover/ui-popover"
,
"ui-steps"
:
"/mp-cu/colorUI/components/ui-steps/ui-steps"
,
"ui-form"
:
"/mp-cu/colorUI/components/ui-form/ui-form"
,
"ui-form-group"
:
"/mp-cu/colorUI/components/ui-form-group/ui-form-group"
,
"ui-input-box"
:
"/mp-cu/colorUI/components/ui-input-box/ui-input-box"
,
"ui-checkbox"
:
"/mp-cu/colorUI/components/ui-checkbox/ui-checkbox"
,
"ui-checkbox-group"
:
"/mp-cu/colorUI/components/ui-checkbox-group/ui-checkbox-group"
,
"ui-change-theme"
:
"/mp-cu/colorUI/components/ui-change-theme/ui-change-theme"
,
"ui-parameter"
:
"/mp-sdk/components/ui-parameter/ui-parameter"
,
"van-button"
:
"/vantPackage/button/index"
,
"van-cell"
:
"/vantPackage/cell/index"
,
"van-cell-group"
:
"/vantPackage/cell-group/index"
,
"van-popup"
:
"/vantPackage/popup/index"
,
"van-picker"
:
"/vantPackage/picker/index"
,
"van-field"
:
"/vantPackage/field/index"
,
"van-row"
:
"/vantPackage/row/index"
,
"van-col"
:
"/vantPackage/col/index"
,
"van-nav-bar"
:
"/vantPackage/nav-bar/index"
,
"van-toast"
:
"/vantPackage/toast/index"
{
"root"
:
"pages/document"
,
"pages"
:
[
"system/system"
,
"theme/theme"
,
"navbar/navbar"
,
"background/background"
,
"text/text"
,
"icon/icon"
,
"shadow/shadow"
,
"border/border"
,
"avatar/avatar"
,
"title/title"
,
"tag/tag"
,
"button/button"
,
"image/image"
,
"code/code"
,
"progress/progress"
,
"loading/loading"
,
"flex/flex"
,
"menu/menu"
,
"fixed/fixed"
,
"card/card"
,
"list/list"
,
"grid/grid"
,
"timeline/timeline"
,
"table/table"
,
"popover/popover"
,
"modal/modal"
,
"toast/toast"
,
"drawer/drawer"
,
"collapse/collapse"
,
"tab/tab"
,
"swiper/swiper"
,
"steps/steps"
,
"input/input"
,
"radio/radio"
,
"checkbox/checkbox"
,
"switch/switch"
,
"picker/picker"
,
"text-color/text-color"
,
"iconfont/iconfont"
,
"subsign/subsign"
,
"qyDetail/qyDetail"
,
"coursedetails/coursedetails"
]
},
"tabBar"
:
{
"color"
:
"#aaaaaa"
,
"borderStyle"
:
"white"
,
"backgroundColor"
:
"#fff"
,
"selectedColor"
:
"#0081ff"
,
"list"
:
[
{
"pagePath"
:
"pages/home/home"
,
"iconPath"
:
"/static/tab_icon/document.png"
,
"selectedIconPath"
:
"/static/tab_icon/document_cur.png"
,
"text"
:
"文档"
},
{
"text"
:
"报名"
,
"iconPath"
:
"/static/tab_icon/tpl.png"
,
"selectedIconPath"
:
"/static/tab_icon/tpl_cur.png"
,
"pagePath"
:
"pages/signup/signup"
},
{
"pagePath"
:
"pages/my/home"
,
"iconPath"
:
"/static/tab_icon/my.png"
,
"selectedIconPath"
:
"/static/tab_icon/my_cur.png"
,
"text"
:
"我的"
}
]
},
"darkmode"
:
true
,
"debug"
:
true
,
"sitemapLocation"
:
"sitemap.json"
{
"root"
:
"packageB"
,
"name"
:
"packTest"
,
"pages"
:
[
"list/fictitious-list/index"
,
"list/old-list/index"
,
"fixed-tools/index"
,
"dot-tag/dot-tag"
,
"layout/layout"
,
"stepper/stepper"
,
"notify/notify"
,
"divider/divider"
,
"search-bar/search-bar"
]
}
],
"window"
:
{
"backgroundTextStyle"
:
"light"
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
,
"navigationBarTitleText"
:
"MP-CU (ColorUI)"
,
"navigationBarTextStyle"
:
"black"
,
"navigationStyle"
:
"custom"
},
"usingComponents"
:
{
"ui-sys"
:
"mp-cu/colorUI/components/ui-sys/ui-sys"
,
"ui-title"
:
"mp-cu/colorUI/components/ui-title/ui-title"
,
"ui-code"
:
"mp-cu/colorUI/components/ui-code/ui-code"
,
"ui-loading"
:
"mp-cu/colorUI/components/ui-loading/ui-loading"
,
"ui-menu"
:
"mp-cu/colorUI/components/ui-menu/ui-menu"
,
"ui-menu-item"
:
"mp-cu/colorUI/components/ui-menu-item/ui-menu-item"
,
"ui-avatar"
:
"mp-cu/colorUI/components/ui-avatar/ui-avatar"
,
"ui-avatar-stack"
:
"mp-cu/colorUI/components/ui-avatar-stack/ui-avatar-stack"
,
"ui-modal"
:
"mp-cu/colorUI/components/ui-modal/ui-modal"
,
"ui-toast"
:
"mp-cu/colorUI/components/ui-toast/ui-toast"
,
"ui-switch"
:
"mp-cu/colorUI/components/ui-switch/ui-switch"
,
"ui-radio-group"
:
"mp-cu/colorUI/components/ui-radio-group/ui-radio-group"
,
"ui-radio"
:
"mp-cu/colorUI/components/ui-radio/ui-radio"
,
"ui-card"
:
"mp-cu/colorUI/components/ui-card/ui-card"
,
"ui-fixed"
:
"mp-cu/colorUI/components/ui-fixed/ui-fixed"
,
"ui-img"
:
"mp-cu/colorUI/components/ui-img/ui-img"
,
"ui-navbar"
:
"/mp-cu/colorUI/components/ui-navbar/ui-navbar"
,
"ui-swiper"
:
"/mp-cu/colorUI/components/ui-swiper/ui-swiper"
,
"ui-text-size"
:
"/mp-cu/colorUI/components/ui-text-size/ui-text-size"
,
"ui-tag"
:
"/mp-cu/colorUI/components/ui-tag/ui-tag"
,
"ui-progress"
:
"/mp-cu/colorUI/components/ui-progress/ui-progress"
,
"ui-tab"
:
"/mp-cu/colorUI/components/ui-tab/ui-tab"
,
"ui-popover"
:
"/mp-cu/colorUI/components/ui-popover/ui-popover"
,
"ui-steps"
:
"/mp-cu/colorUI/components/ui-steps/ui-steps"
,
"ui-form"
:
"/mp-cu/colorUI/components/ui-form/ui-form"
,
"ui-form-group"
:
"/mp-cu/colorUI/components/ui-form-group/ui-form-group"
,
"ui-input-box"
:
"/mp-cu/colorUI/components/ui-input-box/ui-input-box"
,
"ui-checkbox"
:
"/mp-cu/colorUI/components/ui-checkbox/ui-checkbox"
,
"ui-checkbox-group"
:
"/mp-cu/colorUI/components/ui-checkbox-group/ui-checkbox-group"
,
"ui-change-theme"
:
"/mp-cu/colorUI/components/ui-change-theme/ui-change-theme"
,
"ui-parameter"
:
"/mp-sdk/components/ui-parameter/ui-parameter"
,
"van-button"
:
"/vantPackage/button/index"
,
"van-cell"
:
"/vantPackage/cell/index"
,
"van-cell-group"
:
"/vantPackage/cell-group/index"
,
"van-popup"
:
"/vantPackage/popup/index"
,
"van-picker"
:
"/vantPackage/picker/index"
,
"van-field"
:
"/vantPackage/field/index"
,
"van-row"
:
"/vantPackage/row/index"
,
"van-col"
:
"/vantPackage/col/index"
,
"van-nav-bar"
:
"/vantPackage/nav-bar/index"
,
"van-toast"
:
"/vantPackage/toast/index"
,
"van-notice-bar"
:
"/vantPackage/notice-bar/index"
,
"van-card"
:
"/vantPackage/card/index"
},
"tabBar"
:
{
"color"
:
"#aaaaaa"
,
"borderStyle"
:
"white"
,
"backgroundColor"
:
"#fff"
,
"selectedColor"
:
"#0081ff"
,
"list"
:
[
{
"pagePath"
:
"pages/home/home"
,
"iconPath"
:
"/static/tab_icon/document.png"
,
"selectedIconPath"
:
"/static/tab_icon/document_cur.png"
,
"text"
:
"文档"
},
{
"text"
:
"报名"
,
"iconPath"
:
"/static/tab_icon/tpl.png"
,
"selectedIconPath"
:
"/static/tab_icon/tpl_cur.png"
,
"pagePath"
:
"pages/signup/signup"
},
{
"pagePath"
:
"pages/my/home"
,
"iconPath"
:
"/static/tab_icon/my.png"
,
"selectedIconPath"
:
"/static/tab_icon/my_cur.png"
,
"text"
:
"我的"
}
]
},
"darkmode"
:
true
,
"debug"
:
true
,
"sitemapLocation"
:
"sitemap.json"
}
\ No newline at end of file
pages/document/coursedetails/coursedetails.js
0 → 100644
View file @
1147dfc1
import
Toast
from
'
../../../vantPackage/toast/toast
'
;
const
app
=
getApp
();
Page
({
/**
* 页面的初始数据
*/
data
:
{
course
:{
name
:
''
,
note
:
''
,
price
:
''
}
},
onClickLeft
(){
wx
.
navigateBack
({
delta
:
1
,
})
},
toSign
(){
wx
.
navigateTo
({
url
:
`/pages/document/subsign/subsign?price=
${
this
.
data
.
course
.
price
}
&name=
${
this
.
data
.
course
.
name
}
`
,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
const
{
name
,
note
,
price
}
=
options
;
this
.
setData
({
[
"
course.name
"
]:
name
==
'
null
'
?
''
:
name
,
[
"
course.note
"
]:
note
==
'
null
'
?
'
暂无介绍
'
:
note
,
[
"
course.price
"
]:
price
==
'
null
'
?
''
:
price
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
}
})
\ No newline at end of file
pages/document/coursedetails/coursedetails.json
0 → 100644
View file @
1147dfc1
{
"usingComponents"
:
{}
}
\ No newline at end of file
pages/document/coursedetails/coursedetails.wxml
0 → 100644
View file @
1147dfc1
<!-- 课程详情 -->
<ui-sys>
<ui-navbar isSlot>
<view style="width: 100%;height: 100%;">
<van-nav-bar
title="课程介绍"
left-text="返回"
left-arrow
border="{{false}}"
bind:click-left="onClickLeft"
/>
</view>
</ui-navbar>
<view class="box">
<van-cell-group>
<van-cell title="课程名称" value="{{course.name}}" />
<van-cell title="课程简介" value="{{course.note}}" />
<van-cell title="课程价格">
<view><text>¥</text><text class="price">{{course.price}}</text></view>
</van-cell>
</van-cell-group>
<view class="btn">
<van-button type="primary" block color="#1989fa" bind:click="toSign">立即报名</van-button>
</view>
</view>
<van-toast id="van-toast" />
</ui-sys>
pages/document/coursedetails/coursedetails.wxss
0 → 100644
View file @
1147dfc1
.van-nav-bar{
padding-top: 0px !important;
}
.box{
width: 100%;
margin-top: 20rpx;
background-color: #ffffff;
}
.price{
color: brown;
}
.btn{
width: 96%;
margin: 30rpx auto 0;
}
\ No newline at end of file
pages/document/subsign/subsign.js
View file @
1147dfc1
...
...
@@ -169,25 +169,25 @@ Page({
url
:
'
/pages/uploadcard/uploadcard
'
,
})
},
success
(
res
){
const
{
cancel
}
=
res
.
detail
;
if
(
cancel
){
wx
.
navigateBack
({
delta
:
1
,
})
}
else
{
//判断是否登录,登录继续填报,未登录去登录
let
token
=
wx
.
getStorageSync
(
'
token
'
);
if
(
token
==
''
){
Toast
(
'
您还未登录,请先去登录
'
);
setTimeout
(()
=>
{
wx
.
switchTab
({
url
:
"
/pages/my/home
"
,
})
},
2000
)
}
}
},
//
success(res){
//
const {cancel} = res.detail;
//
if(cancel){
//
wx.navigateBack({
//
delta: 1,
//
})
//
}else{
//
//判断是否登录,登录继续填报,未登录去登录
//
let token = wx.getStorageSync('token');
//
if(token == ''){
//
Toast('您还未登录,请先去登录');
//
setTimeout(()=>{
//
wx.switchTab({
//
url: "/pages/my/home",
//
})
//
},2000)
//
}
//
}
//
},
/**
* 生命周期函数--监听页面加载
*/
...
...
@@ -197,7 +197,9 @@ Page({
// price =
// }
this
.
setData
({
[
"
fromDate.price
"
]:
options
.
price
[
"
fromDate.price
"
]:
options
.
price
,
phone
:
app
.
phone
,
[
"
fromDate.phone
"
]:
app
.
phone
})
},
...
...
@@ -205,7 +207,6 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
...
...
pages/document/subsign/subsign.wxml
View file @
1147dfc1
...
...
@@ -11,7 +11,7 @@
/>
</view>
</ui-navbar>
<ui-modal show="{{
isSignupShow}}" title="报名需知" bind:success='success'
>
<ui-modal show="{{
true}}" showCancel="{{false}}" title="报名需知"
>
<scroll-view scroll-y="true" style="height: 300rpx;" bindscrolltoupper="upper" bindscrolltolower="lower" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}">
<view id="demo1" class="scroll-view-item">
<text>特种作业人员操作证办理办事指南
...
...
pages/home/home.wxml
View file @
1147dfc1
...
...
@@ -19,7 +19,12 @@
<view class="ui-container">
<van-notice-bar
left-icon="volume-o"
background="transparent"
color="#1989FA"
text="无论我们能活多久,我们能够享受的只有无法分割的此刻,此外别无其他。——shadowlover"
/>
<block >
<ui-title title="企业介绍" depth="2" isIcon ui="ml-3"/>
<view class="ui-grid ui-cols-2">
...
...
@@ -46,7 +51,7 @@
<block wx:for="{{courseData}}" wx:for-index="id" wx:key="course_index">
<view class="ui-item p-3" >
<app-nav-li data="{{item}}" navurl="/pages/document/
subsign/subsign?price={{item.price}}&name={{item.nam
e}}"/>
<app-nav-li data="{{item}}" navurl="/pages/document/
coursedetails/coursedetails?price={{item.price}}&name={{item.name}}¬e={{item.not
e}}"/>
</view>
</block>
</view>
...
...
pages/my/home.js
View file @
1147dfc1
...
...
@@ -109,5 +109,11 @@ Page({
})
},
onShow
:
function
(){
let
token
=
wx
.
getStorageSync
(
'
token
'
);
if
(
token
==
''
){
this
.
setData
({
show
:
true
})
}
}
})
pages/signup/signup.js
View file @
1147dfc1
...
...
@@ -32,6 +32,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
///pages/document/subsign/subsign?name={{item.name}}&price={{item.price}}
// if(options.type == '1'){
// this.setData({isperson:'个人报名'})
...
...
@@ -44,7 +45,18 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
let
token
=
wx
.
getStorageSync
(
'
token
'
);
if
(
token
==
''
){
wx
.
showToast
({
title
:
'
您还未登录,即将跳转登录
'
,
icon
:
'
none
'
})
setTimeout
(()
=>
{
wx
.
switchTab
({
url
:
'
/pages/my/home
'
,
})
},
2000
)
}
},
/**
...
...
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