Commit 6ab7c87a by wjw

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

parents a70f8605 c6c58516
......@@ -267,27 +267,6 @@ Page({
// 分类商品列表
this.setCommodityClassification(funcCommodityList)
// // 判断是否从推荐菜单进入,主动查询商品详情
// if (this.data.option.commodityId) {
// for (let i = 0, l = funcCommodityList.length; i < l; i++) {
// if (funcCommodityList[i].id === this.data.option.commodityId) {
// let funcEvent = {
// currentTarget: {
// dataset: {
// item: funcCommodityList[i]
// }
// }
// }
// // 查询之后参数失效,避免返回页面时继续查询
// this.setData({
// option: {}
// })
// this.onCommodityDetail(funcEvent)
// break
// }
// }
// }
},
})
},
......@@ -340,14 +319,52 @@ Page({
let funcElement = response[0]
let funcSideBarHeight = []
for (let i = 0, l = funcElement.length; i < l; i++) {
// 120 是分类标题元素 rpx 高度
funcSideBarHeight.push(funcElement[i].top - 120 * wx.getStorageSync('unitProportion'))
// 标题高度需要减去导航栏高度,避免标题被遮挡
funcSideBarHeight.push(funcElement[i].top - wx.getStorageSync('navigationStatusHeight') - wx.getStorageSync('navigationCapsuleHeight'))
}
this.setData({
sideBarHeight: funcSideBarHeight
})
})
this.setCommodityDetail()
},
/**
* 设置自动显示商品详情
* @function
* @param
* @returns
*/
setCommodityDetail: function () {
console.log(this.data.commodityList)
// 判断是否从推荐菜单进入,主动查询商品详情
if (this.data.option.commodityId) {
let funcCommodityList = this.data.commodityList
for (let i = 0, l = funcCommodityList.length; i < l; i++) {
for (let ii = 0, ll = funcCommodityList[i].commodity.length; ii < ll; ii++) {
if (funcCommodityList[i].commodity[ii].id === this.data.option.commodityId) {
let funcEvent = {
currentTarget: {
dataset: {
item: funcCommodityList[i].commodity[ii]
}
}
}
this.setData({
option: {}, // 查询之后置空参数,避免返回页面时继续查询
sideBarIndex: i, // 设置该商品的所在分类
commoditScroll: this.data.sideBarHeight[i],
})
this.onCommodityDetail(funcEvent)
return
}
}
}
}
},
/**
......
......@@ -67,16 +67,15 @@ Page({
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id,
'cover': funcResponse[i].img
'cover': funcResponse[i].img,
'targetId': funcResponse[i].jumpId, // 跳转目标 id
'targetType': funcResponse[i].jumpColumnId,
}
funcList.push(funcItem)
}
this.setData({
banner: funcList
})
console.log(this.data.banner)
}
})
},
......@@ -229,6 +228,54 @@ Page({
})
},
/**
* banner 点击
* @function
* @param {object} - event
* @returns
*/
onBanner: function (event) {
let funcItme = event.currentTarget.dataset.item
console.log(funcItme)
if (funcItme.targetId && funcItme.targetType) {
// 0 - 首页,1 - 所有服务,2 - 儿童营地,3 - 海错图,4 - 元养水韵,5 - 儿童营地接待,6 - 拾光花坊, 7 - 商品
switch (funcItme.targetType) {
case 0:
break
case 1:
break
case 2:
break
case 3:
break
case 4:
break
case 5:
break
case 6:
break
case 7:
break
}
}
},
onBuy: function (event) {
let funcIndex = event.currentTarget.dataset.index
let funcItemIndex = event.currentTarget.dataset.itemindex
......
......@@ -4,7 +4,7 @@
<view class="banner">
<swiper autoplay circular class="banner-swiper" indicator-dots="{{false}}" interval="5000" duration="500" bindchange="eventSwiperChange">
<block wx:for="{{banner}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<swiper-item class="banner-swiper-item" data-item="{{item}}" bindtap="bannerClick">
<swiper-item class="banner-swiper-item" data-item="{{item}}" bindtap="onBanner">
<image class="banner-swiper-image" src="{{item.cover}}"></image>
</swiper-item>
</block>
......
<l-toast l-bg-class="dialog-bg"></l-toast>
<l-dialog
l-bg-class="dialog-bg"
show="{{winDialog}}"
......@@ -7,9 +8,9 @@
title-color="#000000"
content="保存后可在手机相册中查看"
confirm-text="保存"
confirm-color="#000000"
confirm-color="#5DB5DD"
cancel-text="取消"
cancel-color="#000000"
cancel-color="#656E7B"
bind:linconfirm="onSaveMapConfirm"
bind:lincancel="onSaveMapCancel"
>
......@@ -49,5 +50,4 @@
<view class="save-map row con-c align-c" bindtap="onSaveMap">
<text>保存完整地图</text>
</view>
</view>
\ No newline at end of file
......@@ -93,6 +93,18 @@
color: #FFFFFF;
}
/* 弹窗样式 */
.dialog {
width: 590rpx;
height: 308rpx;
border-radius: 4px;
border: 1px red solid;
}
.dialog-bg {
background: rgba(0, 0, 0, .6) !important;
}
\ No newline at end of file
}
.dialog-content {
color: #959DA9;
}

1.79 KB | W: | H:

2.02 KB | W: | H:

pages/home/guide/image/icon/point-arrow-active.png
pages/home/guide/image/icon/point-arrow-active.png
pages/home/guide/image/icon/point-arrow-active.png
pages/home/guide/image/icon/point-arrow-active.png
  • 2-up
  • Swipe
  • Onion skin

1.76 KB | W: | H:

1.96 KB | W: | H:

pages/home/guide/image/icon/point-arrow-inactive.png
pages/home/guide/image/icon/point-arrow-inactive.png
pages/home/guide/image/icon/point-arrow-inactive.png
pages/home/guide/image/icon/point-arrow-inactive.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -93,6 +93,8 @@ Page({
onLoad: function (options) {
if (options.type) options.type = Number(options.type)
console.log(options.type)
logicData.option = options
this.setShopInfo()
......@@ -343,6 +345,8 @@ Page({
if (funcShoppingCart[i].isActive) funcPayAmount = funcPayAmount + funcShoppingCart[i].priceUnit * funcShoppingCart[i].quantity
}
this.setData({
shoppingCartList: funcShoppingCart,
payAmount: App.modular.utils.formatAmount(funcPayAmount),
......@@ -427,6 +431,19 @@ Page({
}
}
// 活动没有场次的异常处理,添加空字段,使页面可以正常显示,但无法通过报名校验
if (funcDateList.length === 0) {
funcDateList = ['']
funcTimeList = [['']]
funcDate = [[{
beginTime: '',
endTime: '',
enroll: '0',
id: '',
residue: 0,
}]]
}
this.setData({
entryId: funcEntryId ? funcEntryId : funcDate[0][0].id,
entryDate: funcDate,
......@@ -454,10 +471,22 @@ Page({
}
}
console.log(funcTimetable)
console.log(funcDate)
console.log(funcTimeBegin)
console.log(funcTimeEnd)
this.setData({
buyContentTime: funcDate + ' ' + funcTimeBegin + ' - ' + funcTimeEnd
})
}
// 活动时间显示取范围实现,观影时间显示取选择场次时间
if (this.data.orderType === 6) {
this.setData({
buyContentTime: funcResponse.activeDate + ' ' + funcResponse.activeTime
})
}
}
})
},
......@@ -628,22 +657,45 @@ Page({
clearTimeout(funcTimer)
}, 100)
App.wxRequest({
url: '/api/v1/commodity/getNotification',
data: {
'notificationId': this.data.shoppingCartList[0].notificationId
},
success: (response) => {
let funcRichText = response.data.particulars
.replace(/<img/gi, '<img style="max-width:100%;height:auto;display:block" ')
.replace(/<section/g, '<div')
.replace(/\/section>/g, '\div>')
switch (this.data.orderType) {
case 6:
case 7:
App.wxRequest({
url: '/api/v1/activity/getDetail',
data: { 'id': this.data.shoppingCartList[0].id },
success: (response) => {
let funcResponse = response.data
let funcRichText = funcResponse.notice
.replace(/<img/gi, '<img style="max-width:100%;height:auto;display:block" ')
.replace(/<section/g, '<div')
.replace(/\/section>/g, '\div>')
this.setData({
noticeDetail: funcRichText
})
}
})
break
this.setData({
noticeDetail: funcRichText
})
}
})
default:
App.wxRequest({
url: '/api/v1/commodity/getNotification',
data: {
'notificationId': this.data.shoppingCartList[0].notificationId
},
success: (response) => {
let funcResponse = response.data
let funcRichText = funcResponse.particulars
.replace(/<img/gi, '<img style="max-width:100%;height:auto;display:block" ')
.replace(/<section/g, '<div')
.replace(/\/section>/g, '\div>')
this.setData({
noticeDetail: funcRichText
})
}
})
}
},
/**
......@@ -706,7 +758,7 @@ Page({
switch (logicData.option.type) {
case 6:
case 7:
if (this.data.quantity > 3) funcErrorMessage = '每个账号最多报名3人'
if (this.data.quantity >= 3) funcErrorMessage = '每个账号最多报名3人'
if (this.data.quantity < 3) funcErrorMessage = '没有更多报名名额了'
break
......@@ -775,6 +827,11 @@ Page({
if (funcErrorIndex === null) funcErrorIndex = i
}
}
// 仅在需要场次数据的场景下校验
if ([6, 7].indexOf(this.data.orderType) >= 0) {
if (this.data.entryId === '') funcPass = false
}
}
// 定位到当前问题位置
......@@ -820,6 +877,12 @@ Page({
}
},
/**
* 商品下单
* @function
* @param
* @returns
*/
paySubmitCommodity: function () {
// 整合商品数据
let funcCommodity = []
......@@ -972,6 +1035,12 @@ Page({
})
},
/**
* 活动下单
* @function
* @param
* @returns
*/
paySubmitActivity: function () {
App.wxRequest({
url: '/api/v1/activity/doActivityEnroll',
......@@ -1017,6 +1086,14 @@ Page({
return
}
if (/价格不一致/.test(response.data.msg)) {
wx.lin.showToast({
title: response.data.msg,
icon: 'error',
})
return
}
// 库存充足正常下单支付
let funcResponse = response.data
pagePayId = funcResponse.orderId
......
......@@ -119,7 +119,7 @@
<text>{{buyContentTime}}</text>
</view>
<view class="amount row align-e">
<text>免费</text>
<text>{{'¥' + buyContentAmount}}</text>
</view>
</view>
</view>
......@@ -178,11 +178,13 @@
</view>
<view class="entry-input row con-b align-c">
<l-button l-class="input-button input-cut" special="{{true}}" bind:lintap="onQuantityCut">
<image class="input-icon" src="{{imageBase + 'cut.png'}}"></image>
<image wx:if="{{1 < quantity}}" class="input-icon" src="{{imageBase + 'icon/cut-1.png'}}"></image>
<image wx:if="{{1 === quantity}}" class="input-icon" src="{{imageBase + 'icon/cut-2.png'}}"></image>
</l-button>
<text class="text" style="{{formQuantity === 0 ? 'color: #C2C7CF' : 'color: #15191F'}}">{{quantity}}</text>
<l-button l-class="input-button input-add" special="{{true}}" bind:lintap="onQuantityAdd">
<image class="input-icon" src="{{imageBase + 'add.png'}}"></image>
<image wx:if="{{quantity < quantityMax}}" class="input-icon" src="{{imageBase + 'icon/add-1.png'}}"></image>
<image wx:if="{{quantity === quantityMax || quantityMax === 0}}" class="input-icon" src="{{imageBase + 'icon/add-2.png'}}"></image>
</l-button>
</view>
<view class="quantity-other row con-b align-c">
......@@ -209,7 +211,7 @@
<text class="text" style="{{formQuantity === 0 ? 'color: #C2C7CF' : 'color: #15191F'}}">{{quantity}}</text>
<l-button l-class="input-button input-add" special="{{true}}" bind:lintap="onQuantityAdd">
<image wx:if="{{quantity < quantityMax}}" class="input-icon" src="{{imageBase + 'icon/add-1.png'}}"></image>
<image wx:if="{{quantity === quantityMax}}" class="input-icon" src="{{imageBase + 'icon/add-2.png'}}"></image>
<image wx:if="{{quantity === quantityMax || quantityMax === 0}}" class="input-icon" src="{{imageBase + 'icon/add-2.png'}}"></image>
</l-button>
</view>
<view class="quantity-other row con-b align-c">
......@@ -231,12 +233,12 @@
</view>
<view class="contact-input col">
<text class="contact-input-mark">姓名</text>
<input placeholder="请输入姓名" data-type="name" data-index="{{0}}" bindblur="onInputBlur"></input>
<input placeholder="请输入姓名" value="{{registerInfo[0].name}}" data-type="name" data-index="{{0}}" bindblur="onInputBlur"></input>
<text>{{registerInfo[0].errorName}}</text>
</view>
<view class="contact-input col">
<text>手机号</text>
<input placeholder="请输入手机号" maxlength="11" type="number" data-type="phone" data-index="{{0}}" bindblur="onInputBlur"></input>
<input placeholder="请输入手机号" value="{{registerInfo[0].phone}}" maxlength="11" type="number" data-type="phone" data-index="{{0}}" bindblur="onInputBlur"></input>
<text>{{registerInfo[0].errorPhone}}</text>
</view>
</view>
......@@ -257,17 +259,17 @@
</view>
<view class="contact-input col">
<text class="contact-input-mark">姓名</text>
<input placeholder="请输入姓名" data-type="name" data-index="{{index}}" bindblur="onInputBlur"></input>
<input placeholder="请输入姓名" value="{{item.name}}" data-type="name" data-index="{{index}}" bindblur="onInputBlur"></input>
<text>{{item.errorName}}</text>
</view>
<view class="contact-input col">
<text>手机号</text>
<input placeholder="请输入手机号" maxlength="11" type="number" data-type="phone" data-index="{{index}}" bindblur="onInputBlur"></input>
<input placeholder="请输入手机号" value="{{item.phone}}" maxlength="11" type="number" data-type="phone" data-index="{{index}}" bindblur="onInputBlur"></input>
<text>{{item.errorPhone}}</text>
</view>
<view class="contact-input col">
<text>身份证号</text>
<input placeholder="请输入身份证号" data-type="identity" data-index="{{index}}" bindblur="onInputBlur"></input>
<input placeholder="请输入身份证号" value="{{item.identity}}" data-type="identity" data-index="{{index}}" bindblur="onInputBlur"></input>
<text>{{item.errorIdentity}}</text>
</view>
</block>
......
......@@ -65,11 +65,6 @@ Page({
clearTimeout(logicData.pageScrollTimer)
}, 10)
},
onActivityDetail: function (event) {
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + event.currentTarget.dataset.id
})
},
//主题活动列表 type 1 近期 0 往期
getActivityList(type) {
......@@ -197,6 +192,19 @@ Page({
url: '/pages/pay/order-input/order-input?type=6'
})
},
onActivityDetail: function (event) {
let index = event.currentTarget.dataset.index
let selectedActivity = this.data.selectedActivity
selectedActivity[index].quantity = 1
this.setShopInfo(selectedActivity[index].officeId, 2)
wx.setStorageSync('shoppingCartBuffer', [selectedActivity[index]])
wx.navigateTo({
url: '/pages/play/activity-detail/activity-detail?id=' + event.currentTarget.dataset.id
})
},
setShopInfo: function (funcShopId, funcShopType) {
for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
if (funcShopId === App.globalData.shopId[i].id) {
......
......@@ -15,7 +15,7 @@
<block wx:if="{{activity.length > 0}}">
<view class="list">
<block wx:for="{{selectedActivity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="item" data-id="{{item.id}}" bindtap="onActivityDetail">
<view class="item" data-id="{{item.id}}" data-index="{{index}}" bindtap="onActivityDetail">
<view class="item-cover" wx:if="{{item.cover !== ''}}">
<image src="{{item.cover}}" mode="aspectFill"></image>
</view>
......
......@@ -151,8 +151,6 @@ Page({
},
// 跳转到报名页面
onReportMovie: function (event) {
console.log(event.currentTarget.dataset.item.filmId)
let funcMovieInfo = {
'id': this.data.movieInfo.activityId, // 活动 id
'name': this.data.movieInfo.filmName, // 电影名称
......@@ -169,7 +167,8 @@ Page({
'quantity': 1,
'quantityMin': 1,
'quantityMax': 3
'quantityMax': 3,
'isActive': true,
}
let funcUserType = wx.getStorageSync('userInfo').userType
......
......@@ -14,7 +14,7 @@ Page({
},
// 导航栏相关属性
navigationStyle: {
navigationStyle: {
normal: {
backIcon: '/image/back-w.png',
color: '#FFFFFF',
......@@ -30,9 +30,14 @@ Page({
navigationScroll: 0,
statusActive: 0,
statusList: [
{ 'id': 0, 'name': '今日放映' },
{ 'id': 1, 'name': '全部热映' },
statusList: [{
'id': 0,
'name': '今日放映'
},
{
'id': 1,
'name': '全部热映'
},
],
// 今日热映
......@@ -49,11 +54,11 @@ Page({
}
}
},
onLoad: function () {
onLoad: function() {
this.getTodayFilm()
this.getAllFilm()
},
onPageScroll: function (funcEvent) {
onPageScroll: function(funcEvent) {
// console.log(funcEvent)
// 优化滚动事件触发频率
if (logicData.pageScrollLock) return
......@@ -64,7 +69,7 @@ Page({
})
// 恢复滚动事件
logicData.pageScrollTimer = setTimeout(function () {
logicData.pageScrollTimer = setTimeout(function() {
logicData.pageScrollLock = false
clearTimeout(logicData.pageScrollTimer)
}, 10)
......@@ -75,7 +80,7 @@ Page({
* @param
* @returns
*/
getTodayFilm: function () {
getTodayFilm: function() {
App.wxRequest({
url: '/api/v1/film/getTodayFilm',
data: {
......@@ -91,8 +96,8 @@ Page({
v.filmDirector = v.filmDirector
v.filmLead = v.filmLead
v.priceSpecialText = App.modular.utils.formatAmount(v.ownerPrice),
v.priceText = App.modular.utils.formatAmount(v.visitorPrice),
v.tags = v.tags.replace(/( )?热映影片( )?/, ' ').split(' ')
v.priceText = App.modular.utils.formatAmount(v.visitorPrice),
v.tags = v.tags.replace(/( )?热映影片( )?/, ' ').split(' ')
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
......@@ -114,13 +119,13 @@ Page({
}
})
},
/**
/**
* 查询全部热映
* @function
* @param
* @returns
*/
getAllFilm: function () {
getAllFilm: function() {
// weekType: 0本周热映 1下周
let movieWeek = []
let movieNextWeek = []
......@@ -140,8 +145,8 @@ Page({
v.filmDirector = v.filmDirector.replace(/\//g, ' ')
v.filmLead = v.filmLead.replace(/\//g, ' ')
v.priceSpecialText = App.modular.utils.formatAmount(v.ownerPrice),
v.priceText = App.modular.utils.formatAmount(v.visitorPrice),
v.tags = v.tags.replace(/( )?热映影片( )?/, ' ').replace(/( )+$/, '').split(' ')
v.priceText = App.modular.utils.formatAmount(v.visitorPrice),
v.tags = v.tags.replace(/( )?热映影片( )?/, ' ').replace(/( )+$/, '').split(' ')
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
......@@ -161,7 +166,7 @@ Page({
title: '本周热映',
list: movieWeek
}
})
})
}
})
App.wxRequest({
......@@ -179,8 +184,8 @@ Page({
v.filmDirector = v.filmDirector.replace(/\//g, ' ')
v.filmLead = v.filmLead.replace(/\//g, ' ')
v.priceSpecialText = App.modular.utils.formatAmount(v.ownerPrice),
v.priceText = App.modular.utils.formatAmount(v.visitorPrice),
v.tags = v.tags.replace(/( )?热映影片( )?/, ' ').split(' ')
v.priceText = App.modular.utils.formatAmount(v.visitorPrice),
v.tags = v.tags.replace(/( )?热映影片( )?/, ' ').split(' ')
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
......@@ -203,10 +208,10 @@ Page({
})
}
})
},
// 切换今日放映 全部热映
onSelectionStatus: function (event) {
onSelectionStatus: function(event) {
let statusActive = Number(event.currentTarget.dataset.type)
if (statusActive === 0) {
this.getTodayFilm()
......@@ -218,35 +223,33 @@ Page({
})
},
// 跳转到电影详情页面
onToMovieDetail: function (event) {
onToMovieDetail: function(event) {
let movieId = event.currentTarget.dataset.movieid
wx.navigateTo({
url: '/pages/play/movie-detail/movie-detail?id=' + movieId,
url: '/pages/play/movie-detail/movie-detail?id=' + movieId,
})
},
// 跳转到报名页面
onReportMovie: function (event) {
onReportMovie: function(event) {
let funcItem = event.currentTarget.dataset.item
console.log(funcItem)
let funcMovieInfo = {
'id': funcItem.activityId, // 活动 id
'name': funcItem.filmName, // 电影名称
'cover': funcItem.cover, // 电影封面
'entryId': funcItem.filmId, // 场次 id
'id': funcItem.activityId, // 活动 id
'name': funcItem.filmName, // 电影名称
'cover': funcItem.cover, // 电影封面
'entryId': funcItem.filmId, // 场次 id
'price': funcItem.sightseerPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcItem.sightseerPrice), // 普通价文本格式
'priceSpecial': funcItem.ownerPrice, // 业主价
'price': funcItem.sightseerPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcItem.sightseerPrice), // 普通价文本格式
'priceSpecial': funcItem.ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcItem.ownerPrice), // 业主价文本格式
'priceDiscount': funcItem.price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcItem.price), // 活动价文本格式
'priceDiscount': funcItem.price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcItem.price), // 活动价文本格式
'priceType': 1,
'quantity': 1,
'quantityMin': 1,
'quantityMax': 3
'quantityMax': 3,
'isActive': true,
}
let funcUserType = wx.getStorageSync('userInfo').userType
......@@ -264,9 +267,8 @@ Page({
}
wx.setStorageSync('shoppingCartBuffer', [funcMovieInfo])
wx.navigateTo({
url: '/pages/pay/order-input/order-input?type=7',
url: '/pages/pay/order-input/order-input?type=7',
})
}
})
\ No newline at end of file
......@@ -10,7 +10,9 @@ Page({
info: {},
// 弹出控制
showPopup: false
showPopup: false,
winToast: false,
},
onLoad: function (options) {
......@@ -223,36 +225,24 @@ Page({
wx.downloadFile({
url: this.data.popupImage,
success: (result) => {
console.log(result)
wx.saveImageToPhotosAlbum({
filePath: result.tempFilePath,
success: (result) => {
wx.lin.showToast({
icon: 'success',
title: '图片已保存至相册',
show: true,
mask: true
})
this.setData({
isSave: true
showPopup: false,
winToastSuccess: true
})
},
fail: (error) => {
wx.lin.showToast({
icon: 'error',
title: '图片已保存失败',
show: true,
mask: true
this.setData({
winToastFail: true
})
}
})
},
fail: (error) => {
wx.lin.showToast({
icon: 'error',
title: '图片下载失败',
show: true,
mask: true
this.setData({
winToastFail: true
})
}
})
......
<!-- 畅玩 - 商店详情 -->
<l-toast
l-class="toast"
l-image-class="toast-icon"
show="{{winToastSuccess}}"
image="../../../image/icon/success-3.png"
title="图片已保存"
duration="3000"
></l-toast>
<l-toast
l-class="toast"
l-image-class="toast-icon"
show="{{winToastFail}}"
image="../../../image/icon/war-3.png"
title="图片保存失败"
duration="3000"
></l-toast>
<navigation class="navigation" titleText="{{info.title}}" color="#ffffff" backIcon="/image/back-w.png"></navigation>
<view class="container">
......
......@@ -2,6 +2,23 @@ page {
position: relative;
}
.dialog-bg {
background: rgba(0, 0, 0, .6) !important;
}
.toast {
width: 262rpx;
height: 262rpx;
border-radius: 4px;
box-shadow: 0px 0px 68px 0px rgba(0,0,0,0.16);
background: #1F252E;
}
.toast-icon {
width: 88rpx !important;
height: 88rpx !important;
}
.navigation {
z-index: 1900;
position: fixed;
......
......@@ -582,26 +582,6 @@ Page({
'content': funcResponse.list[i].content,
'isMore': false,
}
// funcItem = {
// 'isMore': false,
// 'star': 4,
// 'scoreService': 3,
// 'scoreCommodity': 2,
// 'scoreEnvironmental': 1,
// 'userName': '用户名称',
// 'userAvatar': 'https://gss3.bdstatic.com/84oSdTum2Q5BphGlnYG/timg?wapp&quality=80&size=b150_150&subsize=20480&cut_x=0&cut_w=0&cut_y=0&cut_h=0&sec=1369815402&srctrace&di=6a992d9158ef2273c2e9d0a77fbbbe88&wh_rate=null&src=http%3A%2F%2Ftiebapic.baidu.com%2Fforum%2Fpic%2Fitem%2F4d086e061d950a7be03653981dd162d9f2d3c96f.jpg',
// 'userType': 0,
// 'userAlbum': [
// 'https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=975216563,2695721503&fm=111&gp=0.jpg',
// 'https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2856846879,389279115&fm=26&gp=0.jpg',
// 'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2032511182,3555754069&fm=26&gp=0.jpg',
// 'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2032511182,3555754069&fm=26&gp=0.jpg',
// 'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=2032511182,3555754069&fm=26&gp=0.jpg',
// ],
// 'date': '2020.02.09',
// 'content': '/sd12i301!@(#*)(#Updjs',
// }
funcItem.star = Math.floor((funcItem.scoreService + funcItem.scoreCommodity + funcItem.scoreEnvironmental) / 3)
funcList.push(funcItem)
}
......@@ -635,17 +615,7 @@ Page({
let id = event.currentTarget.dataset.id
wx.navigateTo({
url: '/pages/play/movie-detail/movie-detail?id=' + id,
})
// // 补充必要参数
// funcCommodityInfo.quantity = 1
// funcCommodityInfo.quantityMin = 1
// funcCommodityInfo.quantityMax = 1
// funcCommodityInfo.isActive = true
// wx.setStorageSync('shoppingCartBuffer', [funcCommodityInfo])
// wx.navigateTo({
// url: '/pages/pay/order-input/order-input?type=' + funcCommodityInfo.typeId
// })
})
},
onLocation: function () {
......
......@@ -7,6 +7,7 @@ Page({
banner: [],
serviceInfo: {}
},
onLoad: function (options) {
this.queryCommodityDetail()
},
......@@ -34,10 +35,7 @@ Page({
},
queryCommodityDetail: function () {
let funcCommodity = wx.getStorageSync('shoppingCartBuffer')[0]
console.log('queryCommodityDetail', funcCommodity)
App.wxRequest({
url: '/api/v1/commodity/getCommodityParticulars',
data: {
......@@ -46,13 +44,14 @@ Page({
},
success: (response) => {
let funcResponse = response.data
let funcItem = {
'id': funcResponse.id, // 商品标识
'typeId': funcResponse.genre, // 商品分类标识
'inventoriesId': funcResponse.inventoriesId, // 仓库标识
'dateValid': '', // 有效时间
'dateInvalid': '', // 失效时间
'name': funcResponse.name,
'time': funcResponse.spaMins ? funcResponse.spaMins + 'mins' : '',
'address': '元养水韵SPA',
'content': funcResponse.particulars,
'cover': funcResponse.ticketsImg, // 商品封面
'price': funcResponse.sightseerPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcResponse.sightseerPrice), // 普通价文本格式
'priceSpecial': funcResponse.ownerPrice, // 业主价
......@@ -60,6 +59,17 @@ Page({
'priceDiscount': funcResponse.price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcResponse.price), // 活动价文本格式
'priceType': 1,
'quantity': 1,
'quantityMin': 1,
'quantityMax': funcResponse.number < 20 ? funcResponse.number : 20, // 最大上限 20 件
'isActive': true,
'notificationId': funcResponse.notificationId, // 下单须知
'time': funcResponse.spaMins ? funcResponse.spaMins + 'mins' : '',
'address': '元养水韵SPA',
'content': funcResponse.particulars,
}
let funcUserType = wx.getStorageSync('userInfo').userType
......
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": false,
"uploadWithSourceMap": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"compileType": "miniprogram",
"libVersion": "2.10.0",
"appid": "wx37a9b7a3d92029f2",
"projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%8C%E6%9C%9F",
"cloudfunctionTemplateRoot": "",
"watchOptions": {
"ignore": []
},
"debugOptions": {
"hidedInDevtools": []
},
"scripts": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"plugin": {
"current": -1,
"list": []
},
"game": {
"list": []
},
"gamePlugin": {
"current": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": [
{
"id": -1,
"name": "pages/commodity/menu-food/menu-food",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/play/home/home",
"pathName": "pages/play/home/home",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "id=1&type=4",
"scene": null
},
{
"id": -1,
"name": "pages/mine/home/home",
"pathName": "pages/mine/home/home",
"query": "",
"scene": null
}
]
}
}
}
\ No newline at end of file
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