Commit 04dd03e5 by 严立

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

parents 7e77ef9b d93318d3
...@@ -13,6 +13,7 @@ App({ ...@@ -13,6 +13,7 @@ App({
}, },
globalData: { globalData: {
test:'999',
appImageBase: '../../../image/', appImageBase: '../../../image/',
appResourcesBase: 'https://sm-web.meiqicloud.com/userfiles/appResourcesS2/', appResourcesBase: 'https://sm-web.meiqicloud.com/userfiles/appResourcesS2/',
shopId: iEnvironmental.shopId, shopId: iEnvironmental.shopId,
......
...@@ -8,13 +8,13 @@ let logicData = { ...@@ -8,13 +8,13 @@ let logicData = {
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
showPopup: false,
winSide: true, winSide: true,
sideHeight: 1250, sideHeight: 1250,
shareImage: App.globalData.appResourcesBase + 'share/share-1.png',
swiperImage: [], swiperImage: [],
bannerImage: '', bannerImage: App.globalData.appResourcesBase + 'campsite/campsite-header.png',
bottomImage: App.globalData.appResourcesBase + 'campsite/bottom.png',
detailImage: [], detailImage: [],
detailImageUrl: [ detailImageUrl: [
App.globalData.appResourcesBase + 'campsite/campsite-1.png', App.globalData.appResourcesBase + 'campsite/campsite-1.png',
...@@ -103,13 +103,40 @@ Page({ ...@@ -103,13 +103,40 @@ Page({
clearTimeout(logicData.pageScrollTimer) clearTimeout(logicData.pageScrollTimer)
}, 40) }, 40)
}, },
/**
* 缓存用户信息
* @function
* @param {object} - event
* @returns
*/
setShopInfo: function (funcShopAppId, funcShopType) {
// 获取门店基本信息
let funcShopId = App.globalData.shopId
for (let i = 0, l = funcShopId.length; i < l; i++) {
if (funcShopAppId === funcShopId[i].appId) {
let funcShopInfo = {
'id': funcShopId[i].id,
'appId': funcShopId[i].appId,
'name': funcShopId[i].title[funcShopType],
'logo': funcShopId[i].logo,
'cover': funcShopId[i].cover,
'shopType': funcShopType,
'commodityLogo': funcShopId[i].commodityLogo
}
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
}
}
},
// 跳转到购买年卡/月卡/次卡界面 // 跳转到购买年卡/月卡/次卡界面
onBuyCoupon: function (event) { onBuyMembership: function (event) {
console.log(event) // funcShopType 使用函数区分商品类型,所以每个函数里的数值是固定的
let { type } = event.currentTarget.dataset let funcShopType = 1
let funcShopAppId = event.currentTarget.dataset.id
this.setShopInfo(funcShopAppId, funcShopType)
wx.navigateTo({ wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=' + type url: '/pages/commodity/project-detail/project-detail'
}) })
}, },
// 跳转到购买饮品界面 // 跳转到购买饮品界面
...@@ -119,9 +146,37 @@ Page({ ...@@ -119,9 +146,37 @@ Page({
}) })
}, },
// 跳转到购买文创界面 // 跳转到购买文创界面
onBuySnacks() { onBuyArt() {
wx.navigateTo({ wx.navigateTo({
url: '/pages/commodity/menu-art/menu-art', url: '/pages/commodity/menu-art/menu-art',
}) })
} },
// 点击分享图标
onShare: function () {
this.setData({
showPopup: true
})
},
// 点击取消
onCancel: function () {
this.setData({
showPopup: false
})
},
// 点击下载图片
onDownload: function () {
wx.showToast({
title: '已保存到相册',
icon: 'success'
})
this.setData({
showPopup: false
})
},
// 点击位置图标
onLocation: function () {
wx.navigateTo({
url: '/pages/home/guide/guide?id=' + 10
})
},
}) })
\ No newline at end of file
...@@ -12,27 +12,41 @@ ...@@ -12,27 +12,41 @@
</view> </view>
<!-- 头部背景图 --> <!-- 头部背景图 -->
<image class="banner" src="bannerImage"></image> <image class="banner" src="{{bannerImage}}"></image>
<!-- 分享按钮 --> <!-- 分享按钮 -->
<view class="share col con-c align-c"> <view class="share col con-c align-c" bindtap="onShare">
<image class="icon-share" src="/image/icon/share-3.png"></image> <image class="icon-share" src="/image/icon/share-3.png"></image>
</view> </view>
<!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}">
<view class="popupImage">
<image src="{{shareImage}}"></image>
</view>
<view class="row con-b">
<view class="cancel" bindtap="onCancel">
<text>取消</text>
</view>
<view class="download" bindtap="onDownload">
<text>下载图片</text>
</view>
</view>
</l-popup>
<!-- 位置按钮 --> <!-- 位置按钮 -->
<view class="location col con-c align-c"> <view class="location col con-c align-c" bindtap="onLocation">
<image class="icon-location" src="/image/icon/location-3.png"></image> <image class="icon-location" src="/image/icon/location-3.png"></image>
</view> </view>
<!-- 入园购票 --> <!-- 入园购票 -->
<view class="buy-coupon"> <view class="buy-coupon" bindtap="onBuyMembership" data-id="{{3}}">
<view class="buy-coupon-title row align-c"> <view class="buy-coupon-title row align-c">
<image></image> <image src="./image/ruyuangoupiao.png"></image>
<image></image> <image src="/image/more.png"></image>
</view> </view>
<view class="buy-coupon-type row con-b"> <view class="buy-coupon-type row con-b">
<image bindtap="onBuyCoupon" data-type="2"></image> <image src="./image/single.png"></image>
<image bindtap="onBuyCoupon" data-type="1"></image> <image src="./image/month.png"></image>
<image bindtap="onBuyCoupon" data-type="1"></image> <image src="./image/year.png"></image>
</view> </view>
</view> </view>
...@@ -41,21 +55,21 @@ ...@@ -41,21 +55,21 @@
<!-- 饮品预订 --> <!-- 饮品预订 -->
<view class="buy-snacks row" bindtap="onBuySnacks"> <view class="buy-snacks row" bindtap="onBuySnacks">
<view class="buy-left col con-c"> <view class="buy-left col con-c">
<image></image> <image src="./image/yinpinyuding.png"></image>
</view> </view>
<view class="buy-right col con-c"> <view class="buy-right col con-c">
<image></image> <image src="./image/icon-bg.png"></image>
<image class="snacks-img"></image> <image class="snacks-img" src="./image/yinpin.png"></image>
</view> </view>
</view> </view>
<!-- 文创周边 --> <!-- 文创周边 -->
<view class="buy-art row" bindtap="onBuyArt"> <view class="buy-art row" bindtap="onBuyArt">
<view class="buy-left col con-c"> <view class="buy-left col con-c">
<image></image> <image src="./image/wenchuangzhoubian.png"></image>
</view> </view>
<view class="buy-right col con-c"> <view class="buy-right col con-c">
<image></image> <image src="./image/icon-bg.png"></image>
<image class="art-img"></image> <image class="art-img" src="./image/shanzi.png"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -79,6 +93,6 @@ ...@@ -79,6 +93,6 @@
<block wx:for="{{detailImageUrl}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{detailImageUrl}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<image mode="widthFix" src="{{item}}"></image> <image mode="widthFix" src="{{item}}"></image>
</block> </block>
<image mode="widthFix" src="{{bottomImage}}"></image>
</view> </view>
\ No newline at end of file
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
.banner { .banner {
width: 750rpx; width: 750rpx;
height: 1676rpx; height: 1676rpx;
background-color: #ccc;
} }
.share { .share {
...@@ -98,14 +97,12 @@ ...@@ -98,14 +97,12 @@
.buy-coupon-title image:nth-child(1) { .buy-coupon-title image:nth-child(1) {
width: 120rpx; width: 120rpx;
height: 34rpx; height: 34rpx;
background-color: red;
} }
.buy-coupon-title image:nth-child(2) { .buy-coupon-title image:nth-child(2) {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-left: 8rpx; margin-left: 8rpx;
background-color: red;
} }
.buy-coupon-type { .buy-coupon-type {
...@@ -114,7 +111,6 @@ ...@@ -114,7 +111,6 @@
.buy-coupon-type image { .buy-coupon-type image {
width: 170rpx; width: 170rpx;
height: 166rpx; height: 166rpx;
background-color: aqua;
} }
.buy-other { .buy-other {
...@@ -174,4 +170,28 @@ ...@@ -174,4 +170,28 @@
} }
.wx-swiper-dots.wx-swiper-dots-horizontal{ .wx-swiper-dots.wx-swiper-dots-horizontal{
margin-bottom: 64rpx; margin-bottom: 64rpx;
}
/* 分享弹窗 */
.popupImage image {
width: 606rpx;
height: 977rpx;
margin-bottom: 64rpx;
}
.cancel, .download {
width: 288rpx;
height: 96rpx;
text-align: center;
line-height: 96rpx;
border-radius: 4rpx;
}
.cancel {
color: #15191F;
background-color: #fff;
}
.download {
color: #fff;
background-color: #15191F;
} }
\ No newline at end of file
...@@ -25,7 +25,7 @@ Page({ ...@@ -25,7 +25,7 @@ Page({
'name': '待使用' 'name': '待使用'
}, },
{ {
'value': '-1, 4', 'value': `-1','4`,
'name': '取消/过期' 'name': '取消/过期'
}, },
], ],
......
...@@ -69,13 +69,12 @@ ...@@ -69,13 +69,12 @@
<text class="name">{{item.commodity[0].name}}</text> <text class="name">{{item.commodity[0].name}}</text>
<text class="total">{{'x ' + item.total}}</text> <text class="total">{{'x ' + item.total}}</text>
</view> </view>
<!-- 商品数量样式二 --> <!-- 商品数量样式二 -->
<view class="order-list-item-service row con-b align-c" wx:if="{{item.commodity.length >= 2}}"> <view class="order-list-item-service row con-b align-c" wx:if="{{item.commodity.length >= 2}}">
<block wx:for="{{item.commodity}}" wx:for-index="commodityIndex" wx:for-item="commodityItem" wx:key="commodityIndex"> <block wx:for="{{item.commodity}}" wx:for-index="commodityIndex" wx:for-item="commodityItem" wx:key="commodityIndex">
<image class="cover" src="{{commodityItem.cover}}"></image> <image class="cover" src="{{commodityItem.cover}}"></image>
</block> </block>
<text class="total">{{'共 ' + item.total + ' 件'}}</text> <text class="total">{{'共 ' + item.commodity.length + ' 件'}}</text>
</view> </view>
<view class="order-list-item-operation row con-b align-c"> <view class="order-list-item-operation row con-b align-c">
......
...@@ -86,7 +86,7 @@ page { ...@@ -86,7 +86,7 @@ page {
.container-order { .container-order {
/* margin-top: 170rpx; */ /* margin-top: 170rpx; */
margin-top: 288rpx; padding-top: 288rpx;
} }
......
const App = getApp() const App = getApp()
Page({ Page({
data: { data: {
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影 orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
couponInfo: null, couponInfo: null,
// { // {
// type: '套票', // type: '套票',
...@@ -88,18 +88,18 @@ Page({ ...@@ -88,18 +88,18 @@ Page({
submitOperation() { submitOperation() {
let that = this let that = this
wx.lin.showDialog({ wx.lin.showDialog({
type:"confirm", type: "confirm",
title:"", title: "",
content:"是否确认核销券码" , content: "是否确认核销券码",
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定') console.log('用户点击确定')
that.doVolume() that.doVolume()
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消') console.log('用户点击取消')
} }
} }
}) })
}, },
doVolume() { doVolume() {
...@@ -116,24 +116,24 @@ Page({ ...@@ -116,24 +116,24 @@ Page({
data: { data: {
volumeId: that.data.couponDetail.volumeId, volumeId: that.data.couponDetail.volumeId,
}, },
success: function(res) { success: function (res) {
if (res.data.code * 1 == 200) { if (res.data.code * 1 == 200) {
wx.lin.showToast({ wx.lin.showToast({
image: '/image/success.png', image: '/image/success.png',
title: '核销成功', title: '核销成功',
}) })
setTimeout(()=>{ setTimeout(() => {
wx.navigateBack() wx.navigateBack()
},2000); }, 2000);
} else { } else {
wx.lin.showToast({ wx.lin.showToast({
image: '/image/error.png', image: '/image/error.png',
title: res.data.msg, title: res.data.msg,
}) })
} }
}, },
fail: function(err) { fail: function (err) {
wx.lin.showToast({ wx.lin.showToast({
image: '/image/error.png', image: '/image/error.png',
title: err.msg, title: err.msg,
......
...@@ -2,12 +2,14 @@ let App = getApp() ...@@ -2,12 +2,14 @@ let App = getApp()
Page({ Page({
data: { data: {
winToastText: '操作成功',
winToast: false,
isDoing: false,
showNotice: false, showNotice: false,
swiperCurrent: 0, swiperCurrent: 0,
showCodePopup: false, showCodePopup: false,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
shopInfo: {}, shopInfo: {},
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影 orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
...@@ -18,49 +20,17 @@ Page({ ...@@ -18,49 +20,17 @@ Page({
isFromUse: false, isFromUse: false,
winCode: false, winCode: false,
residuePayTime: "", //剩余支付时间 residuePayTime: "", //剩余支付时间
sealImgs: [{
type: 1, codeList: [],
url: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png'
}], sealSrc: '',
sealTest: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png', shopConfig: App.globalData.shopId,
sealBig: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-1.png', imgBasehost: App.globalData.appResourcesBase
seals: {
seal1: {
passSrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
willPaySrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
},
seal1: {
passSrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
willPaySrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
},
seal1: {
passSrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
willPaySrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
},
},
codeList: [{
id: 0,
title: '《 阿凡达 》电影票',
img: './image/QRcode.png',
num: '2179 7092 0925'
},
{
id: 1,
title: '《 阿凡达 》电影票',
img: './image/QRcode.png',
num: '2179 7092 0925'
},
{
id: 2,
title: '《 阿凡达 》电影票',
img: './image/QRcode.png',
num: '2179 7092 0925'
}
]
}, },
onLoad: function (options) { onLoad: function (options) {
let funcOrderInfo = this.data.orderInfo let funcOrderInfo = this.data.orderInfo
funcOrderInfo.id = options.id funcOrderInfo.id = options.id
this.setData({ this.setData({
...@@ -74,7 +44,107 @@ Page({ ...@@ -74,7 +44,107 @@ Page({
success: (result) => { success: (result) => {
this.queryOrderDetail() this.queryOrderDetail()
}, },
})
},
// 再次下单
onOrderAgain: function (event) {
let commodityType = this.data.orderInfo.commodityType
let shopAppId = wx.getStorageSync('shopInfoBuffer') ? wx.getStorageSync('shopInfoBuffer').appId : ""
wx.navigateTo({
url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`,
})
},
// 去支付
onOrderPay: function (event) {
// 数据校验不通过
let that = this
let wxRequest = this.data.orderInfo.wxRequest
// 待支付返回的wx支付参数
if (wxRequest) {
wx.requestPayment({
timeStamp: wxRequest.timeStamp,
nonceStr: wxRequest.nonceStr,
package: wxRequest.package,
signType: wxRequest.signType,
paySign: wxRequest.paySign,
success(res) {
// let state = `orderInfo.state`
// that.setData({
// [state]: 2,
// })
that.queryOrderDetail()
},
fail(res) {}
})
}
},
// 去评价
onOrderEvaluate: function (event) {
let item = JSON.stringify(this.data.orderInfo)
wx.navigateTo({
url: `/pages/pay/order-comment/order-comment?orderItem=${item}`,
})
},
// 删除订单&取消订单
onDelOrCancelOrder: function (event) {
// wx.lin.showDialog({
// type: "confirm",
// title: "",
// content: "是否确认核销券码",
// success: (res) => {
// if (res.confirm) {
// console.log('用户点击确定')
// that.doVolume()
// } else if (res.cancel) {
// console.log('用户点击取消')
// }
// }
// })
let type = event.currentTarget.dataset.type
let that = this
wx.showLoading({
title: '处理中',
mask: true
})
this.setData({
isDoing: true,
})
App.wxRequest({
url: '/api/v1/order/cancelOrder',
data: {
'orderId': this.data.orderInfo.id,
'type': type,
},
success: (response) => {
wx.hideLoading()
let winToastText = type == 1 ? '订单删除成功' : '订单取消成功'
that.setData({
isDoing: false,
winToast: true,
winToastText: winToastText
})
setTimeout(function () {
if (type == 1) {
// 删除操作
wx.redirectTo({
url: '/pages/mine/order/order',
})
} else {
// 取消操作
let state = `orderInfo.state`
that.setData({
isDoing: false,
[state]: -1
})
}
}, 2000)
}
}) })
}, },
// 使用须知 // 使用须知
...@@ -148,8 +218,22 @@ Page({ ...@@ -148,8 +218,22 @@ Page({
'tipTimeSubmit': funcResponse.createDate, 'tipTimeSubmit': funcResponse.createDate,
'tipTimePay': App.modular.miment(funcResponse.paymentTime).format('YYYY-MM-DD hh:mm:ss'), 'tipTimePay': App.modular.miment(funcResponse.paymentTime).format('YYYY-MM-DD hh:mm:ss'),
'tipIntegral': funcResponse.integral, 'tipIntegral': funcResponse.integral,
'officeName': funcResponse.officeName 'officeName': funcResponse.officeName,
'wxRequest': funcResponse.wxRequest
} }
// 设置印章
let shopName = funcResponse.officeName;
let shopFilter = this.data.shopConfig.filter(
item => {
return item.name.toLowerCase() == shopName.toLowerCase()
}
)
funcOrderInfo.shopInfo = shopFilter[0]
console.log(shopFilter[0], '-----------shopFilter[0]------');
// 添加订单商品列表 // 添加订单商品列表
let funcCommodity = funcResponse.smOrderDetails let funcCommodity = funcResponse.smOrderDetails
...@@ -158,7 +242,7 @@ Page({ ...@@ -158,7 +242,7 @@ Page({
'cover': funcCommodity[i].imgUrl, 'cover': funcCommodity[i].imgUrl,
'name': funcCommodity[i].name, // 名称 'name': funcCommodity[i].name, // 名称
'quantity': funcCommodity[i].number, // 数量 'quantity': funcCommodity[i].number, // 数量
'amount': funcCommodity[i].totalPrices, // 总价 'amount': funcCommodity[i].unitPrice, // 总价
'state': Number(funcCommodity[i].status), // 状态 'state': Number(funcCommodity[i].status), // 状态
'codeId': funcCommodity[i].volumeId, // 券码 'codeId': funcCommodity[i].volumeId, // 券码
} }
...@@ -207,16 +291,21 @@ Page({ ...@@ -207,16 +291,21 @@ Page({
}) })
}, },
// 弹出单张二维码 // 弹出单张二维码
onCouponCode: function (event) { onCouponCode: function (event) {
let funcOrderInfo = event.currentTarget.dataset.item let funcOrderInfo = event.currentTarget.dataset.item
wx.showLoading({
title: '加载中',
})
App.wxRequest({ App.wxRequest({
url: '/api/v1/volume/getVolume', url: '/api/v1/volume/getVolume',
data: { data: {
'volumeId': funcOrderInfo.codeId 'volumeId': funcOrderInfo.codeId
}, },
success: (response) => { success: (response) => {
wx.hideLoading({
success: (res) => {},
})
let funcResponse = response.data let funcResponse = response.data
let funcCodeInfo = { let funcCodeInfo = {
'codeNo': funcResponse.serialNumber, 'codeNo': funcResponse.serialNumber,
......
...@@ -791,7 +791,7 @@ ...@@ -791,7 +791,7 @@
} }
.footer-btn { .footer-btn {
padding: 32rpx 20rpx 0; padding: 32rpx 20rpx;
border-top: 1px solid #E2E7EF; border-top: 1px solid #E2E7EF;
} }
......
...@@ -3,7 +3,7 @@ const App = getApp() ...@@ -3,7 +3,7 @@ const App = getApp()
Page({ Page({
data: { data: {
bannerImg: App.globalData.appResourcesBase + 'play/home/type.png', bannerImg: App.globalData.appResourcesBase + 'play/home/type.png',
navigationLogoTop: 0, navigationLogoTop: 0,
navigationLogoMarginTop: 0, navigationLogoMarginTop: 0,
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</view> </view>
<!-- 无场次 --> <!-- 无场次 -->
<view class="show-end col align-c" wx:if="{{showList[0].length === 0 && showList[1].length === 0}}"> <view class="show-end col align-c" wx:if="{{showList[0].length === 0 && showList[1].length === 0}}">
<image src=""></image> <image src="/image/no-movie.png"></image>
<text>观影已结束,请期待后续排片</text> <text>观影已结束,请期待后续排片</text>
</view> </view>
<!-- 有场次 --> <!-- 有场次 -->
......
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