Commit 2ec8baae authored by 不吃草的咩's avatar 不吃草的咩

修改登录跳转方式,修改报名须知,

parent b6426068
# These are supported funding model platforms
# github: [@weilanwl, @bypanghu]
# patreon: # Replace with a single Patreon username
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
# liberapay: # Replace with a single Liberapay username
# issuehunt: # Replace with a single IssueHunt username
# otechie: # Replace with a single Otechie username
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['https://colorui-assest.vercel.app/mp-cu-doc/thanks.jpg','https://paypal.me/iZaiZaiA']
Component({ Component({
data: { data: {
colorName: '', colorName: '',
navurl:''
}, },
options: { options: {
addGlobalClass: true addGlobalClass: true
...@@ -11,13 +10,17 @@ Component({ ...@@ -11,13 +10,17 @@ Component({
type: Object, type: Object,
optionalTypes: Array, optionalTypes: Array,
value: {}, value: {},
},
navurl:{
type:String,
value:''
} }
}, },
lifetimes: { lifetimes: {
attached() { attached() {
this.setData({ this.setData({
colorName: this.getColor(), colorName: this.getColor()
navurl: this.getNavUrl() // navurl: this.getNavUrl()
}); });
} }
}, },
...@@ -27,16 +30,17 @@ Component({ ...@@ -27,16 +30,17 @@ Component({
let colorArr = ['yellow', 'orange', 'red', 'pink', 'mauve', 'purple', 'blue', 'cyan', 'green', 'olive', 'grey', 'brown']; let colorArr = ['yellow', 'orange', 'red', 'pink', 'mauve', 'purple', 'blue', 'cyan', 'green', 'olive', 'grey', 'brown'];
return colorArr[Math.floor(Math.random() * colorArr.length)] return colorArr[Math.floor(Math.random() * colorArr.length)]
}, },
getNavUrl(){ // getNavUrl(){
let params = '' // let params = ''
if(this.data.data.params !== undefined){ // if(this.data.data.params !== undefined){
for(let i in this.data.data.params){ // for(let i in this.data.data.params){
params+=`${i}=${this.data.data.params[i]}&` // params+=`${i}=${this.data.data.params[i]}&`
}; // };
params = params.substr(0,params.length-1); // params = params.substr(0,params.length-1);
}; // };
let url = `/pages/document/${this.data.data.name}/${this.data.data.name}?${params}` // let url = `/pages/document/${this.data.data.name}/${this.data.data.name}?${params}`;
return url; // console.log(url);
} // return url;
// }
}, },
}) })
\ No newline at end of file
...@@ -20,6 +20,9 @@ Page({ ...@@ -20,6 +20,9 @@ Page({
tabCur: e.detail.index tabCur: e.detail.index
}) })
}, },
getPhoneNumber (e) {
console.log(e.detail)
},
checkChange(e) { checkChange(e) {
this.setData({ this.setData({
check: e.detail check: e.detail
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<text slot="center">登录</text> <text slot="center">登录</text>
</ui-navbar> </ui-navbar>
<view class="p-5"> <view class="p-5">
<view class="text-xxl"> <!-- <view class="text-xxl">
<view class="text-bold py-2">欢迎登录ColorUI组件库</view> <view class="text-bold py-2">欢迎登录ColorUI组件库</view>
</view> </view>
<view class="mt-5"> <view class="mt-5">
...@@ -56,11 +56,10 @@ ...@@ -56,11 +56,10 @@
<text>立即注册</text> <text>立即注册</text>
<text class="cicon-round-angle-o ml-3"/> <text class="cicon-round-angle-o ml-3"/>
</view> </view>
</view> </view> -->
<ui-fixed bottom> <ui-fixed bottom>
<view class="p-5"> <view class="p-5">
<ui-title title="其他登录方式" align="center" hasLine tpl="center-column"/> <button class="ui-btn bg-green-gradient radius lg block shadow-green" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
<button class="ui-btn bg-green-gradient radius lg block shadow-green" bindtap="wxloginSubmit" disabled="{{isLoading}}">
<text class="cicon-weixin icon-xl mr-3"/> <text class="cicon-weixin icon-xl mr-3"/>
<text>微信一键登录</text> <text>微信一键登录</text>
<text class="cicon-loading1 icon-spin ml-3" wx:if="{{wxisLoading}}"/> <text class="cicon-loading1 icon-spin ml-3" wx:if="{{wxisLoading}}"/>
......
...@@ -12,7 +12,7 @@ Page({ ...@@ -12,7 +12,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
if(options.type == '1'){ if(options.type == '0'){
this.setData({jgTitle:'机构介绍'}) this.setData({jgTitle:'机构介绍'})
}else{ }else{
this.setData({jgTitle:'报名指南'}) this.setData({jgTitle:'报名指南'})
......
...@@ -12,6 +12,7 @@ Page({ ...@@ -12,6 +12,7 @@ Page({
phone:'', phone:'',
company:'', company:'',
beizhu:'', beizhu:'',
isSignupShow:true,
isShow:false, isShow:false,
isShowStudy:false, isShowStudy:false,
isShowHomework:false, isShowHomework:false,
...@@ -168,6 +169,25 @@ Page({ ...@@ -168,6 +169,25 @@ Page({
url: '/pages/uploadcard/uploadcard', 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)
}
}
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -194,6 +214,7 @@ Page({ ...@@ -194,6 +214,7 @@ Page({
onShow: function () { onShow: function () {
//有一个不为空说明已经有数据就回显数据 //有一个不为空说明已经有数据就回显数据
if(app.information.username != undefined){ if(app.information.username != undefined){
this.isSignupShow = false;
this.setData({ this.setData({
fromDate:app.information, fromDate:app.information,
username:app.information.username, username:app.information.username,
...@@ -210,8 +231,8 @@ Page({ ...@@ -210,8 +231,8 @@ Page({
} }
}, },
onClickLeft(){ onClickLeft(){
wx.switchTab({ wx.navigateBack({
url: '/pages/signup/signup', delta: 1,
}) })
}, },
......
...@@ -42,3 +42,6 @@ ...@@ -42,3 +42,6 @@
.van-nav-bar{ .van-nav-bar{
padding-top: 0px !important; padding-top: 0px !important;
} }
.scroll-view-item{
padding: 20rpx;
}
\ No newline at end of file
...@@ -11,6 +11,31 @@ ...@@ -11,6 +11,31 @@
/> />
</view> </view>
</ui-navbar> </ui-navbar>
<ui-modal show="{{isSignupShow}}" title="报名需知" bind:success='success'>
<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>特种作业人员操作证办理办事指南
一、特种作业操作证的办理
办理所需条件:
1、年满18周岁,且不超过国家法定退休年龄;
2、无妨碍从事相应特种作业的器质性心脏病、癫痫病、美尼尔氏症、眩晕症、癔病、震颤麻痹症、精神病、痴呆症以及其他疾病和生理缺陷;
3、具有初中及以上文化程度;
4、具备必要的安全技术知识与技能;
5、相应特种作业规定的其他条件;
6、按规定接受培训、考核合格。
危险化学品特种作业人员除符合前款第1项、第2项、第4项和第5项规定的条件外,应当具备高中或者相当于高中及以上文化程度。
办理需提交资料:
特种作业(新办、复审、换证)办证所需资料:(可通过在线报名系统按照提示拍照提交相关资料,不用再向培训机构提交纸质资料)
二、安全合格证的办理:
办事规程:
申请人参加由国家、省、市应急管理部门审定的安全生产培训考核单位举办的安全生产培训班的学习培训、考核。
办理需提交资料:
安全培训合格证(新办、复审、换证)办证所需资料:(可通过在线报名系统按照提示拍照提交相关资料,不用再向培训机构提交纸质资料)
备注(在线报名流程):在线报名成功后>管理员审核提交的资料>学员缴纳相关费用>开具发票给学员>学员在线模拟练题>通知学员培训>通知学员考试>考试通过领证
</text>
</view>
</scroll-view>
</ui-modal>
<view class="box"> <view class="box">
<van-cell-group> <van-cell-group>
<van-cell center> <van-cell center>
......
...@@ -23,7 +23,7 @@ Page({ ...@@ -23,7 +23,7 @@ Page({
navData: [{ navData: [{
title: '课程报名', title: '课程报名',
sub: [ sub: [
{ icon: 'cicon-set', name: 'signup', title: '在线报名',}, { icon: 'cicon-set', name: 'signup', title: '在线报名',isTab:true},
// { icon: 'cicon-set', name: 'system', title: '系统' }, // { icon: 'cicon-set', name: 'system', title: '系统' },
// { icon: 'cicon-paint', name: 'theme', title: '主题' }, // { icon: 'cicon-paint', name: 'theme', title: '主题' },
// { icon: 'cicon-topbar', name: 'navbar', title: '导航栏' }, // { icon: 'cicon-topbar', name: 'navbar', title: '导航栏' },
...@@ -88,6 +88,11 @@ Page({ ...@@ -88,6 +88,11 @@ Page({
// https://developers.weixin.qq.com/miniprogram/dev/reference/api/Page.html#onPageScroll-Object-object // https://developers.weixin.qq.com/miniprogram/dev/reference/api/Page.html#onPageScroll-Object-object
this.setData({scrollTop: e.scrollTop}) this.setData({scrollTop: e.scrollTop})
}, },
toSignup(){
wx.switchTab({
url: '/pages/signup/signup',
})
},
onReady: function () { onReady: function () {
app.colorUISdk.request({ app.colorUISdk.request({
url:'wxcourse/list', url:'wxcourse/list',
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<view class="ui-grid ui-cols-2"> <view class="ui-grid ui-cols-2">
<block wx:for="{{jgDetail}}" wx:key="index"> <block wx:for="{{jgDetail}}" wx:key="index">
<view class="ui-item p-3"> <view class="ui-item p-3">
<app-nav-li data="{{item}}"/> <app-nav-li data="{{item}}" navurl="/pages/document/qyDetail/qyDetail?type={{index}}"/>
</view> </view>
</block> </block>
<!-- <block > <!-- <block >
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
<view class="ui-grid ui-cols-2"> <view class="ui-grid ui-cols-2">
<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}}"/> <app-nav-li data="{{item}}" navurl="/pages/document/subsign/subsign?price={{item.price}}&name={{item.name}}"/>
</view> </view>
</block> </block>
</view> </view>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<view class="ui-grid ui-cols-2"> <view class="ui-grid ui-cols-2">
<block wx:for="{{item.sub}}" wx:for-index="sub_index" wx:key="sub_index"> <block wx:for="{{item.sub}}" wx:for-index="sub_index" wx:key="sub_index">
<view class="ui-item p-3"> <view class="ui-item p-3">
<app-nav-li data="{{item}}"/> <app-nav-li data="{{item}}" bindtap="toSignup"/>
</view> </view>
</block> </block>
</view> </view>
......
const app = getApp(); const app = getApp();
import Toast from '../../vantPackage/toast/toast';
Page({ Page({
data: { data: {
scrollTop: 0, scrollTop: 0,
show:false,
title:'登录,享受更多服务。',
phone:'',
}, },
tapToUrl(e) { tapToUrl() {
wx.navigateTo({ // wx.navigateTo({
url: e.currentTarget.dataset.url // url: e.currentTarget.dataset.url
// })
this.setData({
show:true
})
},
randomWord(randomFlag, min, max){
let str = "",
range = min,
arr = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
// 随机产生
if(randomFlag){
range = Math.round(Math.random() * (max-min)) + min;
}
for(var i=0; i<range; i++){
let pos = Math.round(Math.random() * (arr.length-1));
str += arr[pos];
}
return str;
},
getPhoneNumber (e) {
console.log(e.detail);
// let random = Math.random().toString(36).substr(2);
let random = this.randomWord(false, 43);
console.log(random);
//如果返回成功手机号,就随机生成一串字符串存进去
if(e.detail.code !== undefined){
try {
wx.setStorageSync('token', random);
} catch (e) {
wx.showToast({
title: '数据存储失败!',
icon: 'none'
})
}
}else{
wx.showToast({
title: '授权失败,请您重新登录!',
icon: 'none'
})
}
},
onClose(){
this.setData({
show:false
}) })
}, },
tapCopy(e) { tapCopy(e) {
...@@ -26,6 +73,32 @@ Page({ ...@@ -26,6 +73,32 @@ Page({
}, },
}); });
}, },
mycenter(){
let token = wx.getStorageSync('token');
if(token == ''){
this.setData({
show:true
})
}else{
wx.navigateTo({
url: '/pages/seeSignup/seeSignup',
})
}
// url="/pages/seeSignup/seeSignup"
},
seesign(){
//url="/pages/seeSignup/seeSignup"
let token = wx.getStorageSync('token');
if(token == ''){
this.setData({
show:true
})
}else{
wx.navigateTo({
url: '/pages/seeSignup/seeSignup',
})
}
},
// 监听用户滑动页面事件。 // 监听用户滑动页面事件。
onPageScroll(e) { onPageScroll(e) {
// 注意:请只在需要的时候才在 page 中定义此方法,不要定义空方法。以减少不必要的事件派发对渲染层-逻辑层通信的影响。 // 注意:请只在需要的时候才在 page 中定义此方法,不要定义空方法。以减少不必要的事件派发对渲染层-逻辑层通信的影响。
...@@ -35,4 +108,6 @@ Page({ ...@@ -35,4 +108,6 @@ Page({
scrollTop: e.scrollTop scrollTop: e.scrollTop
}) })
}, },
onShow:function(){
}
}) })
.van-cell-group--inset{ .van-cell-group--inset{
margin: 0 !important; margin: 0 !important;
} }
.yang{
}
.logintit{
width: 100%;
height: 50rpx;
line-height: 50rpx;
text-align: center;
font-size: 26rpx;
font-weight: bold;
margin-top: 20rpx;
}
.del{
width: 100%;
margin-top: 30rpx;
font-size: 20rpx;
}
\ No newline at end of file
...@@ -6,12 +6,26 @@ ...@@ -6,12 +6,26 @@
<view class="flex-bar my-4" data-url="/pages/demo/login/login" bindtap="tapToUrl"> <view class="flex-bar my-4" data-url="/pages/demo/login/login" bindtap="tapToUrl">
<ui-avatar ui="xxl ellipse" src="/static/logo.png" /> <ui-avatar ui="xxl ellipse" src="/static/logo.png" />
<view class="flex-sub pl-3"> <view class="flex-sub pl-3">
<view class="text-xl">登录,享受更多服务。</view> <view class="text-xl">{{title}}</view>
</view> </view>
</view> </view>
<van-cell-group inset> <van-cell-group inset>
<van-cell title="我的报名" isLink url="/pages/seeSignup/seeSignup"/> <van-cell title="个人中心" isLink bind:click="mycenter"/>
<van-cell title="我的报名" isLink bind:click="seesign"/>
<van-cell title="设置" isLink url=""/> <van-cell title="设置" isLink url=""/>
</van-cell-group> </van-cell-group>
</view> </view>
<van-popup show="{{ show }}" bind:close="onClose" round closeable custom-class="yang">
<view class="logintit"><text>登录或注册</text></view>
<view class="p-5">
<button class="ui-btn bg-green-gradient radius lg block shadow-green" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
<text class="cicon-weixin icon-xl mr-3"/>
<text>微信账号快速登录</text>
<text class="cicon-loading1 icon-spin ml-3" wx:if="{{wxisLoading}}"/>
</button>
<view class="del">登录代表您已同意用户协议</view>
</view>
</van-popup>
<van-toast id="van-toast" />
</ui-sys> </ui-sys>
\ No newline at end of file
...@@ -7,6 +7,11 @@ Page({ ...@@ -7,6 +7,11 @@ Page({
data: { data: {
}, },
onClickLeft(){
wx.switchTab({
url: "/pages/my/home",
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
......
.van-nav-bar{
padding-top: 0px !important;
}
.box{
width: 98%;
margin: 2% auto 0;
}
\ No newline at end of file
<!--pages/seeSignup/seeSignup.wxml--> <!-- 我的报名查询 -->
<text>pages/seeSignup/seeSignup.wxml</text> <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="5g小课堂" label="¥5488.00" >
<view>
<van-button type="primary" size="small" center>查看协议</van-button>
</view>
</van-cell>
<van-cell title="教你修电脑" label="¥5488.00" >
<view>
<van-button type="primary" size="small" center>查看协议</van-button>
</view>
</van-cell>
</van-cell-group>
</view>
</ui-sys>
\ No newline at end of file
{ {
"usingComponents": {} "usingComponents": {
"app-nav-li": "/mp-sdk/components/app-nav-li/app-nav-li"
}
} }
\ No newline at end of file
...@@ -3,37 +3,24 @@ ...@@ -3,37 +3,24 @@
<ui-navbar isCenter> <ui-navbar isCenter>
<text slot="center">{{isperson}}</text> <text slot="center">{{isperson}}</text>
</ui-navbar> </ui-navbar>
<ui-modal show="{{true}}" showCancel="{{false}}" title="报名需知"> <!-- <ui-menu ui="mt-5 radius border">
<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>特种作业人员操作证办理办事指南
一、特种作业操作证的办理
办理所需条件:
1、年满18周岁,且不超过国家法定退休年龄;
2、无妨碍从事相应特种作业的器质性心脏病、癫痫病、美尼尔氏症、眩晕症、癔病、震颤麻痹症、精神病、痴呆症以及其他疾病和生理缺陷;
3、具有初中及以上文化程度;
4、具备必要的安全技术知识与技能;
5、相应特种作业规定的其他条件;
6、按规定接受培训、考核合格。
危险化学品特种作业人员除符合前款第1项、第2项、第4项和第5项规定的条件外,应当具备高中或者相当于高中及以上文化程度。
办理需提交资料:
特种作业(新办、复审、换证)办证所需资料:(可通过在线报名系统按照提示拍照提交相关资料,不用再向培训机构提交纸质资料)
二、安全合格证的办理:
办事规程:
申请人参加由国家、省、市应急管理部门审定的安全生产培训考核单位举办的安全生产培训班的学习培训、考核。
办理需提交资料:
安全培训合格证(新办、复审、换证)办证所需资料:(可通过在线报名系统按照提示拍照提交相关资料,不用再向培训机构提交纸质资料)
备注(在线报名流程):在线报名成功后>管理员审核提交的资料>学员缴纳相关费用>开具发票给学员>学员在线模拟练题>通知学员培训>通知学员考试>考试通过领证
</text>
</view>
</scroll-view>
</ui-modal>
<ui-menu ui="mt-5 radius border">
<ui-menu-item title="{{item.name}}" icon="cicon-tag text-orange" isAction wx:for="{{courseData}}" wx:key="index"> <ui-menu-item title="{{item.name}}" icon="cicon-tag text-orange" isAction wx:for="{{courseData}}" wx:key="index">
<view slot="action"> <view slot="action">
<navigator url="/pages/document/subsign/subsign?name={{item.name}}&price={{item.price}}" > <navigator url="/pages/document/subsign/subsign?name={{item.name}}&price={{item.price}}" >
<ui-tag bg="bg-blue-thin" info="立即报名" ui="sm"/></navigator> <ui-tag bg="bg-blue-thin" info="立即报名" ui="sm"/></navigator>
</view> </view>
</ui-menu-item> </ui-menu-item>
</ui-menu> </ui-menu> -->
<view class="ui-container">
<block >
<ui-title title="课程列表" depth="2" isIcon ui="ml-3"/>
<view class="ui-grid ui-cols-2">
<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.name}}"/>
</view>
</block>
</view>
</block>
</view>
</ui-sys> </ui-sys>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"checkInvalidKey": true, "checkInvalidKey": true,
"checkSiteMap": true, "checkSiteMap": true,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": true, "compileHotReLoad": false,
"lazyloadPlaceholderEnable": false, "lazyloadPlaceholderEnable": false,
"useMultiFrameRuntime": true, "useMultiFrameRuntime": true,
"useApiHook": true, "useApiHook": true,
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"enableEngineNative": false, "useIsolateContext": true,
"useIsolateContext": false,
"userConfirmedBundleSwitch": false, "userConfirmedBundleSwitch": false,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
...@@ -41,12 +40,13 @@ ...@@ -41,12 +40,13 @@
"showES6CompileOption": false, "showES6CompileOption": false,
"useCompilerPlugins": [ "useCompilerPlugins": [
"sass" "sass"
] ],
"ignoreUploadUnusedFiles": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.21.3", "libVersion": "2.21.3",
"appid": "wx06060b7a7634db15", "appid": "wx95ac219beca2f34f",
"projectname": "MP-CU", "projectname": "MP-CU-main",
"debugOptions": { "debugOptions": {
"hidedInDevtools": [] "hidedInDevtools": []
}, },
......
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