Browse Source

学时确认

master
unknown 7 months ago
parent
commit
d6dee5e67a
  1. 4
      common/js/utils.js
  2. 3
      config/api.js
  3. 14
      config/utils.js
  4. 16
      pages.json
  5. 27
      pages/carEntry/signature/signature.vue
  6. 2
      pages/indexEntry/enroll/registInfo/chooseCoach/chooseCoach.vue
  7. 2
      pages/indexEntry/enroll/uploadAvatar/uploadAvatar.vue
  8. 4
      pages/indexEntry/signIn/signIn.vue
  9. 2
      pages/indexEntry/webView/webView.vue
  10. 27
      pages/other/webView/webView.vue
  11. 16
      pages/tabbar/index/index.vue
  12. 6
      pages/tabbar/learnCar/comp/topInfo.vue
  13. 7
      pages/tabbar/learnCar/index.vue
  14. 2
      pages/tabbar/mine/index.vue
  15. 8
      pages/userCenter/login/login.vue
  16. 2
      uni_modules/zeng-calen/components/zeng-calen/zeng-calen.vue

4
common/js/utils.js

@ -132,8 +132,10 @@ const install = (Vue, vm) => {
if( vm.vuex_userInfo.applyStep&& vm.vuex_userInfo.applyStep<5) {
return vm.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
}
if(vm.vuex_userInfo.applyStep>5) {
uni.$u.toast('您已是报名学员')
}
uni.$u.toast('您已是报名学员')
}
let isImagePath = (path)=> {

3
config/api.js

@ -212,6 +212,9 @@ export const reSignOut = (data) => http.post('business/student/sign/reSignOut',
export const monthSignRecord = (data) => http.post('business/student/sign/monthSignRecord', data)
// 学员扫码签到记录 -- 按天查询
export const signDetail = (data) => http.post('business/student/sign/signDetail', data)
// 学时确认
export const periodConfirm = (data) => http.post('app/student-process/periodConfirm', data)

14
config/utils.js

@ -1,4 +1,4 @@
import { WX_API, H5_API, httpPrefix } from '@/config/site.config.js';
import { WX_API, H5_API, httpPrefix } from './site.config.js';
var _url = H5_API+ WX_API + httpPrefix
import store from '@/store/index.js'
@ -100,7 +100,8 @@ export function chooseImages(num=0) {
})
})
}
export function uploadImgApi(filePath, imgName) {
export function uploadImgApi(filePath, imgName, imgLink='image') {
console.log(filePath)
let token = 'Bearer '+ store.state.user.vuex_loginInfo.accessToken
let timer = new Date() * 1
@ -110,9 +111,9 @@ export function uploadImgApi(filePath, imgName) {
url: _url + 'infra/file/upload',//接口
filePath: filePath,//要上传的图片的本地路径
name: 'file',
// complain
formData: {
path: 'complain/'+ uni.$u.date(timer, 'yyyy-mm-dd')+'/'+timer + '-'+ imgName,
path: imgLink+'/'+ uni.$u.date(timer, 'yyyy-mm-dd')+'/'+timer + '-'+ imgName,
type: 1,
fileSuffix: "png"
},
@ -121,7 +122,8 @@ export function uploadImgApi(filePath, imgName) {
// 'tenant-id': '1704459882232553474'
},
success(res) {
console.log('上传成功')
console.log('上传成功??')
console.log(res)
let res2 = JSON.parse(res.data)
reslove(res2.data)
@ -203,7 +205,7 @@ export function uploadImgApi(filePath, imgName) {
}else {
_this.$store.commit('updateWebVeiwUrl', res.result)
uni.navigateTo({
url: '/pages/other/webView/webView'
url: '/pages/indexEntry/webView/webView'
})
}
}

16
pages.json

@ -66,7 +66,7 @@
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationStyle": "custom",
// "navigationStyle": "custom",
// "navigationBarLoading": false,
"backgroundTextStyle": "dark"
}
@ -521,20 +521,6 @@
}
]
},
{
"root": "pages/other",
"pages": [
{
"path": "webView/webView",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"backgroundTextStyle": "dark"
}
}
]
}
],
"globalStyle": {

27
pages/carEntry/signature/signature.vue

@ -27,6 +27,7 @@
<script>
// import { pathToBase64 } from '@/common/js/jssdk_image_tools.js'
import { uploadImgApi } from '@/config/utils.js'
import { periodConfirm } from '@/config/api.js'
var x = 20;
var y = 20;
export default {
@ -41,9 +42,12 @@
hasSign: false,
realName: '',
checked: false,
subject: 1,
};
},
onLoad(options) {
this.subject = options.subject
},
mounted() {
this.createCanvas();
this.realName = this.vuex_userInfo.name
@ -152,8 +156,9 @@
}else{
that.$emit('closeCanvas', res.tempFilePath);
console.log('这是临时路径?')
const imgLink = await uploadImgApi(res.tempFilePath, 'signatureImg')
const imgLink = await uploadImgApi(res.tempFilePath, 'signatureImg', 'sign')
console.log(imgLink)
that.periodConfirmFn(imgLink)
// //canvasbase64
// pathToBase64(res.tempFilePath).then(re => {
// that.SignatureImg = re;
@ -163,6 +168,22 @@
},
});
},
async periodConfirmFn(signatureUrl) {
const obj = {
processId: this.subject,
signatureUrl,
studentId: this.studentId
}
const {data: res} = await periodConfirm(obj)
if(res) {
this.$u.toast('签名成功啦')
setTimeout(()=>{
uni.switchTab({
url: '/pages/tabbar/learnCar/index'
})
},1000)
}
}
}
};
@ -174,7 +195,7 @@
flex-direction: column;
width: 100%;
// height: 98%;
height: calc(100vh - 150rpx);
height: calc(100vh - 50rpx);
background: #fff;
.topTps {
width: 100%;

2
pages/indexEntry/enroll/registInfo/chooseCoach/chooseCoach.vue

@ -42,7 +42,7 @@
},
onReachBottom() {
if(status=='nomore') return
if(this.status=='nomore') return
this.coachPageFn()
},
methods: {

2
pages/indexEntry/enroll/uploadAvatar/uploadAvatar.vue

@ -58,7 +58,7 @@
},
//
async goPage() {
const photoPath = await uploadImgApi(this.avatar, 'avatar')
const photoPath = await uploadImgApi(this.avatar, 'face')
console.log(photoPath)
this.vuex_userInfo.photoPath = photoPath
this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')

4
pages/indexEntry/signIn/signIn.vue

@ -23,8 +23,8 @@
data() {
return {
actDay: [], //
chooseDay: ["2024-01-29", "2024-01-27", "2024-01-19", "2024-01-10"], //
chooseDayLack: ["2024-01-29", ], //
chooseDay: [], //
chooseDayLack: [], //
list: [],
signMonth: ''
}

2
pages/indexEntry/webView/webView.vue

@ -1,6 +1,6 @@
<template>
<view>
<topNavbar title="学员报名"></topNavbar>
<!-- <topNavbar title="学员报名"></topNavbar> -->
<!-- <web-view :webview-styles="webviewStyles" src="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"></web-view> -->
<web-view :webview-styles="webviewStyles" class="custom-webview" :src="link" :update-title="true"></web-view>
<!-- <iframe src="https://your-h5-url.com" frameborder="0"></iframe> -->

27
pages/other/webView/webView.vue

@ -1,27 +0,0 @@
<template>
<view>
<web-view :webview-styles="webviewStyles" src="http://192.168.1.20/system/menu"></web-view>
<!-- <web-view :webview-styles="webviewStyles" :src="$store.state.webViewUrl"></web-view> -->
</view>
</template>
<script>
export default {
data() {
return {
webviewStyles: {
progress: {
color: '#FF3333'
}
}
}
},
onLoad() {
console.log('噜噜哇'+ this.$store.state.webViewUrl)
}
}
</script>
<style>
</style>

16
pages/tabbar/index/index.vue

@ -27,10 +27,10 @@
:current="current" :mode="mode" :dots-styles="dotsStyles"
field="content">
<swiper class="swiper-box" @change="change" :current="swiperDotIndex" >
<swiper-item v-for="(item, index) in swiperInfo" :key="index" >
<swiper-item v-for="(item, index) in swiperInfo" :key="index" @click="bannerClick(item)" >
<view class="swiper-item" :class="'swiper-item' + index">
<view class="imgBox">
<image :src="item" mode="widthFix"></image>
<image :src="item.imgUrl" mode="widthFix"></image>
</view>
</view>
</swiper-item>
@ -227,6 +227,14 @@
},
methods: {
//
bannerClick(item) {
let link = item.jumpPath
console.log(link)
if(!link) return false
this.$store.commit('updateWebVeiwUrl', link)
this.$goPage('/pages/indexEntry/webView/webView')
},
initApi() {
this.getarticleListFn()
this.getRecommendList()
@ -254,9 +262,7 @@
async getBannerListFn() {
const {data: res} = await getBannerList()
this.swiperInfo = res.list.map(item=>{
return item.imgUrl
})
this.swiperInfo = res.list
console.log(this.swiperInfo)
},
async entrySectionClick(item) {

6
pages/tabbar/learnCar/comp/topInfo.vue

@ -12,7 +12,7 @@
</view>
</view>
<view class="btn_row" @click="showType=true">
<view class="txt">{{ carType }}</view>
<view class="txt">{{ carType.name }}</view>
<u-icon name="arrow-down-fill" color="#fff" size="10"></u-icon>
</view>
</view>
@ -53,8 +53,8 @@
</view> -->
</view>
<!-- v-if="dynamics.classHourReachStatus" -->
<view class="timerFlex">
<view class="link-arrow" @click="$goPage('/pages/carEntry/signature/signature')">
<view class="timerFlex" v-if="dynamics.classHourReachStatus">
<view class="link-arrow" @click="$goPage('/pages/carEntry/signature/signature?subject='+carType.id)">
<view class="txt">确认学时</view>
<u-icon name="arrow-right" color="#3776FF" :size="16"></u-icon>
</view>

7
pages/tabbar/learnCar/index.vue

@ -1,11 +1,11 @@
<template>
<view class="pageBgImg pad">
<view class="pageBgImg">
<view class="pad">
<view class="status_bar"></view>
<view class="" style="height: 100rpx;"></view>
<!-- <u-button @click="requestSingleFreshLocationFn">单次定位</u-button> -->
<!-- <u-button @click="getInitFaceVerifyFn">人脸核身</u-button> -->
<topInfo :carType="curObject.name" @changeSubject="changeSubject" :dynamics="subjectStatus.studentClassHourVO"></topInfo>
<topInfo :carType="curObject" @changeSubject="changeSubject" :dynamics="subjectStatus.studentClassHourVO"></topInfo>
<view class="" v-if="token">
<subject1 v-if="curObject.id==1" :subjectStatus="subjectStatus"></subject1>
<subject2 v-if="curObject.id==2" :subjectStatus="subjectStatus"></subject2>
@ -41,6 +41,9 @@
onPullDownRefresh() {
this.init()
},
onLoad() {
},
onShow() {
this.init()
// this.getStudentProcessFn()

2
pages/tabbar/mine/index.vue

@ -62,7 +62,7 @@
ulData2: [
{name: '学时查询', icon: require('@/static/images/mineIcon/minIcon (4).png'),url: '/pages/mineEntry/carLearnHours/carLearnHours'},
{name: '我的评价', icon: require('@/static/images/mineIcon/minIcon (1).png'),url: '/pages/mineEntry/myEvaluate/myEvaluate'},
{name: '退款申请', icon: require('@/static/images/mineIcon/minIcon (3).png'),url: '/pages/mineEntry/refund/refund'},
// {name: '退', icon: require('@/static/images/mineIcon/minIcon (3).png'),url: '/pages/mineEntry/refund/refund'},
{name: '变更车型', icon: require('@/static/images/mineIcon/minIcon (7).png'),url: '/pages/mineEntry/modelChange/modelChange'},
{name: '同城转校', icon: require('@/static/images/mineIcon/minIcon (5).png'),url: '/pages/mineEntry/schoolTransfer/schoolTransfer'},
// {name: '退', icon: require('@/static/images/mineIcon/minIcon (6).png'),url: ''},

8
pages/userCenter/login/login.vue

@ -54,6 +54,7 @@
}
},
onLoad(options) {
this.isCheck = options.isCheck=='true'?true:false
// alert(options.autoBack)
if(options.autoBack) this.autoBack = ''
@ -122,7 +123,12 @@
url: login_front
})
}else {
// this.$goPage(login_front)
const pages = getCurrentPages();
if(pages.length==1) {
uni.switchTab({
url: '/pages/tabbar/index/index'
})
}
uni.navigateBack()
}
}else {

2
uni_modules/zeng-calen/components/zeng-calen/zeng-calen.vue

@ -306,7 +306,7 @@
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.content {
.content_box {}
.dian {

Loading…
Cancel
Save