Commit e564b053 authored by youjie's avatar youjie

Merge branch 'master' of http://gitlab.oytour.com/youjie/thinkapp

parents 8feb3f06 ea0a030e
<template> <template>
<view class="commentDetailsList-box"> <view class="commentDetailsList-box">
<view class="commentDetailsList-add" @click="goAdd"> <view class="commentDetailsList-add" @click="goAdd">
<van-icon name="plus" /><text>增加评论</text> </view> <van-icon name="plus" />
<text>增加评论</text>
</view>
<view class="index-student-information"> <view class="index-student-information">
<view class="commentDetailsList-content"> <view class="commentDetailsList-content">
<view class="commentDetailsList-list" v-for="(item,index) in CourseCommentTimesList" :key="index"> <view class="commentDetailsList-list" v-for="(item,index) in CourseCommentTimesList" :key="index">
...@@ -30,7 +32,6 @@ ...@@ -30,7 +32,6 @@
<template v-show="show"> <template v-show="show">
<commentDetailsPopu ref="getcommentPopup" @change="changeData"></commentDetailsPopu> <commentDetailsPopu ref="getcommentPopup" @change="changeData"></commentDetailsPopu>
</template> </template>
</view> </view>
</template> </template>
<script> <script>
...@@ -46,25 +47,29 @@ ...@@ -46,25 +47,29 @@
} from "vue"; } from "vue";
import navbar from '../../components/navbar.vue' import navbar from '../../components/navbar.vue'
export default { export default {
props: ["CourseCommentTimesList"], props: ["CourseCommentTimesList", "qMsg"],
emits: ['refreshData'], emits: ['refreshData'],
components: { components: {
navbar, navbar,
commentDetailsPopu commentDetailsPopu
}, },
setup(props, context) { setup(props, context) {
let { refs } = getCurrentInstance(); let {
refs
} = getCurrentInstance();
let { let {
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
let data = reactive({ let data = reactive({
dataList: [], dataList: [],
show:false show: false
}); });
let methods = { let methods = {
goAdd(){ goAdd() {
let url = '/pages/setComments/addComment?CourseId=' + this.qMsg.CourseId + "&CommentTimes=" + this.qMsg.CommentTimes;
console.log("url", url);
uni.navigateTo({ uni.navigateTo({
url: '/pages/setComments/addComment' url: url
}) })
}, },
back() { back() {
...@@ -72,25 +77,25 @@ ...@@ -72,25 +77,25 @@
delta: 1 delta: 1
}) })
}, },
addRules(){//添加规则 addRules() { //添加规则
data.show = true data.show = true
refs.getcommentPopup.$vm.showFun() refs.getcommentPopup.$vm.showFun()
}, },
editRules(item){//编辑规则 editRules(item) { //编辑规则
data.show = true data.show = true
refs.getcommentPopup.$vm.showFun(item) refs.getcommentPopup.$vm.showFun(item)
}, },
deleteRules (){//删除规则 deleteRules() { //删除规则
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '将删除该评价,是否继续', content: '将删除该评价,是否继续',
success: function (res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
console.log('---') console.log('---')
} else if (res.cancel) { } else if (res.cancel) {
uni.showToast({ uni.showToast({
title:'已取消', title: '已取消',
icon:'none', icon: 'none',
duration: 500 duration: 500
}) })
} }
...@@ -101,7 +106,7 @@ ...@@ -101,7 +106,7 @@
item.optionsShow = !item.optionsShow; item.optionsShow = !item.optionsShow;
}, },
//实在评价可见性 //实在评价可见性
clickoptions(item,subItem) { clickoptions(item, subItem) {
let showTypeMsg = { let showTypeMsg = {
CourseId: item.CourseId, CourseId: item.CourseId,
Times: item.Times, Times: item.Times,
...@@ -118,8 +123,7 @@ ...@@ -118,8 +123,7 @@
context.emit('refreshData'); context.emit('refreshData');
}, },
//刷新数据 //刷新数据
changeData() changeData() {
{
//调用父组件方法 //调用父组件方法
context.emit('refreshData'); context.emit('refreshData');
} }
...@@ -144,7 +148,7 @@ ...@@ -144,7 +148,7 @@
}; };
</script> </script>
<style scoped> <style scoped>
.noData { .noData {
text-align: center; text-align: center;
flex: 1; flex: 1;
width: 100%; width: 100%;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment