Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
d8d64b5b
Commit
d8d64b5b
authored
May 22, 2023
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
7a8fba9e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
26 deletions
+33
-26
src/components/restaurantList/index.vue
+24
-21
static/nativeComponents/TimeLimitedDiscount/index.js
+4
-2
static/nativeComponents/TimeLimitedDiscount/index.wxml
+4
-3
static/nativeComponents/TimeLimitedDiscount/index.wxss
+1
-0
No files found.
src/components/restaurantList/index.vue
View file @
d8d64b5b
...
@@ -89,27 +89,7 @@ export default {
...
@@ -89,27 +89,7 @@ export default {
wx
.
getLocation
({
wx
.
getLocation
({
type
:
'wgs84'
,
type
:
'wgs84'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
const
query
=
{
_this
.
getList
(
res
);
longitude
:
res
.
longitude
,
// 经度
latitude
:
res
.
latitude
// 纬度
}
console
.
log
(
'定位数据'
,
res
)
goods
.
getWlyList
(
query
).
then
((
res
)
=>
{
console
.
log
(
res
,
'---res'
)
_this
.
isLoading
=
false
;
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
_this
.
showList
=
true
;
_this
.
sourceData
=
res
.
data
.
data
;
_this
.
sourceData
.
restaurantLogo
=
DFSImg
(
res
.
data
.
data
.
restaurantLogo
);
console
.
log
(
_this
.
sourceData
,
DFSImg
(
res
.
data
.
data
.
restaurantLogo
),
"商家数据"
);
}
else
{
_this
.
showList
=
false
;
// wx.showToast({
// title: '附近暂无餐厅',
// icon: 'none',
// })
}
})
},
},
fail
:
function
(
err
)
{
fail
:
function
(
err
)
{
_this
.
isLoading
=
false
;
_this
.
isLoading
=
false
;
...
@@ -124,12 +104,35 @@ export default {
...
@@ -124,12 +104,35 @@ export default {
}
else
if
(
res
.
cancel
)
{
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
)
console
.
log
(
'用户点击取消'
)
}
}
_this
.
getList
({
longitude
:
""
,
latitude
:
""
});
}
}
})
})
}
}
})
})
},
},
methods
:
{
methods
:
{
getList
(
res
)
{
let
query
=
{
longitude
:
res
.
longitude
,
// 经度
latitude
:
res
.
latitude
// 纬度
}
console
.
log
(
'定位数据'
,
res
)
goods
.
getWlyList
(
query
).
then
((
res
)
=>
{
console
.
log
(
res
,
'---res'
)
this
.
isLoading
=
false
;
if
(
res
.
data
.
code
==
200
&&
res
.
data
.
data
)
{
this
.
showList
=
true
;
this
.
sourceData
=
res
.
data
.
data
;
this
.
sourceData
.
restaurantLogo
=
DFSImg
(
res
.
data
.
data
.
restaurantLogo
);
console
.
log
(
this
.
sourceData
,
DFSImg
(
res
.
data
.
data
.
restaurantLogo
),
"商家数据"
);
}
else
{
this
.
showList
=
false
;
}
})
},
viewMore
()
{
viewMore
()
{
let
url
=
"/pages/wxArticle/main?link="
+
encodeURIComponent
(
process
.
env
.
WLY_PROD_MARKETING
+
"/#/pages/restaurantList/index"
);
let
url
=
"/pages/wxArticle/main?link="
+
encodeURIComponent
(
process
.
env
.
WLY_PROD_MARKETING
+
"/#/pages/restaurantList/index"
);
app
.
$themeToLink
({
app
.
$themeToLink
({
...
...
static/nativeComponents/TimeLimitedDiscount/index.js
View file @
d8d64b5b
...
@@ -184,7 +184,9 @@ const componentOptions = {
...
@@ -184,7 +184,9 @@ const componentOptions = {
// this.setData({ isLoading: true });
// this.setData({ isLoading: true });
// }, 100);
// }, 100);
// }, 100);
// }, 100);
this
.
setData
({
isLoading
:
false
});
if
(
copyData
.
goodsItems
&&
copyData
.
goodsItems
.
length
>
0
)
{
this
.
setData
({
isLoading
:
false
});
}
copyData
.
goodsItems
.
forEach
((
item
,
index
)
=>
{
copyData
.
goodsItems
.
forEach
((
item
,
index
)
=>
{
item
.
productImgUrl
=
DFSImg
(
item
.
imgUrl
);
item
.
productImgUrl
=
DFSImg
(
item
.
imgUrl
);
item
.
productImgUrl1
=
DFSImg
(
item
.
imgUrl
);
item
.
productImgUrl1
=
DFSImg
(
item
.
imgUrl
);
...
@@ -309,7 +311,7 @@ const componentOptions = {
...
@@ -309,7 +311,7 @@ const componentOptions = {
type
:
1
,
type
:
1
,
link
:
`/goods/
${
productId
}
?limitedLime=true&endTime=
${
link
:
`/goods/
${
productId
}
?limitedLime=true&endTime=
${
this
.
data
.
datas
.
componentData
.
endTime
this
.
data
.
datas
.
componentData
.
endTime
}
&terminalProductId=
${
terminalProductId
}
&terminalGoodsMixId=
${
terminalGoodsMixId
}
`
}
&terminalProductId=
${
terminalProductId
?
terminalProductId
:
''
}
&terminalGoodsMixId=
${
terminalGoodsMixId
}
`
});
});
},
},
onclickOrder
(
e
)
{
onclickOrder
(
e
)
{
...
...
static/nativeComponents/TimeLimitedDiscount/index.wxml
View file @
d8d64b5b
...
@@ -14,12 +14,13 @@
...
@@ -14,12 +14,13 @@
class="countDown"
class="countDown"
bind:change="onChange"
bind:change="onChange"
>
>
<text class="endTimedot">距离活动结束</text>
<text class="endTime days">{{ timeData.days }}</text>
<text class="endTime days">{{ timeData.days }}</text>
<text class="endTimedot">
天
</text>
<text class="endTimedot"></text>
<text class="endTime hours">{{ timeData.hours }}</text>
<text class="endTime hours">{{ timeData.hours }}</text>
<text class="endTimedot">
:
</text>
<text class="endTimedot"></text>
<text class="endTime minute">{{ timeData.minutes }}</text>
<text class="endTime minute">{{ timeData.minutes }}</text>
<text class="endTimedot">
:
</text>
<text class="endTimedot"></text>
<text class="endTime second">{{ timeData.seconds }}</text>
<text class="endTime second">{{ timeData.seconds }}</text>
</van-count-down>
</van-count-down>
</view>
</view>
...
...
static/nativeComponents/TimeLimitedDiscount/index.wxss
View file @
d8d64b5b
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
background: #6a6b6b;
background: #6a6b6b;
color: #fff;
color: #fff;
font-weight: bold;
font-weight: bold;
font-size: 13px;
-webkit-border-radius: 6rpx;
-webkit-border-radius: 6rpx;
-moz-border-radius: 6rpx;
-moz-border-radius: 6rpx;
-ms-border-radius: 6rpx;
-ms-border-radius: 6rpx;
...
...
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