Commit 60a64ba7574bf4b08d15842ec39981f8e8c3eb58

Authored by pengye
1 parent 3cbcaca2

意见建议反馈填写

... ... @@ -57,7 +57,9 @@
"pages/pinglun/video",
"pages/customer/detail_owner_invitation_new",
"pages/me/coupon_news",
"pages/me/wananchi"
"pages/me/wananchi",
"pages/pinglun/createOpinion",
"pages/pinglun/opinionSuccess"
],
"requiredPrivateInfos": [
"getLocation",
... ...
... ... @@ -4,7 +4,7 @@
<view class="cu-avatar round lg" style="background-image: url('{{post.isnoshow==1 ? 'http://nosqn.colorcun.com/noshow.jpg' : post.author_image}}');width: 72rpx;height: 72rpx;border-radius: 50%;" ></view>
<view class="flex-treble flex flex-direction margin-left-sm">
<view class="txt-24-h text-bold margin-bottom-sm" style="margin-bottom: 10rpx;">{{post.isnoshow==1 ? '匿名用户' : post.author}}</view>
<stat value="{{post.grade}}" cla="card" disabled></stat>
<stat wx:if="{{post.grade}}" value="{{post.grade}}" cla="card" disabled></stat>
</view>
<view class="text-gray txt-24-h {{hasStatus?'hasStatus status-'+post.status:''}}">{{util.unixtoTime(post.create_time,'YYYY-MM-DD')}}</view>
</view>
... ... @@ -12,7 +12,7 @@
<view class="cu-avatar round lg" style="background-color: rgba(0,0,0,0);"></view>
<view class="flex-treble flex flex-direction margin-left-sm">
<view class="text-df margin-bottom-xs" wx:if="{{post.text}}" style="word-break:break-all;">{{post.text}}</view>
<view class="text-df margin-bottom-xs text-blue">#{{post.eval_label}}</view>
<view wx:if="{{post.eval_label}}" class="text-df margin-bottom-xs text-blue">#{{post.eval_label}}</view>
<view class="grid col-3 grid-square" wx:if="{{enclosure.length>0}}">
<block wx:for="{{enclosure}}" wx:key="enclosure">
<view wx:if="{{!item.avinfo}}" class="bg-image" style="background-image: url('{{item.url}}')" catchtap="displayImage" data-index="{{index}}">
... ...
... ... @@ -55,4 +55,5 @@
.texts {
font-size: 24rpx;
font-weight: 400;
color: #999;
}
\ No newline at end of file
... ...
... ... @@ -12,7 +12,7 @@ Page({
id:'',
oid:'',
sid:'',
types:'1',//1是邀请函过来的
types:'1',//1是邀请函过来的(邀请函的券或者点击意见反馈买券) 2是商家APP分享的
rid:'',
},
use:{},
... ...
... ... @@ -18,10 +18,12 @@
.texts_right {
font-weight: 500;
width: 76%;
text-align: right;
width: 79%;
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
word-break: break-all;
}
.info input {
... ...
... ... @@ -9,7 +9,7 @@
</view>
<view class="info" style="color: rgba({{textColor}});">
<view class="texts font28r">桌位台号:</view>
<view class="texts_right textsTable font28r">{{seller.tablesText}}</view>
<view class="texts_right font28r">{{seller.tablesText}}</view>
</view>
<view class="info" style="color: rgba({{textColor}});">
<view class="texts font28r">就餐人数:</view>
... ...
... ... @@ -19,7 +19,11 @@
.texts_right {
font-weight: 500;
text-align: right;
width: 57%;
width: 79%;
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
word-break: break-all;
}
.info input {
... ... @@ -334,11 +338,4 @@
}
.btns .onebtns{
width: 100%;
}
.textsTable{
display: -webkit-box;
word-break: break-all;
word-wrap: break-word;
overflow: hidden;
text-align: right;
}
\ No newline at end of file
... ...
... ... @@ -42,6 +42,9 @@ Page({
certificate:'',
dataStr:Date.now()*1/1000,
swich_phone:'0',
is_comments:'0',
is_user_comments:false,
cusdem:'',//备注 传参给意见反馈
},
/**
* 生命周期函数--监听页面加载
... ... @@ -64,7 +67,6 @@ Page({
"statReachBottom": true,
"lauchOpts": options, //渠道分析
});
this.getDetail();
},
// 点击了解更多会员优惠政策
gotoFavourableList(){
... ... @@ -77,7 +79,40 @@ Page({
wx.navigateTo({
url
})
},
},
// 去评价
evaluateFun(){
let coupon_data_comments=this.data.marketing.coupon_data_comments;//赠送优惠券的列表
let coupon=this.data.marketing.is_comments_coupon;//评价赠送优惠券
let couponId,price,use;
if(coupon && coupon_data_comments && coupon_data_comments.length>0){
let obj=coupon_data_comments[0];
console.log('填写意见获取的券的信息',obj);
couponId=obj.id;
price=obj.price;
use=JSON.stringify(obj.use)
}
let record={
date:this.data.seller.date,
tablesText:this.data.seller.tablesText,
tableNum:this.data.detail.actual_pum?this.data.detail.actual_pum:this.data.tableNum,
cusdem:this.data.cusdem,
}
let url=util.http_build_query({
sellerName:this.data.seller.name,
record:JSON.stringify(record),
sellerid:this.data.seller.sid,
oid:this.data.detail.id,
types:'1',
coupon:coupon || '',
couponId:couponId || '',
price:price || '',
use:use || '',
},'/pages/pinglun/createOpinion')
wx.navigateTo({
url
})
},
/**
* 用户点击右上角分享
*/
... ... @@ -91,6 +126,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getDetail()
},
cli() {
if(this.data.staffinfo.wechat){
... ... @@ -152,6 +188,8 @@ Page({
this.setData({
detail: this.formatDatail(reserev, dateSmart),
tableNum,
is_user_comments:res.data.is_user_comments,
cusdem:res.data.cusdem,
seller: {
name: reserev.seller.sellername,
sid:reserev.sid,
... ... @@ -274,15 +312,17 @@ Page({
let data=res.data
console.log('data',data);
let coupon_dataList=[]
let home,chef,marketing,reserve,swich_phone,signboard,store,homeColor,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse;
let home,chef,marketing,reserve,swich_phone,is_comments,signboard,store,homeColor,priceInfo,certificate,scoreInfo,recharge_list,stringifyUse;
chef = util.determine(data.chef);
reserve = util.determine(data.reserve);
swich_phone = reserve && reserve.swich_phone?reserve.swich_phone:'';
marketing = util.determine(data.marketing);
signboard = util.determine(data.signboard);
store = util.determine(data.store);
home = util.determine(data.home);
let coupon=marketing?util.determine(marketing.coupon_data):''
swich_phone = reserve && reserve.swich_phone?reserve.swich_phone:'';
is_comments = marketing && marketing.is_comments?marketing.is_comments:'';
let coupon=marketing?util.determine(marketing.coupon_data):'';
marketing.coupon_data_comments=(marketing && is_comments=='1' && marketing.is_comments_coupon=='1')?util.determine(marketing.coupon_data_comments):'';
// is_cash 代金券 is_discount折扣券 is_dish菜品券 只有代金券有几折显示
if(coupon && util.getType(coupon)=='object'){
coupon.stringifyUse=JSON.stringify(coupon.use)
... ... @@ -318,7 +358,8 @@ Page({
stringifyUse,
coupon,
coupon_dataList,
swich_phone
swich_phone,
is_comments,
}
console.log('获取数据', {...obj});
if(marketing && marketing.is_recharge=='1' && marketing.recharge_data){
... ... @@ -363,6 +404,7 @@ Page({
priceInfo,
scoreInfo,
swich_phone,
is_comments,
})
if (home && home.red == '1' && home.green == '67' && home.blue == '163') {
this.setData({
... ...
... ... @@ -29,7 +29,7 @@
</view>
<view class="flex-11" wx:if="{{seller.tablesText}}">
<view class="label">【包间】</view>
<view class="contentData">{{seller.tablesText}}</view>
<view class="contentData room">{{seller.tablesText}}</view>
</view>
<view class="flex-11" wx:if="{{detail.actual_pum || tableNum}}">
<view class="label">【人数】</view>
... ... @@ -43,9 +43,6 @@
<view class="label">【联系】</view>
<view class="contentData">{{reserve.seller_phone?reserve.seller_phone:detail.seller.phone}}</view>
</view>
<view class="welcome">
欢迎垂询,恭候光临!
</view>
<block wx:if="{{staffinfo && reserve.swich_manager=='1'}}">
<view class="handleInfo">
<image wx:if="{{staffinfo && staffinfo.photo}}" src="{{staffinfo.photo}}" class="headerimg" mode="aspectFill"></image>
... ... @@ -59,12 +56,15 @@
</view>
</view>
</block>
<view class="welcome">
欢迎垂询,恭候光临!
</view>
</view>
</view>
<view class="positioning" bindtap="looklocation">
<image src="https://qn.colorcun.com/WechatIMG256.png" mode="" />
<image src="https://qn.colorcun.com/address.png" mode="" />
<view class="name">
<text>{{seller.name?seller.name:reserve.seller_name}}</text>
<text>【{{seller.name?seller.name:reserve.seller_name}}】</text>
<text>{{seller.addr?seller.addr:reserev.seller.map_address}}</text>
</view>
</view>
... ... @@ -96,6 +96,11 @@
</view>
</view>
</view>
<view wx:if="{{is_comments=='1' && !is_user_comments}}" class="evaluateBox" bindtap="evaluateFun">
<text wx:if="{{is_comments=='1' && marketing.is_comments_coupon!='1'}}">{{'想吐槽?戳这里填写意见!-->'}}</text>
<text wx:if="{{marketing.is_comments_coupon=='1'}}">想吐槽?戳这里填写意见反馈赢好礼!</text>
<image src="https://qn.colorcun.com/evaluate.png" mode=""/>
</view>
<!-- <view class="visitor">
确认赴约客人:{{keepAppointment.length}}位
</view>
... ...
... ... @@ -107,14 +107,14 @@
line-height: 40rpx;
color: #000000;
font-family: PingFang SC;
font-size: 28rpx;
font-size: 32rpx;
}
.label {
flex-shrink: 0;
color: #000000;
font-family: PingFang SC;
font-size: 28rpx;
font-size: 32rpx;
}
.contentData {
... ... @@ -122,7 +122,7 @@
line-height: 40rpx;
color: #000000;
font-family: PingFang SC;
font-size: 28rpx;
font-size: 32rpx;
}
.handleInfo {
... ... @@ -187,19 +187,19 @@
}
.positioning {
margin: 16rpx 26rpx;
margin: 16rpx 40rpx;
display: flex;
box-sizing: border-box;
justify-content: center;
background: #D9D9D9;
background: #F8F9FD;
padding: 16rpx 20rpx 16rpx 30rpx;
border-radius: 10rpx;
align-items: center;
}
.positioning image {
width: 72rpx;
height: 116rpx;
width: 60rpx;
height: 71rpx;
margin-right: 38rpx;
}
... ... @@ -463,7 +463,7 @@
}
.preferential {
margin: 16rpx 26rpx;
margin: 16rpx 40rpx;
}
.preferentialItems {
... ... @@ -529,7 +529,7 @@
.price{
display: flex;
align-items: flex-end;
align-items: center;
justify-content: center;
}
... ... @@ -646,4 +646,21 @@
color: #fff !important;
font-weight: normal;
width: 27% !important;
}
.room{
font-weight: 600;
}
.evaluateBox{
margin: 16rpx 84rpx 16rpx 40rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.evaluateBox image{
width: 60rpx;
height: 70rpx;
}
.evaluateBox text{
color: #000;
font-size: 28rpx;
}
\ No newline at end of file
... ...
... ... @@ -47,7 +47,6 @@ Page({
sizeType:['compressed'], //['original', 'compressed'] 所选的图片的尺寸,超大图片 compressed 会引起开卡顿
sourceType:['album', 'camera'], //['album', 'camera'] 选择图片的来源
},
files:[], //组件数据放入这里展示到页面上
hasAddFile:true,//出现上传加号
isnoshow:1, //是否匿名
filesHttps:[],
... ... @@ -128,7 +127,6 @@ Page({
tpupload(e){
this.setData({
filesHttps:e.detail.filesHttps,
files:e.detail.files,
})
},
displayImage(e){
... ...
// pages/pinglun/createOpinion.js
import util from '../../utils/util';
import App from '../../utils/api'
Page({
/**
* 页面的初始数据
*/
data: {
options: {},
filesHttps: [],
},
text: '',
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let data = options
data.record = util.determine(options.record)
this.setData({
options: data
})
console.log('options', {
...data
});
},
// 获取上传的图片或者视频
tpupload(e) {
this.setData({
filesHttps: e.detail.filesHttps,
})
},
textareaInput(e) {
this.text = util.val(e).trim();
},
// 提交
submit() {
if (this.text == '') {
return wx.showToast({
icon: 'none',
title: '请填写意见反馈!',
})
}
wx.showLoading({
title: '提交中',
})
let params = {
sid: this.data.options.sellerid,
rid: this.data.options.oid,
author_openid: getApp().openid,
enclosure: JSON.stringify(this.data.filesHttps),
identity: 1,
text: this.text,
types: this.data.options.types, //types为1时 rid就是预订ID types为2时 rid就是套餐ID types为3时 rid就是卡券ID
isnoshow: '1', //匿名评价 1 开 0 关
}
console.log({
...params
});
App.User.SetComment(params).then(res => {
if (res.ret != 200) {
wx.hideLoading()
return wx.showToast({
icon: 'none',
title: res.msg,
})
}
let url = ''
let options = this.data.options
// 有券
if (this.options.coupon == '1') {
url = util.http_build_query({
sellerName: options.sellerName,
coupon: options.coupon,
couponId: options.couponId || '',
coupon: options.coupon || '',
price: options.price || '',
use: options.use || '',
oid: options.oid,
sid: options.sellerid,
}, './opinionSuccess')
} else { //没券
url = util.http_build_query({
sellerName: options.sellerName,
coupon: options.coupon, //1有券 2没有券
couponId: options.couponId || '',
}, './opinionSuccess')
}
wx.redirectTo({
url
})
if (url) {
wx.hideLoading()
}
}).catch(e => {
wx.hideLoading()
console.log('catch', e);
wx.showToast({
icon: 'none',
title: e.msg,
})
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
... ...
{
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#4d4e50",
"navigationBarTextStyle": "white",
"usingComponents": {
"nav":"/components/nav/nav",
"tpupload": "/components/tpupload/tpupload"
}
}
\ No newline at end of file
... ...
<!--pages/pinglun/createOpinion.wxml 填写意见反馈页面-->
<nav color="#515151">{{options.sellerName}}</nav>
<view class="box">
<view class="info">
<view class="texts font28r">就餐时间:</view>
<view class="texts_right font28r">{{options.record.date}}</view>
</view>
<view class="info">
<view class="texts font28r">桌位台号:</view>
<view class="texts_right font28r">{{options.record.tablesText}}</view>
</view>
<view class="info">
<view class="texts font28r">就餐人数:</view>
<view class="texts_right font28r">{{options.record.tableNum}}</view>
</view>
<view class="info">
<view class="texts font28r">备注信息:</view>
<view wx:if="{{options.record.cusdem}}" class="texts_right font28r">{{options.record.cusdem}}</view>
</view>
</view>
<view class="main">
<textarea class="margin-top-lg text-df textarea" bindinput="textareaInput" cols="30" rows="10" placeholder="麻烦点这里输入您的意见反馈。\n\n\n可以帮助我们持续改进,给您带来更好的服务品质,谢谢啦!" placeholder-style="color:#999999;font-size:30rpx;"></textarea>
<tpupload bind:tpupload="tpupload" tpNum='6'></tpupload>
</view>
<button class="btn" bindtap="submit">提交</button>
\ No newline at end of file
... ...
/* pages/pinglun/createOpinion.wxss */
.box {
padding: 24rpx 0 30rpx 0;
margin: 0 40rpx;
border-bottom: 2rpx solid #515151;
}
.info {
margin-bottom: 16rpx;
display: flex;
justify-content: space-between;
}
.texts {
font-weight: 500;
}
.texts_right {
font-weight: 500;
text-align: right;
width: 79%;
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
word-break: break-all;
}
.textarea {
width: 100%;
height: 370rpx;
font-size: 30rpx;
line-height: 42rpx;
margin-top: 36rpx 0 20rpx 0;
word-wrap: break-word;
white-space: pre-line
}
.textarea-placeholder {
font-size: 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999 !important;
line-height: 42rpx;
}
.main {
padding: 0 40rpx;
margin: 36rpx 0 42rpx 0;
}
.btn {
margin: 0 40rpx;
font-weight: 500;
font-size: 32rpx;
color: #f8f9fd;
border-radius: 42rpx;
background: linear-gradient(104.24deg, #4c8dad -57.47%, #0143a3 55.72%, #42a5ff 148.72%);
}
\ No newline at end of file
... ...
// pages/pinglun/opinionSuccess.js
import App from '../../utils/api'
import util from '../../utils/util';
Page({
/**
* 页面的初始数据
*/
data: {
options: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log('options', options);
this.setData({
options,
})
},
seeCoupon() {
wx.showLoading({
title: '加载中',
})
let options = this.data.options
// 金额大于0 需要购买券
if (options.coupon == '1' && options.price * 1 > 0) {
let url = util.http_build_query({
id: options.couponId,
name: options.sellerName,
oid: options.oid,
sid: options.sid,
types: '1',
use: options.use ? JSON.stringify(options.use) : '',
}, '/pack-activity/pack/buyCoupon')
wx.hideLoading()
wx.redirectTo({
url
})
} else { //金额为0 直接领券后跳转到我的券页面
App.Activity.CreateNewRechargeOrder({
recharge_id: options.couponId,
sellerid: options.sid,
number: '1',
price: options.price,
type: '1',
}).then(res => {
if (res.ret == '200') {
wx.hideLoading()
let price = res.data.price;
if (price == 0) {
wx.showToast({
icon: 'none',
title: '购买成功',
})
wx.reLaunch({
url: '/pages/me/coupon_news'
})
return
}
} else {
wx.hideLoading()
wx.showToast({
title: res.msg,
duration: 2000,
mask: true
})
}
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
... ...
{
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black",
"usingComponents": {
"nav":"/components/nav/nav"
}
}
\ No newline at end of file
... ...
<!--pages/pinglun/opinionSuccess.wxml-->
<nav>{{options.sellerName}}</nav>
<view class="flexView">
<view class="imgBox">
<image src="http://nosqn.colorcun.com/pinglun/p%20%288%29.png" style="width: 60rpx;height: 60rpx;"></image>
<view class="texts">感谢您的评价!</view>
</view>
<view wx:if="{{options.coupon=='0'}}" class="text font28r">我们会加倍用功,努力做到更好!期待您的再次光临!</view>
<view wx:if="{{options.coupon=='1'}}" class="text font28r">我们特地给您准备了小礼物一份,请笑纳!</view>
<button wx:if="{{options.coupon=='1'}}" bindtap="seeCoupon" class="margin-top mylist">去查看</button>
<view wx:if="{{options.coupon=='1'}}" class="font28r info">我们会加倍用功,努力做到更好!期待您的再次光临!</view>
</view>
\ No newline at end of file
... ...
/* pages/pinglun/opinionSuccess.wxss */
.flexView {
display: flex;
flex-direction: column;
align-items: center;
}
.imgBox {
margin-top: 80rpx;
display: flex;
align-items: center;
}
.imgBox image {
width: 90rpx;
height: 90rpx;
}
.texts {
font-weight: bold;
font-size: 38rpx;
margin-left: 20rpx;
}
.mylist {
padding: 0 36rpx;
border-radius: 40rpx;
border: 2rpx solid #0143A3;
font-size: 24rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #0143A3;
text-align: center;
margin-bottom: 200rpx;
}
.text {
color: #000;
margin: 50rpx 96rpx;
}
.info {
color: #000;
margin: 0 96rpx;
}
\ No newline at end of file
... ...