Browse Source

我的收藏接口调用

master
unknown 7 months ago
parent
commit
49138f178c
  1. 17
      components/commentItem/commentItem.vue
  2. 31
      components/nodata/nodata.vue
  3. 6
      config/api.js
  4. 10
      pages.json
  5. 19
      pages/carEntry/evaluate/comp/evaluateItem.vue
  6. 87
      pages/carEntry/evaluate/evaluate.vue
  7. 2
      pages/indexEntry/consult/pubComplaint/pubComplaint.vue
  8. 2
      pages/indexEntry/consult/pubConsult/pubConsult.vue
  9. 3
      pages/indexEntry/consult/record/comp/complaintItem.vue
  10. 5
      pages/indexEntry/consult/record/comp/consultItem.vue
  11. 7
      pages/indexEntry/consult/record/record.vue
  12. 18
      pages/indexEntry/enroll/registInfo/registInfo.vue
  13. 3
      pages/indexEntry/examines/allExamines/allExamines.vue
  14. 17
      pages/indexEntry/examines/allNews/allNews.vue
  15. 2
      pages/indexEntry/examines/detail/detail.vue
  16. 64
      pages/indexEntry/findShcool/coachComment/coachComment.vue
  17. 14
      pages/indexEntry/findShcool/comments/comments.vue
  18. 8
      pages/indexEntry/findShcool/comp/schoolItem.vue
  19. 14
      pages/indexEntry/findShcool/findShcool.vue
  20. 6
      pages/indexEntry/findShcool/shcoolComment/shcoolComment.vue
  21. 12
      pages/indexEntry/findShcool/shcoolDetail/comp/tab1.vue
  22. 24
      pages/indexEntry/findShcool/shcoolDetail/comp/tab3.vue
  23. 17
      pages/indexEntry/findShcool/shcoolDetail/shcoolDetail.vue
  24. 4
      pages/indexEntry/publicVideo/videoDetail/videoDetail.vue
  25. 57
      pages/mineEntry/myCollect/myCollect.vue
  26. 79
      pages/mineEntry/myEvaluate/comp/commentItem.vue
  27. 26
      pages/mineEntry/myEvaluate/myEvaluate.vue
  28. 2
      pages/tabbar/learnCar/comp/subject2.vue
  29. 2
      pages/tabbar/learnCar/comp/subject3.vue
  30. 87
      store/modules/school.js
  31. 3
      uni_modules/uview-ui/components/u-album/u-album.vue

17
components/commentItem/commentItem.vue

@ -10,9 +10,10 @@
</view>
<view class="text">{{ item.description }}</view>
<view class="imgBox" v-if="item.images&&item.images.length">
<view class="img" v-for="(img, imgIndex) in item.images" :key="imgIndex">
<image :src="img" mode=""></image>
</view>
<u-album :urls="item.images" :multipleSize="'160rpx'"></u-album>
</view>
<view class="vdo" v-if="item.videoUrl">
<video :src="item.videoUrl" controls></video>
</view>
</view>
</template>
@ -37,7 +38,15 @@
color: #686B73;
}
}
.vdo {
width: 360rpx;
margin-top: 12rpx;
video {
width: 100%;
height: 180rpx;
display: block;
}
}
.starBox {
padding: 10rpx 0 24rpx 0;
}

31
components/nodata/nodata.vue

@ -0,0 +1,31 @@
<template>
<view class="noDate">
<view class="img">
<image src="https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/complain/2023-10-09/1696832739095-nodata.png" mode=""></image>
</view>
<view class="text">
<text solt>暂无数据</text>
</view>
</view>
</template>
<script>
</script>
<style lang="scss" scoped>
.noDate {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.img {
width: 438rpx;height: 286rpx;
}
.text {
font-size: 26rpx;
color: #999;
margin-top: 60rpx;
}
</style>

6
config/api.js

@ -30,6 +30,8 @@ export const getUsersCommentById = (params) => http.get('business/appcomplain/ge
export const getStudentinfo = (params) => http.get('business/appcomplain/getStudentinfo', {params: params})
// 驾校评论分页
export const getSchoolListComment = (params) => http.get('business/school/getListComment', {params: params})
// 教练评价分页
export const getListCoachComment = (params) => http.get('business/school/getListCoach', {params: params})
// 驾校详情
export const getSchoolDetail = (params) => http.get('business/school/getSchool', {params: params})
// 教练列表分页
@ -43,13 +45,15 @@ export const createUpvote = (data) => http.post('business/contentdata/createUpvo
// 公益视频取消点赞 upvoteId
export const deleteUpvote = (data) => http.delete(`/business/contentdata/deleteUpvote?upvoteId=${data.upvoteId}&mobile=${data.mobile}`)
// 公益视频收藏
export const createCollect = (data) => http.post('business/contentdata/createCollect', data)
export const createCollect = (data) => http.post('business/contentdata/createCollect', data)
// 公益视频取消收藏 CollectId
export const deleteRetransmission = (data) => http.delete(`business/contentdata/deleteCollect?collectId=${data.CollectId}&mobile=${data.mobile}`)
// 公益视频分享
export const createRetransmission = (data) => http.post('business/contentdata/createRetransmission', data)
// 公益视频是否点赞收藏
export const getlikesCollection = (params) => http.get('business/users/getContent', {params: params})
// 公益视频我的收藏
export const getcollectVideo = (params) => http.get('business/users/getcollectVideo', {params: params})
// 行业资讯,
export const getarticleList = (params) => http.get('business/video/article', {params: params})
// 行业政策

10
pages.json

@ -163,7 +163,7 @@
{
"path": "findShcool/coachComment/coachComment",
"style": {
"navigationBarTitleText": "教练评价",
"navigationBarTitleText": "教练详情",
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
}
@ -417,7 +417,7 @@
"style": {
"navigationBarTitleText": "学车进度",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
}
},
@ -426,7 +426,7 @@
"style": {
"navigationBarTitleText": "学车进度",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
}
},
@ -444,7 +444,7 @@
"style": {
"navigationBarTitleText": "我的收藏",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
}
},
@ -453,7 +453,7 @@
"style": {
"navigationBarTitleText": "我的评价",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark"
}
},

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

@ -4,9 +4,10 @@
<view class="card">
<view class="top_row">
<view class="tit">{{ info.tit }}</view>
<u-checkbox-group iconPlacement="right" :size="14" >
<u-checkbox v-model="info.anonymity" shape="circle" label="匿名提交" :iconSize="12" :labelSize="12" ></u-checkbox>
</u-checkbox-group>
<!-- <u-checkbox-group >
<u-checkbox v-model="info.anonymity" shape="circle" label="匿名提交" :iconSize="12" name="匿名提交" :labelSize="12"></u-checkbox>
</u-checkbox-group> -->
<u-checkbox v-model="info.anonymity" shape="circle" label="匿名提交" :iconSize="12" :name="info.anonymity" :labelSize="12" @change="changeChe"></u-checkbox>
</view>
<view class="user_row">
<view class="avatar">
@ -57,7 +58,7 @@
<image :src="item" mode=""></image>
</view>
</view>
<view class="phone" @click="chooseImages" v-if="info.imgArr.length<3">
<view class="phone" @click="chooseImages" v-if="info.imgArr&&info.imgArr.length<3">
<view class="phoneIcon">
<image src="@/static/images/index/btn_tupian.png" mode=""></image>
</view>
@ -99,6 +100,16 @@
}
},
methods: {
// 1 2
changeChe(val) {
// console.log(this.info.anonymity)
console.log(val)
if(val) {
this.info.anonymity = 1
}else {
this.info.anonymity = 2
}
},
deleteImg(item) {
let index = this.info.imgArr.findIndex(val=>val==item)
this.info.imgArr.splice(index, 1)

87
pages/carEntry/evaluate/evaluate.vue

@ -20,14 +20,39 @@
data() {
return {
checked: false,
schoolInfo: {
info: {},
schoolInfo: {},
coachInfo: {},
subject: ''
}
},
onLoad(options) {
this.subject = options.subject
this.getStudentinfoFn()
},
computed: {
btnActive() {
let {schoolInfo, coachInfo} = this
let num1 = schoolInfo.schoolLevel + schoolInfo.qualityLevel + schoolInfo.teachLevel + schoolInfo.serviceLevel
let num2 = coachInfo.qualityLevel + coachInfo.teachLevel + coachInfo.serviceLevel
if(num1&&num2) {
return true
}else {
return false
}
}
},
methods: {
initFrom() {
this.schoolInfo = {
tit: '您对驾校满意吗?',
school: 1,
"schoolId": 8750,
"schoolName": "赵六",
"schoolName": "",
"stars": 0,
"studentId": '',
"studentName": "张三",
"studentIdcard": "",
"studentPhone": "",
"serviceLevel": 0,
@ -35,20 +60,18 @@
"qualityLevel": 0,
"teachLevel": 0,
"subject": 0,
"description": "随便",
"description": "",
"images": "",
"videoUrl": "",
"anonymity": 0,
"anonymity": 2,
"userId": 0,
imgArr: []
},
coachInfo: {
tit: '您对驾校满意吗?',
}
this.coachInfo = {
tit: '您对教练满意吗?',
"schoolId": 8750,
"schoolName": "赵六",
"stars": 0,
"studentId": '',
"studentName": "张三",
"studentIdcard": "",
"studentPhone": "",
"schoolInfo": 0,
@ -57,43 +80,28 @@
"serviceLevel": 0,
"teachLevel": 0,
"subject": 0,
"description": "随便",
"description": "",
"images": "",
"videoUrl": "",
"anonymity": 0,
"anonymity": 2,
"userId": 0,
coachName: '',
imgArr: []
}
}
},
onLoad() {
this.schoolInfo.userId = this.$store.state.user.vuex_loginInfo.userId
this.coachInfo.userId = this.$store.state.user.vuex_loginInfo.userId
this.coachInfo.studentPhone = this.vuex_userInfo.studentPhone
this.getStudentinfoFn()
},
computed: {
btnActive() {
let {schoolInfo, coachInfo} = this
let num1 = schoolInfo.schoolLevel + schoolInfo.qualityLevel + schoolInfo.teachLevel + schoolInfo.serviceLevel
let num2 = coachInfo.qualityLevel + coachInfo.teachLevel + coachInfo.serviceLevel
if(num1&&num2) {
return true
}else {
return false
}
this.coachInfo.subject = this.schoolInfo.subject = this.subject
this.coachInfo.userId = this.schoolInfo.userId = this.$store.state.user.vuex_loginInfo.userId
this.coachInfo.studentPhone = this.vuex_userInfo.studentPhone
}
},
methods: {
this.coachInfo.schoolId = this.schoolInfo.schoolId = this.info.schoolId
this.coachInfo.schoolName = this.schoolInfo.schoolName = this.info.schoolName
this.coachInfo.coachName = this.info.coachName
this.coachInfo.coachId = this.info.coachId
},
//
async getStudentinfoFn() {
const {data: res} = await getStudentinfo({id: this.schoolInfo.userId})
this.coachInfo.schoolId = this.schoolInfo.schoolId = res.schoolId
this.coachInfo.schoolName = this.schoolInfo.schoolName = res.schoolName
this.coachInfo.coachName = res.coachName
this.coachInfo.coachId = res.coachId
const {data: res} = await getStudentinfo({id: this.$store.state.user.vuex_loginInfo.userId})
this.info = res
this.initFrom()
},
async submintFn() {
if(this.coachInfo.imgArr.length) {
@ -104,6 +112,7 @@
}
const res = await addSchoolComment(this.schoolInfo)
const res2 = await addCoachComment(this.coachInfo)
this.initFrom()
this.$u.toast('评价成功')
setTimeout(()=>{
this.$goPage('/pages/mineEntry/myEvaluate/myEvaluate')
@ -121,7 +130,7 @@
}
.btnBg {
margin: 124rpx auto 0 auto;
margin: 90rpx auto 0 auto;
width: 396rpx;
opacity: 0.5;
&.active {

2
pages/indexEntry/consult/pubComplaint/pubComplaint.vue

@ -1,6 +1,6 @@
<template>
<view class="pageBgImg">
<topNavbar title="我要咨询"></topNavbar>
<topNavbar title="我要投诉"></topNavbar>
<view class="pad">
<!-- 投诉类别 -->
<view class="card">

2
pages/indexEntry/consult/pubConsult/pubConsult.vue

@ -97,7 +97,7 @@
}
})
},
uploadImgApi(filePath, imgNamme) {
uploadImgApi(filePath, imgName) {
console.log(filePath)
let token = 'Bearer '+ this.$store.state.user.vuex_loginInfo.accessToken
let _this = this

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

@ -60,9 +60,10 @@
content:'确定要关闭吗?',
success: async (res)=> {
if (res.confirm) {
const result = await consultationClosed({id})
const result = await consultationClosed({id: this.item.complainDO.id})
this.$u.toast('关闭成功')
this.item.complainDO.dealStatus = 3
this.$emit('closeFn')
} else if (res.cancel) {
console.log('用户点击取消');
}

5
pages/indexEntry/consult/record/comp/consultItem.vue

@ -13,7 +13,7 @@
<view class="date" v-if="item.complainDO&&item.complainDO.createTime">创建时间{{ $u.date(item.complainDO.createTime, 'yyyy-mm-dd')}}</view>
<!-- <view class="date">处理时间{{item.complainDO.createTime}}</view> -->
</view>
<view class="close_btn" v-if="item.complainDO.dealStatus==1">关闭</view>
<view class="close_btn" v-if="item.complainDO.dealStatus==1" @click="closeFn">关闭</view>
</view>
</view>
</template>
@ -34,9 +34,10 @@
content:'确定要关闭吗?',
success: async (res)=> {
if (res.confirm) {
const result = await consultationClosed({id})
const result = await consultationClosed({id: this.item.complainDO.id})
this.$u.toast('关闭成功')
this.item.complainDO.dealStatus = 3
this.$emit('closeFn')
} else if (res.cancel) {
console.log('用户点击取消');
}

7
pages/indexEntry/consult/record/record.vue

@ -12,19 +12,20 @@
<view class="tabCon" v-if="params.type==1">
<view class="card" v-for="(item,index) in list" :key="index">
<consultItem :item="item"></consultItem>
<consultItem :item="item" @closeFn="initList"></consultItem>
</view>
</view>
<view class="tabCon" v-if="params.type==2">
<view class="card" v-for="(item,index) in list" :key="index">
<complaintItem :item="item"></complaintItem>
<complaintItem :item="item" @closeFn="initList"></complaintItem>
</view>
</view>
</view>
<view style="padding-bottom: 20rpx;">
<view style="padding-bottom: 20rpx;" v-if="list.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
</template>

18
pages/indexEntry/enroll/registInfo/registInfo.vue

@ -335,6 +335,24 @@
console.log(item)
this.form.coach = item.name
})
let schoolClass = this.$store.state.school.schoolClass
console.log(schoolClass)
if(schoolClass.id) {
this.form.classModel = schoolClass.name
this.form.school = schoolClass.schoolName
this.form.schoolId = schoolClass.schoolId
this.form.car = schoolClass.carType
}
let schoolCoach = this.$store.state.school.schoolCoach
console.log(schoolCoach)
if(schoolCoach.id) {
this.form.classModel = schoolCoach.name
this.form.school = schoolCoach.schoolName
this.form.schoolId = schoolCoach.schoolId
// this.form.car = schoolClass.carType
}
},
methods: {
//

3
pages/indexEntry/examines/allExamines/allExamines.vue

@ -12,9 +12,10 @@
<examineItem :item="item"></examineItem>
</view>
</view>
<view style="padding-bottom: 20rpx;">
<view style="padding-bottom: 20rpx;" v-if="list.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
</template>

17
pages/indexEntry/examines/allNews/allNews.vue

@ -6,27 +6,36 @@
<newItem :item="item"></newItem>
</view>
</view>
<view style="padding-bottom: 20rpx;" v-if="infoList.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!infoList.length"></nodata>
</view>
</template>
<script>
import newItem from '../comp/newItem'
import { getExamSiteInfo } from '@/config/api.js'
export default {
components: { newItem },
data() {
return {
infoList: [],
id: ''
params: {id: '',pageNo: 1,pageSize: 20, },
status: 'loading'
}
},
onLoad(options) {
this.id = options.id
this.params.id = options.id
this.getExamSiteInfoFn()
},
methods: {
async getExamSiteInfoFn() {
const {data: res} = await getExamSiteInfo({id: this.id,pageNo: 1,pageSize: 2, })
this.infoList = res.list
const {data: res} = await getExamSiteInfo(this.params)
this.params.pageNo ++
this.infoList.push(...res.list)
this.total = res.total
if(this.infoList.length>=this.total) this.status = 'nomore'
}
}
}

2
pages/indexEntry/examines/detail/detail.vue

@ -1,7 +1,7 @@
<template>
<!-- 考场详情 -->
<view class="pageBg">
<view class="swiper-box" :style="{ backgroundImage: `url(${detailInfo.images})`, backgroundSize: backgroundSize }">
<view class="swiper-box" :style="{ backgroundImage: `url(${detailInfo.images})`, backgroundSize: '100% 100%' }">
<view class="navPoz">
<topNavbar title=" "></topNavbar>
</view>

64
pages/indexEntry/findShcool/coachComment/coachComment.vue

@ -1,17 +1,69 @@
<template>
<view class="pageBg">
<!-- <view class="infoBox pad">
<info :showSign="true"></info>
</view> -->
<comments></comments>
<view class="infoBox pad">
<info :showSign="true" :coachList="coachList"></info>
</view>
<comments :list="list" @changeNav="changeNav"></comments>
<view style="padding-bottom: 20rpx;" v-if="list.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
</template>
<script>
import comments from '../comments/comments.vue'
// import info from '../shcoolDetail/comp/tab3.vue'
import info from '../shcoolDetail/comp/tab3.vue'
import { getListCoachComment } from '@/config/api.js'
export default {
components: { comments, }
components: { comments, info},
data() {
return {
params: {
pageNo: 1,
pageSize: 20,
coachId: '',
condition: 0
},
total: 20,
list: [],
coachList: [],
status: 'loading'
}
},
onLoad(options) {
if(!options.item) return
let coachInfo = JSON.parse(decodeURIComponent(options.item))
console.log(JSON.parse(options.item))
this.coachList = [coachInfo]
this.params.coachId = coachInfo.coachId
this.getListCoachCommentFn()
},
methods: {
changeNav(val) {
this.params.condition = val
this.initList()
},
initList() {
this.params.pageNo = 1
this.status = 'loading'
this.list = []
this.getListCoachCommentFn()
},
async getListCoachCommentFn() {
const {data: res} = await getListCoachComment(this.params)
this.params.pageNo ++
this.total = res.total
let arr = res.list.map(item=>{
if(item.images) {
item.images = item.images.split(',')
}
return item
})
this.list.push(...arr)
if(this.list.length>=this.list.length) this.status = 'nomore'
}
}
}
</script>

14
pages/indexEntry/findShcool/comments/comments.vue

@ -1,5 +1,5 @@
<template>
<view class="pageBg">
<view class="comments">
<view class="navBox">
<view class="nav" v-for="(item,index) in navList" :key="index" @click="changeNav(item)" :class="{active: currentNav==item.id}">{{ item.text }}</view>
</view>
@ -16,13 +16,14 @@
props: ['list'],
data() {
return {
// 0123
navList: [
{text: '全部', id: 1},
{text: '全部', id: 0},
{text: '最新', id: 2},
{text: '有图', id: 3},
{text: '有视频', id: 4},
{text: '有图', id: 1},
{text: '有视频', id: 3},
],
currentNav: 1,
currentNav: 0,
}
},
methods: {
@ -35,9 +36,8 @@
</script>
<style lang="scss" scoped>
.pageBg {
.comments {
width: 100%;
min-height: 100vh;
padding: 0 28rpx;
.navBox {
padding: 32rpx 0 24rpx 0;

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

@ -1,7 +1,7 @@
<template>
<view class="box" >
<view class="img">
<image src="@/static/images/logo.png" mode=""></image>
<image :src="item.schoolIntroduceDO.iconPath" mode="" v-if="item.schoolIntroduceDO"></image>
</view>
<view class="textCon">
<view class="name">{{ item.shortName }}</view>
@ -10,7 +10,7 @@
<view class="num">{{item.stars}}</view>
</view>
<view class="credit">行业信用{{item.creditrating}}</view>
<view class="adr">距您1000.99公里</view>
<view class="adr">距您{{ $u.utils.distanceFn(item.distance)}}</view>
</view>
<callPhone v-if="showPhone" :servicePhone="[{name: item.phone}]">
<view class="pozPhone">
@ -50,7 +50,9 @@
.img {
width: 204rpx;
height: 140rpx;
background: #FFFFFF;
background: #f6f6f6;
border-radius: 8rpx;
overflow: hidden;
}
.textCon {

14
pages/indexEntry/findShcool/findShcool.vue

@ -3,13 +3,13 @@
<topNavbar title="找驾校"></topNavbar>
<view class="pad">
<view class="searchCon">
<searchRow placeholder="搜索驾校、教练…"></searchRow>
<searchRow placeholder="搜索驾校名称" @searchFn="searchFn"></searchRow>
</view>
<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="goScreen">
<view class="txt">筛选</view>
<view class="txt"><text v-if="params.businessScope||params.district"></text> 筛选</view>
<view class="screenIcon">
<image src="../../../static/images/index/ic_shaixuan.png" mode=""></image>
</view>
@ -22,9 +22,10 @@
</view>
</view>
</view>
<view style="padding-bottom: 20rpx;">
<view style="padding-bottom: 20rpx;" v-if="listData.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!listData.length&&status=='nomore'"></nodata>
</view>
</template>
@ -60,7 +61,8 @@
lng: '',
sercheType: 1,
businessScope: '',
district: ''
district: '',
name: ''
},
total: 20,
listData: [],
@ -90,6 +92,10 @@
}
},
methods: {
searchFn(val) {
this.params.name = val
this.listInit()
},
goScreen() {
let url = `/pages/indexEntry/findShcool/screen/screen?businessScope=${this.params.businessScope}&district=${this.params.district}`
this.$goPage(url)

6
pages/indexEntry/findShcool/shcoolComment/shcoolComment.vue

@ -1,9 +1,10 @@
<template>
<view class="main">
<comments :list="list" @changeNav="changeNav"></comments>
<view style="padding-bottom: 20rpx;">
<view style="padding-bottom: 20rpx;" v-if="list.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
</view>
</template>
@ -35,7 +36,7 @@
})
},
onReachBottom() {
if(this.list.length>this.total) this.getSchoolListCommentFn()
if(this.list.length<this.total) this.getSchoolListCommentFn()
},
methods: {
changeNav(val) {
@ -46,6 +47,7 @@
this.params.pageNo = 1
this.status = 'loading'
this.list = []
this.getSchoolListCommentFn()
},
async getSchoolListCommentFn() {
const {data: res} = await getSchoolListComment(this.params)

12
pages/indexEntry/findShcool/shcoolDetail/comp/tab1.vue

@ -5,7 +5,7 @@
<view class="name">{{ item.name }}</view>
<view class="flex-b">
<view class="price">{{ $u.utils.priceTo(item.totalAmount) }}</view>
<view class="btn">报名</view>
<view class="btn" @click="goSign(item)">报名</view>
</view>
</view>
</view>
@ -14,7 +14,15 @@
<script>
export default {
props: ['classList']
props: ['classList'],
methods: {
goSign(item) {
this.$store.commit('upDateSchoolCoach', {})
this.$store.commit('upDateSchoolClass', item)
this.$goPage('/pages/indexEntry/enroll/enroll')
// console.log(this.$store.state.school.schoolCoach)
}
}
}
</script>

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

@ -1,7 +1,7 @@
<template>
<view class="tabCon">
<view class="tab1">
<view class="card" @click="goPage(item)" v-for="(item,index) in coachList" :key="index">
<view class="card" v-for="(item,index) in coachList" :key="index">
<view class="avatar">
<image :src="item.photoPath" mode="" @error="handleImageError(item)"></image>
</view>
@ -15,8 +15,8 @@
<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>
<view class="btn" v-if="showSign">报名</view>
<view class="more" v-else>
<view class="btn" v-if="showSign" @click="goPageSign(item)">报名</view>
<view class="more" v-else @click="goPageDetail(item)">
<view class="moreText">查看详情</view>
<u-icon name="arrow-right"></u-icon>
</view>
@ -24,7 +24,7 @@
</view>
</view>
</view>
<view style="padding-bottom: 20rpx;">
<view style="padding-bottom: 20rpx;" v-if="coachList.length>20">
<u-loadmore :status="status" />
</view>
</view>
@ -35,12 +35,16 @@
export default {
props: ['showSign', 'coachList', 'status'],
methods: {
goPage(item) {
if(this.showSign) {
}else {
this.$goPage('/pages/indexEntry/findShcool/coachComment/coachComment?coachId='+ item.id)
}
//
goPageDetail(item) {
let objStr = encodeURIComponent(JSON.stringify(item))
this.$goPage('/pages/indexEntry/findShcool/coachComment/coachComment?item='+ objStr)
},
//
goPageSign(item) {
this.$store.commit('upDateSchoolClass', {})
this.$store.commit('upDateSchoolCoach', item)
this.$goPage('/pages/indexEntry/enroll/enroll')
},
handleImageError(item) {
item.photoPath = require('@/static/images/index/avatar.png')

17
pages/indexEntry/findShcool/shcoolDetail/shcoolDetail.vue

@ -1,10 +1,10 @@
<template>
<view class="main pageBg">
<view class="swiper-box">
<view class="swiper-box" >
<view class="navPoz">
<topNavbar title=" "></topNavbar>
</view>
<u-swiper :list="list1" :height="261"></u-swiper>
<u-swiper :list="swiperList" :height="261"></u-swiper>
<view class="radian">
<image :src="radianImg" mode=""></image>
</view>
@ -14,12 +14,12 @@
<view class="card ">
<view class="flex">
<view class="schoolLogo">
<image src="@/static/images/logo.png" mode=""></image>
<image :src="schoolDetail.schoolIntroduceDO.iconPath" mode="" v-if="schoolDetail.schoolIntroduceDO"></image>
</view>
<view class="textCon">
<view class="name">{{schoolDetail.shortName}}</view>
<view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="schoolDetail.stars" disabled></u-rate>
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="schoolDetail.stars" :readonly="true"></u-rate>
<view class="num">{{schoolDetail.stars}}</view>
</view>
<view class="evaluate" @click="$goPage('/pages/indexEntry/findShcool/shcoolComment/shcoolComment?id='+ schoolId)">
@ -65,11 +65,7 @@
components: { tab1, tab2, tab3, tab4},
data() {
return {
list1: [
'https://cdn.uviewui.com/uview/swiper/swiper1.png',
'https://cdn.uviewui.com/uview/swiper/swiper2.png',
'https://cdn.uviewui.com/uview/swiper/swiper3.png',
],
swiperList: [],
radianImg: imgUrl+'radian.png',
show: false,
navList: [
@ -132,6 +128,7 @@
async getSchoolDetailFn() {
const {data: res} = await getSchoolDetail(Object.assign(this.params,{id: this.schoolId}))
this.schoolDetail = res
this.swiperList = res.schoolIntroduceDO&&res.schoolIntroduceDO.headImages.split(',')
},
//
async coachPageFn() {
@ -165,7 +162,7 @@
min-height: 100vh;
.swiper-box {
position: relative;
width: 100%;
.radian {
position: absolute;
width: 100%;

4
pages/indexEntry/publicVideo/videoDetail/videoDetail.vue

@ -94,8 +94,10 @@
//
async likeFn() {
if(this.operateInfo.upvote) {
this.operateInfo.upvote = 0
await deleteUpvote({upvoteId: this.operateInfo.upvoteId,mobile: this.vuex_userInfo.mobile})
}else {
this.operateInfo.upvote = 1
await createUpvote(this.params)
}
this.getlikesCollection()
@ -103,8 +105,10 @@
//
async createCollectFn() {
if(this.operateInfo.collect) {
this.operateInfo.collect = 0
await deleteRetransmission({mobile: this.vuex_userInfo.mobile, CollectId: this.operateInfo.collectId})
}else {
this.operateInfo.collect = 1
await createCollect(this.params)
}
this.getlikesCollection()

57
pages/mineEntry/myCollect/myCollect.vue

@ -3,21 +3,70 @@
<topNavbar title="我的收藏"></topNavbar>
<view class="pad">
<view class="searcBox">
<searchRow placeholder="搜索视频名称"/>
<searchRow placeholder="搜索视频名称" @searchFn="searchFn"/>
</view>
<view class="ul">
<view class="li" v-for="(item,index) in 10" :key="index" @click="$goPage('/pages/indexEntry/publicVideo/videoDetail/videoDetail')">
<videoItem></videoItem>
<view class="li" v-for="(item,index) in list" :key="index" @click="$goPage('/pages/indexEntry/publicVideo/videoDetail/videoDetail?id='+ item.id)">
<videoItem :item="item"></videoItem>
</view>
</view>
<view style="padding-bottom: 20rpx;" v-if="list.length">
<u-loadmore :status="status" />
</view>
<nodata v-if="!list.length"></nodata>
</view>
</view>
</template>
<script>
import videoItem from '../../indexEntry/publicVideo/comp/videoItem.vue'
import { getcollectVideo } from '@/config/api.js'
export default {
components: { videoItem }
components: { videoItem },
data() {
return {
list: [],
params: {
phone: '',
title: '',
pageNo: 1,
pageSize: 20
},
total: 20,
status: 'loading'
}
},
onLoad() {
this.params.phone = this.vuex_userInfo.mobile
this.getcollectVideoFn()
},
onPullDownRefresh() {
this.params.pageNo = 1
this.list = []
this.getcollectVideoFn().then(()=>{
uni.stopPullDownRefresh()
})
},
onReachBottom() {
if(this.total>this.list.length) {
this.getcollectVideoFn()
}
},
methods: {
searchFn(val) {
this.params.title = val
this.list = []
this.params.pageNo = 1
this.getcollectVideoFn()
},
async getcollectVideoFn() {
const {data: res} = await getcollectVideo(this.params)
this.params.pageNo ++
this.list.push(...res.list)
this.total = res.total
if(this.list.length>=this.total) this.status = 'nomore'
}
}
}
</script>

79
pages/mineEntry/myEvaluate/comp/commentItem.vue

@ -0,0 +1,79 @@
<template>
<view class="box">
<view class="top_row">
<view class="avatar">
<image :src="item.phone" mode=""></image>
</view>
<view class="textInfo">
<view class="name oneRowText">{{ item.name}}</view>
<view class="starBox">
<u-rate active-color="#1989FA" inactive-color="#1989FA" gutter="1" :size="16" :value="item.stars" :count="5" :readonly="true" ></u-rate>
<view class="num">{{ item.stars }}</view>
</view>
</view>
<view class="date">{{ $u.date(item.createTime ,'yyyy/mm/dd' ) }}</view>
</view>
<view class="text">{{ item.description }}</view>
<view class="imgBox" v-if="item.images&&item.images.length">
<u-album :urls="item.images" :multipleSize="'160rpx'"></u-album>
</view>
</view>
</template>
<script>
export default {
props: ['item']
}
</script>
<style lang="scss" scoped>
.top_row {
display: flex;
align-items: center;
margin-bottom: 24rpx;
.avatar {
width: 60rpx;
height: 60rpx;
overflow: hidden;
border-radius: 50%;
background: #f6f6f6;
}
.textInfo {
flex: 1;
width: 0;
.name {
font-size: 26rpx;
color: #333;
font-weight: 500;
}
padding: 0 10rpx;
}
.date {
font-size: 24rpx;
color: #686B73;
}
}
.starBox {
padding: 10rpx 0 0rpx 0;
}
.text {
font-size: 24rpx;
}
.imgBox {
display: flex;
flex-wrap: wrap;
padding-top: 20rpx;
.img {
margin-top: 20rpx;
width: 160rpx;
height: 160rpx;
border-radius: 8rpx;
overflow: hidden;
margin-right: 24rpx;
}
}
</style>

26
pages/mineEntry/myEvaluate/myEvaluate.vue

@ -6,19 +6,24 @@
<commentItem :item="item"/>
</view>
</view>
<view style="padding-bottom: 20rpx;">
<u-loadmore :status="status" />
</view>
</view>
</template>
<script>
import { getUsersCommentById } from '@/config/api.js'
import commentItem from './comp/commentItem.vue'
export default {
components: { commentItem },
data() {
return {
params: {
userId: '', pageNo: 1,pageSize: 20
},
total: 20,
status: 'loading',
list: []
}
},
@ -26,12 +31,31 @@
this.getUsersCommentByIdFn()
this.params.userId = this.userId
},
onPullDownRefresh() {
this.params.pageNo = 1
this.list = []
this.getUsersCommentByIdFn().then(()=>{
uni.stopPullDownRefresh()
})
},
onReachBottom() {
if(this.total>this.list.length) {
this.getUsersCommentByIdFn()
}
},
methods: {
async getUsersCommentByIdFn() {
const {data: res} = await getUsersCommentById(this.params)
this.params.pageNo ++
let arr = res.list.map(item=>{
if(item.images) {
item.images = item.images.split(',')
}
return item
})
this.list.push(...res.list)
this.total = res.total
if(this.list.length>=this.total) this.status = 'nomore'
}
}
}

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

@ -35,7 +35,7 @@
<view class="flex-b bg">
<view class="row">
<view class="text">考试成绩100</view>
<view class="btn" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate')">去评价</view>
<view class="btn" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate?subject=2')">去评价</view>
</view>
</view>
</view>

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

@ -35,7 +35,7 @@
<view class="flex-b bg">
<view class="row">
<view class="text">考试成绩100</view>
<view class="btn" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate')">去评价</view>
<view class="btn" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate?subject=2')">去评价</view>
</view>
</view>
</view>

87
store/modules/school.js

@ -1,91 +1,24 @@
// import addApi from '@/api/add.js'; // 引入
const add = {
const school = {
state: {
addList: []
schoolCoach: {},
schoolClass: {}
},
mutations: {
// 更新广告列表
upDateAddList(state, list) {
state.addList = list
// 更新选择的驾校与教练
upDateSchoolCoach(state, obj) {
state.schoolCoach = obj
},
// 更新当前广告点击量
upDateViews(state, id) {
let add = state.addList.find(item=>item.id==id)
add.clicks ++
upDateSchoolClass(state, obj) {
state.schoolClass = obj
},
},
actions: {
// 点击广告
async addClick({commit, dispatch}, curAdd) {
// await dispatch('updateStatistics')
curAdd.clicks ++
if(!curAdd.adBannerDO.jumpUrl) {
return false
}
commit('updateWebVeiwUrl', curAdd.adBannerDO.jumpUrl)
uni.navigateTo({
url:'/pages/commeWebView/addWebView'
})
},
// 获取当前广告
getCurrentAdd({state},id) {
console.log(id)
console.log(state.addList)
let curAdd = state.addList.find(item=>item.id==id)
if(curAdd) {
curAdd.views ++
return curAdd
}else {
return {}
}
},
// // 广告
// async addPageFn({commit,state, dispatch}) {
// await dispatch('updateStatistics')
// let obj = {
// pageNo: 1,
// pageSize: 30,
// adClient: 1
// }
// const [err, res] = await addApi.addPage(obj)
// let list = res.data.records.map(item=>{
// item.views = 0
// item.clicks = 0
// return item
// })
// commit('upDateAddList', list)
// console.log('广告列表')
// console.log(list)
// },
// 更新广告点击量
async updateStatistics({ dispatch,state, commit }) {
let statistics = state.addList.filter(item=>item.views)
console.log('调用更新广告接口')
if(statistics.length) {
let stcsList = statistics.map(add=>{
let obj = {
"adPositionId": add.id,
"adId": add.adId,
"views": add.views,
"clicks": add.clicks
}
return obj
})
const [err, res] = await addApi.batchUpdate(stcsList)
console.log('更新广告点击量请求结果')
console.log(res)
}
}
}
}
export default add
export default school

3
uni_modules/uview-ui/components/u-album/u-album.vue

@ -26,7 +26,8 @@
:style="[
{
width: imageWidth,
height: imageHeight
height: imageHeight,
borderRadius: '8rpx'
}
]"
></image>

Loading…
Cancel
Save