Commit ac07ffd7 by wjw

ww-ui反馈修改

parent 6ab7c87a
......@@ -242,18 +242,35 @@ Page({
},
// 点击下载图片
onDownload: function () {
wx.showToast({
title: '已保存到相册',
icon: 'success'
})
this.setData({
showPopup: false
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({
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">
<image src="{{shareImage}}"></image>
</view>
<view class="row con-b">
<view class="cancel" bindtap="onCancel">
<text>取消</text>
<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="download" bindtap="onDownload">
<text>下载图片</text>
<view class="share-operation row con-b align-c">
<button bindtap="onCancel">取消</button>
<button bindtap="onDownload">下载图片</button>
</view>
</view>
</l-popup>
</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'
})
this.setData({
showPopup: false
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({
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'
})
},
// 点击全部活动
......
......@@ -18,20 +18,36 @@
<view class="share col con-c align-c" bindtap="onShare">
<image class="icon-share" src="/image/icon/share-3.png"></image>
</view>
<!-- 分享弹出图片 -->
<l-popup show="{{showPopup}}" animation="{{false}}">
<view class="popupImage">
<image src="{{shareImage}}"></image>
</view>
<view class="row con-b">
<view class="cancel" bindtap="onCancel">
<text>取消</text>
<!-- 分享弹出图片 -->
<view 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="download" bindtap="onDownload">
<text>下载图片</text>
<view class="share-operation row con-b align-c">
<button bindtap="onCancel">取消</button>
<button bindtap="onDownload">下载图片</button>
</view>
</view>
</l-popup>
</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
......@@ -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'
})
this.setData({
showPopup: false
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({
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">
<image src="{{shareImage}}"></image>
</view>
<view class="row con-b">
<view class="cancel" bindtap="onCancel">
<text>取消</text>
<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="download" bindtap="onDownload">
<text>下载图片</text>
<view class="share-operation row con-b align-c">
<button bindtap="onCancel">取消</button>
<button bindtap="onDownload">下载图片</button>
</view>
</view>
</l-popup>
</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;
}
/* 简介,评论 */
......
{
"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