Commit 26ff04ff authored by 华国豪's avatar 华国豪 🙄

修改图片位置

parent 856a1e22
{ {
"pages": [ "pages": [
"pages/Voucher/write/write",
"pages/Voucher/Voucher", "pages/Voucher/Voucher",
"pages/Voucher/VoucherDetails/VoucherDetails", "pages/Voucher/VoucherDetails/VoucherDetails",
"pages/Voucher/rating/rating", "pages/Voucher/rating/rating",
"pages/Voucher/write/write",
"pages/freeTravel/free", "pages/freeTravel/free",
"pages/visa/visa", "pages/visa/visa",
"pages/Home/home", "pages/Home/home",
......
...@@ -15,6 +15,7 @@ Page({ ...@@ -15,6 +15,7 @@ Page({
rating: '', rating: '',
Message: '', Message: '',
showYouJi: false, showYouJi: false,
showBadYouJi: false
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -33,26 +34,27 @@ Page({ ...@@ -33,26 +34,27 @@ Page({
this.getinfo() this.getinfo()
this.getVoucher() this.getVoucher()
}, },
// 差评直接退出小程序
logOut: function () {
wx.navigateBack({
delta: -1
})
},
// 保存数据 // 保存数据
saveMessage: function () { saveMessage: function () {
console.log(this.data.voucherData)
let data = JSON.parse(JSON.stringify(this.data.voucherData)), let data = JSON.parse(JSON.stringify(this.data.voucherData)),
showYouJi = false; showYouJi = true;
data.forEach(x=>{ data.forEach(x=>{
x.TCID = this.tcId; x.TCID = this.data.tcId;
x.OrderID = this.orderId; x.OrderID = this.data.orderId;
x.GuestId = this.GuestId; x.GuestId = this.data.GuestId;
if (x.SurveyType === 2 || x.SurveyType === 3) { if (x.SurveyType === 2 || x.SurveyType === 3) {
x.SurveyOptionsList.forEach(y=>{ x.SurveyOptionsList.forEach(y=>{
y.IsCheck = y.IsCheckS ? '1' : '0' y.IsCheck = y.IsCheckS ? '1' : '0'
}) })
} }
if (x.SurveyType === 1) { if (x.SurveyType === 1 && x.ScoreNum < 3) {
if (x.ScoreNum >= 3) { showYouJi = false
showYouJi = true
} else {
showYouJi = false
}
} }
}) })
if (this.data.Message === '') { if (this.data.Message === '') {
...@@ -68,6 +70,10 @@ Page({ ...@@ -68,6 +70,10 @@ Page({
this.setData({ this.setData({
showYouJi: true showYouJi: true
}) })
} else {
this.setData({
showBadYouJi: true
})
} }
wx.showToast({ wx.showToast({
title: '提交成功!', title: '提交成功!',
...@@ -85,12 +91,11 @@ Page({ ...@@ -85,12 +91,11 @@ Page({
//写游记 //写游记
goWrite: function () { goWrite: function () {
wx.navigateTo({ wx.navigateTo({
url: '/pages/Voucher/write/write?GuestId=' + _this.data.GuestId + '&orderId=' + _this.data.orderId + '&tcId=' + _this.data.tcId url: '/pages/Voucher/write/write?GuestId=' + this.data.GuestId + '&orderId=' + this.data.orderId + '&tcId=' + this.data.tcId
}) })
}, },
//评分 //评分
handleChange: function (e) { handleChange: function (e) {
console.log(e.detail.value)
let index = e.target.id let index = e.target.id
this.data.voucherData[index].ScoreNum = e.detail.value this.data.voucherData[index].ScoreNum = e.detail.value
this.setData({ this.setData({
...@@ -100,7 +105,6 @@ Page({ ...@@ -100,7 +105,6 @@ Page({
}, },
// 输入留言 // 输入留言
inputMessage: function (e) { inputMessage: function (e) {
console.log(e.detail.value)
let index = e.target.id let index = e.target.id
this.data.voucherData[index].TextContent = e.detail.value this.data.voucherData[index].TextContent = e.detail.value
this.setData({ this.setData({
...@@ -127,9 +131,7 @@ Page({ ...@@ -127,9 +131,7 @@ Page({
}) })
}, },
checkboxChange: function (e) { checkboxChange: function (e) {
let ID = []; let ID = [],checkd = e.detail.value,index = e.target.id;
let checkd = e.detail.value
let index = e.target.id
for (let i = 0; i < checkd.length ; i++) { for (let i = 0; i < checkd.length ; i++) {
ID.push(Number(checkd[i])) ID.push(Number(checkd[i]))
} }
...@@ -146,8 +148,7 @@ Page({ ...@@ -146,8 +148,7 @@ Page({
}) })
}, },
radioChange: function (e) { radioChange: function (e) {
let ID = Number(e.detail.value) let ID = Number(e.detail.value),index = e.target.id;
let index = e.target.id
this.data.voucherData[index].SurveyOptionsList.forEach(o => { this.data.voucherData[index].SurveyOptionsList.forEach(o => {
if (ID === o.ID) { if (ID === o.ID) {
o.IsCheckS = true o.IsCheckS = true
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</view> </view>
<view wx:for="{{voucherData}}" wx:for-item="item" wx:for-index="index" wx:key="index" class='pingfen-item'> <view wx:for="{{voucherData}}" wx:for-item="item" wx:for-index="index" wx:key="index" class='pingfen-item'>
<view> <view>
<text>{{index+1}}、{{item.Title}}</text> <text class='tittle'>{{index+1}}、{{item.Title}}</text>
</view> </view>
<com-rating max="5" rating='5' bindchange='handleChange' wx:if="{{item.SurveyType === 1}}" id="{{index}}"/> <com-rating max="5" rating='5' bindchange='handleChange' wx:if="{{item.SurveyType === 1}}" id="{{index}}"/>
<radio-group wx:elif="{{item.SurveyType === 2}}" class="radio-group" bindchange="radioChange" id="{{index}}"> <radio-group wx:elif="{{item.SurveyType === 2}}" class="radio-group" bindchange="radioChange" id="{{index}}">
...@@ -43,4 +43,16 @@ ...@@ -43,4 +43,16 @@
</view> </view>
</view> </view>
</view> </view>
<view class='dialog' wx:if="{{showBadYouJi}}">
<view class='box'>
<view class='tit'>感谢参与调查</view>
<image src='../../../images/voucher/xieyouji_icon.png'></image>
<view class='btn'>
<button class='next' type="default" size="mini" bindtap="logOut">好的,不用谢~</button>
</view>
<view class='tips'>
非常感谢您的配合,祝您生活愉快~
</view>
</view>
</view>
</view> </view>
\ No newline at end of file
...@@ -26,6 +26,9 @@ page{ ...@@ -26,6 +26,9 @@ page{
.pingfen-item{ .pingfen-item{
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }
.tittle{
font-size: 32rpx;
}
.pingfen-item label{ .pingfen-item label{
font-size: 28rpx; font-size: 28rpx;
padding-right: 30rpx; padding-right: 30rpx;
......
// pages/Voucher/write/write.js // pages/Voucher/write/write.js
let app = getApp()
Page({ Page({
/** /**
...@@ -8,61 +9,78 @@ Page({ ...@@ -8,61 +9,78 @@ Page({
orderId: null, orderId: null,
tcId: null, tcId: null,
GuestId: null, GuestId: null,
list: [],
imgList: [], imgList: [],
tag: [ tag: [],
{ infoMessage: '',
id: 0, showBadYouJi: false,
name: '交通攻略', },
content: '', // 退出
},{ logOut: function () {
id: 1, wx.navigateBack({
name: '营业时间', delta: -1
content: '', })
}, { },
id: 2, //提交游记内容数据
name: '详细地址', goWrite: function () {
content: '', let msg = {
}, { GuestId: this.data.GuestId,
id: 3, TCID: this.data.tcId,
name: '人均消费', OrderID: this.data.orderId,
content: '', GuestTravelLableList: [],
}, { NotesPics: this.data.imgList,
id: 4, };
name: '特色推荐', if (this.data.infoMessage !== '') {
content: '', msg.GuestTravelLableList.push({
}, { Name: '',
id: 5, Content: this.data.infoMessage
name: '行程路线', })
content: '', }
}, { this.data.tag.map(x=>{
id: 6, if (x.Content !== '') {
name: '玩法推荐', msg.GuestTravelLableList.push(x)
content: '',
}, {
id: 7,
name: '实用提示',
content: '',
}, {
id: 8,
name: '行程路线',
content: '',
} }
] })
app.$api('survey_post_SetGuestTravelNotes', msg).then(res => {
this.setData({
showBadYouJi: true,
})
}).catch(err => {
wx.showToast({
title: err.message,
icon: 'none',
duration: 1000
})
})
},
// 正文内容
inputMessage: function (e) {
this.setData({
infoMessage: e.detail.value
})
},
// 标签内容
inputItemMessage: function (e) {
let index = e.target.id
this.data.tag[index].Content = e.detail.value
this.setData({
tag: this.data.tag
})
}, },
//选择标签 //选择标签
clickTag: function (e) { clickTag: function (e) {
let index = e.target.id let index = e.target.id
this.data.tag[index].Content = '';
this.data.tag[index].click = !this.data.tag[index].click
this.setData({
tag: this.data.tag
})
}, },
// 删除图片 // 删除图片
deleteImg: function (e) { deleteImg: function (e) {
let index = e.target.id let index = e.target.id
this.data.imgList.splice(index, 1) this.data.imgList.splice(index, 1)
let _this = this;
console.log(this.data.imgList)
this.setData({ this.setData({
imgList: _this.data.imgList imgList: this.data.imgList
}) })
}, },
// 选择图片 // 选择图片
...@@ -89,7 +107,6 @@ Page({ ...@@ -89,7 +107,6 @@ Page({
_this.setData({ _this.setData({
imgList: arr imgList: arr
}) })
console.log(arr)
} }
}) })
}, },
...@@ -106,8 +123,34 @@ Page({ ...@@ -106,8 +123,34 @@ Page({
tcId: options.tcId, tcId: options.tcId,
GuestId: options.GuestId, GuestId: options.GuestId,
}) })
this.getTag()
},
getTag: function () {
let _this = this;
app.$api('survey_post_GetGuestTravelLableList', {}).then(res => {
let arr = [];
res.forEach((x, i)=>{
arr.push(
{
id: i,
Name: x,
Content: '',
click: false
}
)
})
_this.setData({
tag: arr
})
console.log(this.data.tag)
}).catch(err => {
wx.showToast({
title: err.message,
icon: 'none',
duration: 1000
})
})
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
<view class='content'> <view class='content'>
<view class='top'> <view class='top'>
<view class='top-content'> <view class='top-content'>
<view wx:if='{{list.length < 1}}' class='no-list'> <view class='no-list'>
<textarea placeholder='我来说说在这里游玩的感受吧~'></textarea> <textarea placeholder='我来说说在这里游玩的感受吧~' bindinput='inputMessage'></textarea>
</view> </view>
<view wx:else> <view class='tag-item' wx:for="{{tag}}" wx:for-item="item" wx:for-index="index" wx:key="index" wx:if="{{item.click}}">
阿萨德 <text class='lable'>{{item.Name}}:</text>
<textarea placeholder='请输入...' bindinput='inputItemMessage' id="{{index}}"></textarea>
</view> </view>
<view class='btn'> <view class='btn'>
<button class='next' type="default" size="mini" bindtap="goWrite">发送</button> <button class='next' type="default" size="mini" bindtap="goWrite">发送</button>
...@@ -27,7 +28,17 @@ ...@@ -27,7 +28,17 @@
<text>游记标签</text> <text>游记标签</text>
</view> </view>
<view class='tag-list'> <view class='tag-list'>
<text wx:for="{{tag}}" wx:for-item="item" wx:for-index="index" wx:key="key" bindtap='clickTag' id="{{index}}">{{item.name}}</text> <text class='{{item.click ? "active" : ""}}' wx:for="{{tag}}" wx:for-item="item" wx:for-index="index" wx:key="key" bindtap='clickTag' id="{{index}}">{{item.Name}}</text>
</view>
</view>
<view class='dialog' wx:if="{{showBadYouJi}}">
<view class='box'>
<view class='tit'>感谢参与调查</view>
<image src='../../../images/voucher/xieyouji_icon.png'></image>
<view class='btn'>
<button class='next' type="default" size="mini" bindtap="logOut">好的,不用谢~</button>
</view>
<view class='tips'>常感谢您的配合,请保持电话畅通~稍后客户经理会与您联系</view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file
...@@ -9,7 +9,7 @@ page{ ...@@ -9,7 +9,7 @@ page{
min-height: 310rpx; min-height: 310rpx;
background: rgba(245,245,245,1); background: rgba(245,245,245,1);
box-sizing: border-box; box-sizing: border-box;
padding: 23rpx 20rpx; padding: 23rpx 20rpx 75rpx 20rpx;
position: relative; position: relative;
} }
.no-list{ .no-list{
...@@ -18,8 +18,9 @@ page{ ...@@ -18,8 +18,9 @@ page{
} }
.no-list textarea{ .no-list textarea{
width: 100%; width: 100%;
height: 75px;
} }
.btn button.next{ .top-content .btn button.next{
background: rgba(238,68,84,1); background: rgba(238,68,84,1);
box-shadow: 0px 1px 2px 0px rgba(167,11,26,0.63); box-shadow: 0px 1px 2px 0px rgba(167,11,26,0.63);
border-radius: 10px; border-radius: 10px;
...@@ -30,7 +31,7 @@ page{ ...@@ -30,7 +31,7 @@ page{
z-index: 2; z-index: 2;
} }
.upload{ .upload{
height: 120rpx; min-height: 120rpx;
margin: 20rpx 0; margin: 20rpx 0;
display: flex; display: flex;
flex-wrap:wrap; flex-wrap:wrap;
...@@ -39,8 +40,8 @@ page{ ...@@ -39,8 +40,8 @@ page{
position: relative; position: relative;
} }
.upload .item-box image{ .upload .item-box image{
width: 120rpx; width: 200rpx;
height: 120rpx; height: 200rpx;
border-radius: 20rpx; border-radius: 20rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
...@@ -51,7 +52,7 @@ page{ ...@@ -51,7 +52,7 @@ page{
display: inline-block; display: inline-block;
width:30rpx; width:30rpx;
height:30rpx; height:30rpx;
line-height: 20rpx; line-height: 22rpx;
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
color: white; color: white;
...@@ -91,7 +92,7 @@ page{ ...@@ -91,7 +92,7 @@ page{
border-radius:20px; border-radius:20px;
font-size: 24rpx; font-size: 24rpx;
color: rgba(255,255,255,1); color: rgba(255,255,255,1);
line-height: 23px; line-height: 45rpx;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
} }
...@@ -111,4 +112,68 @@ page{ ...@@ -111,4 +112,68 @@ page{
text-align: center; text-align: center;
line-height: 53rpx; line-height: 53rpx;
margin-bottom: 57rpx; margin-bottom: 57rpx;
}
.tag-list text.active{
background:rgba(238,68,84,.3);
color: #EE4454;
}
.tag-item{
display: flex;
margin-bottom: 20rpx;
border-bottom: 1px solid #E0E2E6;
}
.tag-item .lable{
width: 190rpx;
height: 48rpx;
background: rgba(149,186,255,1);
border-radius: 10px;
font-size: 28rpx;
color: #2C5CB7;
display: inline-block;
text-align: center;
margin-right: 20rpx;
}
.tag-item textarea{
font-size: 26rpx;
height: 75px;
padding: 10rpx 20rpx;
}
.dialog{
height: 100%;
width: 100%;
position: fixed;
left: 0;
top: 0;
z-index: 2;
background:rgba(44,44,44,.5);
display: flex;
align-items: center;
justify-content: center;
}
.dialog .box{
padding: 54rpx;
border-radius:20rpx;
height: 694rpx;
box-sizing: border-box;
background-color: white;
width: 634rpx;
text-align: center;
}
.dialog .box .tit{
font-size: 36rpx;
margin-bottom: 75rpx;
}
.dialog .box image{
width: 278rpx;
height: 218rpx;
}
.dialog .box .btn button.next{
background:rgba(238,68,84,1) !important;
border-color: rgba(238,68,84,1) !important;
color: white;
}
.dialog .box .tips{
font-size: 28rpx;
color: #999999;
margin-top: 25rpx;
} }
\ No newline at end of file
<import src='../../wxParse/wxParse.wxml' /> <import src='../../wxParse/wxParse.wxml' />
<view class="page"> <view class="page">
<view class='box'> <view class='box'>
<image class='logo' src='../../../images/product/logo_t.png'></image> <image class='logo' src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190625044641454.png'></image>
<view class='xbox'> <view class='xbox'>
<view class='title_box'> <view class='title_box'>
<text class='title'>{{Detaildata.Title}}</text> <text class='title'>{{Detaildata.Title}}</text>
......
<import src='../../../wxParse/wxParse.wxml' /> <import src='../../../wxParse/wxParse.wxml' />
<view class="page"> <view class="page">
<view class='box'> <view class='box'>
<image class='success' src='../../../../images/product/success.png'></image> <image class='success' src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190625044641415.png'></image>
<view class='xbox'> <view class='xbox'>
<text class='title'>提交成功</text> <text class='title'>提交成功</text>
<text class='title_t'>系统将为本单预留72小时</text> <text class='title_t'>系统将为本单预留72小时</text>
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
<!-- 广告位 --> <!-- 广告位 -->
<view class='huo'> <view class='huo'>
<view class='advertisement' bindtap='draw' catchtouchmove="doNothing"> <view class='advertisement' bindtap='draw' catchtouchmove="doNothing">
<image src='../../../../images/product/huodong.png'></image> <image src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190625044635970.png'></image>
</view> </view>
<view class='advertisement' bindtap='draw_t' catchtouchmove="doNothing"> <view class='advertisement' bindtap='draw_t' catchtouchmove="doNothing">
<image src='../../../../images/product/guanggao.jpg'></image> <image src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190625044636072.jpg'></image>
</view> </view>
</view> </view>
<view style="width: 100%;height : 50px"></view> <view style="width: 100%;height : 50px"></view>
......
<view class="wrapper"> <view class="wrapper">
<image class='title' src='../../../../images/product/title_n.png'></image> <image class='title' src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190625044641412.png'></image>
<view class="main"> <view class="main">
<scroll-view class="canvas-container" catchtouchmove="doNothing"> <scroll-view class="canvas-container" catchtouchmove="doNothing">
<view animation="{{animationData}}" class="canvas-content" > <view animation="{{animationData}}" class="canvas-content" >
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</view> </view>
<!-- <view bindtap="getLottery" class="canvas-btn {{btnDisabled}}">抽奖</view> --> <!-- <view bindtap="getLottery" class="canvas-btn {{btnDisabled}}">抽奖</view> -->
<image src='../../../../images/product/jt2.png' bindtap="{{btnname}}" class="canvas-btn {{btnDisabled}}" disabled="{{disabled}}"></image> <image src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190625044635899.png' bindtap="{{btnname}}" class="canvas-btn {{btnDisabled}}" disabled="{{disabled}}"></image>
</scroll-view> </scroll-view>
<view class='button_b'> <view class='button_b'>
<view class='button_b_l'> <view class='button_b_l'>
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
<block wx:for="{{item.details}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2"> <block wx:for="{{item.details}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2">
<view class='view_2_detail_box'> <view class='view_2_detail_box'>
<!-- 图 --> <!-- 图 -->
<image wx:if="{{(item2.img===''&&index===0)||(item2.img===''&&index===tripDays.length-1)}}" class='view_2_detail_image' src='../../../images/product/tripPlaceholder_fly.jpg'></image> <image wx:if="{{(item2.img===''&&index===0)||(item2.img===''&&index===tripDays.length-1)}}" class='view_2_detail_image' src='http://imgfile.oytour.com/New/Upload/Cloud/2019-06/20190625044641552.jpg'></image>
<image wx:elif="{{item2.img===''&&index!==0&&index!==tripDays.length-1}}" class='view_2_detail_image' src='../../../images/product/tripPlaceholder.jpg'></image> <image wx:elif="{{item2.img===''&&index!==0&&index!==tripDays.length-1}}" class='view_2_detail_image' src='../../../images/product/tripPlaceholder.jpg'></image>
<image wx:else class='view_2_detail_image' src='{{item2.img}}?x-oss-process=image/resize,m_fill,w_640,h_390'></image> <image wx:else class='view_2_detail_image' src='{{item2.img}}?x-oss-process=image/resize,m_fill,w_640,h_390'></image>
<!-- 标题 --> <!-- 标题 -->
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 5, "current": -1,
"list": [ "list": [
{ {
"id": 0, "id": 0,
...@@ -82,6 +82,7 @@ ...@@ -82,6 +82,7 @@
"id": -1, "id": -1,
"name": "写游记", "name": "写游记",
"pathName": "pages/Voucher/write/write", "pathName": "pages/Voucher/write/write",
"query": "",
"scene": null "scene": null
} }
] ]
......
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