Browse Source

签约合同对接

master
unknown 1 year ago
parent
commit
a819b584fe
  1. 17
      config/api.js
  2. 2
      pages.json
  3. 2
      pages/indexEntry/consult/pubComplaint/pubComplaint.vue
  4. 4
      pages/indexEntry/consult/pubConsult/pubConsult.vue
  5. 2
      pages/indexEntry/consult/record/record.vue
  6. 84
      pages/indexEntry/enroll/enroll.vue
  7. 24
      pages/indexEntry/enroll/realName/realName.vue
  8. 2
      pages/indexEntry/enroll/registInfo/comp/comfigPopup.vue
  9. 22
      pages/indexEntry/enroll/registInfo/registInfo.vue
  10. 71
      pages/indexEntry/enroll/signContract/signContract.vue
  11. 2
      pages/indexEntry/publicVideo/videoDetail/videoDetail.vue
  12. 2
      pages/indexEntry/theory/theory.vue
  13. 2
      pages/mineEntry/myCollect/myCollect.vue
  14. 2
      pages/mineEntry/personaInfo/personaInfo.vue
  15. 2
      pages/tabbar/index/index.vue
  16. 4
      pages/tabbar/mine/index.vue
  17. 6
      store/modules/user.js

17
config/api.js

@ -86,6 +86,23 @@ export const applyOnline = (data) => http.post('app/student-record/applyOnline',
export const getpersonface = (params) => http.get('app/student-record/getpersonface', {params})
// 人脸核身结果查询
export const GetDetectInfoEnhanced = (params) => http.get('app/student-record/GetDetectInfoEnhanced', {params})
// 证件类型获取
export const getCardType = (params) => http.get('system/dict/cardType', {params})
// // 获得合同信息
// export const getContract = (params) => http.get('business/contract/get', {params})
// // 创建合同信息
// export const contractCreate = (data) => http.post('business/contract/create', data)
// // 获取驾校的合同
// export const getSchoolContract = (params) => http.get('business/contract/getSchoolContract', {params})
// 获取合同链接
export const getSignContract = (data) => http.post('business/contract/signContract', data)
// 查询学员合同签署状态
export const getContractStatus = (params) => http.get('business/contract/getContractStatus', {params})

2
pages.json

@ -138,7 +138,7 @@
{
"path": "enroll/signContract/signContract",
"style": {
"navigationBarTitleText": "上传头像",
"navigationBarTitleText": "e签宝",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"backgroundTextStyle": "dark"

2
pages/indexEntry/consult/pubComplaint/pubComplaint.vue

@ -83,7 +83,7 @@
<view class="card">
<view class="phone_row">
<view class="label">联系电话</view>
<view class="uInput my">{{ this.vuex_userInfo.mobile }}</view>
<view class="uInput my">{{ this.vuex_userInfo.phone }}</view>
</view>
</view>

4
pages/indexEntry/consult/pubConsult/pubConsult.vue

@ -34,7 +34,7 @@
<view class="card" style="padding-bottom: 0; margin-top: 24rpx;">
<view class="phone_row">
<view class="label">联系电话</view>
<view class="uInput my">{{ this.vuex_userInfo.mobile }}</view>
<view class="uInput my">{{ this.vuex_userInfo.phone }}</view>
</view>
</view>
@ -63,7 +63,7 @@
if(!this.value.trim()) return this.$u.toast('请输入内容')
let obj = {
images,
studentPhone: this.vuex_userInfo.mobile,
studentPhone: this.vuex_userInfo.phone,
type: 1,
studentId: this.$store.state.user.vuex_loginInfo.userId,
content: this.value

2
pages/indexEntry/consult/record/record.vue

@ -60,7 +60,7 @@
},
onLoad(options) {
if(options.tab) this.params.type = options.tab
this.params.studentPhone = this.vuex_userInfo.mobile
this.params.studentPhone = this.vuex_userInfo.phone
this.studentComplainFn()
},
methods: {

84
pages/indexEntry/enroll/enroll.vue

@ -6,15 +6,15 @@
<view class="row">
<view class="lab">证件类型</view>
<view class="rightCon">
<view class="val">
<input v-model="form.typeName" placeholder="请选择" class="input1" @click="showType=true" disabled/></input>
<view class="val" @click="showType=true">
<input v-model="form.typeName" placeholder="请选择" class="input1" style="pointer-events: none;" disabled/></input>
</view>
<view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view>
</view>
</view>
<view class="row" v-if="form.type==2">
<view class="row" v-if="form.value==7">
<view class="lab">国籍</view>
<view class="rightCon">
<view class="val">
@ -25,7 +25,7 @@
</view>
</view>
</view>
<view class="row" v-if="form.type==2||form.type==3">
<view class="row" v-if="form.value!=1">
<view class="lab">证件号码</view>
<view class="rightCon">
<view class="val">
@ -39,58 +39,65 @@
<view class="row">
<view class="lab">实名认证</view>
<view class="rightCon">
<view class="val">待认证</view>
<view class="val" v-if="vuex_userInfo.applyStep>1" style="color: #1989FA;">已认证</view>
<view class="val" v-else>待认证</view>
</view>
</view>
</view>
<view class="btnBg" @click="goNext">下一步</view>
</view>
<u-picker :show="showType" :columns="typeArr" keyName="label" @confirm="confirmType" @cancel="showType=false"></u-picker>
<u-picker :show="showType" :columns="typeArr" keyName="lab" @confirm="confirmType" @cancel="showType=false"></u-picker>
<!-- <web-view :src="link"></web-view> -->
<!-- <iframe :src="link" frameborder="0"></iframe> -->
</view>
</template>
<script>
import { getpersonface, GetDetectInfoEnhanced } from '@/config/api.js'
import { getpersonface, GetDetectInfoEnhanced, getCardType } from '@/config/api.js'
export default {
data() {
return {
form: {
type: 1,
typeName: ''
value: 1,
typeName: '身份证'
},
showType: false,
typeArr: [
[
{lab: '居民身份证',id: 1},
{lab: '外国人永久居留身份证',id: 2},
{lab: '军官证',id: 3},
]
],
link: 'https://www.baidu.com/?tn=62095104_29_oem_dg&ch=6'
typeArr: [],
}
// 0123456
},
onLoad() {
this.getpersonfaceFn()
this.GetDetectInfoEnhancedFn()
// this.GetDetectInfoEnhancedFn()
this.getCardTypeFn()
},
methods: {
//
async getCardTypeFn() {
const {data: res} = await getCardType()
this.typeArr = [res]
await this.$store.dispatch('getUserInfo')
if(this.vuex_userInfo.applyStep>1) {
res.forEach(item=>{
if(item.value==this.vuex_userInfo.cardType ){
this.form.typeName = item.label
}
})
}
console.log(res)
},
confirmType(val) {
let item = val.value[0]
this.form.type = item.id
this.form.typeName = item.lab
console.log(item)
this.form.value = item.value
this.form.typeName = item.label
this.showType = false
},
async getpersonfaceFn() {
const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: 'http://192.168.1.44:8002/h5/#/pages/indexEntry/enroll/realName/realName'})
const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: 'http://192.168.1.44:8001/h5/#/pages/indexEntry/enroll/realName/realName'})
let obj = JSON.parse(res)
this.link = obj.Url
this.$store.commit('updateBizToken', obj.BizToken)
alert(this.$store.state.school.BizToken)
// #ifdef H5
window.open(this.link, '_blank')
// #endif
@ -103,16 +110,37 @@
let obj = {
ruleId: 1,
redirectUrl: 'http://192.168.1.44:8002/h5/#/pages/indexEntry/enroll/registInfo/registInfo',
bizToken: 'A39C2EF8-9FF7-415D-BA4B-51F9457395CE'
bizToken: 'C9C2BC8E-8336-4071-84B3-8170E283E6CA',
userId: this.userId
}
const {data: res} = await GetDetectInfoEnhanced(obj)
let obj2 = JSON.parse(res)
console.log(obj2)
console.log('请求结果来了')
console.log(obj2.Text)
console.log(obj2.Text.ErrMsg=='成功')
// uni.setStorageSync(obj2)
},
goNext() {
if(!this.form.value) return this.$u.toast('请选择证件类型')
//
if(this.vuex_userInfo.applyStep==3) {
return this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
}
//
if(this.vuex_userInfo.applyStep==2) {
return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
}
//
if(this.vuex_userInfo.applyStep==4||this.vuex_userInfo.applyStep==5) {
return this.$goPage('/pages/indexEntry/enroll/payment/payment')
}
if(!this.vuex_userInfo.applyStep||this.vuex_userInfo.applyStep<2) {
// return this.$goPage('/pages/indexEntry/enroll/realName/realName')
this.getpersonfaceFn()
}
// this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
// this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar')
}
}

24
pages/indexEntry/enroll/realName/realName.vue

@ -8,8 +8,6 @@
import { GetDetectInfoEnhanced } from '@/config/api.js'
export default {
onShow() {
// alert(1)
// alert(this.$store.state.school.BizToken)
this.GetDetectInfoEnhancedFn()
},
onPullDownRefresh() {
@ -17,19 +15,27 @@
},
methods: {
async GetDetectInfoEnhancedFn() {
// let BizToken = uni.getStorageSync('BizToken')
// alert(BizToken)
alert(this.$store.state.school.BizToken)
uni.showLoading({
title: '正在检测中...'
})
let obj = {
ruleId: 1,
redirectUrl: 'http://192.168.1.44:8002/h5/#/pages/indexEntry/enroll/registInfo/registInfo',
bizToken: this.$store.state.school.BizToken
redirectUrl: 'http://192.168.1.44:8001/h5/#/pages/indexEntry/enroll/registInfo/registInfo',
bizToken: this.$store.state.school.BizToken,
userId: this.userId
}
const {data: res} = await GetDetectInfoEnhanced(obj)
let obj2 = JSON.parse(res)
await this.$store.dispatch('getUserInfo')
uni.showLoading()
if(obj2.Text.ErrMsg=='成功') {
this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
}
console.log(obj2)
alert('请求结果来了')
alert(obj2.Text.name)
// console.log(obj2)
// alert('')
// alert(obj2.Text.name)
// uni.setStorageSync(obj2)
},
}

2
pages/indexEntry/enroll/registInfo/comp/comfigPopup.vue

@ -27,7 +27,7 @@
</view>
<view class="li">
<view class="lab">合计</view>
<view class="val">{{ $u.utils.priceTo(form.totalAmount) }}</view>
<view class="val">{{ $u.utils.priceTo(info.totalAmount) }}</view>
</view>
<view class="li">
<view class="lab">支付形式</view>

22
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -302,22 +302,24 @@
car: '',
coach: '',
cardType: 1,
idcard: '431027199009012316',
idcard: '',
nationality: '中国',
businessType: '',//
certificateCodeShow: '原驾驶证号xxx',
driveLicence: '',//
firstDriveDate: '',//
sex: 2,
phone: '18267412456',
phone: '',
applyType: 1,
name: '大乔',
name: '',
oldTrainType: '',//
subjectPass: '',
subjectTreat: '',
photoPath: '123.png',
address: '湖南省,郴州市',
totalAmount: 0
address: '',
totalAmount: 0,
radiovalue2: 2, //
businessType: 0,
},
showSchool: false,
@ -330,9 +332,12 @@
}
},
onLoad() {
this.GetDetectInfoEnhancedFn()
this.form.accountId = this.userId
// this.GetDetectInfoEnhancedFn()
this.form.accountId = this.vuex_userInfo.accountId
this.form.address = this.vuex_userInfo.address
this.form.userId = this.userId
this.form.name = this.vuex_userInfo.name
this.form.idcard = this.vuex_userInfo.idcard
uni.$on('upDateCoachItem',(item)=>{
console.log(item)
this.form.coach = item.name
@ -552,8 +557,9 @@
console.log(val)
this.showPopup = false
const {data: res} = await applyOnline(this.form)
await this.$store.dispatch('getUserInfo')
if(val) {
this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
this.$goPage('/pages/indexEntry/enroll/signContract/signContract?schoolId='+this.form.schoolId)
}
}
}

71
pages/indexEntry/enroll/signContract/signContract.vue

@ -1,16 +1,80 @@
<template>
<view class="pageBgImg">
<topNavbar title="签署合同"></topNavbar>
<view class="pad">
<!-- <view class="pad">
<view class="card">
<view class="h2">教学合同</view>
</view>
<view class="btnBg" @click="$goPage('/pages/indexEntry/enroll/payment/payment')">同意并签字确认</view>
</view>
</view> -->
<web-view :src="url"></web-view>
</view>
</template>
<script>
import {
getContractStatus,
getSignContract
} from '@/config/api.js'
export default {
data() {
return {
url: '',
schoolId: ''
}
},
beforeDestroy() {
clearInterval(this.timer)
this.timer = null
},
onHide() {
clearInterval(this.timer)
this.timer = null
},
onLoad(options) {
this.schoolId = options.schoolId?options.schoolId:this.vuex_userInfo.schoolId
this.timer = setInterval(() => {
this.getContractStatusFn()
}, 3000)
this.getSignContractFn()
},
methods: {
async getSignContractFn() {
uni.showLoading({
title: '正在加载合同...'
})
let info = this.vuex_userInfo
const {
data: res
} = await getSignContract({
schoolId: this.schoolId,
studentId: this.vuex_userInfo.id
})
uni.hideLoading()
this.url = res.url
},
//
async getContractStatusFn() {
const {
data: res
} = await getContractStatus({
studentId: this.vuex_userInfo.id
})
if (res.flowStatus == 2) {
clearInterval(this.timer)
this.timer = null
uni.navigateTo({
url: '/pages/indexEntry/enroll/registInfo/registInfo'
})
if (res.flowStatus > 2) {
clearInterval(this.timer)
this.timer = null
this.$u.toast('合同已撤销或过期')
}
}
}
}
}
</script>
<style lang="scss" scoped>
@ -20,8 +84,9 @@
text-align: center;
padding: 40rpx 0;
}
}
.btnBg {
width: 396rpx !important;
margin: 100rpx auto 100rpx auto;

2
pages/indexEntry/publicVideo/videoDetail/videoDetail.vue

@ -95,7 +95,7 @@
async likeFn() {
if(this.operateInfo.upvote) {
this.operateInfo.upvote = 0
await deleteUpvote({upvoteId: this.operateInfo.upvoteId,mobile: this.vuex_userInfo.mobile})
await deleteUpvote({upvoteId: this.operateInfo.upvoteId,mobile: this.vuex_userInfo.phone})
}else {
this.operateInfo.upvote = 1
await createUpvote(this.params)

2
pages/indexEntry/theory/theory.vue

@ -37,7 +37,7 @@
if(this.currentId==1) {
// let url = 'https://www.hzsjspx.com/theory/scienceStudy?token=amlhcGVpMTY5NTc3NzUzODg5ODA5NjU1&lat=30.343055&lng=120.183711&isUni=1'
let questionUrl = 'http://192.168.1.44:92/question/'
let phone = this.vuex_userInfo.mobile
let phone = this.vuex_userInfo.phone
let obj = {
phone,
cityCode: '3311',

2
pages/mineEntry/myCollect/myCollect.vue

@ -37,7 +37,7 @@
}
},
onLoad() {
this.params.phone = this.vuex_userInfo.mobile
this.params.phone = this.vuex_userInfo.phone
this.getcollectVideoFn()
},
onPullDownRefresh() {

2
pages/mineEntry/personaInfo/personaInfo.vue

@ -5,7 +5,7 @@
<view class="card">
<view class="row">
<view class="lab">手机号</view>
<view class="val">{{ vuex_userInfo.mobile }}</view>
<view class="val">{{ vuex_userInfo.phone }}</view>
</view>
</view>

2
pages/tabbar/index/index.vue

@ -283,7 +283,7 @@
if(!this.$store.state.user.vuex_cityInfo.lat) {
await this.$store.dispatch('getCity')
}
this.$store.dispatch('getUserInfo')
// console.log(this.$store.state.user.vuex_cityInfo)
},

4
pages/tabbar/mine/index.vue

@ -3,7 +3,7 @@
<!-- 学员名字 -->
<view class="top_row flex-b" @click="topClick">
<view class="flex">
<view class="userName">Hi{{ vuex_userInfo.nickname?vuex_userInfo.nickname:vuex_userInfo.mobile?vuex_userInfo.mobile:'请登录'}}</view>
<view class="userName">Hi{{ vuex_userInfo.name?vuex_userInfo.name:vuex_userInfo.phone?vuex_userInfo.phone:'请登录'}}</view>
<view class="arrowIcon">
<image src="../../../static/images/userCenter/ic_gengduo.png" mode=""></image>
</view>
@ -136,7 +136,7 @@
},
methods: {
topClick() {
if(!this.vuex_userInfo.mobile) {
if(!this.vuex_userInfo.phone) {
this.$goPage('/pages/userCenter/login/login')
}else {
this.$goPage('/pages/mineEntry/personaInfo/personaInfo')

6
store/modules/user.js

@ -19,7 +19,7 @@ const user = {
uni.setStorageSync('vuex_loginInfo', payload);
},
update_vuex_userInfo(state, payload) {
state.vuex_userInfo = payload
state.vuex_userInfo = payload || {}
uni.setStorageSync('vuex_userInfo', payload);
},
update_apiOk(state, payload) {
@ -69,10 +69,10 @@ const user = {
})
},
// 获取用户信息
async getUserInfo({commit}) {
async getUserInfo({state, commit}) {
const http = uni.$u.http
let config = { custom: { auth: false }, header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'} }
const res = await http.get('member/user/get',config)
const res = await http.get('app/student-record/get?id='+state.vuex_loginInfo.userId,config)
commit('update_vuex_userInfo',res.data)
},
// 刷新token

Loading…
Cancel
Save