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
8564c70f
Commit
8564c70f
authored
Sep 09, 2023
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页渲染优化
parent
824b5d99
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
53 additions
and
28 deletions
+53
-28
src/components/basicTool/embed-module/index.vue
+1
-0
src/components/common/StoreAddr.vue
+6
-0
src/components/common/pageLoading.vue
+14
-6
src/components/content/text.vue
+0
-1
src/pages/home/index.vue
+29
-13
src/pages/pages_subpack/paySuccess/index.vue
+0
-1
src/utils/log.js
+0
-1
static/nativeComponents/Banner/index.js
+0
-2
static/nativeComponents/CubeNav/index.js
+0
-1
static/nativeComponents/GoodsList/index.wxml
+1
-1
static/nativeComponents/GoodsList/index.wxss
+2
-2
No files found.
src/components/basicTool/embed-module/index.vue
View file @
8564c70f
...
@@ -53,6 +53,7 @@ export default {
...
@@ -53,6 +53,7 @@ export default {
mounted
()
{
},
mounted
()
{
},
methods
:
{
methods
:
{
init
()
{
init
()
{
if
(
!
this
.
microPageId
)
return
;
shop
.
singlePageInfo
({
id
:
this
.
microPageId
}).
then
(
res
=>
{
shop
.
singlePageInfo
({
id
:
this
.
microPageId
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
this
.
contentList
=
res
.
data
.
data
.
pageData
?
JSON
.
parse
(
res
.
data
.
data
.
pageData
)
:
[];
this
.
contentList
=
res
.
data
.
data
.
pageData
?
JSON
.
parse
(
res
.
data
.
data
.
pageData
)
:
[];
...
...
src/components/common/StoreAddr.vue
View file @
8564c70f
...
@@ -39,6 +39,7 @@ export default {
...
@@ -39,6 +39,7 @@ export default {
};
};
},
},
async
onLoad
()
{
async
onLoad
()
{
try
{
let
shopInfo
=
await
shop
.
getShopInfo
(
JSON
.
parse
(
wx
.
getStorageSync
(
"extConfig"
)));
let
shopInfo
=
await
shop
.
getShopInfo
(
JSON
.
parse
(
wx
.
getStorageSync
(
"extConfig"
)));
console
.
log
(
shopInfo
,
'-------------shopInfo'
)
console
.
log
(
shopInfo
,
'-------------shopInfo'
)
if
(
shopInfo
.
data
.
code
==
200
)
{
if
(
shopInfo
.
data
.
code
==
200
)
{
...
@@ -51,8 +52,13 @@ export default {
...
@@ -51,8 +52,13 @@ export default {
this
.
$emit
(
"toUpdate"
);
this
.
$emit
(
"toUpdate"
);
// this.getShopList();
// this.getShopList();
});
});
}
else
{
this
.
$emit
(
"toUpdate"
);
}
}
this
.
reloadName
();
this
.
reloadName
();
}
catch
(
error
)
{
this
.
$emit
(
"toUpdate"
);
}
},
},
filters
:
{
filters
:
{
formatDistance
(
val
)
{
formatDistance
(
val
)
{
...
...
src/components/common/pageLoading.vue
View file @
8564c70f
<
template
>
<
template
>
<div
class=
"loadings"
v-if=
"shopLogo"
>
<div
class=
"loadings"
>
<div
class=
"img flex"
>
<div
class=
"img flex"
>
<image
:src=
"shopLogo"
alt=
""
mode=
"aspectFill"
></image>
<image
:src=
"shopLogo"
alt=
""
mode=
"aspectFill"
></image>
<van-loading
color=
"
black
"
size=
"60px"
/>
<van-loading
color=
"
#333
"
size=
"60px"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -22,12 +22,20 @@ export default {
...
@@ -22,12 +22,20 @@ export default {
},
},
computed
:
{
computed
:
{
shopLogo
()
{
shopLogo
()
{
let
logoUrl
=
app
.
globalData
&&
app
.
globalData
.
shopInfo
&&
app
.
globalData
.
shopInfo
.
logoUrl
;
let
logoUrl
=
""
;
if
(
wx
.
getStorageSync
(
"logoUrl"
))
{
logoUrl
=
wx
.
getStorageSync
(
"logoUrl"
);
}
else
{
logoUrl
=
app
.
globalData
&&
app
.
globalData
.
shopInfo
&&
app
.
globalData
.
shopInfo
.
logoUrl
;
}
return
logoUrl
?
DFSImg
(
logoUrl
):
""
;
return
logoUrl
?
DFSImg
(
logoUrl
):
""
;
},
},
},
},
created
()
{
},
created
()
{
},
mounted
()
{
}
mounted
()
{
},
methods
:
{
}
};
};
</
script
>
</
script
>
...
@@ -39,13 +47,13 @@ export default {
...
@@ -39,13 +47,13 @@ export default {
left
:
0
;
left
:
0
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
z-index
:
3000
;
z-index
:
9999
;
.img{
.img{
width
:
50px
;
width
:
50px
;
height
:
50px
;
height
:
50px
;
position
:
relative
;
position
:
relative
;
padding
:
2px
;
padding
:
2px
;
margin
:
60%
auto
0
;
margin
:
40vh
auto
0
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
image{
image{
...
...
src/components/content/text.vue
View file @
8564c70f
...
@@ -78,7 +78,6 @@ export default {
...
@@ -78,7 +78,6 @@ export default {
},
},
onLoad
(){
onLoad
(){
console
.
log
(
this
.
datas
,
'iu'
)
},
},
computed
:
{
computed
:
{
getPaddingList
()
{
getPaddingList
()
{
...
...
src/pages/home/index.vue
View file @
8564c70f
...
@@ -521,7 +521,6 @@ export default {
...
@@ -521,7 +521,6 @@ export default {
},
},
onShow
()
{
onShow
()
{
console
.
log
(
new
Date
().
getTime
(),
'load-----home-onShow'
)
console
.
log
(
new
Date
().
getTime
(),
'load-----home-onShow'
)
this
.
pageLoading
=
false
;
console
.
log
(
this
.
reloadPage
,
'-reloadPage2'
)
console
.
log
(
this
.
reloadPage
,
'-reloadPage2'
)
if
(
this
.
reloadPage
)
{
if
(
this
.
reloadPage
)
{
this
.
refreshInit
();
this
.
refreshInit
();
...
@@ -555,8 +554,12 @@ export default {
...
@@ -555,8 +554,12 @@ export default {
methods
:
{
methods
:
{
reloadEnterShopRule
()
{
reloadEnterShopRule
()
{
console
.
log
(
'eloadEnterShopRule'
)
// 进店规则--首次进店调用
// 进店规则--首次进店调用
if
(
this
.
h5Params
&&
this
.
h5Params
.
offlineShopCode
)
return
;
if
(
this
.
h5Params
&&
this
.
h5Params
.
offlineShopCode
)
{
this
.
pageLoading
=
false
;
return
;
};
console
.
log
(
'home-methods-reloadEnterShopRule'
)
console
.
log
(
'home-methods-reloadEnterShopRule'
)
if
(
wx
.
getStorageSync
(
"firstView"
))
{
if
(
wx
.
getStorageSync
(
"firstView"
))
{
console
.
log
(
'reloadEnterShopRule-------1'
)
console
.
log
(
'reloadEnterShopRule-------1'
)
...
@@ -568,9 +571,10 @@ export default {
...
@@ -568,9 +571,10 @@ export default {
}
}
},
},
async
enterStoreRule
()
{
async
enterStoreRule
()
{
try
{
let
shopInfo
=
await
shop
.
getShopInfo
(
JSON
.
parse
(
wx
.
getStorageSync
(
"extConfig"
)));
let
shopInfo
=
await
shop
.
getShopInfo
(
JSON
.
parse
(
wx
.
getStorageSync
(
"extConfig"
)));
let
openThousandsStoresFlag
=
shopInfo
.
data
.
data
.
openThousandsStoresFlag
==
1
;
let
openThousandsStoresFlag
=
shopInfo
.
data
.
data
.
openThousandsStoresFlag
==
1
;
if
(
!
openThousandsStoresFlag
)
return
;
if
(
openThousandsStoresFlag
);
{
console
.
log
(
wx
.
getStorageSync
(
"locationObj"
),
'--locationObj'
)
console
.
log
(
wx
.
getStorageSync
(
"locationObj"
),
'--locationObj'
)
let
locationObj
=
wx
.
getStorageSync
(
"locationObj"
)
?
JSON
.
parse
(
wx
.
getStorageSync
(
"locationObj"
))
:
{};
let
locationObj
=
wx
.
getStorageSync
(
"locationObj"
)
?
JSON
.
parse
(
wx
.
getStorageSync
(
"locationObj"
))
:
{};
let
query
=
{
let
query
=
{
...
@@ -609,7 +613,11 @@ export default {
...
@@ -609,7 +613,11 @@ export default {
shop
.
saveEnterShopRecord
(
query2
);
shop
.
saveEnterShopRecord
(
query2
);
}
}
}
}
// this.pageLoading = false;
}
}
catch
(
error
)
{
}
this
.
pageLoading
=
false
;
},
},
toPageLoading
()
{
toPageLoading
()
{
// this.pageLoading = true;
// this.pageLoading = true;
...
@@ -895,7 +903,6 @@ export default {
...
@@ -895,7 +903,6 @@ export default {
}
}
if
(
this
.
$mp
.
page
&&
this
.
$mp
.
page
.
selectAllComponents
(
".transverse-label-goodsListItem"
)){
if
(
this
.
$mp
.
page
&&
this
.
$mp
.
page
.
selectAllComponents
(
".transverse-label-goodsListItem"
)){
this
.
$mp
.
page
.
selectAllComponents
(
".transverse-label-goodsListItem"
).
forEach
(
item
=>
{
this
.
$mp
.
page
.
selectAllComponents
(
".transverse-label-goodsListItem"
).
forEach
(
item
=>
{
console
.
log
(
item
,
'-this.$mp.page.selectComponent(".goodsListItem")'
)
item
.
getScroll
(
el
)
item
.
getScroll
(
el
)
})
})
}
}
...
@@ -1094,20 +1101,29 @@ export default {
...
@@ -1094,20 +1101,29 @@ export default {
async
getThemeList
()
{
async
getThemeList
()
{
console
.
log
(
"getThemeList"
)
console
.
log
(
"getThemeList"
)
this
.
pageLoading
=
true
;
this
.
pageLoading
=
true
;
try
{
await
app
.
getThemePage
(
this
.
$store
.
state
.
extConfig
);
await
app
.
getThemePage
(
this
.
$store
.
state
.
extConfig
);
}
catch
(
error
)
{
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
pageLoading
=
false
;
this
.
pageLoading
=
false
;
},
500
);
console
.
log
(
"加载完成了"
);
},
refreshInit
()
{
this
.
pageLoading
=
true
;
setTimeout
(()
=>
{
wx
.
stopPullDownRefresh
();
this
.
pageLoading
=
false
;
},
1500
);
},
1500
);
},
async
refreshInit
()
{
// this.pageLoading = true;
// setTimeout(() => {
// this.pageLoading = false;
// }, 1500);
log
.
info
(
'onPullDownRefresh'
,
this
.
$store
.
state
.
extConfig
)
log
.
info
(
'onPullDownRefresh'
,
this
.
$store
.
state
.
extConfig
)
app
.
getShopInfo
(
this
.
$store
.
state
.
extConfig
);
app
.
getShopInfo
(
this
.
$store
.
state
.
extConfig
);
this
.
getThemeList
();
try
{
await
this
.
getThemeList
();
}
catch
(
error
)
{
}
wx
.
stopPullDownRefresh
();
}
}
},
},
async
onShareAppMessage
(
res
){
async
onShareAppMessage
(
res
){
...
...
src/pages/pages_subpack/paySuccess/index.vue
View file @
8564c70f
...
@@ -284,7 +284,6 @@ export default {
...
@@ -284,7 +284,6 @@ export default {
}
}
if
(
this
.
$mp
.
page
&&
this
.
$mp
.
page
.
selectAllComponents
(
".transverse-label-goodsListItem"
)){
if
(
this
.
$mp
.
page
&&
this
.
$mp
.
page
.
selectAllComponents
(
".transverse-label-goodsListItem"
)){
this
.
$mp
.
page
.
selectAllComponents
(
".transverse-label-goodsListItem"
).
forEach
(
item
=>
{
this
.
$mp
.
page
.
selectAllComponents
(
".transverse-label-goodsListItem"
).
forEach
(
item
=>
{
console
.
log
(
item
,
'-this.$mp.page.selectComponent(".goodsListItem")'
)
item
.
getScroll
(
el
)
item
.
getScroll
(
el
)
})
})
}
}
...
...
src/utils/log.js
View file @
8564c70f
...
@@ -8,7 +8,6 @@ module.exports = {
...
@@ -8,7 +8,6 @@ module.exports = {
log
.
debug
.
apply
(
log
,
arguments
)
log
.
debug
.
apply
(
log
,
arguments
)
},
},
info
()
{
info
()
{
console
.
log
(
'日志log级别'
);
if
(
!
log
)
return
if
(
!
log
)
return
log
.
info
.
apply
(
log
,
arguments
)
log
.
info
.
apply
(
log
,
arguments
)
},
},
...
...
static/nativeComponents/Banner/index.js
View file @
8564c70f
...
@@ -27,14 +27,12 @@ Component({
...
@@ -27,14 +27,12 @@ Component({
newArr
:
[]
newArr
:
[]
},
},
ready
()
{
ready
()
{
console
.
log
(
app
.
setHomeBgImg
,
"----------------------30"
);
this
.
setData
({
newArr
:
this
.
newList
()
});
this
.
setData
({
newArr
:
this
.
newList
()
});
this
.
bannerChange
({
this
.
bannerChange
({
detail
:
{
detail
:
{
current
:
0
current
:
0
}
}
});
});
console
.
log
(
this
.
data
.
newArr
,
this
.
newList
(),
"--------32"
);
},
},
methods
:
{
methods
:
{
newList
()
{
newList
()
{
...
...
static/nativeComponents/CubeNav/index.js
View file @
8564c70f
...
@@ -43,7 +43,6 @@ Component({
...
@@ -43,7 +43,6 @@ Component({
let
columnWidthArr
=
[
'100%'
,
'50%'
,
'33.3%'
,
'25%'
,
'20%'
,
'16.6%'
]
let
columnWidthArr
=
[
'100%'
,
'50%'
,
'33.3%'
,
'25%'
,
'20%'
,
'16.6%'
]
this
.
data
.
datas
.
componentData
.
imgList
.
forEach
(
item
=>
{
this
.
data
.
datas
.
componentData
.
imgList
.
forEach
(
item
=>
{
console
.
log
(
item
,
'---------------44'
)
item
.
imageUrl
=
item
.
imageUrl
?
app
.
DFSImg
(
item
.
imageUrl
,
400
,
400
)
:
''
item
.
imageUrl
=
item
.
imageUrl
?
app
.
DFSImg
(
item
.
imageUrl
,
400
,
400
)
:
''
})
})
this
.
setData
({
this
.
setData
({
...
...
static/nativeComponents/GoodsList/index.wxml
View file @
8564c70f
...
@@ -179,7 +179,7 @@
...
@@ -179,7 +179,7 @@
<view
<view
class="moreBottom"
class="moreBottom"
bindtap="viewMore"
bindtap="viewMore"
wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='bottom' && datas.componentData['goodsSource']!='assign' && datas.componentData['goodsSource']!='intelligenceRec'}}"
wx:if="{{datas.componentData['moreShow'] && datas.componentData.moreButtonSite=='bottom' && datas.componentData['goodsSource']!='assign' && datas.componentData['goodsSource']!='intelligenceRec'
&& !loading
}}"
>
>
查看更多
查看更多
<text class="jt"></text>
<text class="jt"></text>
...
...
static/nativeComponents/GoodsList/index.wxss
View file @
8564c70f
...
@@ -44,8 +44,8 @@ image{
...
@@ -44,8 +44,8 @@ image{
display: inline-block;
display: inline-block;
border-top: 1px solid;
border-top: 1px solid;
border-right: 1px solid;
border-right: 1px solid;
width:
10
px;
width:
8
px;
height:
10
px;
height:
8
px;
-webkit-transform: rotate(-135deg);
-webkit-transform: rotate(-135deg);
transform: rotate(405deg);
transform: rotate(405deg);
margin-left: 0px;
margin-left: 0px;
...
...
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