Browse Source

增加注册功能

master
unknown 3 months ago
parent
commit
a57cbcdaae
  1. 38
      androidPrivacy.json
  2. 18
      components/user-info/user-info.vue
  3. 9
      config/request.js
  4. 2
      config/site.config.js
  5. 17
      manifest.json
  6. 1
      package.json
  7. 4
      pages/login/login.vue
  8. 1
      pages/recordEntry/operate/mySchedule/comp/mySchedulePopup.vue
  9. 24
      pages/userCenter/personaInfo/personaInfo.vue
  10. 2
      pages/userCenter/refund/refund.vue
  11. 9
      pages/userCenter/scanCode/scanCodeSchool.vue
  12. 6
      pages/userCenter/teachingData/teachingData.vue

38
androidPrivacy.json

@ -0,0 +1,38 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "  请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"http://www.lyjppt.com/htmls/yhxy.html\">《服务协议》</a>和<a href=\"http://www.lyjppt.com/htmls/yszc.html\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"hrefLoader" : "system",
"backToExit" : "true",
"second" : {
"title" : "确认提示",
"message" : "  进入应用前,你需先同意<a href=\"http://www.lyjppt.com/htmls/yhxy.html\">《服务协议》</a>和<a href=\"http://www.lyjppt.com/htmls/yszcJiaxiao.html\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
"disagreeMode" : {
"support" : false,
"loadNativePlugins" : false,
"visitorEntry" : false,
"showAlways" : false
},
"styles" : {
"backgroundColor" : "#fff",
"borderRadius" : "5px",
"title" : {
"color" : "#333"
},
"buttonAccept" : {
"color" : "#333"
},
"buttonRefuse" : {
"color" : "#cccccc"
},
"buttonVisitor" : {
"color" : "#333"
}
}
}

18
components/user-info/user-info.vue

@ -4,7 +4,7 @@
<!-- <image src="@/static/images/coach/avatar.png" mode=""></image> -->
<image :src="vuex_userInfo.photoPath" mode="" v-if="vuex_userInfo.photoPath"></image>
</view>
<view class="info" @click="$goPage('/pages/userCenter/personaInfo/personaInfo')">
<view class="info" @click="$goPage('/pages/userCenter/personaInfo/personaInfo')" :class="{Fwidth: Fwidth}">
<view class="name_row">
<view class="name oneRowText">{{ vuex_userInfo.name}}</view>
<view class="icon">
@ -19,12 +19,20 @@
<!-- <view class="tag" v-if="identity=='校长'">驾校校长</view>
<view class="tag" v-else>合作教练</view> -->
</view>
<view class="tag" >{{identity}}</view>
<view class="tag">{{identity}}</view>
</view>
</view>
</template>
<script>
export default {
props: {
Fwidth: {
type: Boolean,
default: false
}
}
}
</script>
<style lang="scss" scoped>
@ -44,6 +52,10 @@
.info {
padding-left: 20rpx;
&.Fwidth {
flex: 1;
}
.name_row {
display: flex;
align-items: center;
@ -66,6 +78,7 @@
display: flex;
align-items: center;
padding: 16rpx 0;
.icon {
width: 28rpx;
height: 28rpx;
@ -78,6 +91,7 @@
flex: 1;
}
}
.tag {
height: 44rpx;
padding: 0 20rpx;

9
config/request.js

@ -3,7 +3,8 @@ import { H5_API, WX_API,httpPrefix } from './site.config.js'
const ContentType = ['application/json;charset=utf-8', 'application/x-www-form-urlencoded','multipart/form-data', 'application/x-www-form-urlencoded; charset=UTF-8'];
import md5 from 'js-md5'
let secretKey = '22d90e09d1374f0f9e4accd07d333e55'
// 此vm参数为页面的实例,可以通过它引用vuex中的变量
module.exports = (vm) => {
@ -30,6 +31,12 @@ module.exports = (vm) => {
}
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
config.data = config.data || {}
config.data['timestamp'] = Date.now()
let jsonString = JSON.stringify(config.data)
let strSecretKey = jsonString + secretKey
let hash = md5(strSecretKey)
config.header['Signature'] = hash
config.data = jsonString
// 根据custom参数中配置的是否需要token,添加对应的请求头
let token = vm.$store.state.user.vuex_loginInfo.accessToken
if(token) {

2
config/site.config.js

@ -3,7 +3,7 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
// WX_API: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.37:8318/',//非代理地址
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://123.6.232.54:8099/',//非代理地址
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://www.lyjppt.com/',//非代理地址
// TEMP_HOST: VUE_APP_PLATFORM === 'h5' ? '' : 'http://192.168.1.39:48082/',
httpPrefix: 'app-api/',
imgUrl: 'http://jxtemp.oss-cn-hangzhou.aliyuncs.com/defaultImages/admin/bigImg/'

17
manifest.json

@ -1,9 +1,9 @@
{
"name" : "洛阳驾校",
"name" : "洛阳驾校",
"appid" : "__UNI__BD23957",
"description" : "",
"versionName" : "1.0.4",
"versionCode" : 104,
"versionName" : "1.0.8",
"versionCode" : 108,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -38,7 +38,9 @@
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a" ],
"targetSdkVersion" : 30
},
/* ios */
"ios" : {
@ -79,6 +81,9 @@
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"useOriginalMsgbox" : true
}
}
},
@ -118,8 +123,8 @@
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "http://192.168.1.40:8318/",
// "target" : "http://123.6.232.1:8099",
"target" : "http://123.6.232.1:8099/",
// "target" : "http://www.lyjppt.com/",
"changeOrigin" : true,
"secure" : true,
"pathRewrite" : {

1
package.json

@ -10,6 +10,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"js-md5": "^0.8.3",
"uqrcodejs": "^4.0.7",
"uview-ui": "^2.0.36"
}

4
pages/login/login.vue

@ -18,13 +18,13 @@
</view>
<view class="inputBox my">
<!-- <u--input placeholder="请输入手机号" border="none" clearable type="number" maxlength="11" v-model="FormData.phone"></u--input> -->
<input v-model="FormData.phone" placeholder="请输入手机号" type="number" maxlength="11" >
<input v-model.trim="FormData.phone" placeholder="请输入手机号" type="number" maxlength="11" >
</view>
</view>
<view class="form-item">
<view class="inputBox my">
<!-- <u--input placeholder="请输入验证码" border="none" clearable style="height: 100%;" :clearable="false" v-model="FormData.code"></u--input> -->
<input type="text" placeholder="请输入验证码" v-model="FormData.code">
<input type="text" placeholder="请输入验证码" v-model.trim="FormData.code">
</view>
<view class="code" @click='goSms' :class="{active: isPhone&&!codeOn}">{{codeText}}</view>
</view>

1
pages/recordEntry/operate/mySchedule/comp/mySchedulePopup.vue

@ -82,6 +82,7 @@
methods: {
confirmPopup(val) {
if(val==1&&!this.form.siteName) return this.$u.toast('请选择场地')
if(val==1&&!this.form.carNumber) return this.$u.toast('请选择教练车')
this.$emit('confirmClass', val, this.form)
},
//

24
pages/userCenter/personaInfo/personaInfo.vue

@ -43,7 +43,7 @@
<view class="btnBox">
<view class="logout" @click="loginOut">退出登录</view>
<!-- <view class="logout" @click="$goPage('/pages/userCenter/forgetPwd/forgetPwd')">修改密码</view> -->
<view class="logout cancel" @click="cancellationFn"> </view>
</view>
@ -78,7 +78,23 @@
}
},
loginOut() {
this.$store.commit('goLogin')
let _this = this
uni.showModal({
content:'确定要退出登录吗?',
success(val) {
if(val.confirm) {
_this.$store.commit('goLogin')
}
}
})
},
cancellationFn() {
uni.showModal({
content:'您的账号注销后将无法再登录该APP,并且账号注销后,各项信息将被清空且无法恢复,请谨慎使用此功能。如您还需要注销账号,请联系您所在驾校的管理后台的管理员,为您操作注销',
success() {
console.log('哈哈哈')
}
})
},
async goPage(type) {
this.$goPage('/pages/login/privacyAgreement/privacyAgreement?type='+ type)
@ -127,5 +143,9 @@
color: #ADADAD;
text-align: center;
line-height: 100rpx;
margin-top: 30rpx;
&.cancel {
background: none;
}
}
</style>

2
pages/userCenter/refund/refund.vue

@ -1,7 +1,7 @@
<template>
<view class="pageBg">
<view class="bgImg">
<view class="status_bar"></view>
<!-- <view class="status_bar"></view> -->
<topNavbar title="学员退款"></topNavbar>
<view class="pad">
<view class="navBox">

9
pages/userCenter/scanCode/scanCodeSchool.vue

@ -14,7 +14,7 @@
</view>
</view>
<view class="card">
<user-info/>
<user-info :Fwidth="true"/>
</view>
</view>
</view>
@ -63,7 +63,7 @@
}
</script>
<style lang="scss" scoped>
<style lang="scss" >
.qcode {
width: 100%;
display: flex;
@ -90,5 +90,8 @@
margin-left: 6rpx;
}
}
:deep .info {
// width: 80% !important;
flex: 1 !important;
}
</style>

6
pages/userCenter/teachingData/teachingData.vue

@ -35,11 +35,11 @@
</view>
<view class="li">
<view class="lab">科目二平均通过时间</view>
<view class="val">{{info.finishSubjectTowTime ||'暂无'}}</view>
<view class="val">{{info.finishSubjectTowTime ||'0'}}</view>
</view>
<view class="li">
<view class="lab">科目三平均通过时间</view>
<view class="val">{{info.finishSubjectThreeTime || '暂无'}}</view>
<view class="val">{{info.finishSubjectThreeTime || '0'}}</view>
</view>
<view class="li" v-if="info.finishSubjectFourTime">
<view class="lab">科目四平均通过时间</view>
@ -48,7 +48,7 @@
</view>
<view class="title">
<view class="txt">平均拿证时间</view>
<view class="num">{{info.averageFinishTime || '暂无'}}</view>
<view class="num">{{info.averageFinishTime || '0'}}</view>
</view>
<!-- <view class="btnBorder" @click="shareClick">立即分享</view>
<canvas canvas-id="canvas" style="width: 300px; height: 300px;opacity: 0;" class="canvas">3333</canvas>

Loading…
Cancel
Save