Commit c40da588 by wjw

观影

parents 2e7654c7 01a66768
Showing with 912 additions and 1355 deletions
...@@ -32,7 +32,7 @@ App({ ...@@ -32,7 +32,7 @@ App({
onLaunch: function () { onLaunch: function () {
this.setUnitProportion() this.setUnitProportion()
// this.login() this.login()
}, },
setUnitProportion: function () { setUnitProportion: function () {
...@@ -72,11 +72,7 @@ App({ ...@@ -72,11 +72,7 @@ App({
obj.success(res.data) obj.success(res.data)
} }
} else if (402 == code) { } else if (402 == code) {
this.refreshToken({ this.refreshToken(obj)
success: () => {
this.wxRequest(obj)
}
})
} else if (500 === code) { } else if (500 === code) {
if (obj.success) { if (obj.success) {
obj.success(res) obj.success(res)
...@@ -164,7 +160,7 @@ App({ ...@@ -164,7 +160,7 @@ App({
wx.setStorageSync('userInfo', funcUserInfo) wx.setStorageSync('userInfo', funcUserInfo)
if (obj.success) { if (obj && obj.success) {
obj.success(funcResponse.token) obj.success(funcResponse.token)
} }
}, },
...@@ -244,16 +240,6 @@ App({ ...@@ -244,16 +240,6 @@ App({
}, },
/** /**
* 令牌有效性判断
* @function
* @param
* @returns
*/
tokenInspect: function () {
let funcToken = wx.getStorageSync()
},
/**
* 刷新令牌 * 刷新令牌
* @function * @function
* @param * @param
...@@ -266,20 +252,31 @@ App({ ...@@ -266,20 +252,31 @@ App({
token: this.globalData.token, token: this.globalData.token,
refreshToken: this.globalData.refreshToken refreshToken: this.globalData.refreshToken
}, },
success: (res) => { success: (response) => {
let funcResponse = response.data
// { "msg": "登录失效", "code": 402, "success": true }
let token = res.data.token
let refreshToken = res.data.refreshToken
this.globalData.token = token switch (Number(funcResponse.code)) {
this.globalData.refreshToken = refreshToken case 200:
this.globalData.token = funcResponse.token
this.globalData.refreshToken = funcResponse.refreshToken
wx.setStorageSync('token', funcResponse.token)
wx.setStorageSync('tokenRefresh', funcResponse.refreshToken)
if (obj.success) { this.wxRequest(obj)
obj.success() break
case 402:
this.globalData.token = ''
this.globalData.refreshToken = ''
// 记录原始请求参数
let funcCallBackFunction = {
success: () => {
this.wxRequest(obj)
}
}
this.login(funcCallBackFunction)
break
} }
} }
}) })
......
{ {
"pages": [ "pages": [
"pages/home/home/home", "pages/home/home/home",
"pages/home/dynamic/dynamic", "pages/home/dynamic/dynamic",
"pages/home/dynamic-detail/dynamic-detail", "pages/home/dynamic-detail/dynamic-detail",
......
...@@ -273,6 +273,10 @@ Page({ ...@@ -273,6 +273,10 @@ Page({
} }
} }
} }
// 查询之后参数失效,避免返回页面时继续查询
this.setData({
option: {}
})
this.onCommodityDetail(funcEvent) this.onCommodityDetail(funcEvent)
break break
} }
......
...@@ -18,6 +18,9 @@ Page({ ...@@ -18,6 +18,9 @@ Page({
}, { }, {
'appId': 3, 'appId': 3,
'commodityType': 1, 'commodityType': 1,
}, {
'appId': 3,
'commodityType': 3,
} }
], ],
shopCommodityData: [], shopCommodityData: [],
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
<view class="shop-item"> <view class="shop-item">
<view class="shop-name row align-c"> <view class="shop-name row align-c">
<image src="{{resourcesBase + 'shop/logo-3.png'}}" style="width: 64rpx; height: 50rpx;"></image> <image src="{{resourcesBase + 'shop/logo-3.png'}}" style="width: 64rpx; height: 50rpx;"></image>
<text>元养水韵SPA</text> <text>儿童营地</text>
</view> </view>
<view class="commodity-list"> <view class="commodity-list">
<block wx:for="{{shopCommodityData[2]}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{shopCommodityData[2]}}" wx:for-index="index" wx:for-item="item" wx:key="index">
...@@ -212,6 +212,63 @@ ...@@ -212,6 +212,63 @@
</view> </view>
</view> </view>
</block> </block>
<block wx:for="{{shopCommodityData[3]}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row">
<view class="commodity-cover">
<image src="{{item.cover}}"></image>
</view>
<view class="commodity-describe">
<text>{{item.name}}</text>
<text>{{item.describe}}</text>
</view>
<view class="commodity-price">
<!-- 活动价样式 -->
<block wx:if="{{item.priceType === 1}}">
<view>
<text class="commodity-price-symbol">¥</text>
<text class="commodity-price-value">{{item.priceDiscountText}}</text>
<text class="commodity-price-special">业主价</text>
</view>
<view class="commodity-price-through row con-e align-c">
<text>¥</text>
<text>{{item.priceText}}</text>
</view>
</block>
<!-- 业主价样式 -->
<block wx:if="{{item.priceType === 2}}">
<view>
<text class="commodity-price-symbol">¥</text>
<text class="commodity-price-value">{{item.priceSpecialText}}</text>
<text class="commodity-price-special">业主价</text>
</view>
<view class="commodity-price-through row con-e align-c">
<text>¥</text>
<text>{{item.priceText}}</text>
</view>
</block>
<!-- 普通价样式 -->
<block wx:if="{{item.priceType === 3}}">
<view>
<text class="commodity-price-symbol">¥</text>
<text class="commodity-price-value">{{item.priceText}}</text>
<text></text>
</view>
<view class="commodity-price-through row con-e align-c">
<text></text>
<text></text>
</view>
</block>
<view class="commodity-price-operation row con-e align-c">
<button class="row con-c align-c" data-index="{{3}}" data-itemindex="{{index}}" bindtap="onBuy">购买门票</button>
</view>
</view>
</view>
</block>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -5,9 +5,6 @@ Page({ ...@@ -5,9 +5,6 @@ Page({
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
navigationTitle: '123213231',
formType: 1,
appointmentDate: '', appointmentDate: '',
appointmentEndDate: '', appointmentEndDate: '',
appointmentComplete: false, appointmentComplete: false,
...@@ -22,19 +19,12 @@ Page({ ...@@ -22,19 +19,12 @@ Page({
errorQuantity: '', errorQuantity: '',
canSubmit: false, canSubmit: false,
winQuota: false,
// 预约入园剩余名额 // 预约入园剩余名额
total: 0, total: 0,
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({
formType: Number(options.type),
navigationTitle: Number(options.type) === 1 ? '夜间入园预约' : '看房预约'
})
console.log(options.type)
this.setReset() this.setReset()
}, },
...@@ -44,14 +34,11 @@ Page({ ...@@ -44,14 +34,11 @@ Page({
this.setData({ this.setData({
formName: '', formName: '',
formPhone: '', formPhone: '',
formQuantity: this.data.formType === 1 ? 0 : 1, formQuantity: 1,
formDate: funcDate, formDate: funcDate,
appointmentDate: funcDate, appointmentDate: funcDate,
appointmentEndDate: endDate, appointmentEndDate: endDate,
}) })
if (this.data.formType === 1) { // 入园预约
this.getResidue()
}
}, },
onServic: function () { onServic: function () {
...@@ -117,35 +104,10 @@ Page({ ...@@ -117,35 +104,10 @@ Page({
this.updateSubmitButtonStatus() this.updateSubmitButtonStatus()
}, },
onQuantityAdd: function () {
if (this.data.total * 1 == 0) {
this.setData({
errorQuantity: '所选日期预约名额已满'
})
} else if (this.data.formQuantity >= this.data.total * 1) {
this.setData({
errorQuantity: '所选日期预约的名额仅剩' + activityTime.residue + '人'
})
} else if (this.data.formQuantity >= 5) {
this.setData({
errorQuantity: '每个账号最多预约5人'
})
} else {
this.setData({
formQuantity: this.data.formQuantity + 1,
errorQuantity: '',
})
}
this.updateSubmitButtonStatus()
},
onSelectionDate: function (event) { onSelectionDate: function (event) {
this.setData({ this.setData({
formDate: event.detail.value, formDate: event.detail.value,
}) })
if (this.data.formType === 1) { // 入园预约
this.getResidue()
}
}, },
inspectForm: function () { inspectForm: function () {
...@@ -231,6 +193,7 @@ Page({ ...@@ -231,6 +193,7 @@ Page({
mask: true, mask: true,
duration: 1000 * 60, duration: 1000 * 60,
}) })
App.wxRequest({ App.wxRequest({
url: '/api/v1/subscribe/doSubscribe', url: '/api/v1/subscribe/doSubscribe',
data: { data: {
...@@ -238,7 +201,7 @@ Page({ ...@@ -238,7 +201,7 @@ Page({
subscribeNum: this.data.formQuantity, subscribeNum: this.data.formQuantity,
subscribeDate: this.data.formDate + ' 00:00:00', subscribeDate: this.data.formDate + ' 00:00:00',
name: this.data.formName, name: this.data.formName,
type: this.data.formType === 1 ? 0 : 1, type: 1,
}, },
success: (res) => { success: (res) => {
this.setData({ this.setData({
...@@ -264,31 +227,6 @@ Page({ ...@@ -264,31 +227,6 @@ Page({
}) })
}, },
// 预约入园查询返回剩余名额
getResidue() {
App.login({
success: function () {
App.wxRequest({
url: '/api/v1/subscribe/getResidue',
data: {
subscribeDate: this.data.formDate + ' 00:00:00',
type: 0,
},
success: (res) => {
this.setData({
total: res.data.total,
winQuota: true,
formQuantity: 0,
})
this.updateSubmitButtonStatus()
}
})
}
})
},
getNextDay(d, t) { getNextDay(d, t) {
console.log(d, t)//格式为---2019-02-13 3 console.log(d, t)//格式为---2019-02-13 3
d = new Date(d); d = new Date(d);
......
<l-toast l-image-class="toast-image"></l-toast> <l-toast l-image-class="toast-image"></l-toast>
<!-- 首页 - 入园预约 / 房屋预约 --> <!-- 首页 - 入园预约 / 房屋预约 -->
<navigation class="navigation" titleText="{{navigationTitle}}" color="#FFFFFF" backIcon="{{'../../image/icon/arrow-l-2.png'}}"></navigation> <navigation class="navigation" titleText="看房预约" color="#FFFFFF" backIcon="{{'../../image/icon/arrow-l-2.png'}}"></navigation>
<view class="appointment-complete row con-c align-c" wx:if="{{appointmentComplete}}"> <view class="appointment-complete row con-c align-c" wx:if="{{appointmentComplete}}">
<view class="appointment-complete-tip"> <view class="appointment-complete-tip">
<image wx:if="{{formType === 1}}" src="./image/tip-1.png"></image> <image src="{{resourcesBase + 'commodity/room-appointment/tip.png'}}"></image>
<image wx:if="{{formType === 2}}" src="./image/tip-2.png"></image>
<l-button l-class="button" plain="{{true}}" bind:lintap="onAppointmentComplete">我知道了</l-button> <l-button l-class="button" plain="{{true}}" bind:lintap="onAppointmentComplete">我知道了</l-button>
</view> </view>
</view> </view>
<!-- 入园预约 --> <view class="container">
<view wx:if="{{formType === 1}}" class="container">
<view class="appointment-tip"> <view class="appointment-tip">
<image class="background-image" src="./image/banner-1.png"></image> <image class="background-image" src="{{resourcesBase + 'commodity/room-appointment/banner.png'}}"></image>
<image class="ornament-wave" src="/image/ornament-2.png" mode="widthFix"></image>
</view>
<view class="form-title row con-s align-c">
<text>填写预约信息</text>
</view>
<view class="form">
<!-- 名字输入 -->
<view class="row align-c">
<view class="input-label row con-b align-c">
<text>姓</text>
<text>名</text>
</view>
<view class="input-wrap row align-c">
<input maxlength="16" class="text" placeholder-class="input-tip" placeholder="请输入名字" data-type="name" bindblur="onInputBlur"></input>
</view>
</view>
<view class="form-error row align-c">
<text hidden="{{errorName ? false : true}}">{{errorName}}</text>
</view>
<!-- 手机输入 -->
<view class="row align-c">
<view class="input-label row con-b align-c">
<text>手</text>
<text>机</text>
<text>号</text>
</view>
<view class="input-wrap row align-c">
<input maxlength="11" type="number" class="text" placeholder-class="input-tip" placeholder="请输入手机号" data-type="phone" bindblur="onInputBlur"></input>
</view>
</view>
<view class="form-error row align-c">
<text hidden="{{errorPhone ? false : true}}">{{errorPhone}}</text>
</view>
<!-- 预约人数 -->
<view class="row align-c">
<view class="input-label row con-b align-c">
<text>预</text>
<text>约</text>
<text>人</text>
<text>数</text>
</view>
<view class="input-wrap row con-b align-c" style="padding: 0">
<l-button special="{{true}}" bind:lintap="onQuantityCut">
<image class="input-icon" src="{{imageBase + 'icon/cut-1.png'}}"></image>
</l-button>
<text class="text" style="{{formQuantity === 0 ? 'color: #C2C7CF' : 'color: #15191F'}}">{{formQuantity}}</text>
<l-button special="{{true}}" bind:lintap="onQuantityAdd">
<image class="input-icon" src="{{imageBase + 'icon/add-1.png'}}"></image>
</l-button>
</view>
</view>
<view class="form-error row align-c">
<text hidden="{{errorQuantity ? false : true}}">{{errorQuantity}}</text>
</view>
<!-- 预约日期 -->
<view class="row align-c">
<view class="input-label row con-b align-c">
<text>预</text>
<text>约</text>
<text>日</text>
<text>期</text>
</view>
<view class="input-wrap row con-b align-c" style="padding: 0 0 0 24rpx">
<picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" end="{{appointmentEndDate}}" bindchange="onSelectionDate">
<view class="picker text" style="display: inline-block;width:400rpx">{{formDate}}</view>
<image class="input-icon" style="float: right;" src="{{imageBase + 'icon/arrow-r-1.png'}}"></image>
</picker>
</view>
</view>
<view class="quota row con-e align-c" hidden="{{!winQuota}}">
<text>剩余名额:</text>
<text>{{total}}人</text>
</view>
</view>
<view class="appointment-operation">
<button class="{{canSubmit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button>
<button class="button-plain row con-c align-c" bindtap="onServic">电话咨询</button>
</view>
</view>
<!-- 看房预约 -->
<view wx:if="{{formType === 2}}" class="container">
<view class="appointment-tip">
<image class="background-image" src="./image/banner-2.png"></image>
<image class="ornament-wave" src="/image/ornament-2.png" mode="widthFix"></image> <image class="ornament-wave" src="/image/ornament-2.png" mode="widthFix"></image>
</view> </view>
......
...@@ -5,7 +5,7 @@ Page({ ...@@ -5,7 +5,7 @@ Page({
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
shopInfo: {},
shopId: '', shopId: '',
shopLogo: '', shopLogo: '',
shoppingCart: [], // 购物车列表 shoppingCart: [], // 购物车列表
...@@ -100,7 +100,8 @@ Page({ ...@@ -100,7 +100,8 @@ Page({
let funcShopInfo = wx.getStorageSync('shopInfoBuffer') let funcShopInfo = wx.getStorageSync('shopInfoBuffer')
this.setData({ this.setData({
shopId: funcShopInfo.id, shopId: funcShopInfo.id,
shopLogo: funcShopInfo.commodityLogo shopLogo: funcShopInfo.commodityLogo,
shopInfo: funcShopInfo
}) })
console.log(this.data.shopLogo) console.log(this.data.shopLogo)
...@@ -325,7 +326,7 @@ Page({ ...@@ -325,7 +326,7 @@ Page({
// 在此之前需要校验用户是否登录,以及商品库存是否充足 // 在此之前需要校验用户是否登录,以及商品库存是否充足
wx.navigateTo({ wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=5' url: '/pages/pay/order-input/order-input?type=' + this.data.shopInfo.shopType
}) })
}, },
......
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</view> </view>
<view class="empty col con-c align-c" wx:else> <view class="empty col con-c align-c" wx:else>
<image class="empty-cart" src=""></image> <image src="{{imageBase + 'icon/cart-4.png'}}"></image>
<view class="empty-title"> <view class="empty-title">
<text>购物车还没有商品哦</text> <text>购物车还没有商品哦</text>
</view> </view>
......
...@@ -313,10 +313,9 @@ ...@@ -313,10 +313,9 @@
height: 100vh; height: 100vh;
} }
.empty-cart { .empty > image {
width: 176rpx; width: 176rpx;
height: 176rpx; height: 176rpx;
background-color: #ccc;
} }
.empty-title { .empty-title {
......
...@@ -188,14 +188,13 @@ Page({ ...@@ -188,14 +188,13 @@ Page({
}, },
onPointDetail: function () { onPointDetail: function () {
console.log('onPointDetail')
// 当从景点详情进入屏蔽该功能 // 当从景点详情进入屏蔽该功能
if (logicData.option.id) return if (logicData.option.id) return
let funcPointInfo = this.data.pointInfo let funcPointInfo = this.data.pointInfo
for (let i = 0, l = funcPointInfo.length; i < l; i++) { for (let i = 0, l = funcPointInfo.length; i < l; i++) {
if (funcPointInfo[i].isActive) { if (funcPointInfo[i].isActive) {
console.log(funcPointInfo[i].detail) console.log('point', funcPointInfo[i].detail)
wx.navigateTo({ wx.navigateTo({
url: funcPointInfo[i].detail url: funcPointInfo[i].detail
......
...@@ -29,47 +29,47 @@ let output = [ ...@@ -29,47 +29,47 @@ let output = [
}, { }, {
x: 1300, x: 1300,
y: 220, y: 220,
id: 4, id: 6,
name: '原味舒食', name: '原味舒食',
icon: './image/icon/04.png', icon: './image/icon/04.png',
card: 'guide/card/04.png', card: 'guide/card/04.png',
detail: '/pages/play/service-detail/service-detail?id=4', detail: '/pages/play/service-detail/service-detail?id=6',
isActive: false, isActive: false,
}, { }, {
x: 666, x: 666,
y: 280, y: 280,
id: 6, id: 2,
name: '星空影院', name: '星空影院',
icon: './image/icon/05.png', icon: './image/icon/05.png',
card: 'guide/card/05.png', card: 'guide/card/05.png',
detail: '/pages/play/service-detail/service-detail?id=6', detail: '/pages/play/service-detail/service-detail?id=2',
isActive: false, isActive: false,
}, { }, {
x: 1120, x: 1120,
y: 276, y: 276,
id: 3, id: 7,
name: '元养水韵SPA', name: '元养水韵SPA',
icon: './image/icon/06.png', icon: './image/icon/06.png',
card: 'guide/card/06.png', card: 'guide/card/06.png',
detail: '/pages/play/service-detail/service-detail?id=3', detail: '/pages/play/service-detail/service-detail?id=7',
isActive: false, isActive: false,
}, { }, {
x: 1370, x: 1370,
y: 284, y: 284,
id: 5, id: 4,
name: '原野MOJITO', name: '原野MOJITO',
icon: './image/icon/07.png', icon: './image/icon/07.png',
card: 'guide/card/07.png', card: 'guide/card/07.png',
detail: '/pages/play/service-detail/service-detail?id=5', detail: '/pages/play/service-detail/service-detail?id=4',
isActive: false, isActive: false,
}, { }, {
x: 1708, x: 1708,
y: 306, y: 306,
id: 2, id: 5,
name: '拾光花坊', name: '拾光花坊',
icon: './image/icon/08.png', icon: './image/icon/08.png',
card: 'guide/card/08.png', card: 'guide/card/08.png',
detail: '/pages/play/service-detail/service-detail?id=2', detail: '/pages/play/service-detail/service-detail?id=5',
isActive: false, isActive: false,
}, { }, {
x: 1016, x: 1016,
......
...@@ -54,12 +54,11 @@ Page({ ...@@ -54,12 +54,11 @@ Page({
}) })
}, },
getBrands: function (index) { getBrands: function (index) {
let that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/common/getBrands', url: '/api/v1/common/getBrands',
success: function(res) { success: (response) => {
let history = res.data[index] let history = response.data[index]
that.setData({ this.setData({
history history
}) })
} }
......
Component({
/**
* 组件的属性列表
*/
properties: {
data: Object
},
/**
* 组件的初始数据
*/
data: {
},
lifetimes: {
attached: function () {
// console.log(this.data.data)
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
/**
* 组件的方法列表
*/
methods: {
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!-- demo.wxml -->
<view class="component-strategy-item">
<image wx:if="{{data.index === 1}}" class="short" src="{{data.image}}" mode="aspectFill"></image>
<image wx:else src="{{data.image}}" mode="widthFix"></image>
<text class="component-strategy-item-title">{{data.title}}</text>
<text class="component-strategy-item-content">{{data.date}}</text>
</view>
\ No newline at end of file
.component-strategy-item {
display: flex;
flex-direction: column;
margin-top: 16rpx;
border-radius: 4rpx;
overflow: hidden;
background: #ffffff;
}
.component-strategy-item image {
width: 328rpx;
}
.component-strategy-item .short {
width: 328rpx;
height: 354rpx;
}
.component-strategy-item-title {
display: -webkit-box;
margin: 24rpx 20rpx;
font-size: 26rpx;
font-weight: bolder;
color: #000000;
overflow: hidden;
text-overflow: ellipsis;
line-clamp: 2;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.component-strategy-item-content {
margin: 0 24rpx 24rpx 24rpx;
font-size: 22rpx;
color: #959DA9;
}
\ No newline at end of file
...@@ -47,7 +47,6 @@ Page({ ...@@ -47,7 +47,6 @@ Page({
}, },
strategy: [], strategy: [],
strategyList: [], strategyList: [],
strategyOriginList: [],
loading: false, loading: false,
moreData: true, moreData: true,
...@@ -242,83 +241,6 @@ Page({ ...@@ -242,83 +241,6 @@ Page({
}, },
// // 游客攻略列表
// loadVisiterPlanList() {
// this.data.loading = true
// var that = this
// App.wxRequest({
// url: '/api/v1/strategy/getList',
// data: { pageSize: that.data.pageSize+'', pageNo: that.data.pageNo+''},
// success: function (res) {
// console.log(res)
// that.setData({
// loading: false
// })
// if (res.data.list.length > 0) {
// let count = that.data.strategyOriginList.length
// if (that.data.pageNo == 1) {
// count = 0
// }
// let tempArray = []
// for(let i = 0; i < res.data.list.length; i++) {
// let item = res.data.list[i]
// let strategy = {
// id: item.id,
// image: (count == 0 && i == 0) ? item.topImg : item.cover,
// title: item.title,
// date: item.updateDate,
// index: count + i - 1,
// }
// tempArray.push(strategy)
// }
// if (that.data.pageNo == 1) {
// var newArr = tempArray.slice(1)
// var firstItem = tempArray[0]
// that.setData({
// moreData: (tempArray.length >= Number(res.data.count)) ? false : true,
// ['strategyFirstItem.id']: firstItem.id,
// ['strategyFirstItem.image']: firstItem.image,
// ['strategyFirstItem.title']: firstItem.title,
// ['strategyFirstItem.date']: firstItem.date,
// strategyList: newArr,
// strategyOriginList: tempArray,
// })
// } else {
// that.setData({
// moreData: (count + tempArray.length >= Number(res.data.count)) ? false : true,
// strategyOriginList: that.data.strategyOriginList.concat(tempArray),
// strategyList: tempArray,
// })
// }
// // 游客攻略瀑布列表
// // wx.lin.renderWaterFlow(that.data.strategyList, that.data.pageNo == 1 ? true : false, () => {})
// } else {
// }
// },
// fail: function(err) {
// that.setData({
// loading: false
// })
// }
// })
// },
// onReachBottom: function() {
// // console.log('触底啦')
// if (this.data.loading || !this.data.moreData) {
// return
// }
// this.data.pageNo += 1
// this.loadVisiterPlanList()
// },
// 最新动态列表 // 最新动态列表
getNoticeList() { getNoticeList() {
var that = this var that = this
......
{ {
"usingComponents": { "usingComponents": {}
"strategy-item": "./component/strategy-item/strategy-item"
}
} }
\ No newline at end of file
...@@ -77,22 +77,6 @@ ...@@ -77,22 +77,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 游客攻略 -->
<!-- <block wx:if="{{strategyOriginList.length > 0}}">
<view class="strategy detail-item" bindtap="onFirstStrategyDetail">
<image src="./image/title-strategy.png"></image>
<view class="strategy-content">
<image class="background-image" src="{{strategyFirstItem.image}}" mode="aspectFit"></image>
<view class="operation col">
<text>{{strategyFirstItem.title}}</text>
</view>
</view>
</view>
<view style="margin-bottom:10px">
<l-water-flow column-gap="14rpx" generic:l-water-flow-item="strategy-item" bind:linitemtap="onStrategyDetail"></l-water-flow>
</view>
</block> -->
</view> </view>
<view class="footer"> <view class="footer">
......
...@@ -322,6 +322,7 @@ ...@@ -322,6 +322,7 @@
margin-top: 88rpx; margin-top: 88rpx;
} }
.footer image { .footer image {
display: block;
width: 750rpx; width: 750rpx;
height: 1148rpx; height: 1148rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
......
...@@ -3,10 +3,8 @@ const App = getApp() ...@@ -3,10 +3,8 @@ const App = getApp()
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
navigationTitle: '123213231',
formType: 1,
appointmentDate: '', appointmentDate: '',
appointmentEndDate: '', appointmentEndDate: '',
appointmentComplete: false, appointmentComplete: false,
...@@ -28,28 +26,29 @@ Page({ ...@@ -28,28 +26,29 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({
formType: Number(options.type),
navigationTitle: Number(options.type) === 1 ? '夜间入园预约' : '看房预约'
})
this.setReset() this.setReset()
}, },
setReset: function () { setReset: function () {
let funcDate = App.modular.miment(new Date().getTime()).format('YYYY-MM-DD') let funcDate = App.modular.miment().format('YYYY-MM-DD')
console.log(funcDate)
let endDate = this.getNextDay(funcDate, 3) let endDate = this.getNextDay(funcDate, 3)
console.log('endDate', endDate)
this.setData({ this.setData({
formName: '', formName: '',
formPhone: '', formPhone: '',
formQuantity: this.data.formType === 1 ? 0 : 1, formQuantity: 0,
formDate: funcDate, formDate: funcDate,
appointmentDate: funcDate, appointmentDate: funcDate,
appointmentEndDate: endDate, appointmentEndDate: endDate,
}) })
if (this.data.formType === 1) { // 入园预约
this.getResidue() console.log(this.data.formDate)
} console.log(this.data.appointmentDate)
console.log(this.data.appointmentEndDate)
this.queryQuota()
}, },
onServic: function () { onServic: function () {
...@@ -138,12 +137,13 @@ Page({ ...@@ -138,12 +137,13 @@ Page({
}, },
onSelectionDate: function (event) { onSelectionDate: function (event) {
console.log(event.detail.value)
this.setData({ this.setData({
formDate: event.detail.value, formDate: event.detail.value,
}) })
if (this.data.formType === 1) { // 入园预约 this.queryQuota()
this.getResidue()
}
}, },
inspectForm: function () { inspectForm: function () {
...@@ -218,49 +218,39 @@ Page({ ...@@ -218,49 +218,39 @@ Page({
}, },
onSubmit: function () { onSubmit: function () {
var that = this if (!this.inspectForm()) {
App.login({ return
success: function () { }
if (!that.inspectForm()) {
return
}
wx.lin.showToast({ wx.lin.showToast({
icon: 'loading', icon: 'loading',
title: '提交中', title: '提交中',
show: true, show: true,
mask: true, mask: true,
duration: 1000 * 60, duration: 1000 * 60,
})
App.wxRequest({
url: '/api/v1/subscribe/doSubscribe',
data: {
mobile: this.data.formPhone,
subscribeNum: this.data.formQuantity,
subscribeDate: this.data.formDate + ' 00:00:00',
name: this.data.formName,
type: 0,
},
success: (res) => {
this.setData({
appointmentComplete: true,
}) })
App.wxRequest({ wx.lin.hideToast()
url: '/api/v1/subscribe/doSubscribe', },
data: { fail: (err) => {
mobile: that.data.formPhone, wx.lin.showToast({
subscribeNum: that.data.formQuantity, image: '/image/error.png',
subscribeDate: that.data.formDate + ' 00:00:00', title: err.msg,
name: that.data.formName,
type: that.data.formType === 1 ? 0 : 1,
},
success: function (res) {
that.setData({
appointmentComplete: true,
})
wx.lin.hideToast()
},
fail: function (err) {
wx.lin.showToast({
image: '/image/error.png',
title: err.msg,
})
}
}) })
} }
}) })
}, },
onAppointmentComplete: function () { onAppointmentComplete: function () {
...@@ -273,30 +263,22 @@ Page({ ...@@ -273,30 +263,22 @@ Page({
}, },
// 预约入园查询返回剩余名额 // 预约入园查询返回剩余名额
getResidue() { queryQuota: function () {
var that = this App.wxRequest({
App.login({ url: '/api/v1/subscribe/getResidue',
success: function () { data: {
App.wxRequest({ subscribeDate: this.data.formDate + ' 00:00:00',
url: '/api/v1/subscribe/getResidue', type: 0,
data: { },
subscribeDate: that.data.formDate + ' 00:00:00', success: (res) => {
type: 0, this.setData({
}, total: res.data.total,
success: function (res) { winQuota: true,
formQuantity: 0,
that.setData({
total: res.data.total,
winQuota: true,
formQuantity: 0,
})
that.updateSubmitButtonStatus()
}
}) })
this.updateSubmitButtonStatus()
} }
}) })
}, },
getNextDay(d, t) { getNextDay(d, t) {
......
<l-toast l-image-class="toast-image"></l-toast> <l-toast l-image-class="toast-image"></l-toast>
<!-- 首页 - 入园预约 / 房屋预约 --> <!-- 首页 - 入园预约 / 房屋预约 -->
<navigation class="navigation" titleText="{{navigationTitle}}" color="#FFFFFF" backIcon="/image/back-w.png"></navigation> <navigation class="navigation" titleText="夜间入园预约" color="#FFFFFF" backIcon="{{'../../image/icon/arrow-l-2.png'}}"></navigation>
<view class="appointment-complete row con-c align-c" wx:if="{{appointmentComplete}}"> <view class="appointment-complete row con-c align-c" wx:if="{{appointmentComplete}}">
<view class="appointment-complete-tip"> <view class="appointment-complete-tip">
<image wx:if="{{formType === 1}}" src="./image/tip-1.png"></image> <image src="{{resourcesBase + 'home/night-appointment/tip.png'}}"></image>
<image wx:if="{{formType === 2}}" src="./image/tip-2.png"></image>
<l-button l-class="button" plain="{{true}}" bind:lintap="onAppointmentComplete">我知道了</l-button> <l-button l-class="button" plain="{{true}}" bind:lintap="onAppointmentComplete">我知道了</l-button>
</view> </view>
</view> </view>
<!-- 入园预约 --> <!-- 入园预约 -->
<view wx:if="{{formType === 1}}" class="container"> <view class="container">
<view class="appointment-tip"> <view class="appointment-tip">
<image class="background-image" src="./image/banner-1.png"></image> <image class="background-image" src="{{resourcesBase + 'home/night-appointment/banner.png'}}"></image>
<image class="ornament-wave" src="/image/ornament-2.png" mode="widthFix"></image> <image class="ornament-wave" src="/image/ornament-2.png" mode="widthFix"></image>
</view> </view>
...@@ -61,11 +60,11 @@ ...@@ -61,11 +60,11 @@
</view> </view>
<view class="input-wrap row con-b align-c" style="padding: 0"> <view class="input-wrap row con-b align-c" style="padding: 0">
<l-button special="{{true}}" bind:lintap="onQuantityCut"> <l-button special="{{true}}" bind:lintap="onQuantityCut">
<image class="input-icon" src="{{imageBase + 'cut.png'}}"></image> <image class="input-icon" src="{{imageBase + 'icon/cut-1.png'}}"></image>
</l-button> </l-button>
<text class="text" style="{{formQuantity === 0 ? 'color: #C2C7CF' : 'color: #15191F'}}">{{formQuantity}}</text> <text class="text" style="{{formQuantity === 0 ? 'color: #C2C7CF' : 'color: #15191F'}}">{{formQuantity}}</text>
<l-button special="{{true}}" bind:lintap="onQuantityAdd"> <l-button special="{{true}}" bind:lintap="onQuantityAdd">
<image class="input-icon" src="{{imageBase + 'add.png'}}"></image> <image class="input-icon" src="{{imageBase + 'icon/add-1.png'}}"></image>
</l-button> </l-button>
</view> </view>
</view> </view>
...@@ -84,7 +83,7 @@ ...@@ -84,7 +83,7 @@
<view class="input-wrap row con-b align-c" style="padding: 0 0 0 24rpx"> <view class="input-wrap row con-b align-c" style="padding: 0 0 0 24rpx">
<picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" end="{{appointmentEndDate}}" bindchange="onSelectionDate"> <picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" end="{{appointmentEndDate}}" bindchange="onSelectionDate">
<view class="picker text" style="display: inline-block;width:400rpx">{{formDate}}</view> <view class="picker text" style="display: inline-block;width:400rpx">{{formDate}}</view>
<image class="input-icon" style="float: right;" src="{{imageBase + 'more.png'}}"></image> <image class="input-icon" style="float: right;" src="{{imageBase + 'icon/arrow-r-1.png'}}"></image>
</picker> </picker>
</view> </view>
</view> </view>
...@@ -98,67 +97,4 @@ ...@@ -98,67 +97,4 @@
<button class="{{canSubmit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button> <button class="{{canSubmit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button>
<button class="button-plain row con-c align-c" bindtap="onServic">电话咨询</button> <button class="button-plain row con-c align-c" bindtap="onServic">电话咨询</button>
</view> </view>
</view>
<!-- 看房预约 -->
<view wx:if="{{formType === 2}}" class="container">
<view class="appointment-tip">
<image class="background-image" src="./image/banner-2.png"></image>
<image class="ornament-wave" src="/image/ornament-2.png" mode="widthFix"></image>
</view>
<view class="form-title row con-s align-c">
<text>填写预约信息</text>
</view>
<view class="form">
<!-- 名字输入 -->
<view class="row align-c">
<view class="input-label row con-b align-c">
<text>姓</text>
<text>名</text>
</view>
<view class="input-wrap row align-c">
<input maxlength="16" class="text" placeholder-class="input-tip" placeholder="请输入名字" data-type="name" bindblur="onInputBlur"></input>
</view>
</view>
<view class="form-error row align-c">
<text hidden="{{errorName ? false : true}}">{{errorName}}</text>
</view>
<!-- 手机输入 -->
<view class="row align-c">
<view class="input-label row con-b align-c">
<text>手</text>
<text>机</text>
<text>号</text>
</view>
<view class="input-wrap row align-c">
<input maxlength="11" type="number" class="text" placeholder-class="input-tip" placeholder="请输入手机号" data-type="phone" bindblur="onInputBlur"></input>
</view>
</view>
<view class="form-error row align-c">
<text hidden="{{errorPhone ? false : true}}">{{errorPhone}}</text>
</view>
<!-- 预约日期 -->
<view class="row align-c">
<view class="input-label row con-b align-c">
<text>看</text>
<text>房</text>
<text>日</text>
<text>期</text>
</view>
<view class="input-wrap row align-c" style="padding: 0 0 0 24rpx">
<picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" bindchange="onSelectionDate">
<view class="picker text" style="display: inline-block;width:400rpx">{{formDate}}</view>
<image class="input-icon" style="float: right;" src="{{imageBase + 'more.png'}}"></image>
</picker>
</view>
</view>
</view>
<view class="appointment-operation">
<button class="{{canSubmit ? 'button' : 'button-disable'}} row con-c align-c" bindtap="onSubmit">确认预约</button>
</view>
</view> </view>
\ No newline at end of file
...@@ -6,6 +6,7 @@ Page({ ...@@ -6,6 +6,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isCheckPermission: false,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影 orderType: 1, // 1 - 年卡/月卡,2 - 次票, 3 - SPA, 4 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
...@@ -113,6 +114,35 @@ Page({ ...@@ -113,6 +114,35 @@ Page({
url: '/pages/pay/coupon-input/coupon-input', url: '/pages/pay/coupon-input/coupon-input',
}) })
}, },
// 获取核销权限
// api/v1/login/getPermissions权限更上去了
getPermissions() {
let that = this
App.wxRequest({
url: '/api/v1/login/getPermissions',
data: {
permission: 'sys:role:distinguish'
},
success: function (res) {
console.log(res, '核销');
let data = res.data
let isPer = false
if (data.length > 0) {
//有核销权限
isPer = true
} else {
// 无核销权限
isPer = false
}
that.setData({
isCheckPermission: isPer
})
}
})
},
//获取待使用订单 //获取待使用订单
getWillUseOrders() { getWillUseOrders() {
let that = this let that = this
...@@ -200,6 +230,7 @@ Page({ ...@@ -200,6 +230,7 @@ Page({
this.getMyActivityList() this.getMyActivityList()
this.getCardList() this.getCardList()
this.getWillUseOrders() this.getWillUseOrders()
this.getPermissions()
} else { } else {
this.setData({ this.setData({
isRegister: false, isRegister: false,
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</view> </view>
</view> </view>
<view class="coupon row align-c" bindtap="goCouponInput"> <view class="coupon row align-c" bindtap="goCouponInput" wx:if="{{isCheckPermission}}">
<view class="cpopon-info col"> <view class="cpopon-info col">
<text>券码核销</text> <text>券码核销</text>
<text>所属门店:拾光花坊</text> <text>所属门店:拾光花坊</text>
......
...@@ -2,87 +2,116 @@ const App = getApp() ...@@ -2,87 +2,116 @@ const App = getApp()
Page({ Page({
data: { data: {
birthdayEnd: App.modular.miment(new Date().getTime()).format('YYYY-MM-DD'), birthdayLimit: App.modular.miment().format('YYYY-MM-DD'),
mobile: '',
nickName: '', sexList: [
avatarUrl: '',
genderArray: [
{ id: 1, name: '男' }, { id: 1, name: '男' },
{ id: 2, name: '女' }, { id: 2, name: '女' },
], ],
genderIndex: 0, sexActive: 0,
birthday: '', userInfo: {
address: '', name: '',
phone: '',
avatar: '',
address: '',
birthday: '',
sex: '',
userType: '',
status: '',
isSignIn: false,
}
}, },
onLoad: function (options) { onLoad: function (options) {
let funcUserInfo = wx.getStorageSync('userInfo') let funcUserInfo = wx.getStorageSync('userInfo')
funcUserInfo.phone = this.phoneEncryption(funcUserInfo.phone)
if (!funcUserInfo.birthday) funcUserInfo.birthday = birthdayLimit
let mobile = funcUserInfo.phone
let nickName = funcUserInfo.name
let avatarUrl = funcUserInfo.avatar
let sex = funcUserInfo.sex
let birthday = funcUserInfo.birthday
let address = birthday.address
this.setData({ this.setData({
mobile: this.toHide(mobile), userInfo: funcUserInfo
nickName: nickName,
avatarUrl: avatarUrl,
genderIndex: sex == 2 ? 1 : 0,
birthday: birthday ? birthday : this.data.birthdayEnd,
address: address,
}) })
}, },
toHide: function (array) { /**
var mphone = array.substring(0, 3) + '****' + array.substring(7); * 加密号码
return mphone; * @function
* @param {object} - funcEvent
* @returns
*/
phoneEncryption: function (funcPhone) {
return funcPhone = funcPhone.substring(0, 3) + '****' + funcPhone.substring(7)
}, },
/**
* 加密号码
* @function
* @param {object} - funcEvent
* @returns
*/
onInputBlur: function (event) { onInputBlur: function (event) {
let funcType = event.target.dataset.type let funcType = event.target.dataset.type
let funcValue = event.detail.value let funcValue = event.detail.value
let funcUserInfo = wx.getStorageSync('userInfo')
switch (funcType) { switch (funcType) {
case 'name': case 'name':
this.setData({ funcUserInfo.name = funcValue
nickName: funcValue
})
break break
case 'address': case 'address':
this.setData({ funcUserInfo.address = funcValue
address: funcValue
})
break break
} }
this.setData({
userInfo: funcUserInfo
})
this.doUpdateInfo() this.doUpdateInfo()
}, },
// 性别选择 /**
onSelectionGender(e) { * 性别选择
* @function
* @param {object} - funcEvent
* @returns
*/
onSelectionGender(event) {
// console.log(event)
this.setData({ this.setData({
genderIndex: e.detail.value sexActive: Number(event.detail.value)
})
let funcUserInfo = wx.getStorageSync('userInfo')
funcUserInfo.sex = this.data.sexList[this.data.sexActive].id
this.setData({
userInfo: funcUserInfo
}) })
this.doUpdateInfo() this.doUpdateInfo()
}, },
// 生日选择 /**
* 生日选择
* @function
* @param {object} - funcEvent
* @returns
*/
onSelectionDate: function (event) { onSelectionDate: function (event) {
let funcUserInfo = wx.getStorageSync('userInfo')
funcUserInfo.birthday = event.detail.value
this.setData({ this.setData({
birthday: event.detail.value, userInfo: funcUserInfo
}) })
this.doUpdateInfo() this.doUpdateInfo()
}, },
doUpdateInfo() { /**
* 更新信息
let nickName = this.data.nickName * @function
let sex = this.data.genderArray[this.data.genderIndex].id * @param {object} - funcEvent
let birthday = this.data.birthday * @returns
let address = this.data.address */
doUpdateInfo: function () {
if (nickName == '') { if (this.data.userInfo.name == '') {
wx.lin.showToast({ wx.lin.showToast({
image: '/image/error.png', image: '/image/error.png',
title: '请填写姓名', title: '请填写姓名',
...@@ -91,22 +120,20 @@ Page({ ...@@ -91,22 +120,20 @@ Page({
} }
let param = { let param = {
sex: sex, sex: this.data.userInfo.sex,
name: nickName, name: this.data.userInfo.name,
address: address, address: this.data.userInfo.address,
birthday: birthday, birthday: this.data.userInfo.birthday,
} }
console.log(param) console.log(param)
App.wxRequest({ App.wxRequest({
url: '/api/v1/smUser/doUpdateInfo', url: '/api/v1/smUser/doUpdateInfo',
data: param, data: param,
success: function (res) { success: function (res) {
wx.setStorageSync('nickName', nickName) let funcUserInfo = wx.getStorageSync('userInfo')
wx.setStorageSync('sex', sex) Object.assign(funcUserInfo, param)
wx.setStorageSync('birthday', birthday) wx.setStorageSync('userInfo', funcUserInfo)
wx.setStorageSync('address', address)
} }
}) })
} }
}) })
\ No newline at end of file
<!--pages/myInfo/myInfo.wxml-->
<l-toast l-image-class="toast-image"></l-toast> <l-toast l-image-class="toast-image"></l-toast>
<navigation class="navigation" titleText="个人资料" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="个人资料" backIcon="/image/back.png"></navigation>
...@@ -6,32 +5,32 @@ ...@@ -6,32 +5,32 @@
<view class="myInfo"> <view class="myInfo">
<l-list is-hover="{{false}}" l-content-class="menu-title" title="头像" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="头像" is-link="{{false}}">
<view style="margin-bottom:30rpx;" slot="right-section"> <view style="margin-bottom:30rpx;" slot="right-section">
<l-avatar size="100" src="{{avatarUrl}}" /> <l-avatar size="100" src="{{userInfo.avatar}}" />
</view> </view>
</l-list> </l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="姓名" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="姓名" is-link="{{false}}">
<view slot="right-section"> <view slot="right-section">
<input maxlength="10" style="text-align:right;" placeholder="请填写姓名" placeholder-class="phone" value="{{nickName}}" data-type="name" bindblur="onInputBlur" /> <input maxlength="10" style="text-align:right;" placeholder="请填写姓名" placeholder-class="phone" value="{{userInfo.name}}" data-type="name" bindblur="onInputBlur" />
</view> </view>
</l-list> </l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="性别" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="性别" is-link="{{false}}">
<picker slot="right-section" class="input-picker" mode="selector" value="{{genderIndex}}" range-key="{{'name'}}" range="{{genderArray}}" bindchange="onSelectionGender"> <picker slot="right-section" class="input-picker" mode="selector" value="{{sexActive}}" range-key="{{'name'}}" range="{{sexList}}" bindchange="onSelectionGender">
<view class="picker">{{genderArray[genderIndex].name}}</view> <view class="picker">{{sexList[sexActive].name}}</view>
</picker> </picker>
</l-list> </l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="生日" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="生日" is-link="{{false}}">
<picker slot="right-section" class="input-picker" mode="date" value="{{birthday}}" end="{{birthdayEnd}}" bindchange="onSelectionDate"> <picker slot="right-section" class="input-picker" mode="date" value="{{userInfo.birthday}}" end="{{birthdayLimit}}" bindchange="onSelectionDate">
<view class="picker">{{birthday}}</view> <view class="picker">{{userInfo.birthday}}</view>
</picker> </picker>
</l-list> </l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="地址" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="地址" is-link="{{false}}">
<view slot="right-section"> <view slot="right-section">
<input maxlength="30" style="text-align:right;" placeholder="请填写地址" placeholder-class="phone" value="{{address}}" data-type="address" bindblur="onInputBlur" /> <input maxlength="30" style="text-align:right;" placeholder="请填写地址" placeholder-class="phone" value="{{userInfo.address}}" data-type="address" bindblur="onInputBlur" />
</view> </view>
</l-list> </l-list>
<l-list is-hover="{{false}}" l-content-class="menu-title" title="手机号" is-link="{{false}}"> <l-list is-hover="{{false}}" l-content-class="menu-title" title="手机号" is-link="{{false}}">
<view slot="right-section"> <view slot="right-section">
<view class="phone">{{mobile}}</view> <view class="phone">{{userInfo.phone}}</view>
</view> </view>
</l-list> </l-list>
</view> </view>
......
...@@ -100,13 +100,18 @@ Page({ ...@@ -100,13 +100,18 @@ Page({
'status': Number(funcResponse[i].status), 'status': Number(funcResponse[i].status),
'amount': funcResponse[i].totalMoney, 'amount': funcResponse[i].totalMoney,
'commodity': [], 'commodity': [],
'commodityBackup': [],
'commoditySlice3': [],
'commodityType': Number(funcResponse[i].goodType), 'commodityType': Number(funcResponse[i].goodType),
'wxRequest': funcResponse[i].wxRequest 'wxRequest': funcResponse[i].wxRequest,
'total': funcResponse[i].smOrderDetails.length
} }
// 添加订单商品列表 // 添加订单商品列表
let funcTotal = 0 let funcTotal = 0
let funcCommodity = funcResponse[i].smOrderDetails let funcCommodity = funcResponse[i].smOrderDetails
let commodityBackup = []
for (let ii = 0, ll = funcCommodity.length; ii < ll; ii++) { for (let ii = 0, ll = funcCommodity.length; ii < ll; ii++) {
let funcCommodityItem = { let funcCommodityItem = {
'cover': funcCommodity[ii].imgUrl, 'cover': funcCommodity[ii].imgUrl,
...@@ -116,7 +121,13 @@ Page({ ...@@ -116,7 +121,13 @@ Page({
} }
funcTotal = funcTotal + funcCommodityItem.quantity funcTotal = funcTotal + funcCommodityItem.quantity
funcItem.commodity.push(funcCommodityItem) funcItem.commodity.push(funcCommodityItem)
funcItem.commodityBackup.push(funcCommodityItem)
}
// 处理大于三条数据的问题
if (funcItem.commodity.length > 3) {
funcItem.commoditySlice3 = funcItem.commodityBackup.slice(0, 3)
} }
funcItem.total = funcTotal funcItem.total = funcTotal
// 映射门店信息 // 映射门店信息
...@@ -275,40 +286,48 @@ Page({ ...@@ -275,40 +286,48 @@ Page({
*/ */
onOrderCancel: function (event) { onOrderCancel: function (event) {
let that = this let that = this
wx.showLoading({ wx.lin.showDialog({
title: '处理中', type: "confirm",
mask: true title: "",
}) content: "是否确认取消订单",
this.setData({ success: (res) => {
isDoing: true if (res.confirm) {
}) console.log('用户点击确定')
let funcItem = event.target.dataset.item
// let index = event.target.dataset.index wx.showLoading({
// // 无刷新更新数据 title: '处理中',
// let status = `orderList[${index}].status` mask: true
// this.setData({ })
// [status]:-1 this.setData({
// }) isDoing: true
App.wxRequest({ })
url: '/api/v1/order/cancelOrder', let funcItem = event.target.dataset.item
data: { App.wxRequest({
'orderId': funcItem.id, url: '/api/v1/order/cancelOrder',
'type': 0, data: {
}, 'orderId': funcItem.id,
success: (response) => { 'type': 0,
wx.hideLoading() },
that.setData({ success: (response) => {
isDoing: false wx.hideLoading()
}) that.setData({
isDoing: false
that.setData({ })
'orderList': [],
'orderPages': 1, that.setData({
}) 'orderList': [],
that.queryOrder() 'orderPages': 1,
})
that.queryOrder()
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
} }
}) })
}, },
/** /**
...@@ -319,29 +338,42 @@ Page({ ...@@ -319,29 +338,42 @@ Page({
*/ */
onOrderRemove: function (event) { onOrderRemove: function (event) {
let that = this let that = this
wx.showLoading({ wx.lin.showDialog({
title: '处理中', type: "confirm",
mask: true title: "",
}) content: "是否确认删除订单",
this.setData({ success: (res) => {
isDoing: true if (res.confirm) {
}) console.log('用户点击确定')
let funcItem = event.target.dataset.item
App.wxRequest({ wx.showLoading({
url: '/api/v1/order/cancelOrder', title: '处理中',
data: { mask: true
'orderId': funcItem.id, })
'type': 1, this.setData({
}, isDoing: true
success: (response) => { })
wx.hideLoading() let funcItem = event.target.dataset.item
that.setData({ App.wxRequest({
isDoing: false, url: '/api/v1/order/cancelOrder',
'orderList': [], data: {
'orderPages': 1, 'orderId': funcItem.id,
}) 'type': 1,
that.queryOrder() },
console.log(response) success: (response) => {
wx.hideLoading()
that.setData({
isDoing: false,
'orderList': [],
'orderPages': 1,
})
that.queryOrder()
console.log(response)
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
} }
}) })
......
...@@ -13,21 +13,27 @@ ...@@ -13,21 +13,27 @@
<view> <view>
<view class="order-type-row row con-b align-c"> <view class="order-type-row row con-b align-c">
<block wx:for="{{orderType}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{orderType}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view wx:if="{{index < 3}}" class="order-type-item row con-c align-c {{orderTypeActive === index ? 'order-type-item-active' : ''}}" data-item="{{item}}" data-index="{{index}}" bindtap="onOrderTypeSelection"> <view wx:if="{{index < 3}}"
class="order-type-item row con-c align-c {{orderTypeActive === index ? 'order-type-item-active' : ''}}"
data-item="{{item}}" data-index="{{index}}" bindtap="onOrderTypeSelection">
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view>
</block> </block>
</view> </view>
<view class="order-type-row row con-b align-c"> <view class="order-type-row row con-b align-c">
<block wx:for="{{orderType}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{orderType}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view wx:if="{{3 <= index && index < 6}}" class="order-type-item row con-c align-c {{orderTypeActive === index ? 'order-type-item-active' : ''}}" data-item="{{item}}" data-index="{{index}}" bindtap="onOrderTypeSelection"> <view wx:if="{{3 <= index && index < 6}}"
class="order-type-item row con-c align-c {{orderTypeActive === index ? 'order-type-item-active' : ''}}"
data-item="{{item}}" data-index="{{index}}" bindtap="onOrderTypeSelection">
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view>
</block> </block>
</view> </view>
<view class="order-type-row row con-b align-c"> <view class="order-type-row row con-b align-c">
<block wx:for="{{orderType}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{orderType}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view wx:if="{{6 <= index && index < 9}}" class="order-type-item row con-c align-c {{orderTypeActive === index ? 'order-type-item-active' : ''}}" data-item="{{item}}" data-index="{{index}}" bindtap="onOrderTypeSelection"> <view wx:if="{{6 <= index && index < 9}}"
class="order-type-item row con-c align-c {{orderTypeActive === index ? 'order-type-item-active' : ''}}"
data-item="{{item}}" data-index="{{index}}" bindtap="onOrderTypeSelection">
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view>
</block> </block>
...@@ -39,7 +45,8 @@ ...@@ -39,7 +45,8 @@
<view class="container-order"> <view class="container-order">
<view class="status row con-b align-c fixed-tab"> <view class="status row con-b align-c fixed-tab">
<block wx:for="{{statusList}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{statusList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="status-item row con-c align-c {{index === statusActive ? 'status-item-active' : ''}}" data-type="{{index}}" bindtap="onSelectionStatus"> <view class="status-item row con-c align-c {{index === statusActive ? 'status-item-active' : ''}}"
data-type="{{index}}" bindtap="onSelectionStatus">
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view>
</block> </block>
...@@ -50,8 +57,10 @@ ...@@ -50,8 +57,10 @@
<view class="order-list-item col align-c" data-item="{{item}}" bindtap="onOrderDetail"> <view class="order-list-item col align-c" data-item="{{item}}" bindtap="onOrderDetail">
<view class="order-list-item-title row con-b align-c"> <view class="order-list-item-title row con-b align-c">
<view class="row align-c"> <view class="row align-c">
<image wx:if="{{item.shopLogo}}" src="{{resourcesBase + item.shopLogo}}" mode="heightFix"></image> <view class="logo-box">
<text>{{item.name}}</text> <image wx:if="{{item.shopLogo}}" src="{{resourcesBase + item.shopLogo}}" mode="aspectFit"></image>
</view>
<text>{{item.shopName}}</text>
</view> </view>
<view> <view>
<text class="warning" wx:if="{{item.status === 0}}">待付款</text> <text class="warning" wx:if="{{item.status === 0}}">待付款</text>
...@@ -71,24 +80,39 @@ ...@@ -71,24 +80,39 @@
</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:if="{{item.commodity.length>3}}">
<image class="cover" src="{{commodityItem.cover}}"></image> <block wx:for="{{item.commoditySlice3}}" wx:for-index="commodityIndex" wx:for-item="commodityItem"
wx:key="commodityIndex">
<image class="cover" src="{{commodityItem.cover}}"></image>
</block>
</block>
<block wx:else>
<block wx:for="{{item.commodity}}" wx:for-index="commodityIndex" wx:for-item="commodityItem"
wx:key="commodityIndex">
<image class="cover" src="{{commodityItem.cover}}"></image>
</block>
</block> </block>
<text class="total">{{'共 ' + item.commodity.length + ' 件'}}</text>
</view>
<text class="total">{{'共 ' + item.commodityBackup.length + ' 件'}}</text>
</view>
<view class="order-list-item-operation row con-b align-c"> <view class="order-list-item-operation row con-b align-c">
<view class="row align-c"> <view class="row align-c">
<text class="amount">实付:</text> <text class="amount">实付:</text>
<text class="amount">¥{{item.amount}}</text> <text class="amount">¥{{item.amount}}</text>
</view> </view>
<view class="row align-c"> <view class="row align-c">
<button wx:if="{{item.status === 0}}" class="delete row con-c align-c" data-index="{{index}}" data-item="{{item}}" catchtap="onOrderCancel" disabled="{{isDoing}}">取消订单</button> <button wx:if="{{item.status === 0}}" class="delete row con-c align-c" data-index="{{index}}"
<button disabled="{{isDoing}}" wx:if="{{item.status === -1 || item.status === 4}}" class="delete row con-c align-c" data-item="{{item}}" catchtap="onOrderRemove">删除订单</button> data-item="{{item}}" catchtap="onOrderCancel" disabled="{{isDoing}}">取消订单</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 0}}" class="again row con-c align-c" data-item="{{item}}" catchtap="onOrderPay">去支付</button> <button disabled="{{isDoing}}" wx:if="{{item.status === -1 || item.status === 4}}"
<button disabled="{{isDoing}}" wx:if="{{item.status === 2}}" class="again row con-c align-c" data-item="{{item}}" catchtap="onOrderUse">去使用</button> class="delete row con-c align-c" data-item="{{item}}" catchtap="onOrderRemove">删除订单</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 3}}" class="again row con-c align-c" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button> <button disabled="{{isDoing}}" wx:if="{{item.status === 0}}" class="again row con-c align-c"
<button disabled="{{isDoing}}" wx:if="{{item.status === -1}}" class="again row con-c align-c" data-item="{{item}}" catchtap="onOrderAgain">再次下单</button> data-item="{{item}}" catchtap="onOrderPay">去支付</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 2}}" class="again row con-c align-c"
data-item="{{item}}" catchtap="onOrderUse">去使用</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 3}}" class="again row con-c align-c"
data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === -1}}" class="again row con-c align-c"
data-item="{{item}}" catchtap="onOrderAgain">再次下单</button>
</view> </view>
</view> </view>
</view> </view>
...@@ -132,4 +156,6 @@ ...@@ -132,4 +156,6 @@
<image src="{{imageBase + 'icon/close-1.png'}}"></image> <image src="{{imageBase + 'icon/close-1.png'}}"></image>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file <!-- 确认框 -->
<l-dialog />
\ No newline at end of file
...@@ -149,10 +149,10 @@ page { ...@@ -149,10 +149,10 @@ page {
} }
.order-list-item-title image { .order-list-item-title image {
display: block; /* display: block;
max-width: 100rpx; max-width: 100rpx;
height: 60rpx; height: 60rpx;
margin-right: 20rpx; margin-right: 20rpx; */
} }
.order-list-item-service { .order-list-item-service {
...@@ -337,4 +337,17 @@ page { ...@@ -337,4 +337,17 @@ page {
text-align: center; text-align: center;
background: #86C5E1; background: #86C5E1;
border-radius: 4rpx; border-radius: 4rpx;
}
.logo-box {
width: 100rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
}
.logo-box image {
max-width: 100%!important;
max-height: 100%!important;
} }
\ No newline at end of file
...@@ -25,7 +25,7 @@ Page({ ...@@ -25,7 +25,7 @@ Page({
sealSrc: '', sealSrc: '',
shopConfig: App.globalData.shopId, shopConfig: App.globalData.shopId,
imgBasehost: App.globalData.appResourcesBase
}, },
...@@ -48,9 +48,8 @@ Page({ ...@@ -48,9 +48,8 @@ Page({
}, },
// 再次下单 // 再次下单
onOrderAgain: function (event) { onOrderAgain: function (event) {
let commodityType = this.data.orderInfo.commodityType let commodityType = this.data.orderInfo.commodityType
let shopAppId = wx.getStorageSync('shopInfoBuffer') ? wx.getStorageSync('shopInfoBuffer').appId : "" let shopAppId = this.data.orderInfo.shopInfo.appId //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}`,
}) })
...@@ -87,65 +86,66 @@ Page({ ...@@ -87,65 +86,66 @@ Page({
}) })
}, },
// 删除订单&取消订单 // 删除订单&取消订单
// type :1删除0取消
onDelOrCancelOrder: function (event) { 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 type = event.currentTarget.dataset.type
let that = this let that = this
wx.showLoading({ let tip = type == 1 ? '删除订单' : '取消订单'
title: '处理中', wx.lin.showDialog({
mask: true type: "confirm",
}) title: "",
this.setData({ content: "是否确认" + tip,
isDoing: true, success: (res) => {
}) if (res.confirm) {
App.wxRequest({ console.log('用户点击确定')
url: '/api/v1/order/cancelOrder', wx.showLoading({
data: { title: '处理中',
'orderId': this.data.orderInfo.id, mask: true
'type': type, })
}, this.setData({
success: (response) => { isDoing: true,
wx.hideLoading() })
let winToastText = type == 1 ? '订单删除成功' : '订单取消成功' App.wxRequest({
that.setData({ url: '/api/v1/order/cancelOrder',
isDoing: false, data: {
winToast: true, 'orderId': this.data.orderInfo.id,
winToastText: winToastText 'type': type,
}) },
setTimeout(function () { success: (response) => {
if (type == 1) { wx.hideLoading()
// 删除操作 let winToastText = type == 1 ? '订单删除成功' : '订单取消成功'
wx.redirectTo({ that.setData({
url: '/pages/mine/order/order', isDoing: false,
}) winToast: true,
} else { winToastText: winToastText
// 取消操作 })
let state = `orderInfo.state` setTimeout(function () {
that.setData({ if (type == 1) {
isDoing: false, // 删除操作
[state]: -1 wx.redirectTo({
url: '/pages/mine/order/order',
}) })
} } else {
// 取消操作
let state = `orderInfo.state`
that.setData({
isDoing: false,
[state]: -1
})
}
}, 2000)
}, 2000) }
})
} else if (res.cancel) {
console.log('用户点击取消')
}
} }
}) })
}, },
// 使用须知 // 使用须知
handleNotice() { handleNotice() {
...@@ -219,22 +219,20 @@ Page({ ...@@ -219,22 +219,20 @@ Page({
'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 'wxRequest': funcResponse.wxRequest,
'businessTime': funcResponse.businessTime, //营业时间
'expireTime': funcResponse.expireTime, //订单有效期
} }
// 设置印章 // 设置印章
let shopName = funcResponse.officeName; let shopName = funcResponse.officeName;
let shopFilter = this.data.shopConfig.filter( let shopFilter = this.data.shopConfig.filter(
item => { item => {
return item.name.toLowerCase() == shopName.toLowerCase() return item.name.toLowerCase() == shopName.toLowerCase()
} }
) )
funcOrderInfo.shopInfo = shopFilter[0] funcOrderInfo.shopInfo = shopFilter[0]
console.log(shopFilter[0], '-----------shopFilter[0]------'); console.log(shopFilter[0], '-----------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++) {
......
...@@ -55,14 +55,12 @@ ...@@ -55,14 +55,12 @@
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-describe">周一至周日 10:00 - 20:00</text> <text class="info-content-item-describe">{{orderInfo.businessTime}}</text>
</view> </view>
<image class="seal-shot" src="{{imgBasehost+orderInfo.shopInfo.print}}"></image> <image class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"></image>
</view> </view>
</block> </block>
<!-- 普通商品 --> <!-- 普通商品 -->
<block wx:if="{{orderInfo.commodityType === 2}}"> <block wx:if="{{orderInfo.commodityType === 2}}">
<view class="info-content col con-c"> <view class="info-content col con-c">
<view class="info-content-item row"> <view class="info-content-item row">
...@@ -71,7 +69,7 @@ ...@@ -71,7 +69,7 @@
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-describe">周一至周日 10:00 - 20:00</text> <text class="info-content-item-describe">{{orderInfo.businessTime}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
...@@ -82,19 +80,19 @@ ...@@ -82,19 +80,19 @@
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{orderInfo.contactPhone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{imgBasehost+orderInfo.shopInfo.print}}"></image> <image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"></image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state===2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b align-c">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{imgBasehost+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code col con-c align-c">
<text>{{'件商品可用'}}</text> <text>{{'件商品可用'}}</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onFastScan" class="row con-c align-c">一键扫码</button>
<text>{{'2019.09.30 - 2020.12.30'}}</text> <text>{{orderInfo.expireTime}}</text>
</view> </view>
</block> </block>
</block> </block>
...@@ -107,7 +105,7 @@ ...@@ -107,7 +105,7 @@
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-describe">周一至周日 10:00 - 20:00</text> <text class="info-content-item-describe">{{orderInfo.businessTime}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
...@@ -117,21 +115,21 @@ ...@@ -117,21 +115,21 @@
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">{{orderInfo.contactPhone}}</text> <text class="info-content-item-tip">{{orderInfo.contactPhone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{imgBasehost+orderInfo.shopInfo.print}}"></image> <image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"></image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state===2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b align-c">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{imgBasehost+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code col con-c align-c">
<text wx:if="{{orderInfo.commodityType === 5}}">{{'1件餐品可用'}}</text> <text wx:if="{{orderInfo.commodityType === 5}}">{{'1件餐品可用'}}</text>
<text wx:if="{{orderInfo.commodityType === 4}}">{{'1件商品可用'}}</text> <text wx:if="{{orderInfo.commodityType === 4}}">{{'1件商品可用'}}</text>
<text wx:if="{{orderInfo.commodityType === 3}}">{{orderInfo.commodity.length}}张门票可用</text> <text wx:if="{{orderInfo.commodityType === 3}}">{{orderInfo.commodity.length}}张门票可用</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onFastScan" class="row con-c align-c">一键扫码</button>
<text>{{'2019.09.30 - 2020.12.30'}}</text> <text>{{orderInfo.expireTime}}</text>
</view> </view>
</block> </block>
</block> </block>
...@@ -146,7 +144,7 @@ ...@@ -146,7 +144,7 @@
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">活动时间</text> <text class="info-content-item-label">活动时间</text>
<text class="info-content-item-describe">周一至周日 10:00 - 20:00</text> <text class="info-content-item-describe">{{orderInfo.businessTime}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">活动地点</text> <text class="info-content-item-label">活动地点</text>
...@@ -160,19 +158,19 @@ ...@@ -160,19 +158,19 @@
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">18030303030</text> <text class="info-content-item-tip">18030303030</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{imgBasehost+orderInfo.shopInfo.print}}"></image> <image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"></image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state===2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b align-c">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{imgBasehost+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code col con-c align-c">
<text>{{'张门票可用'}}</text> <text>{{'张门票可用'}}</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onFastScan" class="row con-c align-c">一键扫码</button>
<text>{{'2019.09.30 - 2020.12.30'}}</text> <text>{{orderInfo.expireTime}}</text>
</view> </view>
</block> </block>
...@@ -188,7 +186,7 @@ ...@@ -188,7 +186,7 @@
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">场次</text> <text class="info-content-item-label">场次</text>
<text class="info-content-item-describe">周一至周日 10:00 - 20:00</text> <text class="info-content-item-describe">{{orderInfo.businessTime}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
...@@ -198,19 +196,19 @@ ...@@ -198,19 +196,19 @@
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">18030303030</text> <text class="info-content-item-tip">18030303030</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{imgBasehost+orderInfo.shopInfo.print}}"></image> <image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{resourcesBase+orderInfo.shopInfo.print}}"></image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}"> <block wx:if="{{orderInfo.state===2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b align-c">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{imgBasehost+orderInfo.shopInfo.printUse}}"></image> <image class="seal-long" src="{{resourcesBase+orderInfo.shopInfo.printUse}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code col con-c align-c">
<text>{{'张电影票可用'}}</text> <text>{{'张电影票可用'}}</text>
<button bindtap="onFastScan" class="row con-c align-c">一键扫码</button> <button bindtap="onFastScan" class="row con-c align-c">一键扫码</button>
<text>{{'2019.09.30 - 2020.12.30'}}</text> <text>{{orderInfo.expireTime}}</text>
</view> </view>
</block> </block>
...@@ -231,7 +229,10 @@ ...@@ -231,7 +229,10 @@
</view> </view>
<view class="commodity-list"> <view class="commodity-list">
<view class="commodity-shop-info row align-c"> <view class="commodity-shop-info row align-c">
<image src="{{resourcesBase + shopInfo.logo}}"></image> <view class="logo-box">
<image src="{{resourcesBase + orderInfo.shopInfo.logo}}" mode="aspectFit"></image>
</view>
<text>{{orderInfo.officeName}}</text> <text>{{orderInfo.officeName}}</text>
</view> </view>
<block wx:for="{{orderInfo.commodity}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{orderInfo.commodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
...@@ -295,13 +296,13 @@ ...@@ -295,13 +296,13 @@
<image mode="widthFix" src="{{'data:image/jpg;base64,'+item.qrcode}}"></image> <image mode="widthFix" src="{{'data:image/jpg;base64,'+item.qrcode}}"></image>
</view> </view>
<view class="code-num-wrapper row align-c con-a"> <view class="code-num-wrapper row align-c con-a">
<view class="code-num-title {{codeUsed ? 'code-used' : ''}}">券码{{index+1}}:</view> <view class="code-num-title {{item.status==2 ? 'code-used' : ''}}">券码{{index+1}}:</view>
<view class="code-num {{codeUsed ? 'code-used' : ''}}">{{item.serialNumber}}</view> <view class="code-num {{item.status==2 ? 'code-used' : ''}}">{{item.serialNumber}}</view>
<view class="num-copy" wx:if="{{!codeUsed}}" bindtap="setClipboard" data-code="{{item.serialNumber}}" <view class="num-copy" wx:if="{{item.status!=2}}" bindtap="setClipboard" data-code="{{item.serialNumber}}"
data-index="{{index}}">复制</view> data-index="{{index}}">复制</view>
</view> </view>
<view class="code-used-seal" wx:if="{{codeUsed}}"> <view class="code-used-seal" wx:if="{{item.status==2}}">
<image mode="widthFix" src="./image/used.png"></image> <image mode="widthFix" src="{{resourcesBase+'mine/server/codeUsed.png'}}"></image>
</view> </view>
</view> </view>
</swiper-item> </swiper-item>
...@@ -364,4 +365,6 @@ ...@@ -364,4 +365,6 @@
<!-- 成功提示 --> <!-- 成功提示 -->
<l-toast l-image-class="toast-image" l-class="toast-bg" show="{{winToast}}" image="/image/success.png" <l-toast l-image-class="toast-image" l-class="toast-bg" show="{{winToast}}" image="/image/success.png"
title="{{winToastText}}" duration="2000"></l-toast> title="{{winToastText}}" duration="2000"></l-toast>
\ No newline at end of file <!-- 确认框 -->
<l-dialog />
\ No newline at end of file
...@@ -219,6 +219,7 @@ ...@@ -219,6 +219,7 @@
line-height: 32rpx; line-height: 32rpx;
color: #FFFFFF; color: #FFFFFF;
} }
.commodity-item-operation>button.btn-disabled { .commodity-item-operation>button.btn-disabled {
background: #C8E1EC; background: #C8E1EC;
color: #FFFFFF; color: #FFFFFF;
...@@ -820,4 +821,16 @@ ...@@ -820,4 +821,16 @@
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
}
.logo-box {
width: 100rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
}
.logo-box image {
max-width: 100%;
max-height: 100%;
} }
\ No newline at end of file
...@@ -135,10 +135,11 @@ Page({ ...@@ -135,10 +135,11 @@ Page({
case 2: case 2:
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContent: this.data.shoppingCartList[0].cover, buyContentTitle: this.data.shopInfo.name,
buyContentAmount: '360.00',
quantityTitle: '选择购买数量', quantityTitle: '选择购买数量',
quantityTipText: '剩余库存', quantityTipText: '剩余库存',
contactTitle: '填写购人信息', contactTitle: '填写购人信息',
winBuyContent: true, // 购买内容 winBuyContent: true, // 购买内容
winShoppingCart: false, // 购买清单 winShoppingCart: false, // 购买清单
...@@ -151,18 +152,16 @@ Page({ ...@@ -151,18 +152,16 @@ Page({
winButtonPay: true, // 立即支付 winButtonPay: true, // 立即支付
winButtonAppointment: false, // 确认预约 winButtonAppointment: false, // 确认预约
}) })
this.setStock() this.setStock()
break break
case 3: case 3:
this.setData({ this.setData({
orderType: logicData.option.type, orderType: logicData.option.type,
buyContentTitle: this.data.shopInfo.name, buyContent: this.data.shoppingCartList[0].cover,
buyContentAmount: '360.00',
quantityTitle: '选择购买数量', quantityTitle: '选择购买数量',
quantityTipText: '剩余库存', quantityTipText: '剩余库存',
contactTitle: '填写取货人信息', contactTitle: '填写购票人信息',
winBuyContent: true, // 购买内容 winBuyContent: true, // 购买内容
winShoppingCart: false, // 购买清单 winShoppingCart: false, // 购买清单
...@@ -175,6 +174,7 @@ Page({ ...@@ -175,6 +174,7 @@ Page({
winButtonPay: true, // 立即支付 winButtonPay: true, // 立即支付
winButtonAppointment: false, // 确认预约 winButtonAppointment: false, // 确认预约
}) })
this.setStock() this.setStock()
break break
......
...@@ -3,15 +3,13 @@ ...@@ -3,15 +3,13 @@
<view class="container"> <view class="container">
<!-- winBuyContent --> <!-- winBuyContent -->
<view class="buy-content" wx:if="{{winBuyContent}}"> <view class="buy-content" wx:if="{{winBuyContent}}">
<!-- 年卡月卡 -->
<view class="buy-content-pass" wx:if="{{orderType === 1}}"> <view class="buy-content-pass" wx:if="{{orderType === 1}}">
<image src="{{buyContent}}"></image> <image src="{{buyContent}}"></image>
</view> </view>
<view class="buy-content-pass" wx:if="{{orderType === 2}}"> <!-- 普通商品 -->
<image src="{{buyContent}}"></image> <view class="buy-content-service row align-c" wx:if="{{orderType === 2}}">
</view>
<view class="buy-content-service row align-c" wx:if="{{orderType === 3}}">
<view class="row con-c align-c"> <view class="row con-c align-c">
<image src="{{resourcesBase + shopInfo.cover}}"></image> <image src="{{resourcesBase + shopInfo.cover}}"></image>
</view> </view>
...@@ -21,6 +19,12 @@ ...@@ -21,6 +19,12 @@
</view> </view>
</view> </view>
<!-- 次票 -->
<view class="buy-content-pass" wx:if="{{orderType === 3}}">
<image src="{{buyContent}}"></image>
</view>
<!-- 文创商品 -->
<view class="buy-content-art" wx:if="{{orderType === 4}}"> <view class="buy-content-art" wx:if="{{orderType === 4}}">
<view class="buy-content-art-title"> <view class="buy-content-art-title">
<text>取货门店</text> <text>取货门店</text>
...@@ -36,6 +40,7 @@ ...@@ -36,6 +40,7 @@
</view> </view>
</view> </view>
<!-- 餐品 -->
<view class="buy-content-art" wx:if="{{orderType === 5}}"> <view class="buy-content-art" wx:if="{{orderType === 5}}">
<view class="buy-content-art-title"> <view class="buy-content-art-title">
<text>取货门店</text> <text>取货门店</text>
...@@ -55,6 +60,7 @@ ...@@ -55,6 +60,7 @@
</view> </view>
</view> </view>
<!-- 活动 -->
<view class="buy-content-activity row align-c" wx:if="{{orderType === 6}}"> <view class="buy-content-activity row align-c" wx:if="{{orderType === 6}}">
<image src="{{resourcesBase + shopInfo.cover}}"></image> <image src="{{resourcesBase + shopInfo.cover}}"></image>
<view class="buy-content-activity-info col con-b"> <view class="buy-content-activity-info col con-b">
...@@ -70,6 +76,7 @@ ...@@ -70,6 +76,7 @@
</view> </view>
</view> </view>
<!-- 电影 -->
<view class="buy-content-activity row align-c" wx:if="{{orderType === 7}}"> <view class="buy-content-activity row align-c" wx:if="{{orderType === 7}}">
<image src="{{resourcesBase + shopInfo.cover}}"></image> <image src="{{resourcesBase + shopInfo.cover}}"></image>
<view class="buy-content-activity-info col con-b"> <view class="buy-content-activity-info col con-b">
......
...@@ -2,7 +2,9 @@ const App = getApp() ...@@ -2,7 +2,9 @@ const App = getApp()
Page({ Page({
data: { data: {
bannerImg: App.globalData.appResourcesBase + 'play/home/type.png', imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
navigationLogoTop: 0, navigationLogoTop: 0,
navigationLogoMarginTop: 0, navigationLogoMarginTop: 0,
...@@ -12,25 +14,31 @@ Page({ ...@@ -12,25 +14,31 @@ Page({
strategyOriginList: [], strategyOriginList: [],
//接口参数 //接口参数
pageNo: 1, pageNo: 1,
pageSize: 3, pageSize: 10,
loading: false, loading: false,
moreData: true, moreData: true,
activity: [], activityList: [],
swiperActivityCurrent: 0, swiperRecentCurrent: 0,
movieList: [], movieList: [],
swiperMovieCurrent: 0, swiperMovieCurrent: 0,
touristRouteList: [],
}, },
onLoad: function (options) { onLoad: function (options) {
this.setNavigationLogo() this.setNavigationLogo()
this.loadVisiterPlanList()
}, },
onShow: function () { onShow: function () {
this.queryActivity() this.queryActivity()
this.queryMovie() this.queryMovie()
this.routeList()
}, },
/** /**
...@@ -57,7 +65,6 @@ Page({ ...@@ -57,7 +65,6 @@ Page({
* @returns * @returns
*/ */
queryActivity: function () { queryActivity: function () {
var that = this
App.wxRequest({ App.wxRequest({
url: '/api/v1/activity/getList', url: '/api/v1/activity/getList',
data: { data: {
...@@ -81,7 +88,7 @@ Page({ ...@@ -81,7 +88,7 @@ Page({
}) })
this.setData({ this.setData({
activity: tmpArr activityList: tmpArr
}) })
} }
}) })
...@@ -122,7 +129,7 @@ Page({ ...@@ -122,7 +129,7 @@ Page({
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].ownerPrice), // 业主价文本格式 'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].ownerPrice), // 业主价文本格式
'priceType': 1, 'priceType': 1,
'tagsId': funcResponse[i].tagIds, 'tagsId': funcResponse[i].tagIds,
'tags': funcResponse[i].tags.replace(/( )?热映影片( )?/, ' ').split(' '), 'tags': funcResponse[i].tags.split(' '),
} }
if (funcItem.tagsId.includes('102')) { if (funcItem.tagsId.includes('102')) {
funcList.push(funcItem) funcList.push(funcItem)
...@@ -148,9 +155,8 @@ Page({ ...@@ -148,9 +155,8 @@ Page({
}, },
onActivityDetail: function (funcItem) { onActivityDetail: function (funcItem) {
console.log(funcItem)
wx.navigateTo({ wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.currentTarget.dataset.id url: '/pages/play/activity-detail/activity-detail?id=' + funcItem.currentTarget.dataset.item.id
}) })
}, },
...@@ -191,10 +197,10 @@ Page({ ...@@ -191,10 +197,10 @@ Page({
}, },
// 近期活动swiper // 近期活动swiper
swiperActivityChange: function (e) { swiperRecentChange: function (e) {
let swiperActivityCurrent = e.detail.current let swiperRecentCurrent = e.detail.current
this.setData({ this.setData({
swiperActivityCurrent swiperRecentCurrent
}) })
}, },
// 热门电影swiper // 热门电影swiper
...@@ -223,84 +229,56 @@ Page({ ...@@ -223,84 +229,56 @@ Page({
url: '/pages/play/movie-detail/movie-detail?id=' + id url: '/pages/play/movie-detail/movie-detail?id=' + id
}) })
}, },
// 游客攻略列表
loadVisiterPlanList() { /**
this.data.loading = true * 查询游客攻略
var that = this * @function
* @param
* @returns
*/
routeList: function () {
App.wxRequest({ App.wxRequest({
url: '/api/v1/strategy/getList', url: '/api/v1/strategy/getList',
data: { pageSize: that.data.pageSize+'', pageNo: that.data.pageNo+''}, data: { pageSize: this.data.pageSize + '', pageNo: this.data.pageNo + '' },
success: function (res) { success: (response) => {
that.setData({ let funcResponse = response.data
loading: false let funcList = []
}) for (let i = 0, l = funcResponse.list.length; i < l; i++) {
if (res.data.list.length > 0) { let funcItem = {
let count = that.data.strategyOriginList.length 'id': funcResponse.list[i].id,
if (that.data.pageNo == 1) { 'cover': funcResponse.list[i].cover,
count = 0 'title': funcResponse.list[i].title,
} 'content': funcResponse.list[i].content,
let tempArray = [] 'date': funcResponse.list[i].updateDate,
for(let i = 0; i < res.data.list.length; i++) { 'tags': funcResponse.list[i].tags.split('#'),
let item = res.data.list[i] // 'isTop': Number(funcResponse.list[i].top) === 1 ? true : false,
let strategy = { // 'topCover': '',
id: item.id,
image: (count == 0 && i == 0) ? item.topImg : item.cover,
title: item.title,
date: item.updateDate,
index: count + i - 1,
tags: item.tags.split('#')
}
tempArray.push(strategy)
}
// console.log('tempArray', tempArray)
if (that.data.pageNo == 1) {
var newArr = tempArray.slice(1)
var firstItem = tempArray[0]
// console.log('firstItem', firstItem)
that.setData({
moreData: (tempArray.length >= Number(res.data.count)) ? false : true,
['strategyFirstItem.id']: firstItem.id,
['strategyFirstItem.image']: firstItem.image,
['strategyFirstItem.title']: firstItem.title,
['strategyFirstItem.date']: firstItem.date,
strategyList: newArr,
strategyOriginList: tempArray,
})
} else {
that.setData({
moreData: (count + tempArray.length >= Number(res.data.count)) ? false : true,
strategyOriginList: that.data.strategyOriginList.concat(tempArray),
strategyList: tempArray,
})
} }
// 游客攻略瀑布列表
wx.lin.renderWaterFlow(that.data.strategyList, that.data.pageNo == 1 ? true : false, () => {})
} else {
// if (funcItem) funcItem.topCover = funcResponse.list[i].topImg
funcList.push(funcItem)
} }
},
fail: function(err) { this.setData({
that.setData({ touristRouteList: funcList
loading: false
}) })
},
fail: (err) => {
} }
}) })
}, },
onReachBottom: function() { /**
console.log('触底啦') * 游客攻略详情
if (this.data.loading || !this.data.moreData) { * @function
return * @param
} * @returns
this.data.pageNo += 1 */
this.loadVisiterPlanList() onTouristRouteDetail: function (event) {
let funcItem = event.currentTarget.dataset.item
},
// 游客攻略详情
onStrategyDetail: function (funcItem) {
console.log(funcItem)
wx.navigateTo({ wx.navigateTo({
url: '/pages/play/strategy-detail/strategy-detail?id=' + funcItem.detail.item.id url: '/pages/play/strategy-detail/strategy-detail?id=' + funcItem.id
}) })
}, },
}) })
\ No newline at end of file
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
<image src="./image/title-minor.png"></image> <image src="./image/title-minor.png"></image>
</view> </view>
<!-- 畅玩分类 -->
<view class="banner"> <view class="banner">
<image src="{{bannerImg}}"></image> <image src="{{resourcesBase + 'play/home/type.png'}}"></image>
<button class="art-button" bindtap="onToArt"></button> <button class="art-button" bindtap="onToArt"></button>
<button class="health-button" bindtap="onToHealth"></button> <button class="health-button" bindtap="onToHealth"></button>
<button class="food-button" bindtap="onToFood"></button> <button class="food-button" bindtap="onToFood"></button>
...@@ -15,24 +16,26 @@ ...@@ -15,24 +16,26 @@
<button class="hotel-button" bindtap="onToHotel"></button> <button class="hotel-button" bindtap="onToHotel"></button>
</view> </view>
<!-- 近期活动 -->
<view class="title row con-b align-c"> <view class="title row con-b align-c">
<image src="./image/title-activity.png">近期活动</image> <image src="./image/title-activity.png"></image>
<text bindtap="onAllActivity" bindtap="onAllActivity">查看全部</text> <text bindtap="onAllRecent" bindtap="onAllActivity">查看全部</text>
</view> </view>
<swiper class="activity-swiper" next-margin="38rpx" bindchange="swiperActivityChange"> <swiper class="activity-swiper" next-margin="38rpx" bindchange="swiperRecentChange">
<block wx:for="{{activity}}" wx:key="id"> <block wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="activity-item" bindtap="onActivityDetail" data-id="{{item.id}}"> <swiper-item class="activity-item" data-item="{{item}}" bindtap="onActivityDetail">
<image class="{{swiperActivityCurrent === index ? 'activity-item-left' : '' }} {{swiperActivityCurrent === activity.length - 1 ? 'activity-item-center' : ''}}" src="{{item.cover}}"></image> <image class="{{swiperRecentCurrent === index ? 'activity-item-left' : '' }} {{swiperRecentCurrent === banner.length - 1 ? 'activity-item-center' : ''}}" src="{{item.cover}}"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
<!-- 热映影片 -->
<view class="title row con-b align-c"> <view class="title row con-b align-c">
<image src="./image/title-movie.png">热映影片</image> <image src="./image/title-movie.png"></image>
<text bindtap="onAllMovie">查看全部</text> <text bindtap="onAllMovie">查看全部</text>
</view> </view>
<swiper class="movie-swiper" next-margin="38rpx" bindchange="swiperMovieChange"> <swiper class="movie-swiper" next-margin="38rpx" bindchange="swiperMovieChange">
<block wx:for="{{movieList}}" wx:key="id"> <block wx:for="{{movieList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="movie-item col con-e"> <swiper-item class="movie-item col con-e">
<view class="movie-wrapper {{swiperMovieCurrent === index ? 'movie-item-left' : '' }} {{swiperMovieCurrent === movieList.length - 1 ? 'movie-item-center' : ''}}" bindtap="onMovieDetail" data-id="{{item.name}}"> <view class="movie-wrapper {{swiperMovieCurrent === index ? 'movie-item-left' : '' }} {{swiperMovieCurrent === movieList.length - 1 ? 'movie-item-center' : ''}}" bindtap="onMovieDetail" data-id="{{item.name}}">
<view class="movie-cover"> <view class="movie-cover">
...@@ -44,7 +47,7 @@ ...@@ -44,7 +47,7 @@
<text>{{item.movieName}}</text> <text>{{item.movieName}}</text>
</view> </view>
<view class="movie-tags row"> <view class="movie-tags row">
<block wx:for="{{item.tags}}" wx:for-item="tags" wx:key="index"> <block wx:for="{{item.tags}}" wx:for-index="index" wx:for-item="tags" wx:key="index">
<text>{{tags}}</text> <text>{{tags}}</text>
</block> </block>
</view> </view>
...@@ -76,11 +79,47 @@ ...@@ -76,11 +79,47 @@
<!-- 游客攻略 --> <!-- 游客攻略 -->
<view class="route"> <view class="route">
<view class="title row align-c"> <block wx:if="{{touristRouteList.length > 0}}">
<image src="./image/title-route.png">游客攻略</image> <view class="title row align-c">
</view> <image src="./image/title-route.png"></image>
<view style="margin-top: 50rpx"> </view>
<l-water-flow column-gap="15rpx" generic:l-water-flow-item="strategy-item" bind:linitemtap="onStrategyDetail"></l-water-flow> <view class="route-list row con-b">
</view> <!-- 左侧列表 -->
<view class="route-list-left">
<block wx:for="{{touristRouteList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="route-item" wx:if="{{index % 2 === 0}}" data-item="{{item}}" bindtap="onTouristRouteDetail">
<view class="row con-c align-c">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="route-item-tags row align-c">
<block wx:for="{{item.tags}}" wx:for-index="indexTags" wx:for-item="itemTags" wx:key="indexTags">
<text>{{'# ' + itemTags}}</text>
</block>
</view>
<text class="route-item-title">{{item.title}}</text>
<text class="route-item-content">{{item.date}}</text>
</view>
</block>
</view>
<!-- 右侧列表 -->
<view class="route-list-right">
<block wx:for="{{touristRouteList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="route-item" wx:if="{{index % 2 === 1}}" data-item="{{item}}" bindtap="onTouristRouteDetail">
<view class="row con-c align-c">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
<view class="route-item-tags row align-c">
<block wx:for="{{item.tags}}" wx:for-index="indexTags" wx:for-item="itemTags" wx:key="indexTags">
<text>{{'# ' + itemTags}}</text>
</block>
</view>
<text class="route-item-title">{{item.title}}</text>
<text class="route-item-content">{{item.date}}</text>
</view>
</block>
</view>
</view>
</block>
</view> </view>
</view> </view>
\ No newline at end of file
/* page { .title {
background: linear-gradient(180deg, #FFFFFF 0%, #F2F2F2 100%); width: 670rpx;
} */ margin-top: 30rpx;
}
.navigation { .title > image {
z-index: 1900; width: 184rpx;
height: 44rpx;
} }
/* 顶部标题 */
.logo { .logo {
z-index: 1900; z-index: 1900;
position: fixed; position: fixed;
...@@ -30,6 +33,7 @@ ...@@ -30,6 +33,7 @@
height: 20rpx; height: 20rpx;
} }
/* 畅玩分类 */
.banner { .banner {
position: relative; position: relative;
margin-top: 200rpx; margin-top: 200rpx;
...@@ -37,6 +41,11 @@ ...@@ -37,6 +41,11 @@
height: 1200rpx; height: 1200rpx;
} }
.banner > image {
width: 750rpx;
height: 1200rpx;
}
.art-button { .art-button {
position: absolute; position: absolute;
top: 40rpx; top: 40rpx;
...@@ -82,14 +91,7 @@ ...@@ -82,14 +91,7 @@
background: transparent; background: transparent;
} }
/* 近期活动 */
.all {
width: 104rpx;
height: 36rpx;
background-color: #ccc;
}
.activity-swiper { .activity-swiper {
width: 750rpx; width: 750rpx;
height: 721rpx; height: 721rpx;
...@@ -114,6 +116,7 @@ ...@@ -114,6 +116,7 @@
margin-left: 51rpx; margin-left: 51rpx;
} }
/* 热映影片 */
.movie-swiper { .movie-swiper {
width: 750rpx; width: 750rpx;
height: 366rpx; height: 366rpx;
...@@ -121,6 +124,11 @@ ...@@ -121,6 +124,11 @@
padding-bottom: 50rpx; padding-bottom: 50rpx;
} }
.movie-swiper image {
width: 100%;
height: 100%;
}
.movie-item { .movie-item {
width: 712rpx; width: 712rpx;
} }
...@@ -214,209 +222,80 @@ ...@@ -214,209 +222,80 @@
border-radius: 4rpx; border-radius: 4rpx;
} }
/* .banner, /* 游客攻略 */
swiper { .route {
position: relative;
width: 100%;
min-height: 480rpx;
margin-top: 100rpx;
} */
/*
swiper-item {
position: relative;
left: 56rpx;
width: 638rpx !important;
height: 480rpx !important;
} */
.banner-content {
width: 638rpx;
height: 408rpx;
margin-top: 36rpx;
padding: 0 24rpx;
border-radius: 2px;
overflow: hidden;
}
.banner-content-active {
width: 638rpx;
height: 480rpx;
border-radius: 2px;
overflow: hidden;
transition: all 0.2s ease-in 0s;
}
/* 更多活动 */
.activity {
width: 100%;
height: 34rpx;
margin-top: 32rpx;
padding: 0 56rpx;
font-size: 26rpx;
font-weight: bolder;
color: #1e2025;
}
.activity image {
width: 32rpx;
height: 32rpx;
}
/* 装饰波浪 */
.ornament-wave {
width: 750rpx;
height: 60rpx;
margin-top: 20rpx;
}
.ornament-wave image {
width: 750rpx;
height: 60rpx;
}
/* 标签选择 */
.tab {
width: 100%;
padding: 40rpx 40rpx 0 40rpx;
background: #fff;
}
.tab-fixed {
z-index: 1700;
position: fixed;
top: 68px;
left: 0;
padding: 40rpx;
}
.tab-blank {
width: 750rpx; width: 750rpx;
height: 190rpx; padding: 0 40rpx 100rpx 40rpx;
background: #fff; background: linear-gradient(180deg, #FFFFFF 0%, #F2F2F2 100%);
}
.tab .tab-item-active {
width: 100rpx;
height: 100rpx;
margin-bottom: 16rpx;
border-radius: 50%;
background: #e3eeff;
}
.tab .tab-item-inactive {
width: 100rpx;
height: 100rpx;
margin-bottom: 16rpx;
border-radius: 50%;
background: #f5f6f8;
}
.tab .tab-item-text-active {
color: #15191f;
}
.tab .tab-item-text-inactive {
color: #959da9;
} }
.tab-item text { .route-list {
font-size: 24rpx; margin-top: 50rpx;
text-align: center;
} }
.tab-item image { .route-list-left,
width: 52rpx; .route-list-right {
height: 52rpx; width: 328rpx;
} }
/* 标签详情 */ .route-item {
display: flex;
.detail { flex-direction: column;
width: 750rpx; max-width: 328rpx;
min-height: 500rpx; margin-top: 16rpx;
background: #fefefe; border-radius: 4rpx;
overflow: hidden;
background: #ffffff;
} }
.detail image { .route-item image {
display: block; height: 468rpx;
width: 100%;
height: 100%;
} }
/* 商店详情 */ .route-list-right .route-item:first-child image {
height: 354rpx;
.shop-item {
position: relative;
width: 750rpx;
height: 1152rpx;
background: #f3f6fc;
} }
.shop-item image { .route-item-title {
display: block; display: -webkit-box;
width: 750rpx; margin: 24rpx 20rpx;
height: 1152rpx; font-size: 26rpx;
font-size: 0; font-weight: bolder;
} color: #000000;
.shop-item .button {
position: absolute;
width: 534rpx;
height: 96rpx;
background: #86c5e1;
border-radius: 2px;
overflow: hidden; overflow: hidden;
font-size: 30rpx; text-overflow: ellipsis;
font-weight: 500; line-clamp: 2;
color: #fff; -webkit-line-clamp: 2;
line-height: 42rpx; -webkit-box-orient: vertical;
}
image {
width: 100%;
height: 100%;
} }
/* 游客攻略 */ .route-item-tags {
.route { flex-wrap: wrap;
padding: 0 40rpx; height: 32rpx;
background: linear-gradient(180deg, #FFFFFF 0%, #F2F2F2 100%); margin-top: 24rpx;
} padding: 0 24rpx;
.title {
width: 670rpx;
margin-top: 30rpx;
}
.title > image {
width: 184rpx;
height: 44rpx;
}
.strategy-content {
z-index: 3;
position: relative;
width: 670rpx;
height: 320rpx;
margin-top: 32rpx;
border-radius: 2px;
overflow: hidden; overflow: hidden;
word-wrap: break-word;
} }
.strategy-content .operation { .route-item-tags text {
position: absolute; display: inline-block;
bottom: 32rpx; height: 32rpx;
margin: 0 40rpx; margin-right: 16rpx;
} padding: 0 12rpx;
border-radius: 4px;
background: #15191F;
.strategy-content .operation text { white-space: nowrap;
/* height: 40rpx; */ font-size: 18rpx;
font-size: 38rpx; font-weight: 500;
font-weight: 800; line-height: 32rpx;
color: #ffffff; color: #FFFFFF;
} }
.detail-item {
margin-top: 58rpx; .route-item-content {
margin: 0 24rpx 24rpx 24rpx;
font-size: 22rpx;
color: #959DA9;
} }
\ No newline at end of file
...@@ -17,8 +17,7 @@ Page({ ...@@ -17,8 +17,7 @@ Page({
this.setData({ this.setData({
bannerHeight: wx.getSystemInfoSync().windowHeight bannerHeight: wx.getSystemInfoSync().windowHeight
}) })
// this.queryDetail(Number(options.id)) this.queryDetail(Number(options.id))
this.queryDetail(1)
}, },
/** /**
......
...@@ -72,7 +72,7 @@ Page({ ...@@ -72,7 +72,7 @@ Page({
this.setData({ this.setData({
option: options option: options
}) })
console.log(this.data.option)
this.queryDetail(Number(options.id)) this.queryDetail(Number(options.id))
if (Number(options.id) === 2) { if (Number(options.id) === 2) {
this.queryDetailMovie() this.queryDetailMovie()
...@@ -225,7 +225,7 @@ Page({ ...@@ -225,7 +225,7 @@ Page({
], ],
shareImage: App.globalData.appResourcesBase + 'share/share-13.png', shareImage: App.globalData.appResourcesBase + 'share/share-13.png',
name: '原野MOJITO', name: '原野MOJITO',
title: '原味舒食', title: '原野MOJITO',
date: '周一至周日 10:00 - 凌晨02:00', date: '周一至周日 10:00 - 凌晨02:00',
describe: [ describe: [
App.globalData.appResourcesBase + 'shop/detail/detail-3-2-1.png', App.globalData.appResourcesBase + 'shop/detail/detail-3-2-1.png',
...@@ -292,12 +292,10 @@ Page({ ...@@ -292,12 +292,10 @@ Page({
break break
} }
} }
console.log(funcIndex)
// 缓存当前商店信息 // 缓存当前商店信息
for (let i = 0, l = App.globalData.shopId.length; i < l; i++) { for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
if (funcAppId === App.globalData.shopId[i].appId) { if (funcAppId === App.globalData.shopId[i].appId) {
console.log(funcAppId)
let funcItem = { let funcItem = {
'id': App.globalData.shopId[i].id, 'id': App.globalData.shopId[i].id,
'appId': App.globalData.shopId[i].appId, 'appId': App.globalData.shopId[i].appId,
...@@ -343,7 +341,6 @@ Page({ ...@@ -343,7 +341,6 @@ Page({
let shopInfo = wx.getStorageSync('shopInfoBuffer') let shopInfo = wx.getStorageSync('shopInfoBuffer')
let officeId = shopInfo.id let officeId = shopInfo.id
let genre = shopInfo.shopType let genre = shopInfo.shopType
console.log(shopInfo)
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/recommend', url: '/api/v1/commodity/recommend',
data: { data: {
...@@ -353,7 +350,6 @@ Page({ ...@@ -353,7 +350,6 @@ Page({
}, },
success: function(res) { success: function(res) {
let funcResponse = res.data let funcResponse = res.data
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 = {
...@@ -457,7 +453,6 @@ Page({ ...@@ -457,7 +453,6 @@ Page({
}, },
onPageScroll: function (funcEvent) { onPageScroll: function (funcEvent) {
// console.log(funcEvent)
// 优化滚动事件触发频率 // 优化滚动事件触发频率
if (logicData.pageScrollLock) return if (logicData.pageScrollLock) return
logicData.pageScrollLock = true logicData.pageScrollLock = true
...@@ -577,7 +572,6 @@ Page({ ...@@ -577,7 +572,6 @@ Page({
}) })
}, },
onToBuy: function (event) { onToBuy: function (event) {
console.log(event.currentTarget.dataset)
let id = event.currentTarget.dataset.id let id = event.currentTarget.dataset.id
let classifyId = event.currentTarget.dataset.classid let classifyId = event.currentTarget.dataset.classid
wx.navigateTo({ wx.navigateTo({
......
...@@ -3,7 +3,7 @@ let logicData = { ...@@ -3,7 +3,7 @@ let logicData = {
pageScrollTimer: 0, pageScrollTimer: 0,
} }
const app = getApp() const App = getApp()
Page({ Page({
data: { data: {
...@@ -16,39 +16,148 @@ Page({ ...@@ -16,39 +16,148 @@ Page({
detailImage: [], detailImage: [],
detailImageUrl: [], detailImageUrl: [],
detailIndex: 0, detailIndex: 0,
relation: [],
date: '', date: '',
//接口参数 //接口参数
id: '', id: '',
relation: [], // 文中提及列表
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
id: options.id, id: options.id,
}) })
var that = this this.queryTouristRouteDetail()
app.login({ },
success: function() {
that.loadStrategyDetail() /**
* 游客攻略详情
* @function
* @param
* @returns
*/
queryTouristRouteDetail() {
App.wxRequest({
url: '/api/v1/strategy/getDetail',
data: { id: this.data.id },
success: (res) => {
// 此代码段处理目的为,匹配富文本代码中的 <img> 标签,并将其图片的宽度修改为适应屏幕
// width:100% --- 图片宽度加以限制,避免超出屏幕
// height:auto --- 高度自适应
// display:block --- 此代码,可以去掉图片之间的空白间隔,个人觉得好用
let content = res.data.content
.replace(/<img/gi, '<img style="width:100%;height:auto;display:block" ')
.replace(/<table/gi, '<table style="max-width:100%;height:auto;display:block" ')
.replace(/<section/g, '<div')
.replace(/\/section>/g, '\div>');
this.setData({
banner: res.data.banners,
content: content,
date: res.data.updateDate,
title: res.data.title
})
this.queryRelation(res.data.smParkIds)
},
})
},
/**
* 文中提及列表
* @function
* @param
* @returns
*/
queryRelation: function (parkIds) {
if (!parkIds) {
return
}
App.wxRequest({
url: '/api/v1/park/getParksByParkIds',
data: { smParkIds: parkIds },
success: (response) => {
let funcResponse = response.data
let funcList = []
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id,
'cover': funcResponse[i].cardImg,
'title': funcResponse[i].name,
'time': '营业时间 ' + funcResponse[i].businessTime,
'price': funcResponse[i].chargeStandard,
'describe': '',
}
funcList.push(funcItem)
}
this.setData({
relation: funcList
})
} }
}) })
}, },
onSwiperChange: function (funcEvent) { /**
* 文中提及跳转
* @function
* @param
* @returns
*/
onRelation: function (event) {
let funcShopId = event.currentTarget.dataset.id
let funcShopAppId = ''
for (let i = 0, l = App.globalData.pointInfo.length; i < l; i++) {
if (funcShopId === App.globalData.pointInfo[i].id) {
funcShopAppId = App.globalData.pointInfo[i].appId
break
}
}
if (funcShopAppId && funcShopAppId !== 3) {
wx.navigateTo({
url: '/pages/play/service-detail/service-detail?id=' + funcShopAppId
})
return
}
if (funcShopAppId && funcShopAppId === 3) {
wx.navigateTo({
url: '/pages/campsite/home-mirror/home-mirror'
})
return
}
},
/**
* banner 变换事件
* @function
* @param
* @returns
*/
eventSwiperChange: function (event) {
this.setData({ this.setData({
bannerIndex: funcEvent.detail.current bannerIndex: event.detail.current
}) })
}, },
onPageScroll: function(funcEvent) { /**
* 页面滚动事件
* @function
* @param
* @returns
*/
eventPageScroll: function (event) {
// 优化滚动事件触发频率 // 优化滚动事件触发频率
if (logicData.pageScrollLock) return if (logicData.pageScrollLock) return
logicData.pageScrollLock = true logicData.pageScrollLock = true
if (funcEvent.scrollTop > 40 && !this.data.isNavigationWhite) { if (event.scrollTop > 40 && !this.data.isNavigationWhite) {
this.setData({ this.setData({
isNavigationWhite: true isNavigationWhite: true
}) })
...@@ -58,7 +167,7 @@ Page({ ...@@ -58,7 +167,7 @@ Page({
}) })
} }
if (funcEvent.scrollTop <= 40) { if (event.scrollTop <= 40) {
this.setData({ this.setData({
isNavigationWhite: false isNavigationWhite: false
}) })
...@@ -74,102 +183,4 @@ Page({ ...@@ -74,102 +183,4 @@ Page({
clearTimeout(logicData.pageScrollTimer) clearTimeout(logicData.pageScrollTimer)
}, 40) }, 40)
}, },
// 攻略详情
loadStrategyDetail() {
var that = this
app.wxRequest({
url: '/api/v1/strategy/getDetail',
data: { id: that.data.id },
success: function(res) {
/**
* 此代码段处理目的为,匹配富文本代码中的 <img> 标签,并将其图片的宽度修改为适应屏幕
* width:100% --- 图片宽度加以限制,避免超出屏幕
* height:auto --- 高度自适应
* display:block --- 此代码,可以去掉图片之间的空白间隔,个人觉得好用
*/
var content = res.data.content.replace(/<img/gi, '<img style="width:100%;height:auto;display:block" ')
.replace(/<table/gi, '<table style="max-width:100%;height:auto;display:block" ')
.replace(/<section/g, '<div')
.replace(/\/section>/g, '\div>');
that.setData({
banner: res.data.banners,
content: content,
date: res.data.updateDate,
title: res.data.title
})
that.getParksByParkIds(res.data.smParkIds)
},
})
},
shopDetail(e) {
let datasetId = e.currentTarget.dataset.id
let id = ''
if (datasetId == '21a0cbbd39604380bc46fba38ac5fb63') {
// 海错图展馆
id = 1
} else if (datasetId == 'b8f04379bf164b7f8bca69be14146a17') {
// 拾光花坊
id = 2
} else if (datasetId == 'd8922a8f759245d4949b62693099edb5') {
// 元养水韵SPA馆
id = 3
} else if (datasetId == 'd0e5ff414f794e15bc33c4e11f5356a8') {
// 原味舒食
id = 4
} else if (datasetId == '81078c007c034d46b7dfe59935d84f7a') {
// 原野MOJITO
id = 5
} else if (datasetId == '29e79743f0f94e5eb726e0ebdfe64248') {
// 星空影院
id = 6
} else if (datasetId == '559d980e9eaf4459883fb3a556d24347') {
// 儿童营地信息
wx.navigateTo({
url: '/pages/campsite-mirror/campsite-mirror',
})
} else if (datasetId == 'c0a2d795a7a54dcd9459dd1b969c1771') {
// 住宿信息
}
if (id != '') {
wx.navigateTo({
url: '/pages/shop-detail/shop-detail?id=' + id
})
}
},
// 攻略详情文中提及
getParksByParkIds(parkIds) {
if (!parkIds) {
return
}
var that = this
app.wxRequest({
url: '/api/v1/park/getParksByParkIds',
data: { smParkIds: parkIds },
success: function(res) {
var tmpArr = [];
res.data.forEach(item => {
var tmpItem = {
'id': item.id,
'cover': item.guideImg,
'title': item.name,
'time': '营业时间 ' + item.businessTime,
'price': item.chargeStandard,
'describe': '',
}
tmpArr.push(tmpItem)
})
that.setData({
relation: tmpArr
})
}
})
}
}) })
\ No newline at end of file
{ {
"usingComponents": { "usingComponents": {
"parser":"../../component/parser.min/parser" "parser": "../../component/parser.min/parser"
} }
} }
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<view class="container"> <view class="container">
<view id="banner" class="banner"> <view id="banner" class="banner">
<swiper class="banner-swiper" autoplay circular interval="2000" duration="500" indicator-color="rgba(0, 0, 0, 0)" indicator-active-color="rgba(0, 0, 0, 0)" bindchange="onSwiperChange"> <swiper class="banner-swiper" autoplay circular interval="2000" duration="500" indicator-color="rgba(0, 0, 0, 0)" indicator-active-color="rgba(0, 0, 0, 0)" bindchange="eventPageScroll">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item"> <swiper-item class="banner-swiper-item">
<image class="banner-swiper-image" src="{{item}}"></image> <image class="banner-swiper-image" src="{{item}}"></image>
...@@ -32,22 +32,22 @@ ...@@ -32,22 +32,22 @@
<text>{{date}}</text> <text>{{date}}</text>
</view> </view>
</view> </view>
<view class="relation" wx:if="{{relation.length>0}}"> <view class="relation" wx:if="{{relation.length>0}}">
<view class="relation-title"> <view class="relation-title">
<text>文中提及</text> <text>文中提及</text>
</view> </view>
<block wx:for="{{relation}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{relation}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="relation-item row con-b align-c" data-id="{{item.id}}" bindtap="shopDetail"> <view class="relation-item row con-b align-c" data-id="{{item.id}}" bindtap="onRelation">
<image mode="widthFix" src="{{item.cover}}"></image> <image mode="widthFix" src="{{item.cover}}"></image>
<view class="relation-item-info col"> <view class="relation-item-info col">
<text>{{item.title}}</text> <text>{{item.title}}</text>
<text>{{item.time}}</text> <text>{{item.time}}</text>
<text>{{item.price}}</text> <text>{{item.price}}</text>
</view>
<view class="relation-item-more row align-c">
<image src="/image/more-g.png"></image>
</view>
</view> </view>
</block> <view class="relation-item-more row align-c">
<image src="/image/more-g.png"></image>
</view>
</view>
</block>
</view> </view>
</view> </view>
...@@ -131,137 +131,4 @@ rich-text { ...@@ -131,137 +131,4 @@ rich-text {
.relation-item-more image { .relation-item-more image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
}.navigation {
z-index: 1900;
position: fixed;
top: 0;
left: 0;
width: 750rpx;
}
.banner {
position: relative;
width: 750rpx;
height: 870rpx;
background: #ffffff;
}
.banner-swiper,
.banner-swiper-item,
.banner-swiper-image {
position: absolute;
top: 0 !important;
left: 0 !important;
width: 750rpx;
height: 870rpx;
}
.banner-swiper-point {
position: relative;
top: 760rpx;
left: 0;
}
.detail {
width: 750rpx;
padding: 6px 32rpx;
}
.detail-title {
width: 670rpx;
margin: 80rpx 0 64rpx 0;
font-size: 38rpx;
font-weight: 800;
color:#15191F;
line-height: 52rpx;
}
.detail-date {
/* width: 152rpx; */
height: 40rpx;
margin: 64rpx 0 32rpx 0;
font-size: 26rpx;
font-weight: 400;
color: #959DA9;
line-height: 40rpx;
}
.detail > image {
min-width: 100%;
}
rich-text {
margin-bottom: 52rpx;
font-size: 30rpx;
font-weight: 300;
color: #15191F;
line-height: 52rpx;
}
/* 攻略相关 */
.relation-title {
margin: 0 40rpx 90rpx 40rpx;
padding-top: 64rpx;
border-top: 1px #E2E7EF solid;
}
.relation-title text {
width: 120rpx;
height: 42rpx;
margin-top: 40rpx;
font-size: 30rpx;
font-weight: bold;
color:rgba(21,25,31,1);
}
.relation-item {
position: relative;
width: 670rpx;
height: 238rpx;
margin: 0 40rpx 104rpx 40rpx;
background:rgba(245, 246, 248, 1);
border-radius: 2px;
}
.relation-item > image {
position: absolute;
top: -24rpx;
left: 24rpx;
width: 176rpx;
height: 214rpx;
border-radius: 2px;
overflow: hidden;
}
.relation-item {
padding: 32rpx 32rpx 48rpx 230rpx;
}
.relation-item-info text:nth-child(1) {
font-size: 30rpx;
font-weight: bold;
line-height: 42rpx;
color:rgba(21, 25, 31, 1);
}
.relation-item-info text:nth-child(2) {
margin-top: 30rpx;
font-size: 26rpx;
line-height: 36rpx;
color: #656E7B;
}
.relation-item-info text:nth-child(3) {
margin-top: 12rpx;
font-size: 26rpx;
line-height: 36rpx;
color: #656E7B;
}
.relation-item-more {
height: 100%;
}
.relation-item-more image {
width: 32rpx;
height: 32rpx;
} }
\ No newline at end of file
...@@ -21,16 +21,16 @@ ...@@ -21,16 +21,16 @@
"checkSiteMap": false, "checkSiteMap": false,
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
"outputPath": "" "outputPath": ""
}, },
"useIsolateContext": true, "useIsolateContext": true,
"useCompilerModule": false, "useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false, "userConfirmedUseCompilerModuleSwitch": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
"enableEngineNative": false "enableEngineNative": false
...@@ -215,13 +215,6 @@ ...@@ -215,13 +215,6 @@
"pathName": "pages/mine/order/order", "pathName": "pages/mine/order/order",
"query": "", "query": "",
"scene": null "scene": null
},
{
"id": 21,
"name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "id=1&type=4",
"scene": null
} }
] ]
} }
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
top: 0; top: 0;
left: 0; left: 0;
width: 750rpx; width: 750rpx;
z-index: 9;
} }
.container { .container {
......
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