Browse Source

更新代码

master
unknown 1 year ago
parent
commit
a882c40102
  1. 3
      common/js/mixins.js
  2. 19
      components/pickDateTimer/pickDateTimer.vue
  3. 7
      config/api.js
  4. 2
      config/request.js
  5. 2
      config/utils.js
  6. 4
      pages/carEntry/examineAppointment/comp/step1.vue
  7. 80
      pages/carEntry/examineAppointment/comp/step2.vue
  8. 179
      pages/carEntry/examineAppointment/comp/step3.vue
  9. 8
      pages/carEntry/examineAppointment/examineAppointment.vue
  10. 72
      pages/carEntry/operaAppointment/comp/coachInfo.vue
  11. 149
      pages/carEntry/operaAppointment/operaAppointment.vue
  12. 8
      pages/indexEntry/enroll/registInfo/registInfo.vue
  13. 9
      pages/indexEntry/findShcool/findShcool.vue
  14. 9
      pages/indexEntry/findShcool/screen/screen.vue
  15. 36
      pages/indexEntry/publicVideo/videoDetail/videoDetail.vue
  16. 30
      pages/tabbar/index/index.vue
  17. 3
      pages/tabbar/learnCar/comp/subject2.vue
  18. 3
      pages/tabbar/learnCar/comp/subject3.vue
  19. 6
      store/modules/user.js

3
common/js/mixins.js

@ -6,7 +6,8 @@ export default {
...mapState({
city: state=> state.user.vuex_cityInfo.city,
vuex_cityInfo: state=> state.user.vuex_cityInfo,
vuex_userInfo: state=> state.user.vuex_userInfo
vuex_userInfo: state=> state.user.vuex_userInfo,
apiOk: state=> state.user.apiOk,
}),
},
data() {

19
components/pickDateTimer/pickDateTimer.vue

@ -15,6 +15,7 @@
<view class="dateArr" >
<view class="dateWidth" v-for="(item,index) in dateArr[currentDay]" :key="index" @click="chooseDate(item)" >
<view class="date" :class="{active: chooseDay==item.date}">
<view class="dian"></view>
<view class="week">{{ item.week }}</view>
<view class="num">{{ item.num }}</view>
</view>
@ -50,6 +51,12 @@
</view>
</view>
<view class="card">
<view class="noDate">
<image src="http://192.168.1.20:81/zhili/image/20230927/ad178ebdf5394518b27b020c03ee48ab.png" mode=""></image>
</view>
</view>
</view>
</template>
@ -170,6 +177,15 @@
justify-content: center;
font-size: 28rpx;
color: #333;
.dian {
width: 12rpx;
height: 12rpx;
background: #D8D8D8;
border-radius: 50%;
&.active {
background: #1989FA;
}
}
&.active {
background: rgba(25,137,250,0.1);
border: 2rpx solid #1989FA;
@ -245,4 +261,7 @@
line-height: 72rpx;
margin: 108rpx auto 50rpx auto;
}
.noDate {
}
</style>

7
config/api.js

@ -20,12 +20,19 @@ export const coachPage = (params) => http.get('business/coach/page', {params: pa
export const publicVideoPage = (params) => http.get('business/video/page', {params: params})
// 公益视频 详情
export const publicGetvideo = (params) => http.get('business/video/getvideo', {params: params})
// 公益视频点赞
export const createUpvote = (data) => http.post('business/contentdata/createUpvote', data)
// 公益视频收藏
export const createCollect = (data) => http.post('business/contentdata/createCollect', data)
// 公益视频是否点赞收藏
export const getlikesCollection = (params) => http.get('business/users/getContent', {params: params})
// 行业资讯,
export const getarticleList = (params) => http.get('business/video/article', {params: params})
// 行业政策
export const getarticlezcList = (params) => http.get('business/video/articlezc', {params: params})
// 行业资讯,行业政策 详情
export const getarticle = (params) => http.get('business/video/getarticle', {params: params})
// 驾照类型
export const licenseType = () => http.get('system/dict/licenseType', )
// 区域

2
config/request.js

@ -79,6 +79,8 @@ module.exports = (vm) => {
console.log(response.config.url)
if(!noToken&&response.config.url!=='member/auth/logout') {
checkToken(vm)
}else {
vm.$store.commit('update_apiOk', true)
}
return data === undefined ? {} : data
}, (response) => {

2
config/utils.js

@ -6,7 +6,7 @@ export function checkToken(vm) {
if (nowTime > expiresTime * 1) {
vm.$store.commit('goLogin')
// 如果小于20分钟就刷新一下token &&
} else if ((expiresTime * 1 - nowTime) / 60000 < 30) {
} else if ((expiresTime * 1 - nowTime) / 60000 < 10) {
vm.$store.dispatch('refreshToken')
}
}

4
pages/carEntry/examineAppointment/comp/step1.vue

@ -6,8 +6,8 @@
<view class="adr">江西省江西市江西区尚坤丁兰国际1190</view>
</view>
<view class="icon">
<image src="@/static/images/index/telephone.png" mode=""></image>
<!-- <image src="@/static/images/index/telephone_cli.png" mode=""></image> -->
<image src="@/static/images/car/btn_daohang.png" mode=""></image>
<!-- <image src="@/static/images/car/btn_daohang_cli.png" mode=""></image> -->
</view>
</view>
<view class="poz_btn">

80
pages/carEntry/examineAppointment/comp/step2.vue

@ -1,15 +1,19 @@
<template>
<view class="step1">
<view class="step3">
<view class="card">
<view class="carModel">C1小型汽车手动挡</view>
</view>
<view class="card">
<view class="carModel active">C2小型汽车自动挡</view>
<view class="list">
<view class="listItem" v-for="(item,index) in list" :key="index" :class="{active: index==1}">
<view class="num">{{index+1}}号车</view>
<view class="text">{{ item.text }}</view>
</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>
@ -17,12 +21,18 @@
export default {
data() {
return {
dateArr: [
{week: '一', num: '08'},
{week: '二', num: '09'},
{week: '三', num: '10'},
{week: '四', num: '11'},
{week: '五', num: '12'},
list: [{
text: '00001',
id: 1
},
{
text: '00002',
id: 1
},
{
text: '00003',
id: 1
},
],
show: true
}
@ -37,26 +47,47 @@
<style lang="scss" scoped>
.card {
margin-bottom: 20rpx;
.carModel {
padding: 0 36rpx;
height: 152rpx;
background: #FFFFFF;
border-radius: 16rpx;
font-size: 32rpx;
font-weight: 600;
line-height: 152rpx;
padding: 28rpx 24rpx;
}
.list {
display: flex;
flex-wrap: wrap;
display: flex;
justify-content: space-between;
.listItem {
width: 32.4%;
height: 120rpx;
background: #F8F8F8;
border-radius: 12rpx;
font-weight: 500;
text-align: center;
font-size: 24rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.num {
font-size: 28rpx;
font-weight: 600;
margin-bottom: 10rpx;
}
&.active {
background: rgba(25,137,250,0.1);
width: 200rpx;
height: 120rpx;
background: rgba(25, 137, 250, 0.1);
border-radius: 12rpx;
border: 2rpx solid $themC;
color: $themC;
border: 2rpx solid #1989FA;
}
}
}
.btn_row {
display: flex;
justify-content: space-between;
padding-bottom: 30rpx;
.btn {
width: 47%;
height: 72rpx;
@ -66,7 +97,7 @@
color: #fff;
text-align: center;
line-height: 72rpx;
&.border {
background: rgba(25, 137, 250, 0.1);
border: 2rpx solid $themC;
@ -75,5 +106,4 @@
}
}
</style>

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

@ -1,19 +1,48 @@
<template>
<view class="step3">
<view class="card">
<view class="list">
<view class="listItem" v-for="(item,index) in list" :key="index" :class="{active: index==1}">
<view class="num">{{index+1}}号车</view>
<view class="text">{{ item.text }}</view>
<view class="step1">
<pickDateTimer/>
<view class="btn_row">
<view class="border btn" @click="changeStep(3)">返回上一步</view>
<view class="btn" @click="show=true">确认预约</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">xxx</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">2023/08/08 08:009:00</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">xxx</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>
</view>
<view class="btn_row" style="margin-top: 108rpx;">
<view class="border btn" @click="changeStep(2)">返回上一步</view>
<view class="btn" @click="changeStep(4)">下一步</view>
</view>
</u-popup>
</view>
</template>
@ -21,20 +50,8 @@
export default {
data() {
return {
list: [{
text: '00001',
id: 1
},
{
text: '00002',
id: 1
},
{
text: '00003',
id: 1
},
],
show: true
show: false
}
},
methods: {
@ -47,47 +64,90 @@
<style lang="scss" scoped>
.card {
padding: 28rpx 24rpx;
}
.list {
display: flex;
flex-wrap: wrap;
display: flex;
justify-content: space-between;
.listItem {
width: 32.4%;
height: 120rpx;
background: #F8F8F8;
border-radius: 12rpx;
font-weight: 500;
text-align: center;
font-size: 24rpx;
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;
flex-direction: column;
align-items: center;
justify-content: center;
.num {
font-size: 28rpx;
border-radius: 50%;
&.left {
left: 16rpx;
}
&.right {
right: 16rpx;
}
}
}
}
}
.popupCon {
padding: 30rpx 50rpx;
.h2 {
font-weight: 600;
margin-bottom: 10rpx;
color: #333333;
line-height: 70rpx;
font-size: 36rpx;
text-align: center;
}
&.active {
width: 200rpx;
height: 120rpx;
background: rgba(25, 137, 250, 0.1);
border-radius: 12rpx;
border: 2rpx solid $themC;
color: $themC;
.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;
}
}
}
}
}
.btn_row {
display: flex;
justify-content: space-between;
.btn {
width: 47%;
height: 72rpx;
@ -97,7 +157,7 @@
color: #fff;
text-align: center;
line-height: 72rpx;
&.border {
background: rgba(25, 137, 250, 0.1);
border: 2rpx solid $themC;
@ -105,5 +165,4 @@
}
}
}
</style>

8
pages/carEntry/examineAppointment/examineAppointment.vue

@ -15,10 +15,10 @@
<view class="dian" @click="changeStep(3)">
<view class="num" :class="{active: currentStep==3}">3</view>
</view>
<view class="line"></view>
<!-- <view class="line"></view>
<view class="dian" @click="changeStep(4)">
<view class="num" :class="{active: currentStep==4}">4</view>
</view>
</view> -->
<!-- <view class="line"></view>
<view class="dian" @click="changeStep(5)">
<view class="num" :class="{active: currentStep==5}">5</view>
@ -27,7 +27,7 @@
<view class="step_text">
<!-- <view class="txt">选择科目</view> -->
<view class="txt">选择考场</view>
<view class="txt">选择车型</view>
<!-- <view class="txt">选择车型</view> -->
<view class="txt">选择车辆</view>
<view class="txt">选择时间</view>
</view>
@ -36,7 +36,7 @@
<step1 v-if="currentStep==1" @changeStep="changeStep"></step1>
<step2 v-if="currentStep==2" @changeStep="changeStep"></step2>
<step3 v-if="currentStep==3" @changeStep="changeStep"></step3>
<step4 v-if="currentStep==4" @changeStep="changeStep"></step4>
<!-- <step4 v-if="currentStep==4" @changeStep="changeStep"></step4> -->
<!-- <step5 v-if="currentStep==5" @changeStep="changeStep"></step5> -->
</view>
</view>

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

@ -0,0 +1,72 @@
<template>
<view class="coachInfo">
<view class="card">
<view class="avatar">
<image src="@/static/images/logo.png" mode=""></image>
</view>
<view class="rightTxt">
<view class="name_row">
<view class="name">张三三</view>
<view class="tag">未绑定</view>
</view>
<moreRight text="预约其它教练课程"/>
</view>
</view>
</view>
</template>
<script>
</script>
<style lang="scss" scoped>
.coachInfo {
.card {
width: 100%;
height: 180rpx;
display: flex;
align-items: center;
padding: 0 36rpx;
.avatar {
width: 100rpx;
height: 98rpx;
border-radius: 50%;
overflow: hidden;
}
.rightTxt {
flex: 1;
padding: 0 0 0 34rpx;
.name_row {
display: flex;
align-items: center;
margin-bottom: 16rpx;
.name {
font-size: 32rpx;
color: #333;
font-weight: 550;
}
.tag {
width: 98rpx;
height: 40rpx;
background: #F2F2F2;
border-radius: 4rpx;
text-align: center;
line-height: 40rpx;
text-align: center;
margin-left: 24rpx;
color: #959595;
&.active {
color: $themC;
background: #E8F3FE;
}
}
}
moreright {
}
}
}
}
</style>

149
pages/carEntry/operaAppointment/operaAppointment.vue

@ -1,48 +1,40 @@
<template>
<view class="pageBgImg">
<topNavbar :title="title"></topNavbar>
<view class="pad">
<view class="top_row">
<view class="step_row">
<!-- <view class="dian" @click="changeStep(1)">
<view class="num" :class="{active: currentStep==1}">1</view>
</view> -->
<!-- <view class="line"></view> -->
<view class="dian" @click="changeStep(2)">
<view class="num" :class="{active: currentStep==2}">1</view>
</view>
<view class="line"></view>
<view class="dian" @click="changeStep(3)">
<view class="num" :class="{active: currentStep==3}">2</view>
<view class="pad" style="padding-bottom: 60rpx;">
<coachInfo/>
<view class="h1">预约时间</view>
<pickDateTimer/>
<view class="h1">教练车</view>
<view class="card">
<view class="car">
<view class="carTag">赣A98299学</view>
</view>
</view>
<view class="h1">训练场地</view>
<view class="card" >
<view class="site">
<view class="leftTxt">
<view class="adrs">某某场地</view>
<view class="adrsTxt">江西省江西市江西区尚坤丁兰国际1190</view>
</view>
<view class="line"></view>
<view class="dian" @click="changeStep(4)">
<view class="num" :class="{active: currentStep==4}">3</view>
<view class="icon">
<image src="@/static/images/car/btn_daohang.png" mode=""></image>
<!-- <image src="@/static/images/car/btn_daohang_cli.png" mode=""></image> -->
</view>
</view>
<view class="step_text">
<!-- <view class="txt">选择科目</view> -->
<view class="txt">选择场地</view>
<view class="txt">选择车辆</view>
<view class="txt">预约时间</view>
</view>
</view>
<step1 v-if="currentStep==1" @changeStep="changeStep"></step1>
<step2 v-if="currentStep==2" @changeStep="changeStep"></step2>
<step3 v-if="currentStep==3" @changeStep="changeStep"></step3>
<step4 v-if="currentStep==4" @changeStep="changeStep"></step4>
</view>
</view>
</template>
<script>
import step1 from './comp/step1'
import coachInfo from './comp/coachInfo'
import step2 from './comp/step2'
import step3 from './comp/step3'
import step4 from './comp/step4'
export default {
components: { step1, step2, step3, step4 },
components: { coachInfo, step2, step3, step4 },
data() {
return {
currentStep: 2,
@ -69,69 +61,44 @@
</script>
<style lang="scss" scoped>
.top_row {
width: 100%;
padding-bottom: 36rpx;
.step_row {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 0 32rpx;
.dian {
width: 180rpx;
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
// background: red;
}
.num {
width: 46rpx;
height: 46rpx;
background: #D1E7FE;
line-height: 46rpx;
border-radius: 50%;
text-align: center;
.h1 {
line-height: 100rpx;
}
.car {
padding: 32rpx 28rpx;
.carTag {
height: 120rpx;
background: #F8F8F8;
padding: 0 18rpx;
color: $themC;
font-size: 24rpx;
position: absolute;
z-index: 9;
&.active {
border:2rpx solid $themC;
&::before {
content: '';
width: 66rpx;
height: 66rpx;
border-radius: 50%;
position: absolute;
z-index: -1;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
background: rgba(255,255,255,0.6);
filter: blur(6rpx);
}
}
}
.line {
width: 60rpx;
height: 4rpx;
background: rgba(255,255,255,0.4);
}
}
.step_text {
display: flex;
.txt {
flex: 1;
text-align: center;
border-radius: 12rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
}
}
font-weight: 500;
width: fit-content;
line-height: 120rpx;
}
}
.site {
padding: 28rpx 40rpx 28rpx 36rpx;
display: flex;
align-items: center;
.leftTxt {
width: 0;
flex: 1;
color: $themC;
.adrs {
font-size: 32rpx;
font-weight: 550;
margin-bottom: 10rpx;
}
.adrsTxt {
font-size: 28rpx;
font-weight: 400;
}
}
.icon {
width: 72rpx;
height: 72rpx;
}
}
</style>

8
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -259,9 +259,9 @@
</u-popup>
<!-- 选择班型 -->
<u-picker :show="showClassModel" :columns="columnsClassModel" keyName="label" @confirm="confirmClassModel" @close="showClassModel=false"></u-picker>
<u-picker :show="showClassModel" :columns="columnsClassModel" keyName="label" @confirm="confirmClassModel" @cancel="showClassModel=false"></u-picker>
<!-- 选择车型 -->
<u-picker :show="showCar" :columns="columnsCar" keyName="label" @confirm="confirmCar"></u-picker>
<u-picker :show="showCar" :columns="columnsCar" keyName="label" @confirm="confirmCar" :closeOnClickOverlay="true" @cancel="showCar=false"></u-picker>
<!-- 原驾驶证初领日期 -->
<u-datetime-picker :show="showFirstLicenceTime" mode="date" @confirm="confirmFirstLicenceTime"></u-datetime-picker>
<!-- 原驾驶证学驾车型 -->
@ -269,9 +269,9 @@
<oldDrive @pickerOldDrive="pickerOldDrive"/>
</u-popup>
<!-- 已过科目 -->
<u-picker :show="showSubjectPass" :columns="columnsSubject" keyName="label" @confirm="confirmSubjectPass"></u-picker>
<u-picker :show="showSubjectPass" :columns="columnsSubject" keyName="label" @confirm="confirmSubjectPass" @cancel="showSubjectPass=false"></u-picker>
<!-- 待科目 -->
<u-picker :show="showSubjectTreat" :columns="columnsSubject" keyName="label" @confirm="confirmTreat"></u-picker>
<u-picker :show="showSubjectTreat" :columns="columnsSubject" keyName="label" @confirm="confirmTreat" @cancel="showSubjectTreat=false"></u-picker>
</view>
</template>

9
pages/indexEntry/findShcool/findShcool.vue

@ -8,7 +8,7 @@
<view class="navBox">
<view class="tab" v-for="(item,index) in tabData" :key="index" :class="{active: params.sercheType==item.id}" @click="tabClick(item)">
{{ item.text }}</view>
<view class="screen" @click="$goPage('/pages/indexEntry/findShcool/screen/screen')">
<view class="screen" @click="goScreen">
<view class="txt">筛选</view>
<view class="screenIcon">
<image src="../../../static/images/index/ic_shaixuan.png" mode=""></image>
@ -59,6 +59,8 @@
lat: '',
lng: '',
sercheType: 1,
businessScope: '',
district: ''
},
total: 20,
listData: [],
@ -89,6 +91,10 @@
}
},
methods: {
goScreen() {
let url = `/pages/indexEntry/findShcool/screen/screen?businessScope=${this.params.businessScope}&district=${this.params.district}`
this.$goPage(url)
},
goPage(item) {
this.$goPage('/pages/indexEntry/findShcool/shcoolDetail/shcoolDetail?schoolId='+ item.id)
},
@ -97,7 +103,6 @@
this.listInit()
},
async listInit() {
this.listData = []
this.params.pageNo = 1
await this.schoolPageFn()

9
pages/indexEntry/findShcool/screen/screen.vue

@ -35,7 +35,14 @@
areTypeArr: []
}
},
onLoad() {
onLoad(options) {
if(options.businessScope) {
this.driverTypeArr = options.businessScope.split(',')
}
if(options.district) {
this.areTypeArr = options.district.split(',').map(item=>item*1)
console.log(this.areTypeArr)
}
this.licenseTypeFn()
this.nachangListFn()
},

36
pages/indexEntry/publicVideo/videoDetail/videoDetail.vue

@ -4,7 +4,7 @@
<view class="back">
<topNavbar title=""></topNavbar>
</view>
<video :src="vdoDetail.videoUrl" :poster="vdoDetail.videoCover"></video>
<video :src="vdoDetail.videoUrl" :poster="vdoDetail.videoCover" v-if="vdoDetail.videoUrl"></video>
</view>
<view class="pad">
<view class="card" style="margin: 28rpx 0 24rpx 0;">
@ -14,14 +14,14 @@
</view>
</view>
<view class="operate">
<view class="operateItem">
<view class="operateItem" @click="likeFn">
<view class="icon">
<image src="/static/images/index/dianzan_nor.png" mode=""></image>
<!-- <image src="/static/images/index/dianzan_cli.png" mode=""></image> -->
</view>
<view class="txt">点赞</view>
</view>
<view class="operateItem">
<view class="operateItem" @click="createCollectFn">
<view class="icon">
<image src="/static/images/index/shoucang_nor.png" mode=""></image>
<!-- <image src="/static/images/index/shoucang_cli.png" mode=""></image> -->
@ -36,7 +36,7 @@
<view class="txt">分享</view>
</view>
</view>
<view class="videolist">
<!-- <view class="videolist">
<view class="flex-b">
<view class="h1">相关推荐</view>
<moreRight text="更多"></moreRight>
@ -46,32 +46,52 @@
<videoItem></videoItem>
</view>
</view>
</view>
</view> -->
</view>
</view>
</template>
<script>
import videoItem from '../comp/videoItem'
import { publicGetvideo } from '@/config/api.js'
import { publicGetvideo, createUpvote, getlikesCollection, createCollect } from '@/config/api.js'
export default {
components: { videoItem },
data() {
return {
id: '',
vdoDetail: {}
vdoDetail: {},
params: {}
}
},
onLoad(options) {
this.id = options.id
this.params = {knowledge: this.id, mobile: this.vuex_userInfo.mobile}
this.publicGetvideoFn()
},
methods: {
async publicGetvideoFn() {
const {data: res} = await publicGetvideo({id: this.id})
this.vdoDetail = res
this.getlikesCollection()
console.log(res)
}
},
//
async getlikesCollection() {
const {data: res} = await getlikesCollection(this.params)
},
async likeFn() {
const {data: res} = await createUpvote(this.params)
this.getlikesCollection()
console.log(res)
},
//
async createCollectFn() {
const {data: res} = await createCollect(this.params)
this.getlikesCollection()
console.log(res)
},
}
}
</script>

30
pages/tabbar/index/index.vue

@ -71,19 +71,19 @@
</view>
</view>
</view>
<uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="swiperInfo"
<uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="swiperInfo" v-if="swiperInfo.length"
:current="current" :mode="mode" style="height: 230rpx;" :dots-styles="dotsStyles"
field="content">
<swiper class="swiper-box" @change="change" :current="swiperDotIndex" style="height: 230rpx;">
<swiper-item v-for="(item, index) in swiperInfo" :key="index" @click="$goPage('/pages/indexEntry/examines/newsDetail/newsDetail')">
<swiper-item v-for="(item, index) in swiperInfo" :key="index" @click="$goPage('/pages/indexEntry/iIndustryInfo/detail/detail?id='+ item.id)">
<view class="swiper-item" :class="'swiper-item' + index">
<view class="flex-b">
<view class="imgBox">
<image src="../../../static/images/logo.png" mode=""></image>
<image :src="item.picture" mode=""></image>
</view>
<view class="rightText">
<view class="text towRowText">{{ item.text }}</view>
<view class="date">{{ item.date}}</view>
<view class="text towRowText">{{ item.title }}</view>
<view class="date">{{ $u.timeFormat(item.createTime, 'yyyy/mm/dd') }}</view>
</view>
</view>
</view>
@ -117,6 +117,7 @@
<script>
import { imgUrl } from '@/config/site.config'
import { getarticleList } from '@/config/api.js'
export default {
data() {
return {
@ -247,24 +248,14 @@
url: ''
},
],
swiperDotIndex: 1,
swiperDotIndex: 0,
current: 1,
mode: 'default',
swiperInfo: [{
img: require('../../../static/images/index/ic_lilun.png'),
text: '2023年6月份江西省机动车驾驶培训机构考试合格率的通报',
date: '2023/08/09'
},
{
img: require('../../../static/images/index/ic_lilun.png'),
text: '2023年6月份江西省机动车驾驶培训机构考试合格率的通报',
date: '2023/08/10'
},
{
img: require('../../../static/images/index/ic_lilun.png'),
text: '2023年6月份江西省机动车驾驶培训机构考试合格率的通报',
date: '2023/08/11'
},
}
],
dotsStyles: {
backgroundColor: '#E8E9EC',
@ -277,6 +268,7 @@
}
},
async onLoad() {
this.getarticleListFn()
// uni.getLocation({
// type: 'wgs84',
// success: function (res) {
@ -303,6 +295,10 @@
// }
},
methods: {
async getarticleListFn() {
const {data: res} = await getarticleList(this.params)
this.swiperInfo = res.list[0].articleManagementDO
},
refereshFn() {
this.$store.dispatch('refreshToken')
// this.$store.dispatch('getUserInfo')

3
pages/tabbar/learnCar/comp/subject2.vue

@ -78,9 +78,6 @@
<view class="text">预约考场某某考场</view>
</view>
<view class="row">
<view class="text">学驾车型C1</view>
</view>
<view class="row">
<view class="text">车辆编号2号车浙A99988</view>
</view>
<view class="row">

3
pages/tabbar/learnCar/comp/subject3.vue

@ -77,9 +77,6 @@
<view class="text">预约考场某某考场</view>
</view>
<view class="row">
<view class="text">学驾车型C1</view>
</view>
<view class="row">
<view class="text">车辆编号2号车浙A99988</view>
</view>
<view class="row">

6
store/modules/user.js

@ -7,6 +7,7 @@ const user = {
vuex_cityInfo: uni.getStorageSync('vuex_cityInfo') ? uni.getStorageSync('vuex_cityInfo') : {city: '杭州市'},
vuex_userInfo: uni.getStorageSync('vuex_userInfo') ? uni.getStorageSync('vuex_userInfo') : {},
vuex_loginInfo: uni.getStorageSync('vuex_loginInfo') ? uni.getStorageSync('vuex_loginInfo') : {},
apiOk: true
},
mutations: {
update_vuex_cityInfo(state, payload) {
@ -21,6 +22,9 @@ const user = {
state.vuex_userInfo = payload
uni.setStorageSync('vuex_userInfo', payload);
},
update_apiOk(state, payload) {
state.apiOk = payload
},
goLogin(state) {
uni.clearStorageSync()
state.vuex_loginInfo = {}
@ -73,12 +77,14 @@ const user = {
},
// 刷新token
async refreshToken({state, commit}) {
commit('update_apiOk',false)
const http = uni.$u.http
let config = { header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}, custom: { noToken: true } }
let refreshToken = state.vuex_loginInfo.refreshToken
const res = await http.post('member/auth/refresh-token',{refreshToken}, config)
console.log('刷新token结果')
console.log(res)
commit('update_apiOk',true)
commit('update_vuex_loginInfo',res.data)
uni.$u.http.setConfig((config) => {
config.header.Authorization = 'Bearer ' + res.data.accessToken

Loading…
Cancel
Save