Browse Source

适配小程序

master
unknown 11 months ago
parent
commit
cf7c3fdece
  1. 8
      config/api.js
  2. 4
      pages.json
  3. 12
      pages/carEntry/evaluate/comp/evaluateItem.vue
  4. 19
      pages/carEntry/evaluate/evaluate.vue
  5. 2
      pages/carEntry/examineAppointment/comp/pickDate.vue
  6. 5
      pages/carEntry/examineAppointment/comp/step3.vue
  7. 86
      pages/carEntry/examineAppointment/comp/选择科目备份.vue
  8. 10
      pages/carEntry/examineAppointment/examineAppointment.vue
  9. 11
      pages/carEntry/operaAppointment/comp/coachInfo.vue
  10. 3
      pages/carEntry/operaAppointment/comp/pickDate.vue
  11. 32
      pages/carEntry/operaAppointment/comp/step1.vue
  12. 1
      pages/carEntry/operaAppointment/comp/step2.vue
  13. 182
      pages/carEntry/operaAppointment/comp/step3.vue
  14. 256
      pages/carEntry/operaAppointment/comp/step4.vue
  15. 5
      pages/carEntry/operaAppointment/operaAppointment.vue
  16. 9
      pages/carEntry/simulateAppointment/comp/pickDate.vue
  17. 9
      pages/carEntry/simulateAppointment/comp/step2.vue
  18. 15
      pages/carEntry/simulateAppointment/comp/step3.vue
  19. 11
      pages/carEntry/simulateAppointment/simulateAppointment.vue
  20. 1
      pages/indexEntry/NonPlatformStudentInfo/NonPlatformStudentInfo.vue
  21. 2
      pages/indexEntry/consult/pubComplaint/pubComplaint.vue
  22. 2
      pages/indexEntry/consult/pubConsult/pubConsult.vue
  23. 4
      pages/indexEntry/consult/record/comp/complaintItem.vue
  24. 2
      pages/indexEntry/enroll/enroll.vue
  25. 13
      pages/indexEntry/enroll/realName/realName.vue
  26. 2
      pages/indexEntry/findShcool/coachComment/coachComment.vue
  27. 1
      pages/indexEntry/findShcool/comments/comments.vue
  28. 2
      pages/indexEntry/findShcool/comp/schoolItem.vue
  29. 14
      pages/indexEntry/findShcool/shcoolDetail/comp/tab3.vue
  30. 4
      pages/indexEntry/findShcool/shcoolDetail/shcoolDetail.vue
  31. 2
      pages/indexEntry/iIndustryInfo/detail/detail.vue
  32. 2
      pages/indexEntry/publicVideo/comp/videoItem.vue
  33. 26
      pages/indexEntry/publicVideo/videoDetail/videoDetail.vue
  34. 2
      pages/mineEntry/myCollect/myCollect.vue
  35. 49
      pages/mineEntry/myCollect/videoItem.vue
  36. 46
      pages/mineEntry/myContract/myContract.vue
  37. 13
      pages/mineEntry/myOrder/comp/comp.scss
  38. 23
      pages/mineEntry/myOrder/comp/opera.vue
  39. 39
      pages/mineEntry/myOrder/detail/detail.vue
  40. 78
      pages/mineEntry/myOrder/myOrder.vue
  41. 6
      pages/tabbar/index/index.vue
  42. 21
      pages/tabbar/mine/index.vue
  43. 2
      store/modules/school.js
  44. 9
      uni_modules/mumu-previewOffce/changelog.md
  45. 208
      uni_modules/mumu-previewOffce/components/mumu-previewOffce/mumu-previewOffce.vue
  46. 85
      uni_modules/mumu-previewOffce/package.json
  47. 85
      uni_modules/mumu-previewOffce/readme.md

8
config/api.js

@ -94,6 +94,8 @@ export const getCardType = (params) => http.get('system/dict/cardType', {params}
// export const contractCreate = (data) => http.post('business/contract/create', data)
// // 获取驾校的合同
// export const getSchoolContract = (params) => http.get('business/contract/getSchoolContract', {params})
// 我的合同
export const selectContractPdfBase64 = (params) => http.get('business/contract/selectContractPdfBase64', {params})
// 获取合同链接
export const getSignContract = (data) => http.post('business/contract/signContract', data)
// 查询学员合同签署状态
@ -136,6 +138,12 @@ export const masterPage = (params) => http.get('business/booking/master/page', {
export const masterDetail = (params) => http.get('business/booking/master/get', {params})
// 5实操取消预约
export const masterCancelBooking = (data) => http.put('business/booking/master/cancelBooking/'+data, )
// 我的订单
export const applyOrderPage = (params) => http.get('app/apply-order/page', {params})
// 我的订单详情
export const applyOrderGet = (params) => http.get('app/apply-order/get', {params})

4
pages.json

@ -421,7 +421,7 @@
"style": {
"navigationBarTitleText": "订单详情",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
}
},
@ -430,7 +430,7 @@
"style": {
"navigationBarTitleText": "我的订单",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
}
},

12
pages/carEntry/evaluate/comp/evaluateItem.vue

@ -97,6 +97,16 @@
imgArr:[]
}
},
watch: {
info: {
handler(newVal) {
if(newVal) {
this.$emit('updatedForm', newVal)
}
},
deep: true
}
},
methods: {
// 1 2
changeChe(val) {
@ -144,6 +154,8 @@
res.tempFiles.forEach(async (item,index)=>{
let imgLink = await uploadImgApi(item.path, index)
if(imgLink) this.info.imgArr.push(imgLink)
console.log('----------')
console.log(this.info.imgArr)
})
}
})

19
pages/carEntry/evaluate/evaluate.vue

@ -1,8 +1,8 @@
<template>
<view class="pageBgImg">
<topNavbar title="评价"></topNavbar>
<evaluateItem :info="schoolInfo" key="1" v-show="showSchool"/>
<evaluateItem :info="coachInfo" key="2"/>
<evaluateItem :info="schoolInfo" key="1" v-show="showSchool" @updatedForm="updatedSchoolInfo"/>
<evaluateItem :info="coachInfo" key="2" @updatedForm="updatedCoachInfo"/>
<view class="btnBox">
<view class="btnBg" @click="submintFn" :class="{active: btnActive}">提交</view>
@ -44,9 +44,9 @@ import school from '../../../store/modules/school'
let {schoolInfo, coachInfo} = this
let num1 = schoolInfo.schoolLevel + schoolInfo.qualityLevel + schoolInfo.teachLevel + schoolInfo.serviceLevel
let num2 = coachInfo.qualityLevel + coachInfo.teachLevel + coachInfo.serviceLevel
console.log(num1)
console.log(num2)
if(num1&&num2) {
if(this.subject==2&&num1&&num2) {
return true
}else if(this.subject!=2&&num2){
return true
}else {
return false
@ -55,6 +55,12 @@ import school from '../../../store/modules/school'
}
},
methods: {
updatedCoachInfo(val) {
this.coachInfo = val
},
updatedSchoolInfo(val) {
this.schoolInfo = val
},
initFrom() {
this.schoolInfo = {
tit: '您对驾校满意吗?',
@ -122,6 +128,7 @@ import school from '../../../store/modules/school'
this.initFrom()
},
async submintFn() {
if(this.coachInfo.imgArr.length) {
this.coachInfo.images = this.coachInfo.imgArr.join(',')
}
@ -130,7 +137,7 @@ import school from '../../../store/modules/school'
}
let schoolScore = [this.schoolInfo.serviceLevel,this.schoolInfo.schoolLevel,this.schoolInfo.teachLevel,this.schoolInfo.qualityLevel].some(item=>item*1>0)
let coachInfoScore = [this.coachInfo.serviceLevel,this.coachInfo.teachLevel,this.coachInfo.qualityLevel].some(item=>item*1>0)
if(!schoolScore) return this.$u.toast('请对驾校评分')
if(this.subject==2&&!schoolScore) return this.$u.toast('请对驾校评分')
if(!coachInfoScore) return this.$u.toast('请对教练评分')
const res = await addSchoolComment(this.schoolInfo)
const res2 = await addCoachComment(this.coachInfo)

2
pages/carEntry/examineAppointment/comp/pickDate.vue

@ -179,6 +179,7 @@
this.currentDay = this.currentDay + num
this.chooseDay = this.dateArr[this.currentDay][0].date
this.FormData.courseIds = this.courseIds = ''
this.$emit('updatedForm', this.FormData)
this.examSimulationClassFn()
},
chooseCourse(item) {
@ -186,6 +187,7 @@
this.FormData.courseIds = this.courseIds = item.id
this.FormData.classDate = item.classDate
this.FormData.classTime = item.classTime
this.$emit('updatedForm', this.FormData)
console.log(item)
},

5
pages/carEntry/examineAppointment/comp/step3.vue

@ -1,7 +1,7 @@
<template>
<view class="step1">
<pickDateTimer :FormData="FormData"/>
<pickDateTimer :FormData="FormData" @updatedForm="updatedForm"/>
<view class="btn_row">
<view class="border btn" @click="changeStep(2)">返回上一步</view>
@ -76,6 +76,9 @@
},1500)
}
console.log(res)
},
updatedForm(val) {
this.$emit('updatedForm',val)
}
}

86
pages/carEntry/examineAppointment/comp/选择科目备份.vue

@ -1,86 +0,0 @@
<template>
<view class="step1">
<view class="card">
<view class="list">
<view class="listItem" v-for="(item,index) in list" :key="index" :class="{active: index==1}">
{{ item.text }}</view>
</view>
</view>
<view class="btn_row" style="margin-top: 108rpx;">
<view class="border btn" @click="changeStep(1)">返回上一步</view>
<view class="btn" @click="changeStep(3)">下一步</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
text: '科目二',
id: 2
},
{
text: '科目三',
id: 3
},
],
}
},
methods: {
changeStep(val) {
this.$emit('changeStep', val)
}
}
}
</script>
<style lang="scss" scoped>
.list {
display: flex;
flex-wrap: wrap;
display: flex;
padding: 24rpx;
.listItem {
width: 32.4%;
height: 120rpx;
background: #F8F8F8;
border-radius: 12rpx;
font-weight: 500;
text-align: center;
line-height: 120rpx;
margin-right: 20rpx;
&.active {
width: 200rpx;
height: 120rpx;
background: rgba(25, 137, 250, 0.1);
border-radius: 12rpx;
border: 2rpx solid $themC;
color: $themC;
}
}
}
.btn_row {
display: flex;
justify-content: space-between;
.btn {
width: 47%;
height: 72rpx;
background: #1989FA;
border-radius: 8rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
line-height: 72rpx;
&.border {
background: rgba(25, 137, 250, 0.1);
border: 2rpx solid $themC;
color: $themC;
}
}
}
</style>

10
pages/carEntry/examineAppointment/examineAppointment.vue

@ -35,7 +35,7 @@
<step1 v-if="currentStep==1" @changeStep="changeStep" :list="siteList" @chooseSite="chooseSite" :siteId="FormData.examSiteId"></step1>
<step2 v-if="currentStep==2" @changeStep="changeStep" :list="carList" @chooseCar="chooseCar" :carId="FormData.carId"></step2>
<step3 v-if="currentStep==3" @changeStep="changeStep" :FormData="FormData"></step3>
<step3 v-if="currentStep==3" @changeStep="changeStep" :FormData="FormData" @updatedForm="updatedForm"></step3>
<!-- <step4 v-if="currentStep==4" @changeStep="changeStep"></step4> -->
<!-- <step5 v-if="currentStep==5" @changeStep="changeStep"></step5> -->
</view>
@ -59,7 +59,7 @@
longitude: '',
latitude: ''
},
carParams: { "pageNo": 1, "pageSize": 10, "carType": 'C1',},
carParams: { "pageNo": 1, "pageSize": 20, "carType": 'C1',},
FormData: {
examSiteId: '',
carId: '',
@ -78,6 +78,8 @@
onLoad(options) {
if(options.subject) this.FormData.subject = options.subject
this.FormData.trainType = this.vuex_userInfo.trainType
this.siteParams.carType = this.vuex_userInfo.trainType
this.carParams.carType = this.vuex_userInfo.trainType
// this.carType =
let vuex_cityInfo = this.$store.state.user.vuex_cityInfo
if(!vuex_cityInfo.lat) {
@ -100,6 +102,7 @@
chooseSite(item) {
this.FormData.examSiteId = item.id
this.FormData.siteName = item.name
this.carParams.pageNo = 1
this.examCarPageFn()
},
//
@ -118,6 +121,9 @@
changeStep(num) {
this.currentStep = num
},
updatedForm(val) {
this.FormData = val
}
}
}

11
pages/carEntry/operaAppointment/comp/coachInfo.vue

@ -2,7 +2,9 @@
<view class="coachInfo">
<view class="card">
<view class="avatar">
<image :src="FormData.photoPath" mode="" @error="handleImageError()"></image>
<!-- <image :src="FormData.photoPath" mode="" @error="handleImageError()"></image> -->
<image :src="FormData.photoPathh" mode="" v-if="isImagePath(FormData.photoPath)"></image>
<image src="@/static/images/index/avatar.png" mode="" v-else></image>
</view>
<view class="rightTxt">
<view class="name_row">
@ -23,6 +25,13 @@
handleImageError() {
console.log('图片加载失败')
this.FormData.photoPath = require('@/static/images/index/avatar.png')
},
isImagePath(path) {
//
const imageExtensions = /\.(jpg|jpeg|png|gif|bmp|svg)$/i;
// 使
return imageExtensions.test(path);
}
}
}

3
pages/carEntry/operaAppointment/comp/pickDate.vue

@ -216,9 +216,12 @@
this.$u.toast('一天最多能约四节课')
}else {
this.FormData.courseArr.push(item)
// console.log(this.FormData.courseArr)
this.$emit('updatedForm', this.FormData)
}
}else {
this.FormData.courseArr.splice(index,1)
this.$emit('updatedForm', this.FormData)
}
},

32
pages/carEntry/operaAppointment/comp/step1.vue

@ -2,22 +2,22 @@
<view class="step1">
<coachInfo @click.native="showStep2" :FormData="FormData"/>
<view class="h1">预约时间</view>
<pickDate :FormData="FormData"/>
<view class="" v-if="FormData.carNumber">
<pickDate :FormData="FormData" @updatedForm="updatedForm"/>
<view class="" v-if="showCarList.length">
<view class="h1">教练车</view>
<view class="card">
<view class="car">
<view class="carTag">{{FormData.carNumber}}</view>
<view class="carTag" v-for="(item,index) in showCarList" :key="index">{{item}}</view>
</view>
</view>
</view>
<view class="" v-if="FormData.siteName">
<view class="" v-if="showSiteList.length">
<view class="h1">训练场地</view>
<view class="card" @click="$u.utils.openMap(FormData.latitude,FormData.longitude)">
<view class="card" @click="$u.utils.openMap(item.latitude,item.longitude)" v-for="(item,index) in showSiteList" :key="index">
<view class="site">
<view class="leftTxt">
<view class="adrs">{{FormData.siteName}}</view>
<view class="adrsTxt">{{FormData.siteAddress}}</view>
<view class="adrs">{{item.siteName}}</view>
<view class="adrsTxt">{{item.siteAddress}}</view>
</view>
<view class="icon">
<image src="@/static/images/car/btn_daohang.png" mode=""></image>
@ -46,7 +46,20 @@
}
},
computed: {
showSiteList() {
return this.FormData.courseArr.reduce((acc,obj)=>{
const found = acc.some(item => item.siteName == obj.siteName );
if (!found) {
acc.push(obj);
}
return acc;
},[])
},
showCarList() {
return [...new Set(this.FormData.courseArr.map(item=>item.carNumber))]
}
},
methods: {
openPopup(num) {
if(!this.FormData.courseArr.length) {
@ -56,6 +69,9 @@
},
showStep2() {
this.$emit('showStep2')
},
updatedForm(val) {
this.$emit('updatedForm', val)
}
}
}

1
pages/carEntry/operaAppointment/comp/step2.vue

@ -77,6 +77,7 @@
this.FormData.coachId = item.id
this.FormData.coachName = item.name
this.FormData.photoPath = item.photoPath
this.$emit('updatedForm', this.FormData)
}
}
}

182
pages/carEntry/operaAppointment/comp/step3.vue

@ -1,182 +0,0 @@
<template>
<view class="step3">
</view>
</template>
<script>
export default {
data() {
return {
dateArr: [
{week: '一', num: '08'},
{week: '二', num: '09'},
{week: '三', num: '10'},
{week: '四', num: '11'},
{week: '五', num: '12'},
],
show: false
}
},
methods: {
changeStep(val) {
this.$emit('changeStep', val)
}
}
}
</script>
<style lang="scss" scoped>
.card {
width: 100%;
overflow: hidden;
.dateBox {
padding: 36rpx 0 40rpx 0;
.month-row {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 36rpx;
.month {
font-size: 32rpx;
color: $themC;
}
.arrow {
margin-left: 6rpx;
}
}
.date_row {
width: 100%;
height: 100rpx;
position: relative;
.icon {
width: 40rpx;
height: 40rpx;
background: rgba(51,51,51,0.18);
backdrop-filter: blur(4rpx);
position: absolute;
top: 50%;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
&.left {
left: 16rpx;
}
&.right {
right: 16rpx;
}
}
.dateArr {
display: flex;
padding: 0 70rpx;
justify-content: space-between;
.date {
width: 74rpx;
height: 100rpx;
border-radius: 16rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #333;
&.active {
background: rgba(25,137,250,0.1);
border: 2rpx solid #1989FA;
color: $themC;
}
.week {
}
.num {
margin-top: 4rpx;
}
}
}
}
}
}
.card {
.timeCon {
padding: 0 24rpx 70rpx 24rpx;
}
.h2 {
line-height: 90rpx;
font-weight: 500;
color: #333;
}
.time_box {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.time_item {
width: 30%;
height: 120rpx;
background: #F8F8F8;
border-radius: 12rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 12rpx;
color: #333;
&.active {
background: rgba(25,137,250,0.1);
border: 2rpx solid #1989FA;
color: $themC;
}
&.disable {
opacity: 0.5;
}
.lab {
font-size: 28rpx;
font-weight: 500;
}
.time {
font-size: 24rpx;
margin-top: 4rpx;
}
}
}
}
.poz_btn {
position: fixed;
bottom: 0;
left: 0;
padding: 12rpx 32rpx;
width: 100%;
background: #F6F6F6;
}
.btn_row {
display: flex;
justify-content: space-between;
padding-bottom: 30rpx;
.btn {
width: 47%;
height: 72rpx;
background: #1989FA;
border-radius: 8rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
line-height: 72rpx;
&.border {
background: rgba(25, 137, 250, 0.1);
border: 2rpx solid $themC;
color: $themC;
}
}
}
</style>

256
pages/carEntry/operaAppointment/comp/step4.vue

@ -1,256 +0,0 @@
<template>
<view class="step1">
<pickDateTimer/>
<view class="poz_btn">
<view class="btn_row" >
<view class="border btn" @click="changeStep(3)">返回上一步</view>
<view class="btn" @click="show = true">确认预约</view>
</view>
</view>
<u-popup :show="show" mode="center" :round="8">
<view class="popupCon">
<view class="h2">再次确认预约信息</view>
<view class="content">
<view class="row">
<view class="lab">预约类型</view>
<view class="val">实操训练预约</view>
</view>
<view class="row">
<view class="lab">预约科目</view>
<view class="val">科目二</view>
</view>
<view class="row">
<view class="lab">预约场地</view>
<view class="val">xxx场地</view>
</view>
<view class="row">
<view class="lab">预约车辆</view>
<view class="val">02号车</view>
</view>
<view class="row">
<view class="lab">预约时间</view>
<view class="val">2023/08/08 08:009:00</view>
</view>
</view>
<view class="btn_row">
<view class="border btn" @click="show = false">返回修改</view>
<view class="btn">确认</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
dateArr: [
{week: '一', num: '08'},
{week: '二', num: '09'},
{week: '三', num: '10'},
{week: '四', num: '11'},
{week: '五', num: '12'},
],
show: false
}
},
methods: {
changeStep(val) {
this.$emit('changeStep', val)
}
}
}
</script>
<style lang="scss" scoped>
.card {
width: 100%;
overflow: hidden;
.dateBox {
padding: 36rpx 0 40rpx 0;
.month-row {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 36rpx;
.month {
font-size: 32rpx;
color: $themC;
}
.arrow {
margin-left: 6rpx;
}
}
.date_row {
width: 100%;
height: 100rpx;
position: relative;
.icon {
width: 40rpx;
height: 40rpx;
background: rgba(51,51,51,0.18);
backdrop-filter: blur(4rpx);
position: absolute;
top: 50%;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
&.left {
left: 16rpx;
}
&.right {
right: 16rpx;
}
}
.dateArr {
display: flex;
padding: 0 70rpx;
justify-content: space-between;
.date {
width: 74rpx;
height: 100rpx;
border-radius: 16rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #333;
&.active {
background: rgba(25,137,250,0.1);
border: 2rpx solid #1989FA;
color: $themC;
}
.week {
}
.num {
margin-top: 4rpx;
}
}
}
}
}
}
.card {
.timeCon {
padding: 0 24rpx 70rpx 24rpx;
}
.h2 {
line-height: 90rpx;
font-weight: 500;
color: #333;
}
.time_box {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.time_item {
width: 30%;
height: 120rpx;
background: #F8F8F8;
border-radius: 12rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
border-radius: 12rpx;
color: #333;
&.active {
background: rgba(25,137,250,0.1);
border: 2rpx solid #1989FA;
color: $themC;
}
&.disable {
opacity: 0.5;
}
.lab {
font-size: 28rpx;
font-weight: 500;
}
.time {
font-size: 24rpx;
margin-top: 4rpx;
}
}
}
}
.poz_btn {
position: fixed;
bottom: 0;
left: 0;
padding: 12rpx 32rpx;
width: 100%;
background: #F6F6F6;
}
.btn_row {
display: flex;
justify-content: space-between;
padding-bottom: 30rpx;
.btn {
width: 47%;
height: 72rpx;
background: #1989FA;
border-radius: 8rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
line-height: 72rpx;
&.border {
background: rgba(25, 137, 250, 0.1);
border: 2rpx solid $themC;
color: $themC;
}
}
}
.popupCon {
padding: 30rpx 50rpx;
.h2 {
font-weight: 600;
color: #333333;
line-height: 70rpx;
font-size: 36rpx;
text-align: center;
margin-bottom: 20rpx;
}
.content {
padding-bottom: 20rpx;
.row {
padding: 22rpx 0;
display: flex;
font-size: 28rpx;
align-items: center;
.lab {
width: 180rpx;
color: #686B73;
}
.val {
flex: 1;
font-weight: 500;
}
}
}
}
</style>

5
pages/carEntry/operaAppointment/operaAppointment.vue

@ -2,7 +2,7 @@
<view class="pageBgImg">
<topNavbar :title="title"></topNavbar>
<view class="pad" style="padding-bottom: 60rpx;">
<step1 v-if="currentStep==1" @openPopup="openPopup" :FormData="FormData" @showStep2="showStep2"></step1>
<step1 v-if="currentStep==1" @openPopup="openPopup" :FormData="FormData" @showStep2="showStep2" @updatedForm="updatedForm"></step1>
<step2 v-if="currentStep==2" @changeStep="changeStep" :FormData="FormData" ref="step2Ref"></step2>
</view>
@ -96,6 +96,9 @@
}
},
methods: {
updatedForm(val) {
this.FormData = val
},
changeStep(num) {
this.currentStep = num
},

9
pages/carEntry/simulateAppointment/comp/pickDate.vue

@ -112,7 +112,8 @@
this.radioVal = 0
}
}
}
},
},
methods: {
//
@ -174,8 +175,7 @@
this.FormData.courseIds = []
this.chooseDay = item.date
this.simulationClassFn()
console.log('*****')
console.log(item)
this.$emit('updatedForm', this.FormData)
},
changeDateIndex(num) {
if(this.currentDay==0&&num==-1) return this.$u.toast('已是可选最小日期')
@ -183,6 +183,7 @@
this.currentDay = this.currentDay + num
this.chooseDay = this.dateArr[this.currentDay][0].date
this.FormData.courseIds = []
this.$emit('updatedForm', this.FormData)
this.simulationClassFn()
},
chooseCourse(item) {
@ -190,7 +191,7 @@
this.FormData.courseIds = this.courseIds = item.id
this.FormData.classDate = item.classDate
this.FormData.classTime = item.classTime
console.log(item)
this.$emit('updatedForm', this.FormData)
},
}
}

9
pages/carEntry/simulateAppointment/comp/step2.vue

@ -1,7 +1,7 @@
<template>
<view class="step1">
<pickDate :FormData="FormData"/>
<pickDate :FormData="FormData" @updatedForm="updatedForm"/>
<view class="poz_btn">
<view class="btn_row" >
@ -28,10 +28,13 @@
methods: {
changeStep(val) {
if(!this.FormData.courseIds) return this.$u.toast('请选择预约时间段')
console.log(this.FormData.courseIds)
if(val==3&&!this.FormData.courseIds) return this.$u.toast('请选择预约时间段')
this.$emit('changeStep', val)
},
updatedForm(val) {
this.$emit('updatedForm',val)
}
}
}
</script>

15
pages/carEntry/simulateAppointment/comp/step3.vue

@ -3,7 +3,7 @@
<view class="card">
<view class="list">
<view class="listItem" v-for="(item,index) in list" :key="index" :class="{active: FormData.deviceNum==item.seq}" @click="chooseDevice(item)">
{{ item.seq }}</view>
{{ item.seq }} </view>
</view>
</view>
@ -55,6 +55,16 @@
created() {
this.simulationDevicesFn()
},
watch: {
FormData: {
handler(newVal) {
if(newVal) {
this.$emit('updatedForm', newVal)
}
},
deep: true
}
},
methods: {
changeStep(val) {
this.$emit('changeStep', val)
@ -68,6 +78,9 @@
},
chooseDevice(item) {
this.FormData.deviceNum = item.seq
this.$emit('updatedForm', this.FormData)
// this.$set(this.FormData, 'deviceNum', )
console.log(this.FormData.deviceNum)
// this.FormData.deviceName = item.seq
},

11
pages/carEntry/simulateAppointment/simulateAppointment.vue

@ -24,8 +24,8 @@
</view>
<step1 v-if="currentStep==1" @changeStep="changeStep" :list="list1" :FormData="FormData" @choosePoint="choosePoint"></step1>
<step2 v-if="currentStep==2" @changeStep="changeStep" :FormData="FormData"></step2>
<step3 v-if="currentStep==3" @changeStep="changeStep" :FormData="FormData"></step3>
<step2 v-if="currentStep==2" @changeStep="changeStep" :FormData="FormData" @updatedForm="updatedForm"></step2>
<step3 v-if="currentStep==3" @changeStep="changeStep" :FormData="FormData" @updatedForm="updatedForm"></step3>
</view>
</view>
</template>
@ -49,7 +49,9 @@
deviceName: '',
classDate: '',
classTime: '',
deviceNum: ''
deviceNum: '',
courseIds: '',
beginTime: '',
}
}
},
@ -59,6 +61,9 @@
this.FormData.studentId = this.studentId
},
methods: {
updatedForm(val) {
this.FormData = val
},
changeStep(num) {
this.currentStep = num
},

1
pages/indexEntry/NonPlatformStudentInfo/NonPlatformStudentInfo.vue

@ -123,7 +123,6 @@
.card {
padding: 10rpx 46rpx 10rpx 32rpx;
margin-bottom: 20rpx;
.row {
height: 100rpx;
display: flex;

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.phone }}</view>
<view class="uInput my">{{ vuex_userInfo.phone }}</view>
</view>
</view>

2
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.phone }}</view>
<view class="uInput my">{{ vuex_userInfo.phone }}</view>
</view>
</view>

4
pages/indexEntry/consult/record/comp/complaintItem.vue

@ -54,6 +54,10 @@
dealStatus: ['','未处理', '已处理', '已关闭' ],//123
}
},
created() {
console.log('this.item')
console.log(this.item)
},
methods: {
closeFn(id) {
uni.showModal({

2
pages/indexEntry/enroll/enroll.vue

@ -138,7 +138,7 @@
this.showType = false
},
async getpersonfaceFn() {
const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: website + '/pages/indexEntry/enroll/realName/realName'})
const {data: res} = await getpersonface({ ruleId: 1, RedirectUrl: website + '/pages/indexEntry/enroll/realName/realName',userId: this.userId})
let obj = JSON.parse(res)
this.link = obj.Url
this.$store.commit('updateBizToken', obj.BizToken)

13
pages/indexEntry/enroll/realName/realName.vue

@ -8,7 +8,8 @@
import { GetDetectInfoEnhanced } from '@/config/api.js'
import { website } from '@/config/site.config.js'
export default {
onShow() {
onLoad(options) {
alert(options.BizToken)
this.GetDetectInfoEnhancedFn()
},
onPullDownRefresh() {
@ -16,7 +17,7 @@
},
methods: {
async GetDetectInfoEnhancedFn() {
alert(this.$store.state.school.BizToken)
// alert(this.$store.state.school.BizToken)
uni.showLoading({
title: '正在检测中...'
})
@ -30,10 +31,12 @@
bizToken: this.$store.state.school.BizToken,
userId: this.userId
}
const {data: res} = await GetDetectInfoEnhanced(obj)
let obj2 = JSON.parse(res)
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.showLoading()
uni.hideLoading()
if(obj2.Text.ErrMsg=='成功') {
this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
}

2
pages/indexEntry/findShcool/coachComment/coachComment.vue

@ -34,7 +34,7 @@
onLoad(options) {
if(!options.item) return
let coachInfo = JSON.parse(decodeURIComponent(options.item))
console.log(JSON.parse(options.item))
console.log(coachInfo)
this.coachList = [coachInfo]
this.params.coachId = coachInfo.coachId
this.getListCoachCommentFn()

1
pages/indexEntry/findShcool/comments/comments.vue

@ -42,6 +42,7 @@
.navBox {
padding: 32rpx 0 24rpx 0;
display: flex;
z-index: 9;
.nav {
padding: 10rpx 24rpx;
height: 60rpx;

2
pages/indexEntry/findShcool/comp/schoolItem.vue

@ -9,7 +9,7 @@
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" :readonly="true" style="pointer-events: none;"></u-rate>
<view class="num">{{item.stars}}</view>
</view>
<view class="credit">行业信用{{item.creditrating}}</view>
<view class="credit">行业信用 <text v-if="item.creditrating">{{item.creditrating}}</text></view>
<view class="adr">距您{{ $u.utils.distanceFn(item.distance)}}</view>
</view>
<callPhone v-if="showPhone" :servicePhone="[{name: item.phone}]">

14
pages/indexEntry/findShcool/shcoolDetail/comp/tab3.vue

@ -1,9 +1,10 @@
<template>
<view class="tabCon">
<view class="tab1">
<view class="tab1" v-if="coachList.length">
<view class="card" v-for="(item,index) in coachList" :key="index">
<view class="avatar">
<image :src="item.photoPath" mode="" @error="handleImageError(item)"></image>
<image :src="item.photoPath" mode="" v-if="isImagePath(item.photoPath)"></image>
<image src="@/static/images/index/avatar.png" mode="" v-else></image>
</view>
<view class="rightCon">
<view class="flex">
@ -13,7 +14,7 @@
<view class="flex-b">
<view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" disabled style="pointer-events: none;"></u-rate>
<view class="num">{{item.stars}}</view>
<view class="num">{{item.stars || 0}}</view>
</view>
<view class="btn" v-if="showSign" @click="goPageSign(item)">报名</view>
<view class="more" v-else @click="goPageDetail(item)">
@ -48,6 +49,13 @@
},
handleImageError(item) {
item.photoPath = require('@/static/images/index/avatar.png')
},
isImagePath(path) {
//
const imageExtensions = /\.(jpg|jpeg|png|gif|bmp|svg)$/i;
// 使
return imageExtensions.test(path);
}
}
}

4
pages/indexEntry/findShcool/shcoolDetail/shcoolDetail.vue

@ -11,7 +11,7 @@
</view>
<view class="pad traTop">
<!-- 驾校信息 -->
<view class="card ">
<view class="card " v-if="Object.keys(schoolDetail).length">
<view class="flex">
<view class="schoolLogo">
<image :src="schoolDetail.schoolIntroduceDO.iconPath" mode="" v-if="schoolDetail.schoolIntroduceDO"></image>
@ -27,7 +27,7 @@
<u-icon name="arrow-right" color="#363A44" size="14"></u-icon>
</view>
</view>
<callPhone>
<callPhone :servicePhone="[{name: schoolDetail.phone}]">
<view class="pozPhone">
<image src="@/static/images/index/telephone.png" mode=""></image>
</view>

2
pages/indexEntry/iIndustryInfo/detail/detail.vue

@ -26,6 +26,8 @@
onLoad(options) {
this.id = options.id
this.getarticleFn()
let obj = {a: 1}
},
methods: {
async getarticleFn() {

2
pages/indexEntry/publicVideo/comp/videoItem.vue

@ -5,7 +5,7 @@
<image src="@/static/images/index/btn_bofang.png" mode=""></image>
</view>
<view class="cover">
<image :src="item.videoCover" mode="widthFix"></image>
<image :src="item.videoCover" mode="aspectFill"></image>
</view>
</view>
<view class="text oneRowText">{{ item.title }}</view>

26
pages/indexEntry/publicVideo/videoDetail/videoDetail.vue

@ -35,12 +35,13 @@
</view>
<view class="operateWith">
<!-- #ifdef MP-WEIXIN -->
<view class="operateItem" @click="createRetransmissionFn">
<view class="operateItem">
<button @click="onShareAppMessage" open-type="share"></button>
<view class="icon">
<image src="/static/images/index/fenxiang_nor.png" mode=""></image>
</view>
<view class="txt">分享</view>
<view class="txt" >分享</view>
</view>
<!-- #endif -->
</view>
@ -118,7 +119,16 @@
const {data: res} = await createRetransmission(this.params)
this.getlikesCollection()
},
onShareAppMessage(res) {
this.createRetransmissionFn()
if (res.from === 'button') {//
console.log(res.target)
}
return {
title: this.vdoDetail.title,
path: '/pages/indexEntry/publicVideo/videoDetail/videoDetail?id='+ this.id
}
}
}
}
@ -158,6 +168,16 @@
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
button {
display: block;
width: 100%;
height: 100%;
position: absolute;
left: 0;
right: 0;
opacity: 0;
}
.icon {
width: 48rpx;
height: 48rpx;

2
pages/mineEntry/myCollect/myCollect.vue

@ -19,7 +19,7 @@
</template>
<script>
import videoItem from '../../indexEntry/publicVideo/comp/videoItem.vue'
import videoItem from './videoItem.vue'
import { getcollectVideo } from '@/config/api.js'
export default {
components: { videoItem },

49
pages/mineEntry/myCollect/videoItem.vue

@ -0,0 +1,49 @@
<template>
<view class="vdo">
<view class="coverBox">
<view class="start">
<image src="@/static/images/index/btn_bofang.png" mode=""></image>
</view>
<view class="cover">
<image :src="item.videoCover" mode="aspectFill"></image>
</view>
</view>
<view class="text oneRowText">{{ item.title }}</view>
</view>
</template>
<script>
export default {
props: ['item']
}
</script>
<style lang="scss" scoped>
.coverBox {
width: 100%;
height: 168rpx;
background: $themC;
border-radius: 12rpx;
position: relative;
.start {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
width: 50rpx;
height: 50rpx;
z-index: 2;
}
.cover {
width: 100%;
height: 100%;
overflow: hidden;
}
}
.text {
font-size: 24rpx;
padding: 20rpx 0 6rpx 0;
}
</style>

46
pages/mineEntry/myContract/myContract.vue

@ -3,17 +3,59 @@
<topNavbar title="我的合同"></topNavbar>
<view class="pad">
<view class="card">
我的合同
<image :src="pdfUrl" mode="widthFix"></image>
<!-- <web-view :src="pdfUrl"></web-view> -->
<!-- <mumu-previewOffce :fileUrl='pdfUrl' v-model='showPreview' @change="change"></mumu-previewOffce> -->
</view>
</view>
</view>
</template>
<script>
import { selectContractPdfBase64 } from '@/config/api.js'
import MumuPreviewOffce from '@/uni_modules/mumu-previewOffce/components/mumu-previewOffce/mumu-previewOffce.vue'
export default {
components: {
MumuPreviewOffce
},
data() {
return {
pdfUrl: ''
}
},
onLoad() {
this.selectContractPdfBase64Fn()
const obj = '123'
console.log(this.getType(window))
},
methods: {
async selectContractPdfBase64Fn() {
const {data: res} = await selectContractPdfBase64({studentId: this.studentId})
this.pdfUrl = res
console.log('this.pdfUrl')
console.log(this.pdfUrl)
},
change() {
console.log('你关你关')
},
getType(obj){
let type = typeof obj;
if (type !== "object") { // typeof
return type;
}
// typeof object
return Object.prototype.toString.call(obj).replace(/^\[object (\S+)\]$/,
'$1');
}
}
}
</script>
<style lang="scss" scoped>
.card {
padding: 28rpx;
padding: 8rpx;
margin-bottom: 40rpx;
}
</style>

13
pages/mineEntry/myOrder/comp/comp.scss

@ -8,17 +8,22 @@
border-bottom: 2rpx dashed #E8E9EC;
justify-content: space-between;
align-items: center;
.tag {
// width: 176rpx;
height: 60rpx;
background: rgba(250, 149, 25, 0.1);
background: rgba(233, 243, 230, 1.0);
border-radius: 8rpx;
text-align: center;
font-size: 28rpx;
color: #FA7919;
color: #6cbc9f;
margin-right: 24rpx;
padding: 10rpx 18rpx;
white-space: nowrap;
&.yellow {
color: #FA7919;
background: rgba(250, 149, 25, 0.1);
}
}
.schoolName {
@ -30,7 +35,7 @@
.status {
display: flex;
align-items: center;
white-space: nowrap;
.text {
font-size: 28rpx;
color: $themC;

23
pages/mineEntry/myOrder/comp/opera.vue

@ -3,11 +3,11 @@
<view class="consultItem">
<view class="top_row">
<view class="flex">
<view class="tag">学费</view>
<view class="schoolName">xx模拟驾驶馆</view>
<view class="tag" :class="{yellow: item.orderType==1}"> {{orderTypeTxt[item.orderType]}}</view>
<view class="schoolName oneRowText">{{ $u.utils.truncateText(item.schoolName, 12) }}</view>
</view>
<view class="status">
<view class="text">待处理</view>
<view class="text">{{orderStatusTxt[item.orderStatus]}}</view>
<view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view>
@ -21,7 +21,7 @@
</view>
<view class="lab">学驾车型</view>
</view>
<view class="name">000001</view>
<view class="name">{{item.trainType}}</view>
</view>
<view class="row">
<view class="leftLab">
@ -30,7 +30,7 @@
</view>
<view class="lab">所选班型</view>
</view>
<view class="name">2023/08/08 10:00:00</view>
<view class="name">{{item.className}}</view>
</view>
</view>
<view class="border_bottom">
@ -40,17 +40,26 @@
<!-- <view class="btnBg">去评价</view> -->
<view class="rows">
<view class="label">培训费总价</view>
<view class="value">2000.02</view>
<view class="value">{{ $u.utils.priceTo(item.totalAmount) }}</view>
</view>
<view class="rows">
<view class="label hui">实际支付</view>
<view class="value blue">2000.02</view>
<view class="value blue">暂无字段</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: ['item'],
data() {
return {
orderTypeTxt: ['', '学费', '理科费', '考场模拟', '额外学时购买'],//1234
orderStatusTxt: ['待支付', '已支付', '已取消', '支付失败'], //01-12
}
}
}
</script>
<style lang="scss" scoped>

39
pages/mineEntry/myOrder/detail/detail.vue

@ -6,14 +6,14 @@
<view class="consultItem">
<view class="top_row">
<view class="flex">
<view class="tag">学费</view>
<view class="schoolName">xx模拟驾驶馆</view>
<view class="tag":class="{yellow: info.orderType==1}"> {{orderTypeTxt[info.orderType]}}</view>
<view class="schoolName">{{ $u.utils.truncateText(info.schoolName, 12) }}</view>
</view>
<view class="status">
<view class="text">尾款待支付</view>
<view class="icon">
<view class="text">{{orderStatusTxt[info.orderStatus]}}</view>
<!-- <view class="icon">
<u-icon name="arrow-right" size="14" color="#686B73" style="margin-left: 12rpx;" ></u-icon>
</view>
</view> -->
</view>
</view>
<view class="target">
@ -24,7 +24,7 @@
</view>
<view class="lab">学驾车型</view>
</view>
<view class="name">C1</view>
<view class="name">{{info.trainType}}</view>
</view>
<view class="row">
<view class="leftLab">
@ -33,7 +33,7 @@
</view>
<view class="lab">所选班型</view>
</view>
<view class="name">C2自动挡一对一VIP班</view>
<view class="name">{{info.className}}</view>
</view>
<view class="row">
<view class="leftLab">
@ -106,8 +106,31 @@
<script>
import refundInfo from './comp/refundInfo.vue'
import { applyOrderGet } from '@/config/api.js'
export default {
components: { refundInfo }
components: { refundInfo },
data() {
return {
id: '',
info: {},
orderTypeTxt: ['', '学费', '理科费', '考场模拟', '额外学时购买'],//1234
orderStatusTxt: ['待支付', '已支付', '已取消', '支付失败'], //01-12
}
},
onLoad(options) {
this.id = options.id
this.applyOrderGetFn()
},
onPullDownRefresh() {
this.applyOrderGetFn()
},
methods: {
async applyOrderGetFn() {
const {data: res} = await applyOrderGet({ orderId: this.id})
this.info = res
uni.stopPullDownRefresh()
}
}
}
</script>

78
pages/mineEntry/myOrder/myOrder.vue

@ -3,22 +3,26 @@
<topNavbar title="我的订单"></topNavbar>
<view class="pad">
<view class="searcBox">
<searchRow placeholder="搜索"/>
<searchRow placeholder="搜索" @searchFn="searchFn"/>
</view>
<view class="tabs">
<view class="tab" v-for="(item,index) in tabList" :key="index" :class="{active: currentTab==item.id}" @click="changeTab(item)">{{ item.text }}</view>
<view class="tab" v-for="(item,index) in tabList" :key="index" :class="{active: params.orderStatus==item.id}" @click="changeTab(item)">{{ item.text }}</view>
</view>
<view class="navs">
<view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: currentNav==item.id}" @click="changeNav(item)">{{ item.text }}</view>
<view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: params.orderType==item.id}" @click="changeNav(item)">{{ item.text }}</view>
</view>
<view class="recordTotal">100条记录</view>
<view class="recordTotal"> <text v-if="total">{{total}}条记录</text></view>
<view class="tabCon">
<view class="card" v-for="(item,index) in 10" :key="index" @click="$goPage('/pages/mineEntry/myOrder/detail/detail')">
<opera></opera>
<view class="card" v-for="(item,index) in list" :key="index" @click="$goPage('/pages/mineEntry/myOrder/detail/detail?id='+ item.orderId)">
<opera :item="item"></opera>
</view>
</view>
<view style="padding-bottom: 20rpx;" v-if="list.length>2">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
@ -27,31 +31,77 @@
<script>
import opera from './comp/opera'
import { applyOrderPage } from '@/config/api.js'
export default {
components: { opera },
data() {
return {
tabList: [
{text: '已付',id: 1},
{text: '待付',id: 2},
{text: '待付',id: 0},
{text: '退款',id: 3},
],
],//01-12
navList: [
{text: '全部', id: 0},
{text: '学费', id: 1},
{text: '考场模拟费', id: 2}
],
currentTab: 1,
currentNav: 0,
{text: '考场模拟费', id: 3}
],//1234
params: {
pageNo: 1,
pageSize: 20,
orderStatus: 1,
orderType: 0,
sercheValue: ''
},
list: [],
total: 0,
status: 'loading'
}
},
onLoad() {
this.params.studentId = this.studentId
this.applyOrderPageFn()
},
onPullDownRefresh() {
this.initList()
},
onReachBottom() {
if(this.total>this.list.length) {
this.applyOrderPageFn()
}
},
methods: {
searchFn(val) {
this.params.sercheValue = val
this.initList()
},
changeTab(item) {
this.currentTab = item.id
this.params.orderStatus = item.id
this.initList()
},
changeNav(item) {
this.currentNav = item.id
this.params.orderType = item.id
this.initList()
},
initList() {
this.params.pageNo = 1
this.list = []
this.status = 'loading'
this.applyOrderPageFn()
},
async applyOrderPageFn() {
let obj = Object.assign({},this.params)
if(obj.orderType==0) delete obj.orderType
if(!obj.sercheValue) delete obj.sercheValue
const {data: res} = await applyOrderPage(obj)
this.list.push(...res.list)
this.params.pageNo ++
this.total = res.total
if(this.total==this.list.length) {
this.status = 'nomore'
}
uni.stopPullDownRefresh()
}
}
}
</script>

6
pages/tabbar/index/index.vue

@ -33,8 +33,8 @@
</view>
</view>
<!-- 搜索 -->
<view class="searchCon">
<searchRow placeholder="搜索驾校、教练…" @click.native="$goPage('/pages/indexEntry/findShcool/searchShcool/searchShcool')"></searchRow>
<view class="searchCon" @click.self="$goPage('/pages/indexEntry/findShcool/searchShcool/searchShcool')">
<searchRow placeholder="搜索驾校、教练…" ></searchRow>
</view>
</view>
<view class="pad">
@ -293,7 +293,7 @@
methods: {
entrySectionClick(item) {
if(item.text=='我要报名') {
this.$goPage(item.url)
// this.$goPage(item.url)
this.$store.commit('updateNonPlatformStudent', false)
if(this.vuex_userInfo.applyStep==3) {

21
pages/tabbar/mine/index.vue

@ -40,7 +40,7 @@
</view>
<!-- 我的相关入口 -->
<view class="ul">
<view class="li" v-for="(item,index) in myPageEntry" :key="index" @click="$goPage(item.url)">
<view class="li" v-for="(item,index) in myPageEntry" :key="index" @click="myPageEntryClick(item)">
<view class="icon">
<image :src="item.icon" mode=""></image>
</view>
@ -65,9 +65,11 @@
</template>
<script>
import { selectContractPdfBase64 } from '@/config/api.js'
export default {
data() {
return {
myPageEntry: [
{
text: '我的预约',
@ -130,6 +132,7 @@
},
onLoad() {
console.log('我的页面')
},
onShow() {
// uni.hideTabBar();
@ -141,6 +144,22 @@
}else {
this.$goPage('/pages/mineEntry/personaInfo/personaInfo')
}
},
async selectContractPdfBase64Fn() {
const {data: res} = await selectContractPdfBase64({studentId: this.studentId})
this.pdfUrl = res
console.log('this.pdfUrl')
console.log(this.pdfUrl)
},
async myPageEntryClick(item) {
// if(item.text=='') {
// this.showPreview = false
// this.pdfUrl = ''
// await this.selectContractPdfBase64Fn()
// this.showPreview = true
// return
// }
this.$goPage(item.url)
}
}
}

2
store/modules/school.js

@ -19,6 +19,8 @@ const school = {
updateBizToken(state, val) {
uni.setStorageSync('BizToken', val)
state.BizToken = val
console.log('保存到store里了')
console.log(state.BizToken)
},
},

9
uni_modules/mumu-previewOffce/changelog.md

@ -0,0 +1,9 @@
## 1.0.3(2023-02-22)
本插件将于2023/11/30停止提供服务
## 1.0.2(2022-07-19)
- 【添加】 兼容大部分小程序
- 【修复】 微信小程序中直接打开问题
## 1.0.1(2022-07-02)
修复在 ios 下背景出现大量标题,主题,创作者等等数据
## 1.0.0(2022-05-25)
版本上线

208
uni_modules/mumu-previewOffce/components/mumu-previewOffce/mumu-previewOffce.vue

@ -0,0 +1,208 @@
<template>
<view class="preview" v-if="value && isMp === false">
<view class="right" :class="previewType"></view>
<view class="left" :class="previewType"></view>
<iframe :src="previewUrl" width="100%" frameborder="0" id="if"></iframe>
<view class="error" v-if="isError">传入文件格式不正确</view>
<view class="loading">预览模块加载中...</view>
<view class="close" @click="closePre()">关闭</view>
</view>
</template>
<script>
export default {
model: {
event: 'change'
},
props: {
fileUrl: {
type: String,
default: ''
},
value: {
type: Boolean
}
},
data() {
return {
previewUrl: ``,
isError: false,
isMp: false
}
},
watch: {
fileUrl: {
handler(newValue) {
if (!newValue) return
//#ifdef MP
this.isMp = true
uni.downloadFile({
url: newValue,
success: res => {
const filePath = res.tempFilePath
uni.openDocument({
filePath: filePath,
success: res => {
console.log('打开文档成功')
}
})
}
})
//#endif
//#ifndef MP
let exit = newValue.split('.')
if (!exit.length) return (this.isError = true)
exit = exit.pop()
const arr = ['pptx', 'ppt', 'docx', 'doc', 'xlsx', 'xls', 'pdf']
if (arr.indexOf(exit) === -1) return (this.isError = true)
this.isError = false
if (exit === 'pdf') return (this.previewUrl = this.pasePdfUrl(newValue))
this.previewUrl = this.paseOfficeUrl(newValue)
//#endif
},
immediate: true
}
},
methods: {
closePre() {
this.$emit('change', false)
},
paseOfficeUrl(url) {
url = encodeURIComponent(url)
return `https://view.officeapps.live.com/op/embed.aspx?src=${url}&amp;wdPrint=0&amp;wdEmbedCode=0&amp;wdStartOn=1`
},
pasePdfUrl(url) {
//url = encodeURIComponent(url)
return `https://previewpdf.mumudev.top/?file=${url}`
}
},
computed: {
previewType() {
let exit = this.fileUrl.split('.')
if (!exit.length) return console.log('传入文件格式不正确')
exit = exit.pop()
switch (exit) {
case 'pptx':
case 'ppt':
return 'ppt'
case 'docx':
case 'doc':
return 'word'
case 'xlsx':
case 'xls':
return 'excel'
case 'pdf':
return ''
default:
console.log('传入文件格式不正确')
}
}
}
}
</script>
<style lang="scss" scoped>
.preview {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: #fff;
z-index: 100;
.right,
.left {
position: absolute;
z-index: 99999;
}
.ppt {
height: 20px;
width: 80px;
background-color: #444444;
&.right {
bottom: 2px;
right: 4px;
}
&.left {
left: 4px;
bottom: 2px;
width: 50px;
}
}
.word {
position: absolute;
width: 80px;
height: 17px;
background-color: #ffffff;
&.right {
bottom: 2px;
right: 2px;
}
&.left {
left: 2px;
bottom: 2px;
width: 40px;
}
}
.excel {
position: absolute;
width: 90px;
height: 23px;
background-image: linear-gradient(#3f4244, #36383a);
&.right {
bottom: 2px;
right: 2px;
}
&.left {
left: 2px;
bottom: 2px;
}
}
.close {
position: absolute;
top: 50px;
right: 10px;
background-color: #ccc;
color: #fff;
padding: 5px 10px;
border-radius: 5px;
font-size: 12px;
z-index: 102;
}
.error {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #ccc;
}
.loading {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: #ccc;
}
#if {
height: 100%;
position: relative;
z-index: 101;
}
}
</style>

85
uni_modules/mumu-previewOffce/package.json

@ -0,0 +1,85 @@
{
"id": "mumu-previewOffce",
"displayName": "预览offce文件。可以打开 PDF WORD PPT EXCEL 文件",
"version": "1.0.3",
"description": "在程序中直接打开 offce 文件进行预览。可以打开 PDF WORD PPT EXCEL 文件",
"keywords": [
"PDF",
"WORD",
"PPT",
"EXCEL",
"offce"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "",
"type": "component-vue"
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {
"app-vue": "y",
"app-nvue": "n"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "n",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "y",
"快手": "u",
"飞书": "y",
"京东": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

85
uni_modules/mumu-previewOffce/readme.md

@ -0,0 +1,85 @@
# 插件介绍
** 预览的文件地址必须是可以通过互联网访问的!!! **
** 预览的文件地址必须是可以直接复制在浏览器地址中访问的!!! **
## 本插件将于2023/11/30停止提供服务
文档预览工具新版本已上线
对比当前版本支持了手机端双手缩放操作,office文件不在依赖微软的解析接口,支持服务端完全私有化部署(内网部署),UI界面有单独的电脑端、ios端、安卓端。
新版地址:[h5office。预览office文件,预览文档,打开PDF WORD PPT EXCEL 文件 - DCloud 插件市场](https://ext.dcloud.net.cn/plugin?id=10895)
## 插件原理
> pdf 文件预览是通过 `pdf.js` 开源库,搭建了一个pdf预览的网站。前端只需要使用 iframe 加载这个网站即可。[pdf.js 官网](http://mozilla.github.io/pdf.js/api/draft/index.html)
>
> offce 文件的预览是通过微软offce在线接口进行解析的。offce在线地址:https://view.officeapps.live.com/op/embed.aspx?src=‘你的文件网络地址’
>
> 在微信小程序中,是通过小程序中的API进行预览的。[小程序文档](https://developers.weixin.qq.com/miniprogram/dev/api/file/wx.openDocument.html)
## 使用环境
** 不支持nvue 。小程序中使用官方提供的api。h5与其他环境是通过上面介绍的插件原理加载。**
## 插件使用
**插件已支持 uni_modules 支持组件easycom,以下代码演示的是普通使用**
``` html
<!-- HTML -->
<mumu-previewOffce :fileUrl='fileUrl' v-model='showPreview'></mumu-previewOffce>
<button @click='showPreview = true'></button>
```
``` js
import MumuPreviewOffce from '@/uni_modules/mumu-previewOffce/components/mumu-previewOffce/mumu-previewOffce.vue'
export default {
components: {
MumuPreviewOffce
},
data() {
return {
showPreview: false,
fileUrl: 'https://h5plugin.mumudev.top/public/previewOffce/333.docx'
}
},
methods: {
},
}
```
## 相关 API
### 可传属性(Props)
| 参数 | 说明 | 类型 | 默认值 | 可选 |
| ------- | ------------------------ | ------- | ------ | ------------ |
| v-model | 双向绑定,显示或隐藏组件 | Boolean | false | false / true |
| fileUrl | 预览文件的网络地址 | String | - | - |
## 打开本地预览
本地预览功能还在开发中...
开发思路是:
> 选择打开本地文件,上传到服务器。获取到服务器中的文件地址,传递给当前组件展示。
没有办法直接在本地打开,所有采取这种方案。有条件的同学可以自己开发。我也会尽快把这个功能做出来。
## 案例演示
![](https://h5plugin.mumudev.top/public/previewOffce/qrcode.png)
## 支持作者
![支持作者](https://student.mumudev.top/wxMP.jpg)
Loading…
Cancel
Save