-
1common/js/mixins.js
-
130components/UserTab/UserTab - 副本.vue
-
1config/api.js
-
52config/request - 副本.js
-
8config/site.config.js
-
5manifest.json
-
90pages/login/login.vue
-
194pages/login/loginByPhone.vue
-
17pages/tabbar/appointmenRecord/index.vue
-
5pages/tabbar/examSimulation/index.vue
-
5pages/tabbar/statistics/index.vue
-
74pages/userCenter/teachingData/teachingData.vue
-
BINstatic/images/bigImg/indexTopBanner.png
-
BINstatic/images/bigImg/topPageBg.png
-
BINstatic/images/logo.png
-
BINstatic/images/userCenter/loginTopBg.png
-
BINstatic/images/登录流程切图/__MACOSX/登录流程切图/._.DS_Store
-
BINstatic/images/登录流程切图/__MACOSX/登录流程切图/._btn_1.png
-
BINstatic/images/登录流程切图/登录流程切图/.DS_Store
-
BINstatic/images/登录流程切图/登录流程切图/bg_1.png
-
BINstatic/images/登录流程切图/登录流程切图/btn_1.png
-
BINstatic/images/登录流程切图/登录流程切图/btn_2.png
-
BINstatic/images/登录流程切图/登录流程切图/title_1.png
-
BINstatic/logo.png
-
2store/index.js
-
91store/modules/add.js
-
4store/modules/user.js
@ -1,130 +0,0 @@ |
|||
<template> |
|||
<view class=""> |
|||
<!-- 学生端 --> |
|||
<u-tabbar v-if="showWho=='student'" :value="student" @change="studentChange" :fixed="true" :placeholder="true" |
|||
:safeAreaInsetBottom="true" activeColor="#31aef1"> |
|||
<u-tabbar-item v-for="i in studentList" :key='i.id' :text="i.name" :name="i.name"> |
|||
<image class="u-page__item__slot-icon" slot="active-icon" :src="i.active" mode="widthFix"></image> |
|||
<image class="u-page__item__slot-icon" slot="inactive-icon" :src="i.inactive" mode="widthFix"></image> |
|||
</u-tabbar-item> |
|||
|
|||
</u-tabbar> |
|||
<!-- 教师端 --> |
|||
<u-tabbar :value="teacher" @change="teacherChange" :fixed="true" :placeholder="true" |
|||
:safeAreaInsetBottom="true" activeColor="#31aef1"> |
|||
<u-tabbar-item v-for="i in teacherList" :key='i.id' :text="i.name" :name="i.name"> |
|||
<image class="u-page__item__slot-icon" slot="active-icon" :src="i.active" mode="widthFix"></image> |
|||
<image class="u-page__item__slot-icon" slot="inactive-icon" :src="i.inactive" mode="widthFix"></image> |
|||
</u-tabbar-item> |
|||
</u-tabbar> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
props: ['tabNumber'], |
|||
data() { |
|||
return { |
|||
teacher: '课堂', |
|||
student: '', |
|||
showWho: 'teacher', |
|||
teacherList: [{ |
|||
id: 1, |
|||
name: '课堂', |
|||
active: '../../static/images/tabbar/syActive.png', |
|||
inactive: '../../static/images/tabbar/sy.png' |
|||
}, |
|||
{ |
|||
id: 2, |
|||
name: '兴趣小组', |
|||
active: '../../static/images/tabbar/tkActive.png', |
|||
inactive: '../../static/images/tabbar/tk.png' |
|||
}, |
|||
{ |
|||
id: 3, |
|||
name: '我的', |
|||
active: '../../static/images/tabbar/zxActive.png', |
|||
inactive: '../../static/images/tabbar/zx.png' |
|||
} |
|||
], |
|||
studentList: [{ |
|||
id: 1, |
|||
name: '学员课堂', |
|||
active: '../../static/images/tabbar/syActive.png', |
|||
inactive: '../../static/images/tabbar/sy.png' |
|||
}, |
|||
{ |
|||
id: 2, |
|||
name: '学员兴趣小组', |
|||
active: '../../static/images/tabbar/tkActive.png', |
|||
inactive: '../../static/images/tabbar/tk.png' |
|||
}, |
|||
{ |
|||
id: 3, |
|||
name: '学员我的', |
|||
active: '../../static/images/tabbar/zxActive.png', |
|||
inactive: '../../static/images/tabbar/zx.png' |
|||
} |
|||
], |
|||
} |
|||
}, |
|||
mounted() { |
|||
// if (uni.getStorageSync('status') == 'teacher') { |
|||
// this.showWho = 'student' |
|||
// } else { |
|||
// this.showWho = 'teacher' |
|||
// } |
|||
this.student = this.tabNumber |
|||
this.teacher = this.tabNumber |
|||
}, |
|||
methods: { |
|||
teacherChange(e) { |
|||
this.teacher = e |
|||
if (e == '课堂') { |
|||
uni.reLaunch({ |
|||
url: "/pages/tabbar/index/index" |
|||
}) |
|||
// uni.hideHomeButton() //为了防止跳转页面后,小程序右上角会出现一个回到主页的小房子 |
|||
} else if (e == "兴趣小组") { |
|||
uni.reLaunch({ |
|||
url: "/pages/tabbar/question/index" |
|||
}) |
|||
// uni.hideHomeButton() |
|||
} else if (e == "我的") { |
|||
uni.reLaunch({ |
|||
url: "/pages/tabbar/mine/index" |
|||
}) |
|||
// uni.hideHomeButton() |
|||
} |
|||
}, |
|||
studentChange(e) { |
|||
this.student = e |
|||
uni.hideHomeButton() |
|||
// if (e == '课堂') { |
|||
// uni.reLaunch({ |
|||
// url: "/pages/index/CourseTeacherIndex" |
|||
// }) |
|||
// uni.hideHomeButton() //为了防止跳转页面后,小程序右上角会出现一个回到主页的小房子 |
|||
// } else if (e == "兴趣小组") { |
|||
// uni.reLaunch({ |
|||
// url: "/pages/interestGroup/interestGroup" |
|||
// }) |
|||
// uni.hideHomeButton() |
|||
// } else if (e == "我的") { |
|||
// uni.reLaunch({ |
|||
// url: "/pages/mine/mine" |
|||
// }) |
|||
// uni.hideHomeButton() |
|||
// } |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.u-page__item__slot-icon { |
|||
display: block; |
|||
width: 56rpx; |
|||
height: 56rpx; |
|||
} |
|||
</style> |
@ -1,52 +0,0 @@ |
|||
|
|||
// 此vm参数为页面的实例,可以通过它引用vuex中的变量
|
|||
module.exports = (vm) => { |
|||
// 初始化请求配置
|
|||
uni.$u.http.setConfig((config) => { |
|||
/* config 为默认全局配置*/ |
|||
config.baseURL = 'http://121.41.97.244:8090'; /* 根域名 */ |
|||
config.header['content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8' |
|||
return config |
|||
}) |
|||
|
|||
// 请求拦截
|
|||
uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
|
|||
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
|
|||
config.data = config.data || {} |
|||
// 根据custom参数中配置的是否需要token,添加对应的请求头
|
|||
if(config?.custom?.auth) { |
|||
// 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
|
|||
config.header.token = vm.$store.state.userInfo.token |
|||
} |
|||
return config |
|||
}, config => { // 可使用async await 做异步操作
|
|||
return Promise.reject(config) |
|||
}) |
|||
|
|||
// 响应拦截
|
|||
uni.$u.http.interceptors.response.use((response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/ |
|||
const data = response.data |
|||
console.log('response') |
|||
console.log(data) |
|||
// 自定义参数
|
|||
const custom = response.config?.custom |
|||
if (data.code !== 0) { |
|||
// 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示
|
|||
if (custom.toast !== false) { |
|||
uni.$u.toast(data.message) |
|||
} |
|||
|
|||
// 如果需要catch返回,则进行reject
|
|||
if (custom?.catch) { |
|||
return Promise.reject(data) |
|||
} else { |
|||
// 否则返回一个pending中的promise,请求不会进入catch中
|
|||
return new Promise(() => { }) |
|||
} |
|||
} |
|||
return data === undefined ? {} : data |
|||
}, (response) => { |
|||
// 对响应错误做点什么 (statusCode !== 200)
|
|||
return Promise.reject(response) |
|||
}) |
|||
} |
@ -1,8 +1,8 @@ |
|||
const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM; |
|||
// localIp = false
|
|||
module.exports = { |
|||
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
|
|||
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48080/',//非代理地址
|
|||
TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48080/', |
|||
httpPrefix: '/admin-api/' |
|||
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api/' : '',//h5代理
|
|||
WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/',//非代理地址
|
|||
TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.26:48082/', |
|||
httpPrefix: 'admin-api/' |
|||
}; |
@ -1,194 +0,0 @@ |
|||
<template> |
|||
<view class="main"> |
|||
<view class="u-back-top"> |
|||
<view class="backBox"> |
|||
<u-icon name="arrow-left" color="#333" size="28"></u-icon> |
|||
</view> |
|||
</view> |
|||
<view class="title"> |
|||
<image src="@/static/images/userCenter/loginTitle.png" mode=""></image> |
|||
</view> |
|||
<view class="form"> |
|||
<view class="form-item"> |
|||
<view class="inputBox my"> |
|||
<u--input placeholder="请输入登录账号" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input> |
|||
</view> |
|||
</view> |
|||
<view class="form-item"> |
|||
<view class="inputBox my"> |
|||
<u--input placeholder="请输入密码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.password"></u--input> |
|||
</view> |
|||
</view> |
|||
<view class="forgetTps" @click="$u.toast('请联系管理员重置密码!')">忘记密码</view> |
|||
<view class="loginBtn" :class="{active: btnHighlight}" @click="submitFn">登 录</view> |
|||
<!-- <view class="radioWrap"> |
|||
<u-checkbox-group > |
|||
<u-checkbox v-model="isCheck" shape="circle" label="已阅读并同意" :labelSize="12" ></u-checkbox> |
|||
</u-checkbox-group> |
|||
<view class="privacyText"> |
|||
<text>《用户协议》</text>和 <text>《隐私协议》</text> |
|||
</view> |
|||
</view> --> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { getLoginCode } from '@/config/api.js' |
|||
export default { |
|||
data() { |
|||
return { |
|||
isCheck: false, |
|||
codeText: '获取验证码', |
|||
FormData: {}, |
|||
codeOn: false |
|||
} |
|||
}, |
|||
onLoad() { |
|||
|
|||
}, |
|||
computed: { |
|||
isPhone() { |
|||
return uni.$u.test.mobile(this.FormData.phone) |
|||
}, |
|||
btnHighlight() { |
|||
return this.isPhone&&this.FormData.password |
|||
} |
|||
}, |
|||
methods: { |
|||
// 是否选择协议 |
|||
groupChangeEnvnt(e) { |
|||
this.isCheck = e.value |
|||
console.log('是否选择协议', this.isCheck) |
|||
}, |
|||
// 发送短信验证码 |
|||
async goSms() { |
|||
const { |
|||
FormData |
|||
} = this |
|||
if (!FormData.phone) return this.$u.toast('请输入手机号'); |
|||
if (!this.isPhone) return this.$u.toast('手机号格式有误'); |
|||
if (this.codeOn) return |
|||
const data = await getLoginCode({ |
|||
codeType: 1, |
|||
phone: FormData.phone, |
|||
}) |
|||
console.log(data) |
|||
// 获取验证码 |
|||
var time = 60; |
|||
var timer = setInterval(() => { |
|||
time--; |
|||
this.codeText = time + "秒后重新发送" |
|||
this.codeOn = true; |
|||
if (time == 0) { |
|||
clearInterval(timer); |
|||
this.codeText = "获取验证码"; |
|||
this.codeOn = false; |
|||
} |
|||
}, 1000); |
|||
}, |
|||
submitFn() { |
|||
let val = 1 |
|||
if(this.FormData.phone=='18267103167') { |
|||
val = 1 |
|||
}else if(this.FormData.phone=='18267103168') { |
|||
val = 2 |
|||
}else { |
|||
val = 3 |
|||
} |
|||
this.$store.commit('upDateIdentity', val) |
|||
uni.reLaunch({ |
|||
url: '/pages/tabbar/statistics/index' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
|
|||
.main { |
|||
width: 100%; |
|||
min-height: 100vh; |
|||
background: url('../../../static/images/userCenter/loginTopBg.png') no-repeat; |
|||
background-size: 100% 360rpx; |
|||
.u-back-top { |
|||
padding: 32rpx 0 0 0; |
|||
.backBox { |
|||
padding: 24rpx; |
|||
} |
|||
} |
|||
|
|||
.title { |
|||
width: 658rpx; |
|||
height: 94rpx; |
|||
margin: 130rpx auto 114rpx auto; |
|||
} |
|||
|
|||
.form { |
|||
padding: 0 46rpx; |
|||
.form-item { |
|||
height: 112rpx; |
|||
background: #F4F7FF; |
|||
border-radius: 16rpx; |
|||
width: 100%; |
|||
line-height: 112rpx; |
|||
display: flex; |
|||
margin-bottom: 40rpx; |
|||
padding: 0 40rpx; |
|||
.prefix { |
|||
display: flex; |
|||
align-items: center; |
|||
font-size: 32rpx; |
|||
color: #333; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
.inputBox { |
|||
flex: 1; |
|||
} |
|||
.code { |
|||
color: #BBBBBB; |
|||
margin-left: 30rpx; |
|||
&.active { |
|||
color: $themC |
|||
} |
|||
} |
|||
} |
|||
.forgetTps { |
|||
font-size: 28rpx; |
|||
color: $themC; |
|||
margin-top: -20rpx; |
|||
text-align: right; |
|||
} |
|||
.loginBtn { |
|||
width: 100%; |
|||
height: 112rpx; |
|||
background: rgba(25,137,250,0.3); |
|||
border-radius: 16rpx; |
|||
text-align: center; |
|||
line-height: 112rpx; |
|||
font-size: 32rpx; |
|||
font-weight: 600; |
|||
color: #fff; |
|||
margin-top: 100rpx; |
|||
&.active { |
|||
background: rgba(25,137,250,1); |
|||
} |
|||
} |
|||
|
|||
.radioWrap { |
|||
display: flex; |
|||
align-items: center; |
|||
margin-top: 40rpx; |
|||
.privacyText { |
|||
font-size: 24rpx; |
|||
color: #888E94; |
|||
text { |
|||
color: $themC; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</style> |
@ -1,17 +0,0 @@ |
|||
<template> |
|||
<view class="pageBgImg"> |
|||
预约记录 |
|||
<UserTab name ='预约记录'></UserTab> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
onShow() { |
|||
uni.hideTabBar() |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style> |
|||
</style> |
Before Width: 750 | Height: 492 | Size: 394 KiB |
Before Width: 750 | Height: 324 | Size: 5.0 KiB |
Before Width: 100 | Height: 100 | Size: 10 KiB After Width: 72 | Height: 72 | Size: 3.9 KiB |
Before Width: 375 | Height: 180 | Size: 36 KiB |
Before Width: 375 | Height: 180 | Size: 36 KiB |
Before Width: 16 | Height: 16 | Size: 461 B |
Before Width: 16 | Height: 16 | Size: 567 B |
Before Width: 329 | Height: 47 | Size: 8.8 KiB |
Before Width: 72 | Height: 72 | Size: 3.9 KiB |
@ -1,91 +0,0 @@ |
|||
|
|||
// import addApi from '@/api/add.js'; // 引入
|
|||
|
|||
const add = { |
|||
state: { |
|||
addList: [] |
|||
}, |
|||
mutations: { |
|||
// 更新广告列表
|
|||
upDateAddList(state, list) { |
|||
state.addList = list |
|||
}, |
|||
|
|||
// 更新当前广告点击量
|
|||
upDateViews(state, id) { |
|||
let add = state.addList.find(item=>item.id==id) |
|||
add.clicks ++ |
|||
}, |
|||
|
|||
|
|||
|
|||
|
|||
}, |
|||
actions: { |
|||
// 点击广告
|
|||
async addClick({commit, dispatch}, curAdd) { |
|||
// await dispatch('updateStatistics')
|
|||
curAdd.clicks ++ |
|||
if(!curAdd.adBannerDO.jumpUrl) { |
|||
return false |
|||
} |
|||
|
|||
commit('updateWebVeiwUrl', curAdd.adBannerDO.jumpUrl) |
|||
uni.navigateTo({ |
|||
url:'/pages/commeWebView/addWebView' |
|||
}) |
|||
}, |
|||
// 获取当前广告
|
|||
getCurrentAdd({state},id) { |
|||
console.log(id) |
|||
console.log(state.addList) |
|||
let curAdd = state.addList.find(item=>item.id==id) |
|||
if(curAdd) { |
|||
curAdd.views ++ |
|||
return curAdd |
|||
}else { |
|||
return {} |
|||
} |
|||
}, |
|||
// // 广告
|
|||
// async addPageFn({commit,state, dispatch}) {
|
|||
// await dispatch('updateStatistics')
|
|||
// let obj = {
|
|||
// pageNo: 1,
|
|||
// pageSize: 30,
|
|||
// adClient: 1
|
|||
// }
|
|||
// const [err, res] = await addApi.addPage(obj)
|
|||
// let list = res.data.records.map(item=>{
|
|||
// item.views = 0
|
|||
// item.clicks = 0
|
|||
// return item
|
|||
// })
|
|||
// commit('upDateAddList', list)
|
|||
// console.log('广告列表')
|
|||
// console.log(list)
|
|||
|
|||
// },
|
|||
// 更新广告点击量
|
|||
async updateStatistics({ dispatch,state, commit }) { |
|||
let statistics = state.addList.filter(item=>item.views) |
|||
console.log('调用更新广告接口') |
|||
if(statistics.length) { |
|||
let stcsList = statistics.map(add=>{ |
|||
let obj = { |
|||
"adPositionId": add.id, |
|||
"adId": add.adId, |
|||
"views": add.views, |
|||
"clicks": add.clicks |
|||
} |
|||
return obj |
|||
}) |
|||
const [err, res] = await addApi.batchUpdate(stcsList) |
|||
console.log('更新广告点击量请求结果') |
|||
console.log(res) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
export default add |