Commit 2c151bd7 by zqm

MM - 环境评分,跳转商品列表显示对应商铺

parent 56eef8d6
......@@ -212,10 +212,11 @@ Page({
// 删除,取消预约
doCancel: function (event) {
let that = this
let type = event.currentTarget.dataset.type
wx.lin.showDialog({
type: "confirm",
title: "",
content: "是否确认删除报名",
content: type == 0 ? "是否确认取消报名" : "是否确认删除报名",
success: (res) => {
if (res.confirm) {
console.log('用户点击确定')
......@@ -232,22 +233,34 @@ Page({
url: '/api/v1/activity/doCancel',
data: {
'enrollId': funcItem.enrollId,
'type': 1, //0取消1删除
'type': type, //0取消1删除
},
success: (response) => {
wx.hideLoading()
wx.lin.showToast({
image: '/image/success.png',
title: '删除成功',
})
setTimeout(() => {
that.setData({
isDoing: false,
'activityList': [],
'pageNo': 1,
if (response.data && response.data.code == 500) {
wx.lin.showToast({
image: '/image/error.png',
title: response.data.msg,
})
that.getActivity()
}, 2000);
} else {
wx.lin.showToast({
image: '/image/success.png',
title: type == 0 ? '取消成功' : '删除成功',
})
setTimeout(() => {
that.setData({
isDoing: false,
'activityList': [],
'pageNo': 1,
isFinished:false
})
that.getActivity()
}, 2000);
}
}
})
......
......@@ -40,7 +40,8 @@
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view catchtap="doCancel" data-item="{{activity}}" class="cancel-btn">删除报名</view>
<view catchtap="doCancel" data-item="{{activity}}" data-type='0' class="cancel-btn">取消报名
</view>
<view catchtap="onOrderPay" data-item="{{activity}}" class="confirm-btn">去支付</view>
</view>
</view>
......@@ -146,7 +147,7 @@
</view>
<!-- 已过期 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '4'||activity.status === '6'}}">
<view class="mask-cancel" bindtap="onOrderDetail" data-item="{{activity}}"></view>
<view wx:if="{{activity.status === '4'}}" class="mask-cancel" bindtap="onOrderDetail" data-item="{{activity}}"></view>
<view class="appointment-time mask-cancel-time">{{activity.date}}</view>
<view class="appintment-activity-status-cancel">
<text wx:if="{{activity.status === '4'}}">已过期</text>
......@@ -174,7 +175,8 @@
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view data-item="{{activity}}" catchtap="doCancel" class="cancel-btn ">删除报名</view>
<view data-item="{{activity}}" data-type='1' catchtap="doCancel" class="cancel-btn ">删除报名
</view>
</view>
</view>
</view>
......@@ -207,7 +209,7 @@
<text>{{activity.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view data-item="{{activity}}" catchtap="doCancel" class="cancel-btn cancel">删除报名</view>
<view data-item="{{activity}}" catchtap="doCancel" data-type="1" class="cancel-btn cancel">删除报名</view>
<view data-index="0" catchtap="goAppoint" class="confirm-btn confirm-once">再次报名</view>
</view>
</view>
......
......@@ -220,8 +220,7 @@
}
.appointment-activity-footer {
position: relative;
z-index: 2;
margin-top: 48rpx;
}
.appointment-activity-price text:nth-child(1) {
......
......@@ -299,7 +299,7 @@ Page({
}
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
wx.navigateTo({
url: '/pages/pay/order-detail/order-detail?id=' + funcItem.id,
url: `/pages/pay/order-detail/order-detail?id=${funcItem.id}&shopAppId=${funcItem.shopAppId}`,
})
},
......@@ -529,11 +529,11 @@ Page({
onOrderAgain: function (event) {
let item = event.currentTarget.dataset.item
console.log(item)
console.log(item, '再次下单')
let commodityType = item.commodityType
let shopAppId = wx.getStorageSync('shopInfoBuffer') ? wx.getStorageSync('shopInfoBuffer').appId : ""
let shopAppId = item.shopAppId// wx.getStorageSync('shopInfoBuffer') ? wx.getStorageSync('shopInfoBuffer').appId : ""
console.log(commodityType, 'commodityType------------------------');
console.log(shopAppId, 'shopAppId------------------------');
wx.navigateTo({
url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`,
})
......
......@@ -22,7 +22,7 @@ Page({
fileResults: []
},
onLoad: function (options) {
console.log(options, '99999999999999999999999999999');
let pageFrom = options.pageFrom
let orderItem = JSON.parse(options.orderItem)
this.setData({
......@@ -243,6 +243,12 @@ Page({
})
}
},
doInputContent: function (event) {
console.log(event);
this.setData({
content:event.detail.value
})
},
/**
* 移除评价图片
* @function
......@@ -261,6 +267,7 @@ Page({
*/
onSubmitCommennt: function () {
let that = this;
if (this.data.scoreServeText == 0) {
wx.lin.showToast({
image: '/image/error.png',
......@@ -299,7 +306,7 @@ Page({
'imgUrls': formData.imgUrls,
'serviceEvaluation': formData.serviceEvaluation,
'productEvaluation': formData.productEvaluation,
'environmentalEvaluation': formData.productEvaluation,
'environmentalEvaluation': formData.environmentalEvaluation,
'content': formData.content
},
success: (response) => {
......
......@@ -68,8 +68,8 @@
<view class="score-star row">
<block wx:for="{{5}}" wx:key="index">
<view class="star" bindtap="onChangeScore" data-index="{{index}}" data-type="{{3}}">
<image wx:if="{{scoreEnvironment >= index + 1}}" src="{{imageBase + 'star-yellow.png'}}"></image>
<image wx:elif="{{scoreEnvironment < index + 1}}" src="{{imageBase + 'star-gray.png'}}"></image>
<image wx:if="{{scoreEnvironment >= (index + 1)}}" src="{{imageBase + 'star-yellow.png'}}"></image>
<image wx:elif="{{scoreEnvironment < (index + 1)}}" src="{{imageBase + 'star-gray.png'}}"></image>
</view>
</block>
</view>
......@@ -78,12 +78,18 @@
</view>
</view>
<view class="order-comment">
<l-textarea cursor-spacing="100" placeholder="您的评价与建议,会让园区做的更好" placeholder-style="color: #C2C7CF" maxlength="200"
l-class="l-textarea" border="{{false}}" bind:linconfirm="eventInputDone" />
<!-- <l-textarea cursor-spacing="100" placeholder="您的评价与建议,会让园区做的更好" placeholder-style="color: #C2C7CF" maxlength="200"
l-class="l-textarea" border="{{false}}" bind:linconfirm="eventInputDone" /> -->
<textarea style="padding:24rpx;font-size:26rpx;color:#15191F;line-height:40rpx" cols="30" rows="10" maxlength='200' placeholder="您的评价与建议,会让园区做的更好" placeholder-style="color: #C2C7CF;font-size:26rpx"
bindinput="doInputContent"></textarea>
<view class="text-length-box " style="padding:16rpx 24rpx;text-align:right;font-size:24rpx;color:#C2C7CF;">
{{content.length}}/200</view>
<view class="order-picker">
<l-image-picker size-type="compressed" preview="{{true}}" l-item-class="l-image-item" l-class="l-picker" count="9" size="3" size-type="compressed"
custom="{{true}}" bind:linchange="eventImageAdd" bind:linremove="eventImageRemove"
bind:linpreview="eventImagePreview">
<l-image-picker size-type="compressed" preview="{{true}}" l-item-class="l-image-item" l-class="l-picker"
count="9" size="3" size-type="compressed" custom="{{true}}" bind:linchange="eventImageAdd"
bind:linremove="eventImageRemove" bind:linpreview="eventImagePreview">
<view class="col con-c align-c">
<image class="icon-img" src="{{resourcesBase+'mine/server/camera_icon.png'}}"></image>
<text>添加图片</text>
......
......@@ -25,6 +25,7 @@ Page({
sealSrc: '',
shopConfig: App.globalData.shopId,
shopAppId: ""
},
......@@ -36,6 +37,7 @@ Page({
this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer'),
orderInfo: funcOrderInfo,
shopAppId: options.shopAppId,
fromPage: options.fromPage === 'order' ? 'order' : '',
isFromUse: options.showCode === 'true' ? true : false,
})
......@@ -44,7 +46,7 @@ Page({
// 再次下单
onOrderAgain: function (event) {
let commodityType = this.data.orderInfo.commodityType
let shopAppId = this.data.orderInfo.shopInfo.appId //wx.getStorageSync('shopInfoBuffer') ? wx.getStorageSync('shopInfoBuffer').appId : ""
let shopAppId = this.data.shopAppId //wx.getStorageSync('shopInfoBuffer') ? wx.getStorageSync('shopInfoBuffer').appId : ""
wx.navigateTo({
url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`,
})
......
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 sign in to comment