Commit 4801a0cb by 严立

LL - 正式体验版代码合并

parents 2e76f6ea 7f272207
......@@ -320,9 +320,7 @@ App({
* @param {object} - { commodity: '商品数据对象', complete: '回调函数' }
* @returns
*/
setCommodityInfo: function (funcParam) {
let funcInfoRaw = funcParam.commodity
let funcComplete = funcParam.complete
setCommodityInfo: function (funcInfoRaw) {
// 特殊数据格式化
switch (Number(funcInfoRaw.genre)) {
......@@ -346,15 +344,15 @@ App({
'notificationId': funcInfoRaw.notificationId, // 购买须知
'priceType': 1, // 当前用户身份享受价格类型
'price': funcInfoRaw.sightseerPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcInfoRaw.sightseerPrice), // 普通价文本格式
'priceText': this.modular.utils.formatAmount(funcInfoRaw.sightseerPrice), // 普通价文本格式
'priceSpecial': funcInfoRaw.ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcInfoRaw.ownerPrice), // 业主价文本格式
'priceSpecialText': this.modular.utils.formatAmount(funcInfoRaw.ownerPrice), // 业主价文本格式
'priceDiscount': funcInfoRaw.price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcInfoRaw.price), // 活动价文本格式
'priceDiscountText': this.modular.utils.formatAmount(funcInfoRaw.price), // 活动价文本格式
'inventoriesId': funcInfoRaw.inventoriesId,
'dateValid': this.modular.miment().format('YYYY.MM.DD'), // 有效时间
'dateInvalid': funcInfoRaw.funcInfoRaw.cardNam, // 失效时间
'dateInvalid': funcInfoRaw.cardNam, // 失效时间
}
let funcUserType = wx.getStorageSync('userInfo').userType
......@@ -370,5 +368,7 @@ App({
funcInfo.priceType = 3
}
}
return funcInfo
},
})
\ No newline at end of file
......@@ -242,18 +242,35 @@ Page({
},
// 点击下载图片
onDownload: function () {
wx.showToast({
title: '已保存到相册',
icon: 'success'
wx.downloadFile({
url: this.data.shareImage,
success: (result) => {
wx.saveImageToPhotosAlbum({
filePath: result.tempFilePath,
success: (result) => {
this.setData({
showPopup: false,
winToastSuccess: true
})
},
fail: (error) => {
this.setData({
showPopup: false
winToastFail: true
})
}
})
},
fail: (error) => {
this.setData({
winToastFail: true
})
}
})
},
// 点击位置图标
onLocation: function () {
wx.navigateTo({
url: '/pages/home/guide/guide?id=' + 3
url: '/pages/home/guide/guide?id=' + 3 + '&card=false'
})
},
// 点击全部活动
......
......@@ -22,19 +22,35 @@
<image class="icon-share" src="/image/icon/share-3.png"></image>
</view>
<!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}">
<view class="popupImage">
<view class="container-share row con-c align-c" hidden="{{!showPopup}}">
<view class="col con-c">
<view class="share-content">
<image src="{{shareImage}}"></image>
</view>
<view class="row con-b">
<view class="cancel" bindtap="onCancel">
<text>取消</text>
</view>
<view class="download" bindtap="onDownload">
<text>下载图片</text>
</view>
</view>
</l-popup>
<view class="share-operation row con-b align-c">
<button bindtap="onCancel">取消</button>
<button bindtap="onDownload">下载图片</button>
</view>
</view>
</view>
<!-- 下载图片反馈 -->
<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>
<!-- 位置按钮 -->
<view class="location col con-c align-c" bindtap="onLocation">
<image class="icon-location" src="/image/icon/location-3.png"></image>
......
......@@ -197,25 +197,61 @@
}
/* 分享弹窗 */
.popupImage image {
.container-share {
z-index: 1700;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding-top: 60rpx;
background: rgba(0, 0, 0, 0.65);
}
.share-content image {
width: 606rpx;
height: 977rpx;
margin-bottom: 64rpx;
}
.cancel, .download {
.share-operation {
margin-top: 60rpx;
}
.share-operation button:nth-child(1) {
width: 288rpx;
height: 96rpx;
border-radius: 4rpx;
background: #FFFFFF;
text-align: center;
font-size: 30rpx;
font-weight: 500;
line-height: 96rpx;
color: #15191F;
}
.share-operation button:nth-child(2) {
width: 288rpx;
height: 96rpx;
border-radius: 4rpx;
background: #15191F;
text-align: center;
font-size: 30rpx;
font-weight: 500;
line-height: 96rpx;
color: #FFFFFF;
}
.cancel {
color: #15191F;
background-color: #fff;
.toast {
width: 262rpx;
height: 262rpx;
border-radius: 4px;
box-shadow: 0px 0px 68px 0px rgba(0,0,0,0.16);
background: #1F252E;
}
.download {
color: #fff;
background-color: #15191F;
.toast-icon {
width: 88rpx !important;
height: 88rpx !important;
}
\ No newline at end of file
......@@ -211,30 +211,59 @@ Page({
},
// 点击分享图标
onShare: function () {
wx.hideTabBar({
animation: true,
})
this.setData({
showPopup: true
})
},
// 点击取消
onCancel: function () {
wx.showTabBar({
animation: true,
})
this.setData({
showPopup: false
})
},
// 点击下载图片
onDownload: function () {
wx.showToast({
title: '已保存到相册',
icon: 'success'
wx.downloadFile({
url: this.data.shareImage,
success: (result) => {
wx.saveImageToPhotosAlbum({
filePath: result.tempFilePath,
success: (result) => {
this.setData({
showPopup: false,
winToastSuccess: true
})
wx.showTabBar({
animation: true,
})
},
fail: (error) => {
this.setData({
showPopup: false
winToastFail: true
})
}
})
},
fail: (error) => {
this.setData({
winToastFail: true
})
wx.showTabBar({
animation: true,
})
}
})
},
// 点击位置图标
onLocation: function () {
wx.navigateTo({
url: '/pages/home/guide/guide?id=' + 3
url: '/pages/home/guide/guide?id=' + 3 + '&card=false'
})
},
// 点击全部活动
......
......@@ -19,19 +19,35 @@
<image class="icon-share" src="/image/icon/share-3.png"></image>
</view>
<!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}">
<view class="popupImage">
<view class="container-share row con-c align-c" hidden="{{!showPopup}}">
<view class="col con-c">
<view class="share-content">
<image src="{{shareImage}}"></image>
</view>
<view class="row con-b">
<view class="cancel" bindtap="onCancel">
<text>取消</text>
</view>
<view class="download" bindtap="onDownload">
<text>下载图片</text>
</view>
</view>
</l-popup>
<view class="share-operation row con-b align-c">
<button bindtap="onCancel">取消</button>
<button bindtap="onDownload">下载图片</button>
</view>
</view>
</view>
<!-- 下载图片反馈 -->
<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>
<!-- 位置按钮 -->
<view class="location col con-c align-c" bindtap="onLocation">
<image class="icon-location" src="/image/icon/location-3.png"></image>
......
......@@ -194,27 +194,62 @@
.wx-swiper-dots.wx-swiper-dots-horizontal{
margin-bottom: 64rpx;
}
/* 分享弹窗 */
.popupImage image {
.container-share {
z-index: 1700;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding-top: 60rpx;
background: rgba(0, 0, 0, 0.65);
}
.share-content image {
width: 606rpx;
height: 977rpx;
margin-bottom: 64rpx;
}
.cancel, .download {
.share-operation {
margin-top: 60rpx;
}
.share-operation button:nth-child(1) {
width: 288rpx;
height: 96rpx;
border-radius: 4rpx;
background: #FFFFFF;
text-align: center;
font-size: 30rpx;
font-weight: 500;
line-height: 96rpx;
color: #15191F;
}
.share-operation button:nth-child(2) {
width: 288rpx;
height: 96rpx;
border-radius: 4rpx;
background: #15191F;
text-align: center;
font-size: 30rpx;
font-weight: 500;
line-height: 96rpx;
color: #FFFFFF;
}
.cancel {
color: #15191F;
background-color: #fff;
.toast {
width: 262rpx;
height: 262rpx;
border-radius: 4px;
box-shadow: 0px 0px 68px 0px rgba(0,0,0,0.16);
background: #1F252E;
}
.download {
color: #fff;
background-color: #15191F;
.toast-icon {
width: 88rpx !important;
height: 88rpx !important;
}
\ No newline at end of file
......@@ -236,11 +236,10 @@ Page({
*/
onBanner: function (event) {
return
let funcItme = event.currentTarget.dataset.item
// 月卡商品
// funcItme.targetId = '94b7a6a7f82845d3a1875ee1e7a033fa'
funcItme.targetId = '94b7a6a7f82845d3a1875ee1e7a033fa'
// 门票商品
// funcItme.targetId = '0ac170457a8546469976753ea21cd8e9'
......@@ -252,7 +251,7 @@ Page({
// funcItme.targetId = '006a1a3df15e43119103ec34e0bec393'
// 餐品
funcItme.targetId = '329f304aca104ff1887dde5877e15126'
// funcItme.targetId = '329f304aca104ff1887dde5877e15126'
funcItme.targetType = 4
......@@ -304,13 +303,7 @@ Page({
},
success: (response) => {
console.log(response)
let funcParam = {
'commodity': response.data,
'complete': function () {
console.log('complete')
}
}
App.setCommodityInfo(funcParam)
console.log(App.setCommodityInfo(response.data))
}
})
......
......@@ -79,7 +79,7 @@ Page({
authInfo: null,
goodTypeCountData: {},
enrollSubscribeData: {},
isLoadingOrder:true
isLoadingOrder: true
},
// 去活动预约列表
......@@ -189,7 +189,7 @@ Page({
getWillUseOrders() {
let that = this
this.setData({
isLoadingOrder:true
isLoadingOrder: true
})
App.wxRequest({
url: '/api/v1/order/getOrderList',
......@@ -217,11 +217,14 @@ Page({
let listBackUp = JSON.parse(JSON.stringify(list)) //备份数据
let orderList = `myOrder.artOrder.orderList`
// 初始化取一个
if (list.length > 0) {
list.length = 1
}
that.setData({
[orderList]: list,
orderListBackup: listBackUp,
isLoadingOrder:false
isLoadingOrder: false
})
......@@ -432,11 +435,11 @@ Page({
App.wxRequest({
url: '/api/v1/activity/getMyActivityList',
data: {
enrollState:2,//待使用
activeState: '1',//""全部 0 未开始 1进行中 2已结束
enrollState: 2, //待使用
activeState: '1', //""全部 0 未开始 1进行中 2已结束
pageSize: -1,
pageNo: 1,
type: 1 ,//0 影片 1 活动
type: 1, //0 影片 1 活动
},
success: function (res) {
let list = res.data.list
......
......@@ -207,7 +207,7 @@
</view>
</view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreOrder" wx:if="{{!isLoadingOrder}}">
<view class="more row align-c con-c" bindtap="onShowMoreOrder" wx:if="{{!isLoadingOrder&&orderListBackup.length>1}}">
<text wx:if="{{!showMoreOrder}}">展开更多</text>
<text wx:else>收起</text>
<image wx:if="{{!showMoreOrder}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
......
......@@ -99,7 +99,7 @@ Page({
name: '今日' + App.modular.miment().format('MM月DD日')
}
statusList.push(tempItem)
showList[index] = movieInfo.allTimes[key]
showList[index] = movieInfo.today
index++
} else if (key === App.modular.miment().add(1, 'DD').format('YYYY-MM-DD')) {
tempItem = {
......@@ -107,7 +107,7 @@ Page({
name: '明日' + App.modular.miment().add(1, 'DD').format('MM月DD日')
}
statusList.push(tempItem)
showList[index] = movieInfo.allTimes[key]
showList[index] = movieInfo.tomorrow
index++
} else if (key === App.modular.miment().add(day, 'DD').format('YYYY-MM-DD')) {
tempItem = {
......
......@@ -149,7 +149,8 @@ page {
width: 710rpx;
height: 160rpx;
margin-left: 40rpx;
border-bottom: 1px solid #3A3A40;
padding-right: 40rpx;
border-bottom: 1rpx solid #3A3A40;
}
.show-time-start {
width: 118rpx;
......@@ -158,13 +159,14 @@ page {
font-weight: 600;
}
.show-time-end {
width: 122rpx;
width: 130rpx;
margin-left: 48rpx;
color: #959DA9;
font-size: 26rpx;
}
.show-free {
margin-left: 130rpx;
margin-left: 80rpx;
width: 130rpx;
color: #fff;
font-size: 26;
}
......
......@@ -458,6 +458,7 @@ Page({
success: (response) => {
let funcCommodityList = []
let funcResponse = response.data
console.log(JSON.stringify(funcResponse))
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id, // 商品标识
......@@ -465,7 +466,7 @@ Page({
'sidebarId': funcResponse[i].classifyId, // 商品分类标识
'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面
'img': funcResponse[i].img, // 商品详情图
'img': funcResponse[i].img.split('|'), // 商品详情图
'price': funcResponse[i].sightseerPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcResponse[i].sightseerPrice), // 普通价文本格式
'priceSpecial': funcResponse[i].ownerPrice, // 业主价
......@@ -490,7 +491,6 @@ Page({
funcItem.priceType = 3
}
}
console.log(funcItem.img)
funcCommodityList.push(funcItem)
}
......@@ -791,12 +791,29 @@ Page({
},
// 点击下载图片
onDownload: function () {
wx.showToast({
title: '已保存到相册',
icon: 'success'
wx.downloadFile({
url: this.data.shareImage,
success: (result) => {
wx.saveImageToPhotosAlbum({
filePath: result.tempFilePath,
success: (result) => {
this.setData({
showPopup: false,
winToastSuccess: true
})
},
fail: (error) => {
this.setData({
showPopup: false
winToastFail: true
})
}
})
},
fail: (error) => {
this.setData({
winToastFail: true
})
}
})
},
// 跳转到文创商品商店
......
......@@ -25,19 +25,35 @@
<image src="{{imageBase + 'icon/location-2.png'}}" bind:tap="onLocation"></image>
</view>
<!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}">
<view class="popupImage">
<view class="container-share row con-c align-c" hidden="{{!showPopup}}">
<view class="col con-c">
<view class="share-content">
<image src="{{shareImage}}"></image>
</view>
<view class="row con-b">
<view class="cancel" bindtap="onCancel">
<text>取消</text>
</view>
<view class="download" bindtap="onDownload">
<text>下载图片</text>
</view>
</view>
</l-popup>
<view class="share-operation row con-b align-c">
<button bindtap="onCancel">取消</button>
<button bindtap="onDownload">下载图片</button>
</view>
</view>
</view>
<!-- 下载图片反馈 -->
<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>
<!-- 开放时间信息 -->
<view class="commodity-other {{option.id === '6' || option.id === '4' ? 'food-border' : ''}} row align-c">
<image src="./image/time.png"></image>
......@@ -109,7 +125,9 @@
<view class="commodity-card-list row">
<block wx:for="{{detailCommodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-card-item col">
<image mode="center" src="{{item.img}}"></image>
<view class="commodity-card-item-cover row con-c align-c">
<image mode="aspectFill" src="{{item.img[0]}}"></image>
</view>
<view class="commodity-card-item-title row con-b align-c">
<text>{{item.name}}</text>
</view>
......
......@@ -309,6 +309,10 @@
width: 562rpx;
height: 316rpx;
}
.commodity-card-item-cover image{
width: 562rpx;
height: 316rpx;
}
.movie-card-item > image {
width: 300rpx;
height: 369rpx;
......@@ -551,27 +555,63 @@
}
/* 分享弹窗 */
.popupImage image {
.container-share {
z-index: 1700;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding-top: 60rpx;
background: rgba(0, 0, 0, 0.65);
}
.share-content image {
width: 606rpx;
height: 977rpx;
margin-bottom: 64rpx;
}
.cancel, .download {
.share-operation {
margin-top: 60rpx;
}
.share-operation button:nth-child(1) {
width: 288rpx;
height: 96rpx;
border-radius: 4rpx;
background: #FFFFFF;
text-align: center;
font-size: 30rpx;
font-weight: 500;
line-height: 96rpx;
color: #15191F;
}
.share-operation button:nth-child(2) {
width: 288rpx;
height: 96rpx;
border-radius: 4rpx;
background: #15191F;
text-align: center;
font-size: 30rpx;
font-weight: 500;
line-height: 96rpx;
color: #FFFFFF;
}
.cancel {
color: #15191F;
background-color: #fff;
.toast {
width: 262rpx;
height: 262rpx;
border-radius: 4px;
box-shadow: 0px 0px 68px 0px rgba(0,0,0,0.16);
background: #1F252E;
}
.download {
color: #fff;
background-color: #15191F;
.toast-icon {
width: 88rpx !important;
height: 88rpx !important;
}
/* 简介,评论 */
......
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