引入日历前
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
<view class="orderOper" >
|
||||
<view style="width: 100%; text-align: right;">
|
||||
<view @click.stop="pingji(item.productId)" class="opCan" >评价</view>
|
||||
<view @click.stop="pingji(item.productId)" class="opCan" >追加评价</view>
|
||||
<view @click.stop="showZhuiping(item.productId)" class="opCan" >追评</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
@@ -119,7 +119,9 @@
|
||||
<!-- 对话框 -->
|
||||
<u-popup :show="pingjiaShow" :round="10" @close="closePingjia">
|
||||
<view class="tanchu">
|
||||
<view class="dp_title">添加评价</view>
|
||||
<view class="dp_title" v-if="pjType != 'zhuiping'">添加评价</view>
|
||||
<view class="dp_title" v-else>添加追评</view>
|
||||
|
||||
<view style="max-height: 1000rpx;overflow-y: scroll;">
|
||||
<uni-forms :modelValue="Pform">
|
||||
<!-- 评价图片 -->
|
||||
@@ -131,20 +133,15 @@
|
||||
<!-- <u-button type="success" @click="submitPJ">提交评价</u-button> -->
|
||||
<!-- 提交 -->
|
||||
<view class="padding-bottom-sm flex padding-lr-sm" style="border-bottom: 1px solid #EEEEEE;">
|
||||
|
||||
<view class="mb20">
|
||||
<view v-html="Pform.html">
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="mb30">
|
||||
|
||||
<view class="mb30" v-if="pjType != 'zhuiping'">
|
||||
<span :class="['star',Pform.star>=1 ? 'starLight': 'starGray']" @click="getStar(1)"></span>
|
||||
<span :class="['star',Pform.star>=2 ? 'starLight': 'starGray']" @click="getStar(2)"></span>
|
||||
<span :class="['star',Pform.star>=3 ? 'starLight': 'starGray']" @click="getStar(3)"></span>
|
||||
<span :class="['star',Pform.star>=4 ? 'starLight': 'starGray']" @click="getStar(4)"></span>
|
||||
<span :class="['star',Pform.star>=5 ? 'starLight': 'starGray']" @click="getStar(5)"></span>
|
||||
</view>
|
||||
<view class="mb30">
|
||||
<view class="mb30" v-if="pjType != 'zhuiping'">
|
||||
<!-- <uni-file-picker :auto-upload="false" ref="files" @delete="deleteImg" limit="5" @success="upSuccess" @select="select" v-model="Pform.img" fileMediatype="image" :image-styles="imageStyles"/> -->
|
||||
<u-upload :fileList="Pform.img" @afterRead="afterRead" @delete="deletePic" multiple :maxCount="4"
|
||||
width="80" height="80" :previewFullImage="true">
|
||||
@@ -157,21 +154,23 @@
|
||||
</view>
|
||||
<view class="">
|
||||
<!-- <button class="cu-btn bg-gradual-blue shadow-blur">发送</button> -->
|
||||
<u-button type="success" @click="submitPJ">提交评价</u-button>
|
||||
<u-button type="success" @click="submitPJ" v-if="pjType != 'zhuiping'">提交评价</u-button>
|
||||
<u-button type="success" @click="zhuiping" v-else>提交追评</u-button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="position: relative;">
|
||||
<emotion @emotion="handleEmj" :height="220" v-if="isShowEmj" :windowWidth="windowWidth"></emotion>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<music-play :playData="playData"></music-play>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import musicPlay from '@/components/music.vue'
|
||||
import emotion from '@/bkhumor-emojiplus/components/bkhumor-emojiplus/bkhumor-emojiplus.vue';
|
||||
import $http from '@/config/requestConfig.js';
|
||||
import {
|
||||
@@ -184,11 +183,11 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
playData:{},
|
||||
title: 'Hello',
|
||||
isShowEmj: false,
|
||||
emojiIcon:'cuIcon-emoji',
|
||||
message: '',
|
||||
|
||||
message: '',
|
||||
|
||||
windowWidth:0,
|
||||
windowHeight:500,
|
||||
@@ -221,7 +220,9 @@
|
||||
}], // 物流详情信息全部
|
||||
deliverDetailsLength: null,
|
||||
emoji:[],
|
||||
Files:[]
|
||||
Files:[],
|
||||
pjType:'',
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -236,15 +237,17 @@
|
||||
this.getOrderList()
|
||||
},
|
||||
components:{
|
||||
emotion
|
||||
emotion,
|
||||
musicPlay
|
||||
},
|
||||
computed: {
|
||||
...mapState(['userInfo']),
|
||||
},
|
||||
|
||||
methods: {
|
||||
methods: {
|
||||
// 获得输入的表情数组
|
||||
handleEmj(i) {
|
||||
console.log(i,'i');
|
||||
console.log(i,'i---------');
|
||||
this.inputValue = i
|
||||
// console.log(this.inputValue);
|
||||
if(i.emotioni == '[em_98]') {
|
||||
@@ -260,6 +263,42 @@
|
||||
/// this.Pform.html += i.emotion
|
||||
}
|
||||
},
|
||||
showZhuiping(val){
|
||||
this.pjType = 'zhuiping'
|
||||
this.pingjiaShow = true
|
||||
this.productID = val
|
||||
},
|
||||
// 追加评论
|
||||
zhuiping(){
|
||||
let data = {
|
||||
//'oid':'',
|
||||
'userId': this.userInfo.id,
|
||||
'bookid': this.productID,
|
||||
'conTent': this.Pform.comment
|
||||
}
|
||||
console.log(data,'data')
|
||||
$http.request({
|
||||
url: "user/followUp/userFollowUp",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data,
|
||||
header: { //默认 无 说明:请求头
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
uni.showToast({
|
||||
title:'成功!',
|
||||
icon:'success'
|
||||
})
|
||||
this.pingjiaShow = false
|
||||
this.pjType = ''
|
||||
this.productID = null,
|
||||
this.Pform.comment = ''
|
||||
this.Pform.html = ''
|
||||
this.emoji = []
|
||||
}
|
||||
})
|
||||
},
|
||||
textareaBInput(e) {
|
||||
console.log(e,'e')
|
||||
this.Pform.comment = e.detail.value
|
||||
@@ -308,23 +347,23 @@
|
||||
console.log(e)
|
||||
},
|
||||
// 获取html格式的评论1
|
||||
getHtmlComment(){
|
||||
var ss = this.Pform.comment
|
||||
if(this.emoji.length> 0){
|
||||
for (var i = 0; i<this.emoji.length; i++){
|
||||
if(this.Pform.comment.indexOf(this.emoji[i].name) !== -1 ){
|
||||
//var re = new RegExp(this.emoji[0].name,"g"); //定义正则表达式
|
||||
//第一个参数是要替换掉的内容,第二个参数"g"表示替换全部(global)。
|
||||
// ss = ss.replace(re, ); //第一个参数是正则表达式。
|
||||
ss = ss.replace(this.emoji[i].name, this.emoji[i].tag)
|
||||
// console.log(ss)
|
||||
}
|
||||
}
|
||||
this.Pform.html = ss
|
||||
}else{
|
||||
this.Pform.html = this.Pform.comment
|
||||
}
|
||||
|
||||
getHtmlComment(){
|
||||
// 格式化html
|
||||
var ss = this.Pform.comment
|
||||
if(this.emoji.length> 0){
|
||||
for (var i = 0; i<this.emoji.length; i++){
|
||||
if(this.Pform.comment.indexOf(this.emoji[i].name) !== -1 ){
|
||||
//var re = new RegExp(this.emoji[0].name,"g"); //定义正则表达式
|
||||
//第一个参数是要替换掉的内容,第二个参数"g"表示替换全部(global)。
|
||||
// ss = ss.replace(re, ); //第一个参数是正则表达式。
|
||||
ss = ss.replace(this.emoji[i].name, this.emoji[i].tag)
|
||||
// console.log(ss)
|
||||
}
|
||||
}
|
||||
this.Pform.html = ss
|
||||
}else{
|
||||
this.Pform.html = this.Pform.comment
|
||||
}
|
||||
//console.log(this.Pform.html,'this.Pform.html')
|
||||
},
|
||||
deletePic() {
|
||||
@@ -359,31 +398,17 @@
|
||||
},
|
||||
// 提交评价
|
||||
submitPJ(){
|
||||
if(this.Pform.comment != ''){
|
||||
// 格式化html
|
||||
var ss = this.Pform.comment
|
||||
if(this.emoji.length> 0){
|
||||
for (var i = 0; i<this.emoji.length; i++){
|
||||
if(this.Pform.comment.indexOf(this.emoji[i].name) !== -1 ){
|
||||
//var re = new RegExp(this.emoji[0].name,"g"); //定义正则表达式
|
||||
//第一个参数是要替换掉的内容,第二个参数"g"表示替换全部(global)。
|
||||
// ss = ss.replace(re, ); //第一个参数是正则表达式。
|
||||
ss = ss.replace(this.emoji[i].name, this.emoji[i].tag)
|
||||
// console.log(ss)
|
||||
}
|
||||
}
|
||||
this.Pform.html = ss
|
||||
}else{
|
||||
this.Pform.html = this.Pform.comment
|
||||
}
|
||||
if(this.Pform.comment != ''){
|
||||
|
||||
let data={
|
||||
'userid':this.userInfo.id,
|
||||
'orderSn': this.orderSn,
|
||||
'bookid': this.productID,
|
||||
'content': this.Pform.html,
|
||||
// 'content': this.Pform.html,
|
||||
'content': this.Pform.comment,
|
||||
'starLevel':this.Pform.star,
|
||||
'images':this.Pform.img
|
||||
'images':this.Pform.img,
|
||||
// 'emoji':this.emoji // 表情数组
|
||||
}
|
||||
// console.log(data,'data')
|
||||
$http.request({
|
||||
@@ -416,6 +441,7 @@
|
||||
// 添加评价
|
||||
pingji(id){
|
||||
console.log(id)
|
||||
this.pjType = ''
|
||||
this.productID = id
|
||||
this.pingjiaShow = true
|
||||
},
|
||||
@@ -482,6 +508,7 @@
|
||||
this.$http
|
||||
.post(`book/buyorder/appGetOrderInfo/${this.orderType}?orderId=${this.orderID}`)
|
||||
.then(res => {
|
||||
console.log(res,'res')
|
||||
this.orderContet = res.buyOrder
|
||||
this.productIDs = res.buyOrder.products.map(item => {
|
||||
return item.productId
|
||||
|
||||
Reference in New Issue
Block a user