Commit 9690d2f5 by wjw

Merge branch 'master' of http://120.77.182.185/yanl/mini-shimao.git into master

parents 68933f16 2c151bd7
...@@ -48,8 +48,6 @@ App({ ...@@ -48,8 +48,6 @@ App({
for (let i = 0, l = funcObjectKey.length; i < l; i++) { for (let i = 0, l = funcObjectKey.length; i < l; i++) {
funcCss = funcCss + funcObjectKey[i] + ': ' + funcCssObject[funcObjectKey[i]] + '; ' funcCss = funcCss + funcObjectKey[i] + ': ' + funcCssObject[funcObjectKey[i]] + '; '
} }
// console.log(funcCss)
return funcCss return funcCss
}, },
...@@ -64,10 +62,6 @@ App({ ...@@ -64,10 +62,6 @@ App({
method: obj.method || 'POST', method: obj.method || 'POST',
header: header, header: header,
success: (res) => { success: (res) => {
// console.log("接口:", this.globalData.baseUrl + obj.url);
// console.log("参数:", JSON.stringify(obj.data));
// console.log("返回:", res);
let code = res.data.code * 1 let code = res.data.code * 1
if (200 == code && true == res.data.success) { if (200 == code && true == res.data.success) {
if (obj.success) { if (obj.success) {
...@@ -90,9 +84,6 @@ App({ ...@@ -90,9 +84,6 @@ App({
} }
}, },
fail: (err) => { fail: (err) => {
// console.log("接口:", this.globalData.baseUrl + obj.url)
// console.log("参数:", obj.data)
// console.log("返回:", err)
if (obj.fail) { if (obj.fail) {
let err = { let err = {
statusCode: 9999, statusCode: 9999,
...@@ -162,7 +153,6 @@ App({ ...@@ -162,7 +153,6 @@ App({
} }
wx.setStorageSync('userInfo', funcUserInfo) wx.setStorageSync('userInfo', funcUserInfo)
if (obj && obj.success) { if (obj && obj.success) {
obj.success(funcResponse.token) obj.success(funcResponse.token)
} }
......
let App = getApp() let App = getApp()
Page({ Page({
scrollLock: false,
scrollTimer: 0,
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
...@@ -16,7 +19,11 @@ Page({ ...@@ -16,7 +19,11 @@ Page({
shopInfo: {}, shopInfo: {},
sideBar: [], // 侧边菜单 sideBar: [], // 侧边菜单
sideBarHeight: [], // 分类商品起始高度
sideBarTopPadding: 0, sideBarTopPadding: 0,
sideBarIndex: 0,
menuTitle: '', // 商品列表标题 menuTitle: '', // 商品列表标题
commodityList: [], // 商品列表 commodityList: [], // 商品列表
commodityDetail: {}, // 商品详情 commodityDetail: {}, // 商品详情
...@@ -25,7 +32,7 @@ Page({ ...@@ -25,7 +32,7 @@ Page({
currentIndex: 0,
scrollTop: 0, scrollTop: 0,
winToast: false, winToast: false,
...@@ -177,7 +184,7 @@ Page({ ...@@ -177,7 +184,7 @@ Page({
for (let i = 0, l = funcSideBar.length; i < l; i++) { for (let i = 0, l = funcSideBar.length; i < l; i++) {
if (funcSideBar[i].id === this.data.option.sideBarId) { if (funcSideBar[i].id === this.data.option.sideBarId) {
this.setData({ this.setData({
currentIndex: i sideBarIndex: i
}) })
break break
} }
...@@ -208,7 +215,7 @@ Page({ ...@@ -208,7 +215,7 @@ Page({
url: '/api/v1/commodity/getCommoditys', url: '/api/v1/commodity/getCommoditys',
data: { data: {
'officeId': this.data.shopInfo.id, 'officeId': this.data.shopInfo.id,
// 'classifyId': this.data.sideBar[this.data.currentIndex].id, // 'classifyId': this.data.sideBar[this.data.sideBarIndex].id,
'genre': this.data.shopInfo.shopType, 'genre': this.data.shopInfo.shopType,
}, },
success: (response) => { success: (response) => {
...@@ -264,32 +271,78 @@ Page({ ...@@ -264,32 +271,78 @@ Page({
funcCommodityList.push(funcItem) funcCommodityList.push(funcItem)
} }
this.setData({ // 分类商品列表
winLoading: false, this.setCommodityClassification(funcCommodityList)
commodityList: funcCommodityList,
}) // // 判断是否从推荐菜单进入,主动查询商品详情
// if (this.data.option.commodityId) {
// for (let i = 0, l = funcCommodityList.length; i < l; i++) {
// if (funcCommodityList[i].id === this.data.option.commodityId) {
// let funcEvent = {
// currentTarget: {
// dataset: {
// item: funcCommodityList[i]
// }
// }
// }
// // 查询之后参数失效,避免返回页面时继续查询
// this.setData({
// option: {}
// })
// this.onCommodityDetail(funcEvent)
// break
// }
// }
// }
},
})
},
// 判断是否从推荐菜单进入,主动查询商品详情 /**
if (this.data.option.commodityId) { * 分类商品列表
for (let i = 0, l = funcCommodityList.length; i < l; i++) { * @function
if (funcCommodityList[i].id === this.data.option.commodityId) { * @param
let funcEvent = { * @returns
currentTarget: { */
dataset: { setCommodityClassification: function (funcCommodityList) {
item: funcCommodityList[i] let funcSideBarId = this.data.sideBar
} let funcList = []
}
} for (let i = 0, l = funcSideBarId.length; i < l; i++) {
// 查询之后参数失效,避免返回页面时继续查询 funcList.push({
this.setData({ 'id': funcSideBarId[i].id,
option: {} 'tab': funcSideBarId[i].tab,
}) 'commodity': [],
this.onCommodityDetail(funcEvent) })
break for (let ii = 0; ii < funcCommodityList.length; ii++) {
} if (funcSideBarId[i].id === funcCommodityList[ii].sideBarId) {
} funcList[i].commodity.push(funcCommodityList[ii])
funcCommodityList.splice(ii, 1)
ii = ii - 1
} }
}, }
}
this.setData({
winLoading: false,
commodityList: funcList,
})
// 获取商品分类高度,用于判断滚动位置自动选择标签
const funcQuery = wx.createSelectorQuery()
funcQuery.selectAll('.right-content-title').boundingClientRect()
funcQuery.exec((response) => {
let funcElement = response[0]
let funcSideBarHeight = []
for (let i = 0, l = funcElement.length; i < l; i++) {
funcSideBarHeight.push(funcElement[i].top)
}
this.setData({
sideBarHeight: funcSideBarHeight
})
console.log(this.data.sideBarHeight)
}) })
}, },
...@@ -303,7 +356,7 @@ Page({ ...@@ -303,7 +356,7 @@ Page({
let funcIndex = event.currentTarget.dataset.index let funcIndex = event.currentTarget.dataset.index
let funcMenuTitle = this.data.sideBar[funcIndex].tab let funcMenuTitle = this.data.sideBar[funcIndex].tab
this.setData({ this.setData({
currentIndex: funcIndex, sideBarIndex: funcIndex,
menuTitle: funcMenuTitle, menuTitle: funcMenuTitle,
scrollTop: 0 scrollTop: 0
}) })
...@@ -441,4 +494,36 @@ Page({ ...@@ -441,4 +494,36 @@ Page({
url: '/pages/commodity/shopping-cart/shopping-cart', url: '/pages/commodity/shopping-cart/shopping-cart',
}) })
}, },
/**
* 页面滚动事件
* @function
* @param
* @returns
*/
onPageScroll: function (event) {
// 优化滚动事件触发频率
if (this.scrollLock) return
this.scrollLock = true
console.log(event.detail.scrollTop)
let funcIndex = 0
let funcScrollHeight = event.detail.scrollTop
let funcSideBarHeight = this.data.sideBarHeight
for (let i = 0, l = funcSideBarHeight.length; i < l; i++) {
if (funcScrollHeight > funcSideBarHeight[i]) {
funcIndex = i
}
}
this.setData({
sideBarIndex: funcIndex
})
// 恢复滚动事件
this.scrollTimer = setTimeout(() => {
this.scrollLock = false
clearTimeout(this.scrollTimer)
}, 10)
},
}) })
\ No newline at end of file
...@@ -21,73 +21,77 @@ ...@@ -21,73 +21,77 @@
<view class="row"> <view class="row">
<!-- 侧边菜单 --> <!-- 侧边菜单 -->
<view class="side-bar" style="{{'padding-top: ' + sideBarTopPadding + 'px;'}}"> <scroll-view class="side-bar" scroll-y style="{{'padding-top: ' + sideBarTopPadding + 'px;'}}">
<block wx:for="{{sideBar}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{sideBar}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="menu-item {{currentIndex === index ? 'active' : ''}}" data-index="{{index}}" bindtap="onSelectionSideBar"> <view class="menu-item {{sideBarIndex === index ? 'active' : ''}}" data-index="{{index}}" bindtap="onSelectionSideBar">
<text>{{item.tab}}</text> <text>{{item.tab}}</text>
</view> </view>
</block> </block>
</view> </scroll-view>
<!-- 商品列表 --> <!-- 商品列表 -->
<view class="menu-list"> <scroll-view class="menu-list" scroll-y bindscroll="onPageScroll">
<view class="right-content-title">{{menuTitle}}</view>
<block wx:for="{{commodityList}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{commodityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row" data-item="{{item}}" bind:tap="onCommodityDetail"> <view class="right-content-title">{{item.tab}}</view>
<view class="item-img">
<image src="{{item.cover}}" mode="widthFix"></image>
</view>
<view class="item-info">
<view class="item-info-title">{{item.name}}</view>
<view class="item-info-text-wrap">
<view wx:if="{{item.describe}}">{{item.describe}}</view>
<view wx:else class="item-info-content"></view>
</view>
<view class="item-other row con-b"> <!-- 循环商品列表 -->
<!-- 活动价样式 --> <block wx:for="{{item.commodity}}" wx:for-index="indexCommodity" wx:for-item="itemCommodity" wx:key="indexCommodity">
<view wx:if="{{item.priceType === 1}}"> <view class="commodity-item row" data-item="{{itemCommodity}}" bind:tap="onCommodityDetail">
<view class="item-price row align-c"> <view class="item-img">
<text>¥</text> <image src="{{itemCommodity.cover}}" mode="widthFix"></image>
<text>{{item.priceDiscountText}}</text> </view>
<text class="item-price-discount">活动价</text> <view class="item-info">
</view> <view class="item-info-title">{{itemCommodity.name}}</view>
<view class="item-info-old-price row align-c"> <view class="item-info-text-wrap">
<text>¥</text> <view wx:if="{{itemCommodity.describe}}">{{itemCommodity.describe}}</view>
<text>{{item.priceText}}</text> <view wx:else class="item-info-content"></view>
</view>
</view> </view>
<!-- 业主价样式 --> <view class="item-other row con-b">
<view wx:if="{{item.priceType === 2}}"> <!-- 活动价样式 -->
<view class="item-price row align-c"> <view wx:if="{{itemCommodity.priceType === 1}}">
<text>¥</text> <view class="item-price row align-c">
<text>{{item.priceSpecialText}}</text> <text>¥</text>
<text class="item-price-special">业主价</text> <text>{{itemCommodity.priceDiscountText}}</text>
<text class="item-price-discount">活动价</text>
</view>
<view class="item-info-old-price row align-c">
<text>¥</text>
<text>{{itemCommodity.priceText}}</text>
</view>
</view> </view>
<view class="item-info-old-price row align-c">
<text>¥</text> <!-- 业主价样式 -->
<text>{{item.priceText}}</text> <view wx:if="{{itemCommodity.priceType === 2}}">
<view class="item-price row align-c">
<text>¥</text>
<text>{{itemCommodity.priceSpecialText}}</text>
<text class="item-price-special">业主价</text>
</view>
<view class="item-info-old-price row align-c">
<text>¥</text>
<text>{{itemCommodity.priceText}}</text>
</view>
</view> </view>
</view>
<!-- 普通价样式 --> <!-- 普通价样式 -->
<view wx:if="{{item.priceType === 3}}"> <view wx:if="{{itemCommodity.priceType === 3}}">
<view class="item-price row align-c"> <view class="item-price row align-c">
<text>¥</text> <text>¥</text>
<text>{{item.priceText}}</text> <text>{{itemCommodity.priceText}}</text>
<text></text> <text></text>
</view>
</view> </view>
</view>
<view class="item-operation-add"> <view class="item-operation-add">
<button class="row con-c align-c" data-item="{{item}}" catchtap="onCommodityAdd"> <button class="row con-c align-c" data-item="{{itemCommodity}}" catchtap="onCommodityAdd">
<image mode="widthFix" src="{{imageBase + 'icon/cart-3.png'}}"></image> <image mode="widthFix" src="{{imageBase + 'icon/cart-3.png'}}"></image>
</button> </button>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </block>
</block> </block>
<!-- 购物车按钮 --> <!-- 购物车按钮 -->
...@@ -100,7 +104,7 @@ ...@@ -100,7 +104,7 @@
<image src="../../../image/cart.png" mode="widthFix"></image> <image src="../../../image/cart.png" mode="widthFix"></image>
</view> </view>
</view> </view>
</view> </scroll-view>
</view> </view>
<!-- 商品详情弹窗 --> <!-- 商品详情弹窗 -->
......
...@@ -67,20 +67,23 @@ Page({ ...@@ -67,20 +67,23 @@ Page({
pageNo: 1 pageNo: 1
}) })
this.getBanner() this.getBanner()
// this.loadVisiterPlanList()
this.getNoticeList() this.getNoticeList()
this.getBrands() this.getBrands()
}, },
setLogin: function () { setLogin: function () {
let funcUserInfo = wx.getStorageSync('userInfo') let funcTimer = setInterval(() => {
this.setData({ let funcUserInfo = wx.getStorageSync('userInfo')
isLogin: funcUserInfo.isSignIn if (funcUserInfo) {
}) this.setData({
isLogin: funcUserInfo.isSignIn
})
clearInterval(funcTimer)
}
}, 200)
}, },
onShareAppMessage: function (res) { onShareAppMessage: function (res) {
if (res.from === 'button') { if (res.from === 'button') {
// 来自页面内转发按钮 // 来自页面内转发按钮
console.log(res.target)
} }
return { return {
title: '自定义转发标题', title: '自定义转发标题',
...@@ -95,7 +98,6 @@ Page({ ...@@ -95,7 +98,6 @@ Page({
}, },
onGuide: function () { onGuide: function () {
console.log('onGuide')
wx.navigateTo({ wx.navigateTo({
url: '/pages/home/guide/guide' url: '/pages/home/guide/guide'
}) })
...@@ -186,7 +188,6 @@ Page({ ...@@ -186,7 +188,6 @@ Page({
}, },
bannerClick(e) { bannerClick(e) {
console.log(e.currentTarget.dataset.item)
// 活动、动态、攻略详情 对应 1,2,3 // 活动、动态、攻略详情 对应 1,2,3
let jumpColumnId = e.currentTarget.dataset.item.jumpColumnId*1 let jumpColumnId = e.currentTarget.dataset.item.jumpColumnId*1
let jumpId = e.currentTarget.dataset.item.jumpId let jumpId = e.currentTarget.dataset.item.jumpId
...@@ -278,7 +279,6 @@ Page({ ...@@ -278,7 +279,6 @@ Page({
// 跳转到品牌故事详情页面 // 跳转到品牌故事详情页面
onToHistory: function (event) { onToHistory: function (event) {
let { index } = event.currentTarget.dataset let { index } = event.currentTarget.dataset
console.log(index)
wx.navigateTo({ wx.navigateTo({
url: '/pages/home/history/history?index=' + index, url: '/pages/home/history/history?index=' + index,
}) })
......
...@@ -112,14 +112,14 @@ Page({ ...@@ -112,14 +112,14 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
let detail = JSON.parse(options.detail); let detail = JSON.parse(options.detail);
let yyDate = detail.subscribeDate ? Date.parse(detail.subscribeDate.replace(/-/g, '/')) : 0
let yyDate = detail.subscribeDate ? Date.parse(detail.subscribeDate.replace(/-/, '/')) : 0 let nowStr = new Date().toLocaleString().substr(0, 10).replace(/-/g, '/') + " 00:00:00"
let nowStr = new Date().toLocaleString().substr(0, 10) + " 00:00:00"
let now = Date.parse(nowStr) let now = Date.parse(nowStr)
let isShowCancel = now <= yyDate
let isShowCancel = now <= yyDate
this.setData({ this.setData({
tickerInfo: detail, tickerInfo: detail,
type: detail.type, type: detail.type,
......
...@@ -212,10 +212,11 @@ Page({ ...@@ -212,10 +212,11 @@ Page({
// 删除,取消预约 // 删除,取消预约
doCancel: function (event) { doCancel: function (event) {
let that = this let that = this
let type = event.currentTarget.dataset.type
wx.lin.showDialog({ wx.lin.showDialog({
type: "confirm", type: "confirm",
title: "", title: "",
content: "是否确认删除报名", content: type == 0 ? "是否确认取消报名" : "是否确认删除报名",
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定') console.log('用户点击确定')
...@@ -232,22 +233,34 @@ Page({ ...@@ -232,22 +233,34 @@ Page({
url: '/api/v1/activity/doCancel', url: '/api/v1/activity/doCancel',
data: { data: {
'enrollId': funcItem.enrollId, 'enrollId': funcItem.enrollId,
'type': 1, //0取消1删除 'type': type, //0取消1删除
}, },
success: (response) => { success: (response) => {
wx.hideLoading() wx.hideLoading()
wx.lin.showToast({ if (response.data && response.data.code == 500) {
image: '/image/success.png', wx.lin.showToast({
title: '删除成功', image: '/image/error.png',
}) title: response.data.msg,
setTimeout(() => {
that.setData({
isDoing: false,
'activityList': [],
'pageNo': 1,
}) })
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 @@ ...@@ -40,7 +40,8 @@
<text>{{activity.amount}}</text> <text>{{activity.amount}}</text>
</view> </view>
<view class="appointment-activity-btn row"> <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 catchtap="onOrderPay" data-item="{{activity}}" class="confirm-btn">去支付</view>
</view> </view>
</view> </view>
...@@ -145,11 +146,12 @@ ...@@ -145,11 +146,12 @@
</view> </view>
</view> </view>
<!-- 已过期 --> <!-- 已过期 -->
<view class="appointment-wrapper" wx:if="{{activity.status === '4'}}"> <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="appointment-time mask-cancel-time">{{activity.date}}</view>
<view class="appintment-activity-status-cancel"> <view class="appintment-activity-status-cancel">
<text>已过期</text> <text wx:if="{{activity.status === '4'}}">已过期</text>
<text wx:if="{{activity.status === '6'}}">已评价</text>
</view> </view>
<view class="appointment-activity-content row align-c"> <view class="appointment-activity-content row align-c">
<view class="appointment-activity-img"> <view class="appointment-activity-img">
...@@ -173,7 +175,8 @@ ...@@ -173,7 +175,8 @@
<text>{{activity.amount}}</text> <text>{{activity.amount}}</text>
</view> </view>
<view class="appointment-activity-btn row"> <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> </view>
</view> </view>
...@@ -206,7 +209,7 @@ ...@@ -206,7 +209,7 @@
<text>{{activity.amount}}</text> <text>{{activity.amount}}</text>
</view> </view>
<view class="appointment-activity-btn row"> <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 data-index="0" catchtap="goAppoint" class="confirm-btn confirm-once">再次报名</view>
</view> </view>
</view> </view>
......
...@@ -220,6 +220,7 @@ ...@@ -220,6 +220,7 @@
} }
.appointment-activity-footer { .appointment-activity-footer {
margin-top: 48rpx; margin-top: 48rpx;
} }
.appointment-activity-price text:nth-child(1) { .appointment-activity-price text:nth-child(1) {
......
...@@ -299,7 +299,7 @@ Page({ ...@@ -299,7 +299,7 @@ Page({
} }
wx.setStorageSync('shopInfoBuffer', funcShopInfo) wx.setStorageSync('shopInfoBuffer', funcShopInfo)
wx.navigateTo({ 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({ ...@@ -529,11 +529,11 @@ Page({
onOrderAgain: function (event) { onOrderAgain: function (event) {
let item = event.currentTarget.dataset.item let item = event.currentTarget.dataset.item
console.log(item) console.log(item, '再次下单')
let commodityType = item.commodityType 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({ wx.navigateTo({
url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`, url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`,
}) })
......
...@@ -22,7 +22,7 @@ Page({ ...@@ -22,7 +22,7 @@ Page({
fileResults: [] fileResults: []
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options, '99999999999999999999999999999');
let pageFrom = options.pageFrom let pageFrom = options.pageFrom
let orderItem = JSON.parse(options.orderItem) let orderItem = JSON.parse(options.orderItem)
this.setData({ this.setData({
...@@ -243,6 +243,12 @@ Page({ ...@@ -243,6 +243,12 @@ Page({
}) })
} }
}, },
doInputContent: function (event) {
console.log(event);
this.setData({
content:event.detail.value
})
},
/** /**
* 移除评价图片 * 移除评价图片
* @function * @function
...@@ -261,6 +267,7 @@ Page({ ...@@ -261,6 +267,7 @@ Page({
*/ */
onSubmitCommennt: function () { onSubmitCommennt: function () {
let that = this; let that = this;
if (this.data.scoreServeText == 0) { if (this.data.scoreServeText == 0) {
wx.lin.showToast({ wx.lin.showToast({
image: '/image/error.png', image: '/image/error.png',
...@@ -299,7 +306,7 @@ Page({ ...@@ -299,7 +306,7 @@ Page({
'imgUrls': formData.imgUrls, 'imgUrls': formData.imgUrls,
'serviceEvaluation': formData.serviceEvaluation, 'serviceEvaluation': formData.serviceEvaluation,
'productEvaluation': formData.productEvaluation, 'productEvaluation': formData.productEvaluation,
'environmentalEvaluation': formData.productEvaluation, 'environmentalEvaluation': formData.environmentalEvaluation,
'content': formData.content 'content': formData.content
}, },
success: (response) => { success: (response) => {
......
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
<view class="score-star row"> <view class="score-star row">
<block wx:for="{{5}}" wx:key="index"> <block wx:for="{{5}}" wx:key="index">
<view class="star" bindtap="onChangeScore" data-index="{{index}}" data-type="{{3}}"> <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:if="{{scoreEnvironment >= (index + 1)}}" src="{{imageBase + 'star-yellow.png'}}"></image>
<image wx:elif="{{scoreEnvironment < index + 1}}" src="{{imageBase + 'star-gray.png'}}"></image> <image wx:elif="{{scoreEnvironment < (index + 1)}}" src="{{imageBase + 'star-gray.png'}}"></image>
</view> </view>
</block> </block>
</view> </view>
...@@ -78,12 +78,18 @@ ...@@ -78,12 +78,18 @@
</view> </view>
</view> </view>
<view class="order-comment"> <view class="order-comment">
<l-textarea cursor-spacing="100" placeholder="您的评价与建议,会让园区做的更好" placeholder-style="color: #C2C7CF" maxlength="200" <!-- <l-textarea cursor-spacing="100" placeholder="您的评价与建议,会让园区做的更好" placeholder-style="color: #C2C7CF" maxlength="200"
l-class="l-textarea" border="{{false}}" bind:linconfirm="eventInputDone" /> 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"> <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" <l-image-picker size-type="compressed" preview="{{true}}" l-item-class="l-image-item" l-class="l-picker"
custom="{{true}}" bind:linchange="eventImageAdd" bind:linremove="eventImageRemove" count="9" size="3" size-type="compressed" custom="{{true}}" bind:linchange="eventImageAdd"
bind:linpreview="eventImagePreview"> bind:linremove="eventImageRemove" bind:linpreview="eventImagePreview">
<view class="col con-c align-c"> <view class="col con-c align-c">
<image class="icon-img" src="{{resourcesBase+'mine/server/camera_icon.png'}}"></image> <image class="icon-img" src="{{resourcesBase+'mine/server/camera_icon.png'}}"></image>
<text>添加图片</text> <text>添加图片</text>
......
...@@ -25,6 +25,7 @@ Page({ ...@@ -25,6 +25,7 @@ Page({
sealSrc: '', sealSrc: '',
shopConfig: App.globalData.shopId, shopConfig: App.globalData.shopId,
shopAppId: ""
}, },
...@@ -36,6 +37,7 @@ Page({ ...@@ -36,6 +37,7 @@ Page({
this.setData({ this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer'), shopInfo: wx.getStorageSync('shopInfoBuffer'),
orderInfo: funcOrderInfo, orderInfo: funcOrderInfo,
shopAppId: options.shopAppId,
fromPage: options.fromPage === 'order' ? 'order' : '', fromPage: options.fromPage === 'order' ? 'order' : '',
isFromUse: options.showCode === 'true' ? true : false, isFromUse: options.showCode === 'true' ? true : false,
}) })
...@@ -44,7 +46,7 @@ Page({ ...@@ -44,7 +46,7 @@ Page({
// 再次下单 // 再次下单
onOrderAgain: function (event) { onOrderAgain: function (event) {
let commodityType = this.data.orderInfo.commodityType 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({ wx.navigateTo({
url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`, url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`,
}) })
...@@ -217,7 +219,7 @@ Page({ ...@@ -217,7 +219,7 @@ Page({
'wxRequest': funcResponse.wxRequest, 'wxRequest': funcResponse.wxRequest,
'businessTime': funcResponse.businessTime, //营业时间 'businessTime': funcResponse.businessTime, //营业时间
'expireTime': funcResponse.expireTime, //订单有效期 'expireTime': funcResponse.expireTime, //订单有效期
'particulars': funcResponse.particulars
} }
// 设置印章 // 设置印章
let shopName = funcResponse.officeName; let shopName = funcResponse.officeName;
...@@ -227,7 +229,7 @@ Page({ ...@@ -227,7 +229,7 @@ Page({
} }
) )
funcOrderInfo.shopInfo = shopFilter[0] funcOrderInfo.shopInfo = shopFilter[0]
// 添加订单商品列表 // 添加订单商品列表
let funcCommodity = funcResponse.smOrderDetails let funcCommodity = funcResponse.smOrderDetails
for (let i = 0, l = funcCommodity.length; i < l; i++) { for (let i = 0, l = funcCommodity.length; i < l; i++) {
......
...@@ -360,9 +360,11 @@ ...@@ -360,9 +360,11 @@
<!-- 使用须知 --> <!-- 使用须知 -->
<l-popup show="{{showNotice}}" content-align="bottom"> <l-popup show="{{showNotice}}" content-align="bottom">
<view class="notice-popup-wrapper"> <view class="notice-popup-wrapper">
<view class="notice-popup-title">购买须知</view> <view class="notice-popup-title">使用须知</view>
<scroll-view scroll-y class="notice-popup-content"> <scroll-view scroll-y class="notice-popup-content">
<view>
<rich-text nodes="{{orderInfo.particulars}}"></rich-text>
</view>
</scroll-view> </scroll-view>
</view> </view>
</l-popup> </l-popup>
......
...@@ -508,8 +508,6 @@ ...@@ -508,8 +508,6 @@
color: #959DAA; color: #959DAA;
} }
/* 扫码弹窗 */
.scan-code-wrapper {}
.code-header { .code-header {
height: 70rpx; height: 70rpx;
...@@ -541,6 +539,9 @@ ...@@ -541,6 +539,9 @@
.item-center { .item-center {
margin-left: 112rpx; margin-left: 112rpx;
} }
.notice-popup-content {
max-height: 896rpx;
}
.code-item-title { .code-item-title {
color: #15191F; color: #15191F;
......
...@@ -92,7 +92,6 @@ Page({ ...@@ -92,7 +92,6 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options)
if (options.type) options.type = Number(options.type) if (options.type) options.type = Number(options.type)
logicData.option = options logicData.option = options
...@@ -349,8 +348,6 @@ Page({ ...@@ -349,8 +348,6 @@ Page({
payAmount: App.modular.utils.formatAmount(funcPayAmount), payAmount: App.modular.utils.formatAmount(funcPayAmount),
buyContentAmount: funcPriceUnit, buyContentAmount: funcPriceUnit,
}) })
console.log('shoppingCartList', this.data.shoppingCartList)
}, },
/** /**
...@@ -492,7 +489,6 @@ Page({ ...@@ -492,7 +489,6 @@ Page({
* @returns * @returns
*/ */
onEntryTimeChange: function (event) { onEntryTimeChange: function (event) {
console.log(event.detail)
let funcColumn = event.detail.column let funcColumn = event.detail.column
let funcIndex = event.detail.value let funcIndex = event.detail.value
...@@ -985,11 +981,9 @@ Page({ ...@@ -985,11 +981,9 @@ Page({
'enrollNum': this.data.quantity, 'enrollNum': this.data.quantity,
'name': this.data.registerInfo[0].name, 'name': this.data.registerInfo[0].name,
'mobile': this.data.registerInfo[0].phone, 'mobile': this.data.registerInfo[0].phone,
'totalPrice': Number(this.data.payAmount),
}, },
success: (response) => { success: (response) => {
console.log('/api/v1/activity/doActivityEnroll')
console.log(response)
if (/请勿重复报名/.test(response.data.msg)) { if (/请勿重复报名/.test(response.data.msg)) {
wx.lin.showToast({ wx.lin.showToast({
title: response.data.msg, title: response.data.msg,
...@@ -1012,10 +1006,20 @@ Page({ ...@@ -1012,10 +1006,20 @@ Page({
return return
} }
if (/总价格不能为空/.test(response.data.msg)) {
wx.lin.showToast({
title: response.data.msg,
icon: 'error',
})
this.setData({
isPaySubmit: false,
})
return
}
// 库存充足正常下单支付 // 库存充足正常下单支付
let funcResponse = response.data let funcResponse = response.data
pagePayId = funcResponse.orderId pagePayId = funcResponse.orderId
console.log(pagePayId)
this.setData({ this.setData({
orderId: pagePayId orderId: pagePayId
}) })
...@@ -1032,8 +1036,6 @@ Page({ ...@@ -1032,8 +1036,6 @@ Page({
'signType': funcResponse.signType, 'signType': funcResponse.signType,
'paySign': funcResponse.paySign, 'paySign': funcResponse.paySign,
success: (response) => { success: (response) => {
console.log('active requestPayment')
if (response.errMsg === 'requestPayment:ok') { if (response.errMsg === 'requestPayment:ok') {
// 用户点击支付完成按钮回调 // 用户点击支付完成按钮回调
// this.payStatus(true) // this.payStatus(true)
...@@ -1063,8 +1065,6 @@ Page({ ...@@ -1063,8 +1065,6 @@ Page({
}, },
queryPayStatus: function () { queryPayStatus: function () {
console.log('queryPayStatus')
let funcIndex = 0 let funcIndex = 0
App.globalData.payStateTimer = setInterval(() => { App.globalData.payStateTimer = setInterval(() => {
...@@ -1097,9 +1097,6 @@ Page({ ...@@ -1097,9 +1097,6 @@ Page({
* @returns * @returns
*/ */
payStatus: function (funcPayResult) { payStatus: function (funcPayResult) {
console.log('payStatus', funcPayResult)
console.log('payStatus', logicData.option.type)
clearInterval(App.globalData.payStateTimer) clearInterval(App.globalData.payStateTimer)
this.setData({ this.setData({
isPaySubmit: false, isPaySubmit: false,
......
...@@ -399,7 +399,6 @@ Page({ ...@@ -399,7 +399,6 @@ Page({
}, },
success: (response) => { success: (response) => {
let funcResponse = response.data.list let funcResponse = response.data.list
console.log(funcResponse)
let funcList = [] let funcList = []
for (let i = 0, l = funcResponse.length; i < l; i++) { for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = { let funcItem = {
...@@ -429,7 +428,6 @@ Page({ ...@@ -429,7 +428,6 @@ Page({
funcItem.priceType = 3 funcItem.priceType = 3
} }
} }
console.log(funcItem)
funcList.push(funcItem) funcList.push(funcItem)
} }
...@@ -617,8 +615,6 @@ Page({ ...@@ -617,8 +615,6 @@ Page({
let funcEvaluate = this.data.detailEvaluate let funcEvaluate = this.data.detailEvaluate
let funcTextHeight = response[0] let funcTextHeight = response[0]
console.log(funcContentHeight)
console.log(funcTextHeight)
for (let i = 0, l = funcTextHeight.length; i < l; i++) { for (let i = 0, l = funcTextHeight.length; i < l; i++) {
if (funcContentHeight > funcTextHeight[i].height) { if (funcContentHeight > funcTextHeight[i].height) {
funcEvaluate[i].isMore = true funcEvaluate[i].isMore = true
...@@ -724,6 +720,7 @@ Page({ ...@@ -724,6 +720,7 @@ Page({
}, },
// 跳转到服务详情 // 跳转到服务详情
onContact: function () { onContact: function () {
App.setShopInfo(Number(this.data.option.id), 3)
wx.navigateTo({ wx.navigateTo({
url: '/pages/commodity/project-detail/project-detail' url: '/pages/commodity/project-detail/project-detail'
}) })
...@@ -902,8 +899,6 @@ Page({ ...@@ -902,8 +899,6 @@ Page({
this.setData({ this.setData({
detailEvaluate: funcEvaluate detailEvaluate: funcEvaluate
}) })
console.log(funcItem)
}, },
/** /**
...@@ -913,7 +908,6 @@ Page({ ...@@ -913,7 +908,6 @@ Page({
* @returns * @returns
*/ */
onEvaluateAlbum: function (event) { onEvaluateAlbum: function (event) {
console.log('onEvaluateAlbum')
let funcItem = event.currentTarget.dataset.item let funcItem = event.currentTarget.dataset.item
let funcIndex = event.currentTarget.dataset.index let funcIndex = event.currentTarget.dataset.index
......
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