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

修改图片位置

parent 856a1e22
{
"pages": [
"pages/Voucher/write/write",
"pages/Voucher/Voucher",
"pages/Voucher/VoucherDetails/VoucherDetails",
"pages/Voucher/rating/rating",
"pages/Voucher/write/write",
"pages/freeTravel/free",
"pages/visa/visa",
"pages/Home/home",
......
......@@ -15,6 +15,7 @@ Page({
rating: '',
Message: '',
showYouJi: false,
showBadYouJi: false
},
/**
* 生命周期函数--监听页面加载
......@@ -33,26 +34,27 @@ Page({
this.getinfo()
this.getVoucher()
},
// 差评直接退出小程序
logOut: function () {
wx.navigateBack({
delta: -1
})
},
// 保存数据
saveMessage: function () {
console.log(this.data.voucherData)
let data = JSON.parse(JSON.stringify(this.data.voucherData)),
showYouJi = false;
showYouJi = true;
data.forEach(x=>{
x.TCID = this.tcId;
x.OrderID = this.orderId;
x.GuestId = this.GuestId;
x.TCID = this.data.tcId;
x.OrderID = this.data.orderId;
x.GuestId = this.data.GuestId;
if (x.SurveyType === 2 || x.SurveyType === 3) {
x.SurveyOptionsList.forEach(y=>{
y.IsCheck = y.IsCheckS ? '1' : '0'
})
}
if (x.SurveyType === 1) {
if (x.ScoreNum >= 3) {
showYouJi = true
} else {
showYouJi = false
}
if (x.SurveyType === 1 && x.ScoreNum < 3) {
showYouJi = false
}
})
if (this.data.Message === '') {
......@@ -68,6 +70,10 @@ Page({
this.setData({
showYouJi: true
})
} else {
this.setData({
showBadYouJi: true
})
}
wx.showToast({
title: '提交成功!',
......@@ -85,12 +91,11 @@ Page({
//写游记
goWrite: function () {
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) {
console.log(e.detail.value)
let index = e.target.id
this.data.voucherData[index].ScoreNum = e.detail.value
this.setData({
......@@ -100,7 +105,6 @@ Page({
},
// 输入留言
inputMessage: function (e) {
console.log(e.detail.value)
let index = e.target.id
this.data.voucherData[index].TextContent = e.detail.value
this.setData({
......@@ -127,9 +131,7 @@ Page({
})
},
checkboxChange: function (e) {
let ID = [];
let checkd = e.detail.value
let index = e.target.id
let ID = [],checkd = e.detail.value,index = e.target.id;
for (let i = 0; i < checkd.length ; i++) {
ID.push(Number(checkd[i]))
}
......@@ -146,8 +148,7 @@ Page({
})
},
radioChange: function (e) {
let ID = Number(e.detail.value)
let index = e.target.id
let ID = Number(e.detail.value),index = e.target.id;
this.data.voucherData[index].SurveyOptionsList.forEach(o => {
if (ID === o.ID) {
o.IsCheckS = true
......
......@@ -13,7 +13,7 @@
</view>
<view wx:for="{{voucherData}}" wx:for-item="item" wx:for-index="index" wx:key="index" class='pingfen-item'>
<view>
<text>{{index+1}}、{{item.Title}}</text>
<text class='tittle'>{{index+1}}、{{item.Title}}</text>
</view>
<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}}">
......@@ -43,4 +43,16 @@
</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>
\ No newline at end of file
......@@ -26,6 +26,9 @@ page{
.pingfen-item{
margin-bottom: 40rpx;
}
.tittle{
font-size: 32rpx;
}
.pingfen-item label{
font-size: 28rpx;
padding-right: 30rpx;
......
// pages/Voucher/write/write.js
let app = getApp()
Page({
/**
......@@ -8,61 +9,78 @@ Page({
orderId: null,
tcId: null,
GuestId: null,
list: [],
imgList: [],
tag: [
{
id: 0,
name: '交通攻略',
content: '',
},{
id: 1,
name: '营业时间',
content: '',
}, {
id: 2,
name: '详细地址',
content: '',
}, {
id: 3,
name: '人均消费',
content: '',
}, {
id: 4,
name: '特色推荐',
content: '',
}, {
id: 5,
name: '行程路线',
content: '',
}, {
id: 6,
name: '玩法推荐',
content: '',
}, {
id: 7,
name: '实用提示',
content: '',
}, {
id: 8,
name: '行程路线',
content: '',
tag: [],
infoMessage: '',
showBadYouJi: false,
},
// 退出
logOut: function () {
wx.navigateBack({
delta: -1
})
},
//提交游记内容数据
goWrite: function () {
let msg = {
GuestId: this.data.GuestId,
TCID: this.data.tcId,
OrderID: this.data.orderId,
GuestTravelLableList: [],
NotesPics: this.data.imgList,
};
if (this.data.infoMessage !== '') {
msg.GuestTravelLableList.push({
Name: '',
Content: this.data.infoMessage
})
}
this.data.tag.map(x=>{
if (x.Content !== '') {
msg.GuestTravelLableList.push(x)
}
]
})
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) {
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) {
let index = e.target.id
this.data.imgList.splice(index, 1)
let _this = this;
console.log(this.data.imgList)
this.setData({
imgList: _this.data.imgList
imgList: this.data.imgList
})
},
// 选择图片
......@@ -89,7 +107,6 @@ Page({
_this.setData({
imgList: arr
})
console.log(arr)
}
})
},
......@@ -106,8 +123,34 @@ Page({
tcId: options.tcId,
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 @@
<view class='content'>
<view class='top'>
<view class='top-content'>
<view wx:if='{{list.length < 1}}' class='no-list'>
<textarea placeholder='我来说说在这里游玩的感受吧~'></textarea>
<view class='no-list'>
<textarea placeholder='我来说说在这里游玩的感受吧~' bindinput='inputMessage'></textarea>
</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 class='btn'>
<button class='next' type="default" size="mini" bindtap="goWrite">发送</button>
......@@ -27,7 +28,17 @@
<text>游记标签</text>
</view>
<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>
\ No newline at end of file
......@@ -9,7 +9,7 @@ page{
min-height: 310rpx;
background: rgba(245,245,245,1);
box-sizing: border-box;
padding: 23rpx 20rpx;
padding: 23rpx 20rpx 75rpx 20rpx;
position: relative;
}
.no-list{
......@@ -18,8 +18,9 @@ page{
}
.no-list textarea{
width: 100%;
height: 75px;
}
.btn button.next{
.top-content .btn button.next{
background: rgba(238,68,84,1);
box-shadow: 0px 1px 2px 0px rgba(167,11,26,0.63);
border-radius: 10px;
......@@ -30,7 +31,7 @@ page{
z-index: 2;
}
.upload{
height: 120rpx;
min-height: 120rpx;
margin: 20rpx 0;
display: flex;
flex-wrap:wrap;
......@@ -39,8 +40,8 @@ page{
position: relative;
}
.upload .item-box image{
width: 120rpx;
height: 120rpx;
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
margin-right: 20rpx;
}
......@@ -51,7 +52,7 @@ page{
display: inline-block;
width:30rpx;
height:30rpx;
line-height: 20rpx;
line-height: 22rpx;
font-size: 28rpx;
text-align: center;
color: white;
......@@ -91,7 +92,7 @@ page{
border-radius:20px;
font-size: 24rpx;
color: rgba(255,255,255,1);
line-height: 23px;
line-height: 45rpx;
display: inline-block;
text-align: center;
}
......@@ -111,4 +112,68 @@ page{
text-align: center;
line-height: 53rpx;
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' />
<view class="page">
<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='title_box'>
<text class='title'>{{Detaildata.Title}}</text>
......
<import src='../../../wxParse/wxParse.wxml' />
<view class="page">
<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'>
<text class='title'>提交成功</text>
<text class='title_t'>系统将为本单预留72小时</text>
......@@ -31,10 +31,10 @@
<!-- 广告位 -->
<view class='huo'>
<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 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 style="width: 100%;height : 50px"></view>
......
<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">
<scroll-view class="canvas-container" catchtouchmove="doNothing">
<view animation="{{animationData}}" class="canvas-content" >
......@@ -18,7 +18,7 @@
</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>
<view class='button_b'>
<view class='button_b_l'>
......
......@@ -182,7 +182,7 @@
<block wx:for="{{item.details}}" wx:for-item="item2" wx:for-index="index2" wx:key="index2">
<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: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 @@
"list": []
},
"miniprogram": {
"current": 5,
"current": -1,
"list": [
{
"id": 0,
......@@ -82,6 +82,7 @@
"id": -1,
"name": "写游记",
"pathName": "pages/Voucher/write/write",
"query": "",
"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