Browse Source

上传

master
前端-胡立永 2 months ago
parent
commit
1e2a67ad83
6 changed files with 229 additions and 47 deletions
  1. +13
    -1
      api/api.js
  2. +7
    -0
      pages.json
  3. +11
    -10
      pages/index/order.vue
  4. +186
    -0
      pages/index/review.vue
  5. +0
    -36
      pages/index/start.vue
  6. +12
    -0
      store/store.js

+ 13
- 1
api/api.js View File

@ -67,7 +67,7 @@ const config = {
auth: true,
},
//提交问答记录
//提交预约信息
submit: {
url: '/applet_post/submit',
method: 'POST',
@ -108,6 +108,18 @@ const config = {
showLoading : true,
},
//我的-评论题目列表接口
queryAnswerList: {
url: '/applet_post/queryAnswerList',
method: 'GET',
},
//我的-回答评论接口
answerComment: {
url: '/applet_post/answerComment',
method: 'POST',
auth : true,
},
}


+ 7
- 0
pages.json View File

@ -37,6 +37,13 @@
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/index/review",
"style" :
{
"navigationBarTitleText" : ""
}
}
],
"preloadRule": {


+ 11
- 10
pages/index/order.vue View File

@ -23,6 +23,9 @@
<view class="service">
<text>预约日期{{item.yearValue}}-{{item.monthDay}}</text>
</view>
<view class="status">
<text>{{ tabs[item.state].name }}</text>
</view>
</view>
<view class="contenta">
@ -57,6 +60,7 @@
<view></view>
<view class="b2"
v-if="item.state == 1"
@click.stop="toEvaluate(item.id)">
去评价
</view>
@ -79,21 +83,16 @@
},
data() {
return {
tabs: [{
name: '全部'
},
tabs: [
{
name: '租赁押金'
name: '待上门'
},
{
name: '水洗租赁'
name: '待评价'
},
{
name: '破损换货'
name: '已完成'
},
{
name: '退货退款'
}
],
mixinsListApi : 'queryReservation',
}
@ -120,8 +119,10 @@
//
toEvaluate(id){
// uni.navigateTo({
// url: '/pages_order/info/appoint?id=' + id
// url: '/pages/index/review?oid=' + id
// })
this.$store.commit('getAnswerList', id)
},
}
}


+ 186
- 0
pages/index/review.vue View File

@ -0,0 +1,186 @@
<template>
<view class="home">
<image src="/static/image/bg/1.png"
class="page-bg"
mode="aspectFill"></image>
<!-- next1 -->
<view class="content_now" v-if="stop == 1">
<view class=""
v-if="Answer[index]"
v-html="$utils.stringFormatHtml(Answer[index].title)">
</view>
<!-- <view class="mian-btn"
:class="{active:isActive === '是'}"
@click="setActive('是')"></view>
<view class="mian-btn"
:class="{active:isActive === '否'}"
@click="setActive('否')"></view> -->
<view class="mian-btn"
v-for="(item, index) in Answer[index] && Answer[index].answer && Answer[index].answer.split(',')"
:class="{active:isActive === item}"
:key="index"
@click="setActive(item)">{{ item }}</view>
</view>
<view class="an">
<!-- <view style="display: flex;width: 600rpx;"
v-if="stop == 1">
<view class="next-btn"
v-if="index > 0"
@click="index--">
上一题
</view>
<view class="next-btn"
@click="next">
下一题
</view>
</view> -->
<view class="next-btn"
@click="next">
下一题
</view>
<text class="second-color">{{ configList.bg_title }}</text>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
isActive : null,
stop : 1,
index : 0,
oId : 0,
}
},
computed : {
...mapState(['reviewAnswerList', 'configList']),
Answer(){
// let ids = []
// for(let i = 0;i < this.queryMyLog.length;i++){
// ids.push(this.queryMyLog[i].topId)
// }
// return this.problemList.filter(n => {
// return !ids.includes(n.id)
// })
return this.reviewAnswerList
},
},
onLoad(args) {
this.oId = args.oid
},
onShow() {
},
methods: {
setActive(value){
this.isActive = value
},
next(){
this['next' + this.stop]()
},
next1(){
if(this.isActive){
this.$api('answerComment', {
topId : this.Answer[this.index].id,
context : this.isActive,
answerId : this.oId,
}, res => {
this.isActive = null
if(this.index == this.Answer.length - 1){
// 退
// uni.showToast({
// title: '',
// icon: 'none'
// })
uni.navigateTo({
url: '/pages/index/cancelArticle?key=sucess'
})
}else{
this.index++
}
})
}else{
uni.showToast({
title:'请选择后进行下一题',
icon: 'none'
})
}
},
}
}
</script>
<style lang="scss" scoped>
.region{
display: flex;
align-items: center;
&>view{
width: 140rpx;
height: 50rpx;
border-radius: 10rpx;
border: 1px solid #e6bf7f;
margin: 0 10rpx;
line-height: 50rpx;
text-align: center;
}
}
.b-btn{
width: 86%;
display: flex;
justify-content: center;
padding-top: 130rpx;
.pre-btn{
border: 4rpx solid #f1e0c6;
padding: 16rpx 90rpx;
border-radius: 66rpx;
color: #e6bf7f;
}
}
.next-btn{
background-image: url('../../static/image/home/btn.png');
background-size: contain;
background-repeat: no-repeat;
background-position: center;
width: 280rpx;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 16rpx 90rpx;
}
.an{
position: fixed;
bottom: 300rpx;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
}
</style>

+ 0
- 36
pages/index/start.vue View File

@ -1,36 +0,0 @@
<template>
<view>
<greetCmponents :textList="textList" :path="greetP5" :btn="btn" />
</view>
</template>
<script>
import greetCmponents from "../../components/home/greetComponents.vue"
export default {
data() {
return {
textList: [
'感谢您参加我们的上门威士忌品鉴服务!',
'我们希望您享受了这次独特的体验。',
'为了帮助我们不断提升服务质量,',
'请您花几分钟时间分享您的评价和反馈。',
'您的意见对我们非常重要,感谢您的支持!',
],
greetP5: '/pages/index/appointment',
btn: [
'开始'
]
}
},
components: {
greetCmponents
},
methods: {
}
}
</script>
<style>
</style>

+ 12
- 0
store/store.js View File

@ -14,6 +14,7 @@ const store = new Vuex.Store({
articleList : [],//文章列表
problemList : [],//问题列表
queryMyLog : [],//我的答题记录
reviewAnswerList : [],//评论题目列表
},
getters: {
},
@ -103,6 +104,17 @@ const store = new Vuex.Store({
}
})
},
// 评论题目列表接口
getAnswerList(state, id){
api('queryAnswerList', res => {
if(res.code == 200){
state.reviewAnswerList = res.result
uni.navigateTo({
url: '/pages/index/review?oid=' + id
})
}
})
},
// 查询我的答题记录
getQueryMyLog(state){
api('queryMyLog', res => {


Loading…
Cancel
Save