Commit 1147dfc1 authored by 不吃草的咩's avatar 不吃草的咩

增加课程简介,修改是否登录跳转方式

parent e5918b66
...@@ -5,6 +5,7 @@ App({ ...@@ -5,6 +5,7 @@ App({
colorUI,//挂载到app上 colorUI,//挂载到app上
colorUISdk, colorUISdk,
information:{}, information:{},
phone:'13520051245',
onLaunch() { onLaunch() {
//console.log(colorUISdk.isRandom.getRandom(6)) //console.log(colorUISdk.isRandom.getRandom(6))
//console.log(colorUISdk.version) //console.log(colorUISdk.version)
......
{ {
"pages": [ "pages": [
"pages/home/home", "pages/home/home",
"pages/my/home", "pages/my/home",
"pages/demo/background/background", "pages/demo/background/background",
"pages/demo/avatar/avatar", "pages/demo/avatar/avatar",
"pages/demo/wallpaper/wallpaper", "pages/demo/wallpaper/wallpaper",
"pages/demo/login/login", "pages/demo/login/login",
"pages/demo/set/set", "pages/demo/set/set",
"pages/signup/signup", "pages/signup/signup",
"pages/uploadcard/uploadcard", "pages/uploadcard/uploadcard",
"pages/seeSignup/seeSignup" "pages/seeSignup/seeSignup"
], ],
"subpackages": [ "subpackages": [
{ {
"root": "packageA", "root": "packageA",
"name": "packTemplate", "name": "packTemplate",
"pages": [ "pages": [
"home/home" "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"
}, },
"usingComponents": { {
"ui-sys": "mp-cu/colorUI/components/ui-sys/ui-sys", "root": "pages/document",
"ui-title": "mp-cu/colorUI/components/ui-title/ui-title", "pages": [
"ui-code": "mp-cu/colorUI/components/ui-code/ui-code", "system/system",
"ui-loading": "mp-cu/colorUI/components/ui-loading/ui-loading", "theme/theme",
"ui-menu": "mp-cu/colorUI/components/ui-menu/ui-menu", "navbar/navbar",
"ui-menu-item": "mp-cu/colorUI/components/ui-menu-item/ui-menu-item", "background/background",
"ui-avatar": "mp-cu/colorUI/components/ui-avatar/ui-avatar", "text/text",
"ui-avatar-stack": "mp-cu/colorUI/components/ui-avatar-stack/ui-avatar-stack", "icon/icon",
"ui-modal": "mp-cu/colorUI/components/ui-modal/ui-modal", "shadow/shadow",
"ui-toast": "mp-cu/colorUI/components/ui-toast/ui-toast", "border/border",
"ui-switch": "mp-cu/colorUI/components/ui-switch/ui-switch", "avatar/avatar",
"ui-radio-group": "mp-cu/colorUI/components/ui-radio-group/ui-radio-group", "title/title",
"ui-radio": "mp-cu/colorUI/components/ui-radio/ui-radio", "tag/tag",
"ui-card": "mp-cu/colorUI/components/ui-card/ui-card", "button/button",
"ui-fixed": "mp-cu/colorUI/components/ui-fixed/ui-fixed", "image/image",
"ui-img": "mp-cu/colorUI/components/ui-img/ui-img", "code/code",
"ui-navbar": "/mp-cu/colorUI/components/ui-navbar/ui-navbar", "progress/progress",
"ui-swiper": "/mp-cu/colorUI/components/ui-swiper/ui-swiper", "loading/loading",
"ui-text-size": "/mp-cu/colorUI/components/ui-text-size/ui-text-size", "flex/flex",
"ui-tag": "/mp-cu/colorUI/components/ui-tag/ui-tag", "menu/menu",
"ui-progress": "/mp-cu/colorUI/components/ui-progress/ui-progress", "fixed/fixed",
"ui-tab": "/mp-cu/colorUI/components/ui-tab/ui-tab", "card/card",
"ui-popover": "/mp-cu/colorUI/components/ui-popover/ui-popover", "list/list",
"ui-steps": "/mp-cu/colorUI/components/ui-steps/ui-steps", "grid/grid",
"ui-form": "/mp-cu/colorUI/components/ui-form/ui-form", "timeline/timeline",
"ui-form-group": "/mp-cu/colorUI/components/ui-form-group/ui-form-group", "table/table",
"ui-input-box": "/mp-cu/colorUI/components/ui-input-box/ui-input-box", "popover/popover",
"ui-checkbox": "/mp-cu/colorUI/components/ui-checkbox/ui-checkbox", "modal/modal",
"ui-checkbox-group": "/mp-cu/colorUI/components/ui-checkbox-group/ui-checkbox-group", "toast/toast",
"ui-change-theme": "/mp-cu/colorUI/components/ui-change-theme/ui-change-theme", "drawer/drawer",
"ui-parameter": "/mp-sdk/components/ui-parameter/ui-parameter", "collapse/collapse",
"van-button": "/vantPackage/button/index", "tab/tab",
"van-cell": "/vantPackage/cell/index", "swiper/swiper",
"van-cell-group": "/vantPackage/cell-group/index", "steps/steps",
"van-popup": "/vantPackage/popup/index", "input/input",
"van-picker": "/vantPackage/picker/index", "radio/radio",
"van-field": "/vantPackage/field/index", "checkbox/checkbox",
"van-row": "/vantPackage/row/index", "switch/switch",
"van-col": "/vantPackage/col/index", "picker/picker",
"van-nav-bar": "/vantPackage/nav-bar/index", "text-color/text-color",
"van-toast": "/vantPackage/toast/index" "iconfont/iconfont",
"subsign/subsign",
"qyDetail/qyDetail",
"coursedetails/coursedetails"
]
}, },
"tabBar": { {
"color": "#aaaaaa", "root": "packageB",
"borderStyle": "white", "name": "packTest",
"backgroundColor": "#fff", "pages": [
"selectedColor": "#0081ff", "list/fictitious-list/index",
"list": [ "list/old-list/index",
{ "fixed-tools/index",
"pagePath": "pages/home/home", "dot-tag/dot-tag",
"iconPath": "/static/tab_icon/document.png", "layout/layout",
"selectedIconPath": "/static/tab_icon/document_cur.png", "stepper/stepper",
"text": "文档" "notify/notify",
}, "divider/divider",
{ "search-bar/search-bar"
"text": "报名", ]
"iconPath": "/static/tab_icon/tpl.png", }
"selectedIconPath": "/static/tab_icon/tpl_cur.png", ],
"pagePath": "pages/signup/signup" "window": {
}, "backgroundTextStyle": "light",
{ "navigationBarBackgroundColor": "#FFFFFF",
"pagePath": "pages/my/home", "navigationBarTitleText": "MP-CU (ColorUI)",
"iconPath": "/static/tab_icon/my.png", "navigationBarTextStyle": "black",
"selectedIconPath": "/static/tab_icon/my_cur.png", "navigationStyle": "custom"
"text": "我的" },
} "usingComponents": {
] "ui-sys": "mp-cu/colorUI/components/ui-sys/ui-sys",
}, "ui-title": "mp-cu/colorUI/components/ui-title/ui-title",
"darkmode": true, "ui-code": "mp-cu/colorUI/components/ui-code/ui-code",
"debug": true, "ui-loading": "mp-cu/colorUI/components/ui-loading/ui-loading",
"sitemapLocation": "sitemap.json" "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
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
{
"usingComponents": {}
}
\ No newline at end of file
<!-- 课程详情 -->
<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>
.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
...@@ -169,25 +169,25 @@ Page({ ...@@ -169,25 +169,25 @@ Page({
url: '/pages/uploadcard/uploadcard', url: '/pages/uploadcard/uploadcard',
}) })
}, },
success(res){ // success(res){
const {cancel} = res.detail; // const {cancel} = res.detail;
if(cancel){ // if(cancel){
wx.navigateBack({ // wx.navigateBack({
delta: 1, // delta: 1,
}) // })
}else{ // }else{
//判断是否登录,登录继续填报,未登录去登录 // //判断是否登录,登录继续填报,未登录去登录
let token = wx.getStorageSync('token'); // let token = wx.getStorageSync('token');
if(token == ''){ // if(token == ''){
Toast('您还未登录,请先去登录'); // Toast('您还未登录,请先去登录');
setTimeout(()=>{ // setTimeout(()=>{
wx.switchTab({ // wx.switchTab({
url: "/pages/my/home", // url: "/pages/my/home",
}) // })
},2000) // },2000)
} // }
} // }
}, // },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -197,7 +197,9 @@ Page({ ...@@ -197,7 +197,9 @@ Page({
// price = // price =
// } // }
this.setData({ this.setData({
["fromDate.price"]:options.price ["fromDate.price"]:options.price,
phone:app.phone,
["fromDate.phone"]:app.phone
}) })
}, },
...@@ -205,7 +207,6 @@ Page({ ...@@ -205,7 +207,6 @@ Page({
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function () {
}, },
/** /**
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
/> />
</view> </view>
</ui-navbar> </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}}"> <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"> <view id="demo1" class="scroll-view-item">
<text>特种作业人员操作证办理办事指南 <text>特种作业人员操作证办理办事指南
......
...@@ -19,7 +19,12 @@ ...@@ -19,7 +19,12 @@
<view class="ui-container"> <view class="ui-container">
<van-notice-bar
left-icon="volume-o"
background="transparent"
color="#1989FA"
text="无论我们能活多久,我们能够享受的只有无法分割的此刻,此外别无其他。——shadowlover"
/>
<block > <block >
<ui-title title="企业介绍" depth="2" isIcon ui="ml-3"/> <ui-title title="企业介绍" depth="2" isIcon ui="ml-3"/>
<view class="ui-grid ui-cols-2"> <view class="ui-grid ui-cols-2">
...@@ -46,7 +51,7 @@ ...@@ -46,7 +51,7 @@
<block wx:for="{{courseData}}" wx:for-index="id" wx:key="course_index"> <block wx:for="{{courseData}}" wx:for-index="id" wx:key="course_index">
<view class="ui-item p-3" > <view class="ui-item p-3" >
<app-nav-li data="{{item}}" navurl="/pages/document/subsign/subsign?price={{item.price}}&name={{item.name}}"/> <app-nav-li data="{{item}}" navurl="/pages/document/coursedetails/coursedetails?price={{item.price}}&name={{item.name}}&note={{item.note}}"/>
</view> </view>
</block> </block>
</view> </view>
......
...@@ -109,5 +109,11 @@ Page({ ...@@ -109,5 +109,11 @@ Page({
}) })
}, },
onShow:function(){ onShow:function(){
let token = wx.getStorageSync('token');
if(token == ''){
this.setData({
show:true
})
}
} }
}) })
...@@ -32,6 +32,7 @@ Page({ ...@@ -32,6 +32,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
///pages/document/subsign/subsign?name={{item.name}}&price={{item.price}} ///pages/document/subsign/subsign?name={{item.name}}&price={{item.price}}
// if(options.type == '1'){ // if(options.type == '1'){
// this.setData({isperson:'个人报名'}) // this.setData({isperson:'个人报名'})
...@@ -44,7 +45,18 @@ Page({ ...@@ -44,7 +45,18 @@ Page({
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function () {
let token = wx.getStorageSync('token');
if(token == ''){
wx.showToast({
title: '您还未登录,即将跳转登录',
icon: 'none'
})
setTimeout(()=>{
wx.switchTab({
url: '/pages/my/home',
})
},2000)
}
}, },
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment