Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dedb5739
authored
Sep 24, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
LL - BUG 修复
parent
bd9db424
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
132 additions
and
52 deletions
image/icon/success-3.png
image/icon/war-3.png
pages/commodity/menu-food/menu-food.js
pages/home/guide/guide.wxml
pages/home/guide/guide.wxss
pages/pay/order-input/order-input.js
pages/play/activity/activity.js
pages/play/activity/activity.wxml
pages/play/point-detail/point-detail.js
pages/play/point-detail/point-detail.wxml
pages/play/point-detail/point-detail.wxss
image/icon/success-3.png
0 → 100644
View file @
dedb5739
4.31 KB
image/icon/war-3.png
0 → 100644
View file @
dedb5739
3.98 KB
pages/commodity/menu-food/menu-food.js
View file @
dedb5739
...
...
@@ -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
}
}
}
}
},
/**
...
...
pages/home/guide/guide.wxml
View file @
dedb5739
<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"
>
...
...
@@ -50,4 +51,3 @@
<view class="save-map row con-c align-c" bindtap="onSaveMap">
<text>保存完整地图</text>
</view>
\ No newline at end of file
pages/home/guide/guide.wxss
View file @
dedb5739
...
...
@@ -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;
}
.dialog-content {
color: #959DA9;
}
pages/pay/order-input/order-input.js
View file @
dedb5739
...
...
@@ -429,6 +429,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
,
...
...
@@ -808,6 +821,11 @@ Page({
if
(
funcErrorIndex
===
null
)
funcErrorIndex
=
i
}
}
// 仅在需要场次数据的场景下校验
if
([
6
,
7
].
indexOf
(
this
.
data
.
orderType
)
>=
0
)
{
if
(
this
.
data
.
entryId
===
''
)
funcPass
=
false
}
}
// 定位到当前问题位置
...
...
pages/play/activity/activity.js
View file @
dedb5739
...
...
@@ -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
)
{
...
...
pages/play/activity/activity.wxml
View file @
dedb5739
...
...
@@ -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>
...
...
pages/play/point-detail/point-detail.js
View file @
dedb5739
...
...
@@ -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
})
}
})
...
...
pages/play/point-detail/point-detail.wxml
View file @
dedb5739
<!-- 畅玩 - 商店详情 -->
<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">
...
...
pages/play/point-detail/point-detail.wxss
View file @
dedb5739
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment