unknown 9 months ago
parent
commit
b92f2da6f4
  1. 6
      config/api.js
  2. 5
      pages.json
  3. 8
      pages/indexEntry/enroll/enroll.vue
  4. 79
      pages/indexEntry/enroll/realName/realName.vue
  5. 30
      pages/indexEntry/enroll/realName/webView.vue
  6. 26
      pages/indexEntry/enroll/registInfo/registInfo.vue
  7. 10
      pages/indexEntry/enroll/signContract/signContract.vue
  8. 40
      pages/mineEntry/myOrder/comp/download.js
  9. 20
      pages/mineEntry/myOrder/detail/detail.vue
  10. 45
      pages/mineEntry/myOrder/voucher/voucher.vue
  11. 10
      pages/mineEntry/personaInfo/personaInfo.vue
  12. 51
      pages/mineEntry/refund/comp/myform.vue

6
config/api.js

@ -156,6 +156,12 @@ export const getdictDataList = (params) => http.get('app/refund/getdictDataList'
export const getApplyStep = (params) => http.get('app/student-record/getApplyStep', {params}) export const getApplyStep = (params) => http.get('app/student-record/getApplyStep', {params})
// 查询缴费凭证 // 查询缴费凭证
export const getStudentVoucher = (params) => http.get('app/apply-order/getStudentVoucher.do', {params}) export const getStudentVoucher = (params) => http.get('app/apply-order/getStudentVoucher.do', {params})
// 扫卡识别银行卡号
export const scanningBanks = (params) => http.get('app/apply-order/scanningBanks.do', {params})
// 删除账号
export const deleteTest = (params) => http.get('app/student-record/deleteTest', {params})

5
pages.json

@ -84,7 +84,7 @@
{ {
"path": "enroll/realName/realName", "path": "enroll/realName/realName",
"style": { "style": {
"navigationBarTitleText": "实名认证",
"navigationBarTitleText": "实名认证realName",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"backgroundTextStyle": "dark" "backgroundTextStyle": "dark"
@ -93,7 +93,7 @@
{ {
"path": "enroll/realName/webView", "path": "enroll/realName/webView",
"style": { "style": {
"navigationBarTitleText": "实名认证",
"navigationBarTitleText": "实名认证webView",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"backgroundTextStyle": "dark" "backgroundTextStyle": "dark"
@ -131,6 +131,7 @@
"path": "enroll/registInfo/chooseCoach/chooseCoach", "path": "enroll/registInfo/chooseCoach/chooseCoach",
"style": { "style": {
"navigationBarTitleText": "选择教练", "navigationBarTitleText": "选择教练",
// "navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"backgroundTextStyle": "dark" "backgroundTextStyle": "dark"
} }

8
pages/indexEntry/enroll/enroll.vue

@ -138,13 +138,11 @@
this.showType = false this.showType = false
}, },
async getpersonfaceFn() { async getpersonfaceFn() {
const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: website + '/pages/indexEntry/enroll/realName/realName?userId='+this.userId+'&test=123' ,userId: this.userId})
const {data: res} = await getpersonface({ ruleId: 2, RedirectUrl: website + '/pages/indexEntry/enroll/realName/realName?userId='+this.userId+'&test=123' ,userId: this.userId})
let obj = JSON.parse(res) let obj = JSON.parse(res)
this.link = obj.Url this.link = obj.Url
this.$store.commit('updateBizToken', obj.BizToken) this.$store.commit('updateBizToken', obj.BizToken)
console.log('来这里了吗?')
// #ifdef H5 // #ifdef H5
console.log('来这里了吗2?')
window.open(this.link, '_blank') window.open(this.link, '_blank')
// #endif // #endif
@ -152,8 +150,6 @@
// alert(obj.BizToken) // alert(obj.BizToken)
// this.GetDetectInfoEnhancedFn(obj.BizToken) // this.GetDetectInfoEnhancedFn(obj.BizToken)
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
console.log('来这里了吗3?')
console.log(website+'website地址')
this.$store.commit('updateWebVeiwUrl', this.link) this.$store.commit('updateWebVeiwUrl', this.link)
uni.navigateTo({ uni.navigateTo({
@ -165,7 +161,7 @@
}, },
async GetDetectInfoEnhancedFn(bizToken) { async GetDetectInfoEnhancedFn(bizToken) {
let obj = { let obj = {
ruleId: 1,
ruleId: 2,
redirectUrl: website + '/pages/indexEntry/enroll/registInfo/registInfo', redirectUrl: website + '/pages/indexEntry/enroll/registInfo/registInfo',
bizToken: 'C9C2BC8E-8336-4071-84B3-8170E283E6CA', bizToken: 'C9C2BC8E-8336-4071-84B3-8170E283E6CA',
userId: this.userId userId: this.userId

79
pages/indexEntry/enroll/realName/realName.vue

@ -1,12 +1,19 @@
<template> <template>
<view class="pageBgImg"> <view class="pageBgImg">
<!-- #ifdef H5 -->
<topNavbar title="实名认证"></topNavbar> <topNavbar title="实名认证"></topNavbar>
<!-- #endif -->
</view> </view>
</template> </template>
<script> <script>
import { GetDetectInfoEnhanced, getbiztoken } from '@/config/api.js'
import { website } from '@/config/site.config.js'
import {
GetDetectInfoEnhanced,
getbiztoken
} from '@/config/api.js'
import {
website
} from '@/config/site.config.js'
export default { export default {
data() { data() {
return { return {
@ -14,13 +21,14 @@
} }
}, },
onLoad(options) { onLoad(options) {
const routeInfo = this.$route;
console.log('当前页面路由信息:', routeInfo);
const fullPath = '/' + routeInfo.path + '?' + Object.keys(routeInfo.query).map(key => key + '=' + routeInfo.query[key]).join('&');
console.log('当前页面全路径:', fullPath);
if(options.userId) {
// const routeInfo = this.$route;
// console.log('', routeInfo);
// const fullPath = '/' + routeInfo.path + '?' + Object.keys(routeInfo.query).map(key => key + '=' + routeInfo
// .query[key]).join('&');
// console.log('', fullPath);
if (options.userId) {
this.userId = options.userId this.userId = options.userId
this.GetDetectInfoEnhancedFn() this.GetDetectInfoEnhancedFn()
} }
@ -30,42 +38,43 @@
}, },
methods: { methods: {
async GetDetectInfoEnhancedFn() { async GetDetectInfoEnhancedFn() {
const data = await getbiztoken({ userId: this.userId})
const data = await getbiztoken({
userId: this.userId
})
// alert(this.$store.state.school.BizToken) // alert(this.$store.state.school.BizToken)
uni.showLoading({ uni.showLoading({
title: '正在检测中...' title: '正在检测中...'
}) })
let redirectUrl = website + '/pages/indexEntry/enroll/registInfo/registInfo'
if(this.$store.state.user.NonPlatformStudent) {
redirectUrl = website + '/pages/indexEntry/NonPlatformStudent/NonPlatformStudent'
}
let redirectUrl = ''
// // #ifdef H5
// let redirectUrl = website + '/pages/indexEntry/enroll/registInfo/registInfo'
// if (this.$store.state.user.NonPlatformStudent) {
// redirectUrl = website + '/pages/indexEntry/NonPlatformStudent/NonPlatformStudent'
// }
// // #endif
let obj = { let obj = {
ruleId: 1,
redirectUrl,
ruleId: 2,
redirectUrl: '',
bizToken: data.data, bizToken: data.data,
userId: this.userId userId: this.userId
} }
const res = await GetDetectInfoEnhanced(obj) const res = await GetDetectInfoEnhanced(obj)
// alert(res.msg)
// if(!res.msg) return false
let obj2 = JSON.parse(res.data)
await this.$store.dispatch('getUserInfo')
uni.hideLoading()
if (process.env.VUE_APP_PLATFORM === 'h5') {
window.close(); //
} else {
//
console.log('当前不是 H5 环境,无法关闭页面');
}
if(obj2.Text.ErrMsg=='成功') {
this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
}
// // #ifdef H5
// let obj2 = JSON.parse(res.data)
// console.log(obj2) // console.log(obj2)
// alert('')
// alert(obj2.Text.ErrMsg)
// alert(obj2.Text.name)
// uni.setStorageSync(obj2)
// await this.$store.dispatch('getUserInfo')
// if (obj2.Text.ErrMsg == '') {
// this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
// }
// // #endif
// #ifdef MP-WEIXIN
window.close()
// #endif
}, },
} }
} }

30
pages/indexEntry/enroll/realName/webView.vue

@ -26,6 +26,7 @@
}, },
onLoad() { onLoad() {
this.link = this.$store.state.webViewUrl this.link = this.$store.state.webViewUrl
console.log('噜噜哇'+ this.$store.state.webViewUrl)
// http://192.168.1.44:92/question/?uniItem=%7B%22phone%22%3A%2218267103167%22%2C%22cityCode%22%3A%223311%22%2C%22isUni%22%3A1%7D // http://192.168.1.44:92/question/?uniItem=%7B%22phone%22%3A%2218267103167%22%2C%22cityCode%22%3A%223311%22%2C%22isUni%22%3A1%7D
// uni.hideNavigationBarLoading() // uni.hideNavigationBarLoading()
}, },
@ -38,21 +39,24 @@
this.timer = null this.timer = null
}, },
onShow() { onShow() {
this.timer = setInterval(async () => {
const res = await this.getApplyStepFn()
console.log(res)
if(res==2) {
clearInterval(this.timer)
this.timer = null
let redirectUrl = '/pages/indexEntry/enroll/registInfo/registInfo'
if(this.$store.state.user.NonPlatformStudent) {
redirectUrl = '/pages/indexEntry/NonPlatformStudent/NonPlatformStudent'
}
this.$goPage(redirectUrl)
}
}, 2000)
this.pollingFn()
}, },
methods: { methods: {
async pollingFn() {
this.timer = setInterval(async () => {
const res = await this.getApplyStepFn()
console.log(res)
if(res==2) {
clearInterval(this.timer)
this.timer = null
let redirectUrl = '/pages/indexEntry/enroll/registInfo/registInfo'
if(this.$store.state.user.NonPlatformStudent) {
redirectUrl = '/pages/indexEntry/NonPlatformStudent/NonPlatformStudent'
}
this.$goPage(redirectUrl)
}
}, 2000)
},
getApplyStepFn() { getApplyStepFn() {
let _this = this let _this = this
if(this.ok) return this.getApplyStepApi if(this.ok) return this.getApplyStepApi

26
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -332,15 +332,8 @@
} }
}, },
onLoad() { onLoad() {
// this.GetDetectInfoEnhancedFn()
this.form.userId = this.userId
this.form.accountId = this.vuex_userInfo.accountId
this.form.address = this.vuex_userInfo.address
this.form.name = this.vuex_userInfo.name
this.form.idcard = this.vuex_userInfo.idcard
this.form.phone = this.vuex_userInfo.phone
this.form.nationality = this.vuex_userInfo.nationality || '中国'
this.form.cardType = this.vuex_userInfo.cardType || '1'
this.initUserInfo()
uni.$on('upDateCoachItem',(item)=>{ uni.$on('upDateCoachItem',(item)=>{
console.log(item) console.log(item)
this.form.coach = item.name this.form.coach = item.name
@ -368,8 +361,21 @@
this.schoolClassFn() this.schoolClassFn()
} }
}, },
onPullDownRefresh() {
this.initUserInfo()
},
methods: { methods: {
async initUserInfo() {
await this.$store.dispatch('getUserInfo')
this.form.userId = this.userId
this.form.accountId = this.vuex_userInfo.accountId
this.form.address = this.vuex_userInfo.address
this.form.name = this.vuex_userInfo.name
this.form.idcard = this.vuex_userInfo.idcard
this.form.phone = this.vuex_userInfo.phone
this.form.nationality = this.vuex_userInfo.nationality || '中国'
this.form.cardType = this.vuex_userInfo.cardType || '1'
},
async schoolClassFn() { async schoolClassFn() {
const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId}) const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId})
this.columnsClassModel = [res.list] this.columnsClassModel = [res.list]

10
pages/indexEntry/enroll/signContract/signContract.vue

@ -7,7 +7,7 @@
</view> </view>
<view class="btnBg" @click="$goPage('/pages/indexEntry/enroll/payment/payment')">同意并签字确认</view> <view class="btnBg" @click="$goPage('/pages/indexEntry/enroll/payment/payment')">同意并签字确认</view>
</view> --> </view> -->
<web-view :src="url"></web-view>
<web-view :src="webViewUrl"></web-view>
</view> </view>
</template> </template>
@ -19,7 +19,7 @@
export default { export default {
data() { data() {
return { return {
url: '',
webViewUrl: '',
schoolId: '' schoolId: ''
} }
}, },
@ -28,8 +28,7 @@
this.timer = null this.timer = null
}, },
onHide() { onHide() {
clearInterval(this.timer)
this.timer = null
}, },
onLoad(options) { onLoad(options) {
this.schoolId = options.schoolId?options.schoolId:this.vuex_userInfo.schoolId this.schoolId = options.schoolId?options.schoolId:this.vuex_userInfo.schoolId
@ -51,7 +50,7 @@
studentId: this.studentId studentId: this.studentId
}) })
uni.hideLoading() uni.hideLoading()
this.url = res.url
this.webViewUrl = res.url
}, },
// //
async getContractStatusFn() { async getContractStatusFn() {
@ -63,7 +62,6 @@
if (res.flowStatus == 2) { if (res.flowStatus == 2) {
clearInterval(this.timer) clearInterval(this.timer)
this.timer = null this.timer = null
alert('签约成功')
uni.navigateTo({ uni.navigateTo({
url: '/pages/indexEntry/enroll/payment/payment' url: '/pages/indexEntry/enroll/payment/payment'
}) })

40
pages/mineEntry/myOrder/comp/download.js

@ -0,0 +1,40 @@
export let downloadImg = function (imageUrl) {
uni.downloadFile({
url: imageUrl,
success(res) {
if (res.statusCode === 200) {
// 下载成功后,获取临时文件路径
const tempFilePath = res.tempFilePath;
// 保存图片到本地相册
uni.saveImageToPhotosAlbum({
filePath: tempFilePath,
success() {
uni.showToast({
title: '图片保存成功',
icon: 'success',
duration: 2000
});
},
fail(err) {
console.error('保存图片失败', err);
uni.showToast({
title: '图片保存失败',
icon: 'none',
duration: 2000
});
}
});
}
},
fail(err) {
console.error('下载图片失败', err);
uni.showToast({
title: '图片下载失败',
icon: 'none',
duration: 2000
});
}
});
}

20
pages/mineEntry/myOrder/detail/detail.vue

@ -101,7 +101,7 @@
<view class="refundBtn" @click="goFund" v-if="!info.refundId">申请退款</view> <view class="refundBtn" @click="goFund" v-if="!info.refundId">申请退款</view>
</view> </view>
<view class="rightBtn"> <view class="rightBtn">
<view class="btnBorder">下载发票</view>
<view class="btnBorder" @click="downloadImage">下载发票</view>
<view class="btnBorder" @click="goVoucher">培训缴费电子凭证</view> <view class="btnBorder" @click="goVoucher">培训缴费电子凭证</view>
</view> </view>
</view> </view>
@ -115,9 +115,11 @@
<script> <script>
import refundInfo from './comp/refundInfo.vue' import refundInfo from './comp/refundInfo.vue'
import { downloadImg } from '../comp/download.js'
import { import {
applyOrderGet, applyOrderGet,
selectRefundDetail
selectRefundDetail,
getStudentVoucher
} from '@/config/api.js' } from '@/config/api.js'
export default { export default {
components: { components: {
@ -192,7 +194,16 @@
goFund() { goFund() {
this.$goPage('/pages/mineEntry/refund/refund?orderId=' + this.orderId) this.$goPage('/pages/mineEntry/refund/refund?orderId=' + this.orderId)
}, },
async downloadImage() {
let obj = {
studentId: this.studentId,
type: 1
}
const {data: imageUrl} = await getStudentVoucher(obj)
//
downloadImg(imageUrl)
}
} }
} }
</script> </script>
@ -202,6 +213,8 @@
.btn_row { .btn_row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
margin: 24rpx 0 0 0;
.rightBtn { .rightBtn {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
@ -233,7 +246,6 @@
border-radius: 8rpx; border-radius: 8rpx;
border: 2rpx solid #E8E9EC; border: 2rpx solid #E8E9EC;
line-height: 72rpx; line-height: 72rpx;
margin: 24rpx 0 0 0;
font-size: 28rpx; font-size: 28rpx;
color: #ADADAD; color: #ADADAD;
text-align: center; text-align: center;

45
pages/mineEntry/myOrder/voucher/voucher.vue

@ -1,15 +1,23 @@
<template> <template>
<view class="main">
666
<view class="pageBgImg">
<topNavbar title="培训缴费电子凭证"></topNavbar>
<view class="imgBox" style="width: 100%;">
<image :src="imgLink" mode="widthFix"></image>
</view>
<view class="btnBox">
<view class="btnBg" @click="downloadImgClick">保存到手机</view>
</view>
</view> </view>
</template> </template>
<script> <script>
import { getStudentVoucher } from '@/config/api.js' import { getStudentVoucher } from '@/config/api.js'
import { downloadImg } from '../comp/download.js'
export default { export default {
data() { data() {
return { return {
orderId: ''
orderId: '',
imgLink: ''
} }
}, },
onLoad(options) { onLoad(options) {
@ -24,12 +32,39 @@
studentId: this.studentId, studentId: this.studentId,
type: 1 type: 1
} }
const res = await getStudentVoucher(obj)
const {data: res} = await getStudentVoucher(obj)
this.imgLink = res
console.log(res) console.log(res)
},
downloadImgClick() {
downloadImg(this.imgLink)
} }
} }
} }
</script> </script>
<style>
<style lang="scss" scoped>
.imgBox {
// transform: translateY(200px);
transform: translateX(50px);
transform: rotate(90deg);
width: 100%;
image {
margin-top: 500rpx;
transform: scale(2);
}
}
.btnBox {
display: flex;
justify-content: center;
position: fixed;
bottom: 0;
left: 0;
background-color: #fff;
padding: 30rpx 0;
width: 100%;
.btnBg {
padding: 0 30rpx;
}
}
</style> </style>

10
pages/mineEntry/personaInfo/personaInfo.vue

@ -43,13 +43,16 @@
</view> </view>
<view class="logout" @click="logOutFn">退出登录</view> <view class="logout" @click="logOutFn">退出登录</view>
<view class="logout" @click="deleteTestClick" style="margin-top: 40rpx;">删除测试账号开发用的</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { logOut } from '@/config/api.js'
import { logOut,deleteTest } from '@/config/api.js'
export default { export default {
methods: { methods: {
logOutFn() { logOutFn() {
@ -70,6 +73,11 @@
} }
}); });
},
async deleteTestClick() {
const res = await deleteTest({phone: this.vuex_userInfo.phone})
this.$store.commit('goLogin')
console.log(res)
} }
} }
} }

51
pages/mineEntry/refund/comp/myform.vue

@ -49,7 +49,7 @@
<view class="inputBox"> <view class="inputBox">
<u--input placeholder="请输入" border="none" clearable v-model="FormData.idCard"></u--input> <u--input placeholder="请输入" border="none" clearable v-model="FormData.idCard"></u--input>
</view> </view>
<view class="scan">
<view class="scan" @click="scanningBanksClick">
<image src="@/static/images/userCenter/btn_yinhangkax.png" mode=""></image> <image src="@/static/images/userCenter/btn_yinhangkax.png" mode=""></image>
</view> </view>
</view> </view>
@ -68,7 +68,10 @@
</template> </template>
<script> <script>
import { getdictDataList, applyOnlineFund, getLoginCode } from '@/config/api.js'
import { getdictDataList, applyOnlineFund, getLoginCode, scanningBanks } from '@/config/api.js'
import { H5_API, WX_API,httpPrefix } from '@/config/site.config.js';
import { chooseImages } from '@/config/utils.js'
const _url = H5_API + WX_API + httpPrefix + 'app/apply-order/scanningBanks.do';
export default { export default {
props: ['info', 'orderId'], props: ['info', 'orderId'],
data() { data() {
@ -102,6 +105,8 @@
}, },
created() { created() {
this.getdictDataListFn() this.getdictDataListFn()
console.log('_url')
console.log(_url)
}, },
methods: { methods: {
// 退 // 退
@ -202,6 +207,48 @@
_this.codeOn = false; _this.codeOn = false;
}) })
}, },
async scanningBanksClick() {
// let filePath = await chooseImages(2)
let _this = this
let timer = new Date() * 1
let token = 'Bearer '+ this.$store.state.user.vuex_loginInfo.accessToken
uni.chooseImage({
count: 1, //
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success: res => {
//
console.log(res.tempFilePaths[0])
uni.uploadFile({
url: _url,//
filePath: res.tempFilePaths[0],//
name: 'file',
formData: {
path: 'complain/'+ uni.$u.date(timer, 'yyyy-mm-dd')+'/'+timer + '-'+ 'scanningBanks',
type: 1,
fileSuffix: "png"
},
header: {
Authorization: token,
'tenant-id': '1704459882232553474'
},
success(res) {
console.log('上传成功')
let res2 = JSON.parse(res.data)
if(res2.code==0) {
}
// _this.imgArr.push(res2.data)
console.log(res2)
uni.hideLoading();
},
complete: (comp)=> {console.log(comp)}
})
}
})
}
} }
} }
</script> </script>

Loading…
Cancel
Save