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

8
pages/indexEntry/enroll/enroll.vue

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

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

@ -1,12 +1,19 @@
<template>
<view class="pageBgImg">
<!-- #ifdef H5 -->
<topNavbar title="实名认证"></topNavbar>
<!-- #endif -->
</view>
</template>
<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 {
data() {
return {
@ -14,13 +21,14 @@
}
},
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.GetDetectInfoEnhancedFn()
}
@ -30,42 +38,43 @@
},
methods: {
async GetDetectInfoEnhancedFn() {
const data = await getbiztoken({ userId: this.userId})
const data = await getbiztoken({
userId: this.userId
})
// alert(this.$store.state.school.BizToken)
uni.showLoading({
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 = {
ruleId: 1,
redirectUrl,
ruleId: 2,
redirectUrl: '',
bizToken: data.data,
userId: this.userId
}
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)
// 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() {
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
// uni.hideNavigationBarLoading()
},
@ -38,21 +39,24 @@
this.timer = null
},
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: {
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() {
let _this = this
if(this.ok) return this.getApplyStepApi

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

@ -332,15 +332,8 @@
}
},
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)=>{
console.log(item)
this.form.coach = item.name
@ -368,8 +361,21 @@
this.schoolClassFn()
}
},
onPullDownRefresh() {
this.initUserInfo()
},
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() {
const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId})
this.columnsClassModel = [res.list]

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

@ -7,7 +7,7 @@
</view>
<view class="btnBg" @click="$goPage('/pages/indexEntry/enroll/payment/payment')">同意并签字确认</view>
</view> -->
<web-view :src="url"></web-view>
<web-view :src="webViewUrl"></web-view>
</view>
</template>
@ -19,7 +19,7 @@
export default {
data() {
return {
url: '',
webViewUrl: '',
schoolId: ''
}
},
@ -28,8 +28,7 @@
this.timer = null
},
onHide() {
clearInterval(this.timer)
this.timer = null
},
onLoad(options) {
this.schoolId = options.schoolId?options.schoolId:this.vuex_userInfo.schoolId
@ -51,7 +50,7 @@
studentId: this.studentId
})
uni.hideLoading()
this.url = res.url
this.webViewUrl = res.url
},
//
async getContractStatusFn() {
@ -63,7 +62,6 @@
if (res.flowStatus == 2) {
clearInterval(this.timer)
this.timer = null
alert('签约成功')
uni.navigateTo({
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>
<view class="rightBtn">
<view class="btnBorder">下载发票</view>
<view class="btnBorder" @click="downloadImage">下载发票</view>
<view class="btnBorder" @click="goVoucher">培训缴费电子凭证</view>
</view>
</view>
@ -115,9 +115,11 @@
<script>
import refundInfo from './comp/refundInfo.vue'
import { downloadImg } from '../comp/download.js'
import {
applyOrderGet,
selectRefundDetail
selectRefundDetail,
getStudentVoucher
} from '@/config/api.js'
export default {
components: {
@ -192,7 +194,16 @@
goFund() {
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>
@ -202,6 +213,8 @@
.btn_row {
display: flex;
justify-content: space-between;
align-items: center;
margin: 24rpx 0 0 0;
.rightBtn {
display: flex;
justify-content: flex-end;
@ -233,7 +246,6 @@
border-radius: 8rpx;
border: 2rpx solid #E8E9EC;
line-height: 72rpx;
margin: 24rpx 0 0 0;
font-size: 28rpx;
color: #ADADAD;
text-align: center;

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

@ -1,15 +1,23 @@
<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>
</template>
<script>
import { getStudentVoucher } from '@/config/api.js'
import { downloadImg } from '../comp/download.js'
export default {
data() {
return {
orderId: ''
orderId: '',
imgLink: ''
}
},
onLoad(options) {
@ -24,12 +32,39 @@
studentId: this.studentId,
type: 1
}
const res = await getStudentVoucher(obj)
const {data: res} = await getStudentVoucher(obj)
this.imgLink = res
console.log(res)
},
downloadImgClick() {
downloadImg(this.imgLink)
}
}
}
</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>

10
pages/mineEntry/personaInfo/personaInfo.vue

@ -43,13 +43,16 @@
</view>
<view class="logout" @click="logOutFn">退出登录</view>
<view class="logout" @click="deleteTestClick" style="margin-top: 40rpx;">删除测试账号开发用的</view>
</view>
</view>
</template>
<script>
import { logOut } from '@/config/api.js'
import { logOut,deleteTest } from '@/config/api.js'
export default {
methods: {
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">
<u--input placeholder="请输入" border="none" clearable v-model="FormData.idCard"></u--input>
</view>
<view class="scan">
<view class="scan" @click="scanningBanksClick">
<image src="@/static/images/userCenter/btn_yinhangkax.png" mode=""></image>
</view>
</view>
@ -68,7 +68,10 @@
</template>
<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 {
props: ['info', 'orderId'],
data() {
@ -102,6 +105,8 @@
},
created() {
this.getdictDataListFn()
console.log('_url')
console.log(_url)
},
methods: {
// 退
@ -202,6 +207,48 @@
_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>

Loading…
Cancel
Save