parent
b686679013
commit
d99d73f1a1
@ -0,0 +1,38 @@
|
||||
const app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
imgDir: global.config.imgDir,
|
||||
action:"login"
|
||||
},
|
||||
log(e){
|
||||
console.log(e);
|
||||
},
|
||||
onLoad: function (options) {
|
||||
let {action="login"} = options;
|
||||
this.setData({action});
|
||||
|
||||
},
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
<page-meta>
|
||||
<navigation-bar title=""/>
|
||||
</page-meta>
|
||||
|
||||
<view class="container">
|
||||
<image class="login" src="{{imgDir}}educoder.png" mode="aspectFit"></image>
|
||||
<form class="account-form" bindsubmit="log">
|
||||
<view class="inputs">
|
||||
<view class="input-wrap">
|
||||
<input placeholder="邮箱或手机号">
|
||||
|
||||
</input>
|
||||
</view>
|
||||
<view class="input-wrap {{action!='login'?'':'hidden'}}">
|
||||
<input placeholder="验证码">
|
||||
</input>
|
||||
<button class="obtain-code">
|
||||
获取验证码
|
||||
</button>
|
||||
</view>
|
||||
<view class="input-wrap">
|
||||
<input placeholder="请输入密码">
|
||||
|
||||
</input>
|
||||
</view>
|
||||
<view class="input-wrap {{action!='login'?'':'hidden'}}">
|
||||
<input placeholder="请再次输入密码">
|
||||
|
||||
</input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="actions">
|
||||
<button id="reset" bindtap="onTapReset" form-type="submit">重置密码</button>
|
||||
<button id="login" bindtap="onTapLogin" form-type="submit">登录</button>
|
||||
<button id="register" bindtap="onTapRegister">注册</button>
|
||||
</view>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</view>
|
@ -0,0 +1,16 @@
|
||||
.input-wrap{
|
||||
transition: 1s all ease;
|
||||
max-height: 50px;
|
||||
display: flex;
|
||||
margin: 0 24px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.input-wrap>input{
|
||||
padding: 4px 10px;
|
||||
border-radius: 4px;
|
||||
border: 1px lightblue
|
||||
}
|
||||
.hidden{
|
||||
max-height: 0px;
|
||||
}
|
||||
|
@ -0,0 +1,66 @@
|
||||
// miniprogram/account/pages/profile/profile.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<!--miniprogram/account/pages/profile/profile.wxml-->
|
||||
<text>miniprogram/account/pages/profile/profile.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* miniprogram/account/pages/profile/profile.wxss */
|
@ -1,71 +0,0 @@
|
||||
// pages/courses/courses.js
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
options: {},
|
||||
data: {
|
||||
courses: [],
|
||||
loading: true,
|
||||
page: 1,
|
||||
show_join_course_modal:false,
|
||||
loaded_all: false,
|
||||
},
|
||||
search_courses: function({detail: {value}}){
|
||||
this.setData({ loaded_all: false });
|
||||
this.options.search = value;
|
||||
this.fetch_courses(this.options).then(res => {
|
||||
console.log(res);
|
||||
this.set_courses(res.courses);
|
||||
if (res.courses.length<=10) {
|
||||
this.setData({ loaded_all: true })
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
show_join_course_modal: function(event){
|
||||
this.setData({show_join_course_modal: true});
|
||||
},
|
||||
cancel_join_course_modal: function(event){
|
||||
this.setData({show_join_course_modal: false});
|
||||
},
|
||||
|
||||
fetch_courses: function(options){
|
||||
return app.api("courses")(options)
|
||||
},
|
||||
set_courses: function(courses){
|
||||
this.setData({courses: courses});
|
||||
},
|
||||
add_courses: function(courses){
|
||||
this.setData({
|
||||
courses:[...this.data.courses, ...courses],
|
||||
})
|
||||
},
|
||||
|
||||
onLoad: function (options) {
|
||||
this.fetch_courses().then(res=>{
|
||||
console.log(res);
|
||||
this.set_courses(res.courses);
|
||||
})
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
onReachBottom: function () {
|
||||
if(!this.data.loaded_all){
|
||||
wx.pageScrollTo({
|
||||
selector: ".loading"
|
||||
})
|
||||
this.fetch_courses({ page: this.data.page + 1 ,...this.options})
|
||||
.then(res => {
|
||||
this.setData({ page: this.data.page + 1});
|
||||
if(res.courses.length==0){
|
||||
this.setData({loaded_all: true})
|
||||
}else{
|
||||
this.add_courses(res.courses);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"join-course-modal": "/components/modal/join-course/join-course"
|
||||
}
|
||||
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
<!--pages/addclass/addclass.wxml-->
|
||||
<view class="container">
|
||||
<view class="course-list form-wrap">
|
||||
<view>
|
||||
<image hidden="{{courses.length==0 || loading}}" src="cloud://educoder.6564-educoder-1300855313/images/blank2.png" class="none-content"></image>
|
||||
<text hidden="{{courses.length==0 || loading}}" class="none-content">没有可以加入的课程了</text>
|
||||
</view>
|
||||
<block wx:for="{{courses}}" wx:for-item="course" wx:key="id">
|
||||
<view hidden="{{course.present}}" bindtap="show_join_course_modal" class="course-item flex-wrap" data-id="{{course.id}}" data-name="{{course.name}}">
|
||||
<myicon class="course-icon" type="internet_class" size="26" color="#00b0f0"></myicon>
|
||||
<text class="course-name">{{course.name}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="loading" hidden="{{loaded_all}}">
|
||||
<image src="cloud://educoder.6564-educoder-1300855313/images/loading_min.gif" style="width:20px;height:20px"></image>
|
||||
</view>
|
||||
</view>
|
||||
<join-course-modal hidden="{{!show_join_course_modal}}"/>
|
@ -1,68 +0,0 @@
|
||||
/* pages/addclass/addclass.wxss */
|
||||
.course-icon{
|
||||
margin-left: 2px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
.course-list{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 0 -12px
|
||||
}
|
||||
.course-item{
|
||||
align-items: center;
|
||||
background: white;
|
||||
padding: 30rpx 12px;
|
||||
border-bottom: 1rpx solid #EEE;
|
||||
position: relative;
|
||||
}
|
||||
.course-item:after {
|
||||
content: '加入>';
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 2rpx;
|
||||
top: 50%;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
margin-top: -20rpx;
|
||||
margin-right: 20rpx;
|
||||
color: #999;
|
||||
}
|
||||
.course-name{
|
||||
vertical-align: middle;
|
||||
margin-right: 80rpx;
|
||||
}
|
||||
|
||||
.none-content{
|
||||
align-self: center;
|
||||
}
|
||||
view.none-content{
|
||||
direction: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
text.none-content{
|
||||
font-size: 16px;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
|
||||
image.none-content{
|
||||
margin-top: 120rpx;
|
||||
height: 160rpx;
|
||||
width: 180rpx;
|
||||
}
|
||||
|
||||
.code-input{
|
||||
border-radius: 10rpx;
|
||||
border: 1rpx solid;
|
||||
height: 36px;
|
||||
margin-bottom: 24rpx;
|
||||
padding-left: 16rpx;
|
||||
}
|
||||
lable.identity{
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.loading{
|
||||
padding-top: 16rpx;
|
||||
text-align: center;
|
||||
}
|
@ -1,75 +1,38 @@
|
||||
const app = getApp();
|
||||
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
base_url: "https://www.educoder.net",
|
||||
page_info: {},
|
||||
page_status: 0
|
||||
statusBarHeight: 20,
|
||||
current: 0,
|
||||
show: [1],
|
||||
list: [
|
||||
{ text: "实训" ,type:"shixun"},
|
||||
{ text: "课堂" , type:"course"},
|
||||
//{text:"课程"}
|
||||
]
|
||||
},
|
||||
enterSearch() {
|
||||
let type = this.data.list[this.data.current].type || '';
|
||||
app.navigateTo({ url: `{search}?type=${type}`});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.callApi({name:"home.index"})
|
||||
.then(res => {
|
||||
console.info(res);
|
||||
this.setData({ page_info: res, page_status: 1 });
|
||||
}).catch(error => {
|
||||
this.setData({ page_status: 2 });
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
wx.getSystemInfo({
|
||||
success: res => {
|
||||
let { statusBarHeight } = res;
|
||||
this.setData({ statusBarHeight });
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
switchNav({ target: { dataset: { current } } }) {
|
||||
this.setData({ current });
|
||||
this.setData({ ['show[' + current + ']']: 1 })
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
this.onLoad();
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
switchTab({ detail: { current, source, value } }) {
|
||||
console.log(current, source, value);
|
||||
if (source == "touch") {
|
||||
this.setData({ current });
|
||||
this.setData({ ['show[' + current + ']']: 1 })
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTitleText": "发现"
|
||||
"navigationBarTitleText": "发现",
|
||||
"navigationStyle": "custom"
|
||||
}
|
@ -1,48 +1,22 @@
|
||||
<view class="container">
|
||||
<view class="swiper-images">
|
||||
<swiper class="swiper-images" indicator-dots="1" autoplay="1">
|
||||
<swiper-item class="swiper-image" wx:for="{{page_info.images_url}}" wx:for-item="image">
|
||||
<image class="swiper-image" mode="widthFix" src="{{base_url+image.image_url}}"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<view class="subjects">
|
||||
<view class="title">
|
||||
<text>实践课程</text>
|
||||
<text class="hint">TRAINING COURSE</text>
|
||||
</view>
|
||||
<view class="loading" wx:if="{{page_status==0}}">
|
||||
<image src="cloud://educoder.6564-educoder-1300855313/images/loading_big.gif" style="width:50px;height:50px"></image>
|
||||
</view>
|
||||
<view class="grid-view">
|
||||
<view class="grid-item" wx:for="{{page_info.subjects}}" wx:for-item="subject">
|
||||
<view class="item">
|
||||
<image src="{{base_url+'/'+subject.image_url}}" mode="widthFix"></image>
|
||||
<view class="detail">
|
||||
<text class="name">{{subject.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pratices">
|
||||
<view class="title">
|
||||
<text>实训项目</text>
|
||||
<text class="hint">DEVELOPMENT COMMUNITY</text>
|
||||
</view>
|
||||
<view class="loading" wx:if="{{page_status==0}}">
|
||||
<!---->
|
||||
<image src="cloud://educoder.6564-educoder-1300855313/images/loading_big.gif" style="width:50px;height:50px"></image>
|
||||
</view>
|
||||
<view class="grid-view">
|
||||
<view class="grid-item" wx:for="{{page_info.shixuns}}" wx:for-item="practice">
|
||||
<view class="item">
|
||||
<image src="{{base_url+'/'+practice.pic}}" mode="widthFix"></image>
|
||||
<view class="detail">
|
||||
<text class="name">{{practice.name}}</text>
|
||||
</view>
|
||||
<view class="navigation">
|
||||
<view style="height:{{statusBarHeight}}px"></view>
|
||||
<view class="navigation-bar">
|
||||
<view class="navigation-left">
|
||||
<icon class="search" type="search" size="26" color="white" bindtap="enterSearch"/>
|
||||
<text class="title">发现</text>
|
||||
</view>
|
||||
<view class="navbar" bindtap="switchNav">
|
||||
<view class="navitem {{current==index?'active':''}}" wx:for="{{list}}" data-current="{{index}}">
|
||||
{{item.text}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<swiper class="body" current="{{current}}" bindchange="switchTab" circular="1">
|
||||
<swiper-item>
|
||||
<courses wx:if="{{show[0]}}"/>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<shixuns wx:if="{{show[1]}}"/>
|
||||
</swiper-item>
|
||||
</swiper>
|
@ -0,0 +1,23 @@
|
||||
// pages/findmore/shixuns/shixuns.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<!--pages/findmore/shixuns/shixuns.wxml-->
|
||||
<text>pages/findmore/shixuns/shixuns.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* pages/findmore/shixuns/shixuns.wxss */
|
@ -0,0 +1,44 @@
|
||||
<view class="user-display">
|
||||
<navigator wx:if="{{!user.id}}" class="user-info no-login" style="display: flex;align-items: center;" url="/account/pages/login/login">
|
||||
<image src="{{imgDir}}blank_info_bg.png" style="width: 50px; height:50px; padding:12px"></image>
|
||||
<text class="color-grey ft14 m12">点击登陆,获取更多内容</text>
|
||||
</navigator>
|
||||
|
||||
<block wx:else>
|
||||
<navigator hover-class="none" class="user-info p4" url="/account/pages/profile/profile">
|
||||
<image src="{{eduImgDir}}{{user.avatar_url}}" class="avatar fl m4" catchtap="onTapAvatar" data-url="{{user.avatar_url}}"></image>
|
||||
<view class="user-detail fl">
|
||||
<text>{{user.name}}</text>
|
||||
</view>
|
||||
</navigator>
|
||||
<view class="relation-info">
|
||||
<view class="relation-detail">
|
||||
<text>经验值</text>
|
||||
<text>{{user.experience}}</text>
|
||||
</view>
|
||||
<view class="relation-detail">
|
||||
<text>金币</text>
|
||||
<text>{{user.grade}}</text>
|
||||
</view>
|
||||
<view class="relation-detail attendance">
|
||||
<button class="attendance" type="cap" plain="{{user.attendance_signed}}" size="mini" disabled="{{user.attendance_signed}}" bindtap="attendance">{{user.attendance_signed?'已签到':'签到'}}</button>
|
||||
<radio class="auto-attendance" checked="{{auto_attendance}}" bindtap="tapAutoAttendence">自动签到</radio>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="nav-list">
|
||||
<navigator class="nav" url="/account/pages/change_password/change_password">修改密码</navigator>
|
||||
<view class="nav addclass" bindtap="show_join_course_modal">加入课程</view>
|
||||
<navigator url="/course/pages/course_setting/course_setting?intent=create" class="nav createclass">创建课程</navigator>
|
||||
<button open-type="feedback" class="nav" style="width:auto">小程序反馈</button>
|
||||
<button open-type="contact" class="nav" style="width:auto">小程序客服</button>
|
||||
<view class="nav" bindtap="update">当前版本:{{version}}</view>
|
||||
<navigator url="/account/pages/about/about" class="nav about">关于</navigator>
|
||||
</view>
|
||||
<view>
|
||||
<button class="login" type="main" wx:if="{{!user.id||user.id==2}}" bindtap="enter_login">登录</button>
|
||||
<button class="logout" wx:elif="{{user.id!=2}}" bindtap="logout">退出登录</button>
|
||||
</view>
|
||||
<join-course-modal hidden="{{!show_join_course_modal}}" />
|
@ -0,0 +1,103 @@
|
||||
.nav-list{
|
||||
margin-top: 4px;
|
||||
}
|
||||
.nav {
|
||||
font-size: 16px;
|
||||
background: white;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 0 14px;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
text-align: left;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
button.nav::after{
|
||||
border: none;
|
||||
}
|
||||
|
||||
.login{
|
||||
margin: 16rpx 70rpx;
|
||||
}
|
||||
|
||||
.logout{
|
||||
background: red;
|
||||
color: white;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.user-display{
|
||||
background: white;
|
||||
}
|
||||
.no-login{
|
||||
color: #0080f0;
|
||||
}
|
||||
.user-info{
|
||||
padding: 4px 12px;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.user-detail{
|
||||
margin-left: 20px;
|
||||
|
||||
}
|
||||
.user-detail>text{
|
||||
display: block;
|
||||
}
|
||||
.relation-info{
|
||||
margin-bottom: 1px;
|
||||
display: flex;
|
||||
}
|
||||
.relation-detail{
|
||||
width:33.33%;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
.relation-detail>text{
|
||||
display: block;
|
||||
padding-top: 4px;
|
||||
}
|
||||
.my-display{
|
||||
margin-top: 1px;
|
||||
padding: 16px 8px;
|
||||
}
|
||||
.my-detail{
|
||||
display: inline-block;
|
||||
width:33%;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
.my-detail>image{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
.my-detail>text{
|
||||
display: block;
|
||||
}
|
||||
.contact{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
background: transparent;
|
||||
font-size: 12px;
|
||||
text-decoration: underline;
|
||||
color: grey;
|
||||
font-weight: normal;
|
||||
left:0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.avatar{
|
||||
border-radius: 50%;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
}
|
||||
.auto-attendance{
|
||||
transform: scale(0.64);
|
||||
}
|
||||
button.attendance{
|
||||
font-size: 13px!important;
|
||||
font-weight: normal;
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<view class="setting">
|
||||
<image class="user-bg" mode="scaleToFill" src="cloud://educoder.6564-educoder-1300855313/images/bg.png"></image>
|
||||
<view class="user-view">
|
||||
<image wx:if="{{user.user_id&&user.user_id!=2}}" class="avatar" bindtap="onTapAvatar" data-src="{{eduImgDir}}{{user.image_url}}" src="{{eduImgDir}}{{user.image_url}}"></image>
|
||||
<image wx:else class="avatar" src="{{imgDir}}avatar.png"></image>
|
||||
<text class="user-text" bindtap="enter_usersetting">{{user.real_name}} | {{user.user_school}}</text>
|
||||
</view>
|
||||
<view class="nav-list">
|
||||
<navigator class="nav" url="/account/pages/change_password/change_password">修改密码</navigator>
|
||||
<view class="nav addclass" bindtap="show_join_course_modal">加入课程</view>
|
||||
<navigator url="/course/pages/course_setting/course_setting?intent=create" class="nav createclass">创建课程</navigator>
|
||||
<button open-type="feedback" class="nav">小程序反馈</button>
|
||||
<button open-type="contact" class="nav">小程序客服</button>
|
||||
<view class="nav" bindtap="update">当前版本:{{version}}</view>
|
||||
<navigator url="/account/pages/about/about" class="nav about">关于</navigator>
|
||||
</view>
|
||||
<view>
|
||||
<button class="login" type="main" wx:if="{{user.user_id==2}}" bindtap="enter_login">登录</button>
|
||||
<button class="logout" wx:else bindtap="logout">退出登录</button>
|
||||
</view>
|
||||
</view>
|
||||
<join-course-modal hidden="{{!show_join_course_modal}}"/>
|
@ -1,68 +0,0 @@
|
||||
.nav {
|
||||
font-size: 16px;
|
||||
background: white;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 0 14px;
|
||||
height: 46px;
|
||||
line-height: 46px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
button.nav::after{
|
||||
border: none;
|
||||
}
|
||||
.user-text{
|
||||
font-size: 16px;
|
||||
color: white;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.avatar{
|
||||
width: 136rpx;
|
||||
height: 136rpx;
|
||||
margin-top: 88rpx;
|
||||
margin-bottom: 24rpx;
|
||||
border-radius: 50%;
|
||||
align-self: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
.user-view{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 750rpx;
|
||||
height: 341rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
.user-bg{
|
||||
top:0;
|
||||
position: fixed;
|
||||
z-index: -1;
|
||||
left:0;
|
||||
right:0;
|
||||
height: 341rpx;
|
||||
width: 100%;
|
||||
}
|
||||
.login{
|
||||
margin: 16rpx 70rpx;
|
||||
}
|
||||
|
||||
.logout{
|
||||
background: red;
|
||||
border-radius: 26rpx;
|
||||
color: white;
|
||||
margin: 16rpx 70rpx;
|
||||
}
|
||||
/* .nav-list{
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
view.foot{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width:100%;
|
||||
height: 40px;
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.foot button{
|
||||
height: 38px;
|
||||
} */
|
Loading…
Reference in new issue