Browse Source

测试过全流程

master
unknown 6 months ago
parent
commit
34e08e763c
  1. 3
      App.vue
  2. 136
      config/api - 副本.js
  3. 2
      config/api.js
  4. 6
      pages/userCenter/refund/comp/item.vue
  5. 72
      pages/userCenter/refund/refund.vue
  6. 3
      pages/userCenter/scanCode/scanCode.vue

3
App.vue

@ -16,5 +16,6 @@
<style lang="scss">
/*每个页面公共css */
@import '@/uni_modules/uview-ui/index.scss';
@import 'common/css/app.scss'
@import 'common/css/app.scss';
</style>

136
config/api - 副本.js

@ -1,136 +0,0 @@
var http = uni.$u.http
// 隐私政策
export const getAgreement = (params, config = {}) => http.post('/util/manage/getAgreement.do', params, config)
// 验证码登录
export const loginPwd = (data) => http.post('system/auth/login', data, { custom: { noToken: true , 'Tenant-Id': data['Tenant-Id']}})
// 获取个人信息
export const getUserInfo = (data) => http.post('member/user/get', {header: {'contentType': 1}})
// 退出登录
export const logOut = (data={}) => http.post('member/auth/logout', data, { custom: { noToken: true }})
// 驾校列表分页
export const schoolPage = (params) => http.get('business/school/page', {params: params})
// 获得租户分页
export const tenantPage = (params) => http.get('system/tenant/pages', {params: params, custom: { noToken: true }})
// 实操预约记录分页
export const bookingMasterPage = (params) => http.get('business/booking/master/page', {params: params, header: {'contentType': 3} })
// 实操预约详情
export const bookingMasterDetail = (params) => http.get('business/booking/master/get', {params: params, header: {'contentType': 3} })
// 获得我的排课详情
export const scheduleClassGetById = (params) => http.get('business/booking/schedule-class/getById', {params: params, })
// 获得我的排课详情预约记录
export const getBookingDetailByClassId = (params) => http.get('business/booking/master/getBookingDetailByClassId', {params: params, })
// 获得排课
export const scheduleClassGet = (params) => http.get('business/booking/schedule-class/get', {params: params, })
// 发布排课计划
export const scheduleClassCreate = (data) => http.post('business/booking/schedule-class/create', data)
// 根据时间段发布排课计划
export const scheduleClassCreateByTime = (data) => http.post('business/booking/schedule-class/createByTime', data)
// 获取排课日期范围
export const getClassDateLimit = (params) => http.get('business/booking/global-config/getClassDateLimit', {params} ,)
// 获取排课时间段范围
export const getClassTimeLimt = (params) => http.get('business/booking/global-config/getClassTimeLimt', {params} ,)
// 创建排课模板
export const getClassCreate = (data) => http.post('business/booking/schedule-template/create', data ,)
// 排课模板分页
export const scheduleTemplatePage = (params) => http.get('business/booking/schedule-template/page', {params} ,)
// 更新排课模版
export const scheduleTemplateUpdate = (data) => http.put('business/booking/schedule-template/update', data ,)
// 获取排课模版
export const scheduleTemplateGet = (params) => http.get('business/booking/schedule-template/get', {params} ,)
// 训练场地
export const trainingSiteList = (params) => http.get('business/training-site/list', {params} ,)
// 获得考场模拟预约记录分页
export const examSimulationPages = (params) => http.get('business/exam-simulation-record/page', {params} ,)
// 已报名学员
export const studentRecordPage = (params) => http.get('business/student-record/page', {params} ,)
// 驾校班型
export const schoolClass = (params) => http.get('business/school-class/getSchoolByClass', {params} ,)
// 获得学员档案记录
export const studentDetail = (params) => http.get('business/student-record/getStudent', {params} ,)
// 获得教练车信息分页
export const carPage = (params) => http.get('business/car/page', {params} ,)
// 驾校场地分页
export const sitePage = (params) => http.get('business/training-site/page', {params} ,)
// 驾校教练分页
export const coachPage = (params) => http.get('business/coach/page', {params})
// 驾校教练详情
export const coachDetail = (params) => http.get('business/coach/get', {params})
// 教练评价列表分页
export const coachCommentPage = (params) => http.get('app/coach-comment/pageCoachComment', {params})
// 获得教练员评价条数
export const pageCoachCommentTotal = (params) => http.get('app/coach-comment/pageCoachCommentTotal', {params})
// 获得驾校评价
export const schoolCommentPage = (params) => http.get('business/school-comment/page', {params})
// 获取驾校评价条数
export const commentPagetotal = (params) => http.get('business/school-comment/pagetotal', { params })
// 修改用户密码
export const updatePassword = (data) => http.put('system/user/profile/update-password', data)
// 获得考场分页
export const simulationPage = (params) => http.get('business/booking/simulation-record/page', {params})
// 获得考场列分页
export const businessSitePage = (params) => http.get('business/site/page', {params})
// 教练绑定教练车
export const coachBinding = (data) => http.post('business/coach/binding', data)
// 取消绑定教练车
export const coachUnbinding = (data) => http.put('business/coach/unbinding', data)
// 获得考场车辆管理分页
export const siteCarPage = (params) => http.get('business/site-car/page', {params})
// 我的学员(累计学员、今日新增学员、等)
export const studentOwner = (params) => http.get('business/student-record/owner', {params})
// 获得学员档案记录列表
export const studentList = (params) => http.get('business/student-record/page', {params})
// 绑定教练
export const studentBindCoach = (data) => http.post('business/student-record/bindCoach', data)
// 教练二维码生成
export const getQR = (data) => http.post('business/coach/sign/getQR', data)
// 获取学习中的学员
export const signStudentList = (data) => http.post('business/coach/sign/studentList', data)
// 切换学员计时
export const changeStudent = (data) => http.post('business/coach/sign/changeStudent', data)
export const getLoginCode = (data) => http.post('member/auth/send-sms-code', data, { custom: { noToken: true, catch: true,}})
// 驾校教练使用手机 + 验证码登录
export const coachSmsLogin = (data) => http.post('member/auth/coach_sms-login', data, { custom: { noToken: true, catch: true,}})

2
config/api.js

@ -12,7 +12,7 @@
// 学员学费退款列表
export const headmasterPage = (params) => http.get('app/refund/headmasterPage', {params})
// 学员学费退款审核通过
export const updateRefundStatusOpend = (params) => http.get('app/refund/updateRefundStatusOpend', {params})
export const updateRefundStatusOpend = (params) => http.get('app/refund/updateRefundStatusPass', {params})
// 学员学费退款审核不通过
export const updateRefundStatusOut = (params) => http.get('app/refund/updateRefundStatusOut', {params})

6
pages/userCenter/refund/comp/item.vue

@ -6,8 +6,8 @@
<view class="schoolName">{{item.studentName}} {{item.studentPhone}}</view>
</view>
<view class="status">
<text class="text red" v-if="item.refundStatus==-1">取消{{item.refundStatus}}</text>
<view class="text" v-else :class="{red: item.refundStatus==2}">{{stateTxt[item.refundStatus]}}</view>
<text class="text red" v-if="item.auditStatus==-1"> </text>
<view class="text" v-else :class="{red: item.auditStatus==2}">{{stateTxt[item.auditStatus]}}</view>
<view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view>
@ -36,7 +36,7 @@
<view class="border_bottom">
<view class="row">
<view class="lab">不通过原因</view>
<view class="val hui">{{ item.auditFailReason }}</view>
<view class="val hui">{{ item.schoolFailReason }}</view>
</view>
</view>
<view class="border_bottom">

72
pages/userCenter/refund/refund.vue

@ -1,16 +1,21 @@
<template>
<view class="pageBg">
<view class="pageBgImg">
<view class="status_bar"></view>
<topNavbar title="学员退款"></topNavbar>
<view class="pad">
<view class="navBox">
<cardNav :navData="navData" :currentNav="params.status" @changeNav="changeNav" />
</view>
</view>
</view>
<view class="pad con">
<view class="list">
<view class="card" v-for="(item,index) in list" :key="index">
<refundItem :item="item">
<template>
<view class="btn_row" v-if="item.refundStatus==0">
<view class="btn_row" v-if="item.auditStatus==0">
<view class="btnBg" @click="passFn(item)">审核通过</view>
<view class="btnBg" @click="noPassClick(item)">审核不通过</view>
</view>
@ -23,13 +28,13 @@
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
<u-popup :show="show" :round="16" mode="center" @close="show=false" @open="show=true" closeable>
<view class="popCon">
<view class="inputBox">
<!-- <input type="text" placeholder="请输入不通过原因" > -->
<!-- <u--textarea v-model="value3" placeholder="请输入内容" autoHeight ></u--textarea> -->
<textarea placeholder="请输入不通过原因" maxlength="40" v-model.trim="auditFailReason"></textarea>
<textarea placeholder="请输入不通过原因" maxlength="40" v-model.trim="schoolFailReason"></textarea>
</view>
<view class="footBox">
<view class="btn">取消</view>
@ -42,15 +47,26 @@
<script>
import refundItem from './comp/item'
import { headmasterPage, updateRefundStatusOpend,updateRefundStatusOut } from '@/config/api.js'
import {
headmasterPage,
updateRefundStatusOpend,
updateRefundStatusOut
} from '@/config/api.js'
export default {
components: { refundItem },
components: {
refundItem
},
data() {
return {
show: false,
navData: [
{text: '待审核', id: 0},
{text: '已审核', id: 1}
navData: [{
text: '待审核',
id: 0
},
{
text: '已审核',
id: 1
}
],
params: {
pageNo: 1,
@ -59,7 +75,7 @@
},
status: 'loading',
list: [],
auditFailReason: '',
schoolFailReason: '',
curRefundId: '',
}
},
@ -73,7 +89,9 @@
this.listInit()
},
async headmasterPageFn() {
const {data: res} = await headmasterPage(this.params)
const {
data: res
} = await headmasterPage(this.params)
this.params.pageNo++
this.list.push(...res.list)
this.total = res.total
@ -91,18 +109,21 @@
},
//
noPassClick(item) {
this.auditFailReason = ''
this.schoolFailReason = ''
this.show = true
this.curRefundId = item.refundId
},
//
async noPass() {
console.log(this.auditFailReason)
if(!this.auditFailReason) return this.$u.toast('请输入不通过原因')
const res = await updateRefundStatusOut({id: this.curRefundId, auditFailReason: this.auditFailReason})
console.log(this.schoolFailReason)
if (!this.schoolFailReason) return this.$u.toast('请输入不通过原因')
const res = await updateRefundStatusOut({
id: this.curRefundId,
schoolFailReason: this.schoolFailReason
})
if (res.code == 0) {
this.$u.toast('已驳回')
this.auditFailReason = ''
this.schoolFailReason = ''
this.show = false
this.listInit()
}
@ -116,7 +137,9 @@
content: `学员${item.studentName}的申请确定审通过吗?`,
success: async function(res) {
if (res.confirm) {
const reslut = await updateRefundStatusOpend({id: item.refundId})
const reslut = await updateRefundStatusOpend({
id: item.refundId
})
if (reslut.code == 0) _this.$u.toast('已通过')
_this.listInit()
} else if (res.cancel) {
@ -130,20 +153,30 @@
</script>
<style lang="scss" scoped>
.pageBgImg {
height: auto;
padding-bottom: 110rpx;
}
.navBox {
padding: 0 0 24rpx 0;
}
.card {
padding: 0 28rpx;
margin-bottom: 24rpx;
}
.con {
// transform: translateY(-100rpx);
margin-top: -100rpx;
}
.popCon {
width: calc(100vw - 100rpx);
.inputBox {
width: 100%;
// height: 200rpx;
padding: 90rpx 44rpx 24rpx 44rpx;
textarea {
border: 1rpx solid #eee;
border-radius: 20rpx;
@ -155,17 +188,20 @@
font-size: 30rpx;
}
}
.footBox {
width: 100%;
height: 112rpx;
display: flex;
border-top: 1rpx solid #eee;
.btn {
flex: 1;
text-align: center;
line-height: 112rpx;
font-size: 34rpx;
color: #999;
&.blue {
color: $themC;
border-left: 1rpx solid #eeeeee;
@ -178,9 +214,11 @@
display: flex;
justify-content: center;
padding: 10rpx 0 30rpx 0;
.btnBg {
width: 188rpx;
margin: 0 26rpx;
&:first-child {
width: 168rpx;
}

3
pages/userCenter/scanCode/scanCode.vue

@ -16,7 +16,7 @@
</view>
</view>
<view class="qcode">
<image :src="ossUrl" mode="widthFix" style="width: 500rpx;height: 500rpx;"></image>
<image :src="ossUrl" mode="widthFix" style="width: 500rpx;height: 500rpx;" v-if="ossUrl"></image>
</view>
</view>
<!-- <view class="card">
@ -67,6 +67,7 @@
this.refresh()
},
async refresh() {
this.ossUrl = ''
const {data: res} = await getQR({type: this.currentType})
this.ossUrl = res.ossUrl
clearTimeout(this.timer)

Loading…
Cancel
Save