Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
30dc7441
Commit
30dc7441
authored
Feb 27, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
0c88743f
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
60 additions
and
20 deletions
+60
-20
app.js
src/app.js
+3
-1
wxHtml.js
src/component/html2wxml/wxHtml.js
+14
-1
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+1
-1
project.config.json
src/project.config.json
+2
-2
home.wxml
src/shoppingGuid/page/pages/home/home.wxml
+2
-2
moreCoupons.json
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.json
+2
-1
moreProducts.json
src/shoppingGuid/page/pages/moreProducts/moreProducts.json
+2
-1
welfare.wxml
src/shoppingGuid/page/pages/welfare/welfare.wxml
+2
-2
chooseStore.js
src/subPackage/page/pages/chooseStore/chooseStore.js
+20
-2
chooseStore.json
src/subPackage/page/pages/chooseStore/chooseStore.json
+1
-1
chooseStore.wxml
src/subPackage/page/pages/chooseStore/chooseStore.wxml
+3
-1
h5page.js
src/subPackage/page/pages/h5/h5page.js
+2
-1
html2json.js
src/wxParser/html2json.js
+0
-1
index.js
src/wxParser/index.js
+1
-1
index.wxss
src/wxParser/index.wxss
+5
-2
No files found.
src/app.js
View file @
30dc7441
...
@@ -17,7 +17,7 @@ App({
...
@@ -17,7 +17,7 @@ App({
// 默认 false
// 默认 false
wx
.
setStorageSync
(
'reLoginErr'
,
false
)
wx
.
setStorageSync
(
'reLoginErr'
,
false
)
try
{
try
{
this
.
isFromQiyeConsoleIn
(
e
);
this
.
isFromQiyeConsoleIn
(
this
.
options
);
let
res
=
wx
.
getSystemInfoSync
();
// 获取当前运行环境
let
res
=
wx
.
getSystemInfoSync
();
// 获取当前运行环境
config
.
pixelRate
=
res
.
windowWidth
/
750
;
config
.
pixelRate
=
res
.
windowWidth
/
750
;
...
@@ -85,6 +85,8 @@ App({
...
@@ -85,6 +85,8 @@ App({
onShow
:
function
(
options
=
{})
{
onShow
:
function
(
options
=
{})
{
//检查是不是有更新
//检查是不是有更新
this
.
checkForUpdate
();
this
.
checkForUpdate
();
// console.log('this.options----', this.options)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
// 获取当前会员是否是体验者
// 获取当前会员是否是体验者
...
...
src/component/html2wxml/wxHtml.js
View file @
30dc7441
...
@@ -50,10 +50,23 @@ Component({
...
@@ -50,10 +50,23 @@ Component({
tapLink
:
(
url
)
=>
{
// 点击超链接时的回调函数
tapLink
:
(
url
)
=>
{
// 点击超链接时的回调函数
// url 就是 HTML 富文本中 a 标签的 href 属性值
// url 就是 HTML 富文本中 a 标签的 href 属性值
// 这里可以自定义点击事件逻辑,比如页面跳转
// 这里可以自定义点击事件逻辑,比如页面跳转
console
.
log
(
url
)
if
(
url
){
//跳转到web页面
if
(
url
.
indexOf
(
'http:'
)
>
-
1
||
url
.
indexOf
(
'https'
)
>
-
1
){
let
enCodeUrl
=
encodeURIComponent
(
url
);
let
sharePath
=
`/subPackage/page/pages/h5/h5page?url=
${
enCodeUrl
}
`
wx
.
navigateTo
({
wx
.
navigateTo
({
url
url
:
sharePath
,
})
})
}
}
else
{
wx
.
navigateTo
({
url
:
url
,
})
}
}
}
}
}
this
.
data
.
config
=
config
this
.
data
.
config
=
config
},
},
...
...
src/pages/confirmOrder/confirmOrder.js
View file @
30dc7441
...
@@ -150,7 +150,7 @@ wxService.page({
...
@@ -150,7 +150,7 @@ wxService.page({
//选择门店去
//选择门店去
onTapSelectStore
(){
onTapSelectStore
(){
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/subPackage/page/pages/chooseStore/chooseStore'
,
url
:
'/subPackage/page/pages/chooseStore/chooseStore
?isFrom=order
'
,
});
});
},
},
//订单备注输入
//订单备注输入
...
...
src/project.config.json
View file @
30dc7441
...
@@ -511,10 +511,10 @@
...
@@ -511,10 +511,10 @@
"query"
:
""
"query"
:
""
},
},
{
{
"id"
:
-1
,
"id"
:
70
,
"name"
:
"选择门店"
,
"name"
:
"选择门店"
,
"pathName"
:
"subPackage/page/pages/chooseStore/chooseStore"
,
"pathName"
:
"subPackage/page/pages/chooseStore/chooseStore"
,
"query"
:
""
,
"query"
:
"
isFrom=guid
"
,
"scene"
:
null
"scene"
:
null
},
},
{
{
...
...
src/shoppingGuid/page/pages/home/home.wxml
View file @
30dc7441
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<view class='main-container'>
<view class='main-container'>
<!-- 优惠券 -->
<!-- 优惠券 -->
<view class='mg-b-40'>
<view class='mg-b-40'>
<view class='header'>
优惠券
</view>
<view class='header'>
发券中心
</view>
<view class='status-bar'>
<view class='status-bar'>
<view class='status-items'>
<view class='status-items'>
<view
<view
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
</view>
</view>
<!-- 爆款推荐 -->
<!-- 爆款推荐 -->
<view class='mg-b-40'>
<view class='mg-b-40'>
<view class='header'>
爆款推荐
</view>
<view class='header'>
商城热卖
</view>
<view class='status-bar'>
<view class='status-bar'>
<view class='status-items'>
<view class='status-items'>
<view class='status-bar-item {{item.active ? "active" : ""}}'
<view class='status-bar-item {{item.active ? "active" : ""}}'
...
...
src/shoppingGuid/page/pages/moreCoupons/moreCoupons.json
View file @
30dc7441
{
{
"navigationBarTitleText"
:
"
更多优惠券
"
,
"navigationBarTitleText"
:
"
发券中心
"
,
"enablePullDownRefresh"
:
true
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{}
"usingComponents"
:
{}
}
}
\ No newline at end of file
src/shoppingGuid/page/pages/moreProducts/moreProducts.json
View file @
30dc7441
{
{
"navigationBarTitleText"
:
"
更多商品
"
,
"navigationBarTitleText"
:
"
商城热卖
"
,
"enablePullDownRefresh"
:
true
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{}
"usingComponents"
:
{}
}
}
\ No newline at end of file
src/shoppingGuid/page/pages/welfare/welfare.wxml
View file @
30dc7441
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<view class='main-container'>
<view class='main-container'>
<!-- 优惠券 -->
<!-- 优惠券 -->
<view class='mg-b-40'>
<view class='mg-b-40'>
<view class='header'>
优惠券
</view>
<view class='header'>
发券中心
</view>
<view class='status-bar'>
<view class='status-bar'>
<view class='status-items'>
<view class='status-items'>
<view class='status-bar-item {{item.active ? "active" : ""}}'
<view class='status-bar-item {{item.active ? "active" : ""}}'
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
</view>
</view>
<!-- 爆款推荐 -->
<!-- 爆款推荐 -->
<view class='mg-b-40'>
<view class='mg-b-40'>
<view class='header'>
爆款推荐
</view>
<view class='header'>
商城热卖
</view>
<view class='status-bar'>
<view class='status-bar'>
<view class='status-items'>
<view class='status-items'>
<view class='status-bar-item {{item.active ? "active" : ""}}'
<view class='status-bar-item {{item.active ? "active" : ""}}'
...
...
src/subPackage/page/pages/chooseStore/chooseStore.js
View file @
30dc7441
...
@@ -21,23 +21,41 @@ wxService.page({
...
@@ -21,23 +21,41 @@ wxService.page({
// iconPath: '/assets/imgs/location.png'
// iconPath: '/assets/imgs/location.png'
// }
// }
],
],
storeList
:
[]
storeList
:
[],
isFrom
:
''
,
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
data
.
isFrom
=
options
.
isFrom
;
this
.
setData
({
isFrom
:
this
.
data
.
isFrom
});
wx
.
hideShareMenu
();
wx
.
hideShareMenu
();
},
},
//去下单
//去下单
onTapToOrder
(
e
){
onTapToOrder
(
e
){
let
item
=
e
.
currentTarget
.
dataset
.
item
;
let
item
=
e
.
currentTarget
.
dataset
.
item
;
if
(
this
.
data
.
isFrom
==
'order'
){
wx
.
setStorageSync
(
'choosedStoreInfo'
,
item
);
wx
.
setStorageSync
(
'choosedStoreInfo'
,
item
);
wx
.
navigateBack
({
wx
.
navigateBack
({
delta
:
1
delta
:
1
});
});
}
else
{
let
latitude
=
item
.
latitude
;
let
longitude
=
item
.
longitude
;
wx
.
openLocation
({
latitude
:
latitude
,
longitude
:
longitude
,
name
:
item
.
fullname
?
item
.
fullname
:
item
.
name
,
address
:
item
.
storeFullAddress
});
}
},
},
/**
/**
...
...
src/subPackage/page/pages/chooseStore/chooseStore.json
View file @
30dc7441
{
{
"navigationBarTitleText"
:
"
选择
门店"
,
"navigationBarTitleText"
:
"
附近
门店"
,
"enablePullDownRefresh"
:
true
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"usingComponents"
:
{
"empty"
:
"../../../../component/empty/empty"
"empty"
:
"../../../../component/empty/empty"
...
...
src/subPackage/page/pages/chooseStore/chooseStore.wxml
View file @
30dc7441
...
@@ -37,7 +37,9 @@
...
@@ -37,7 +37,9 @@
<view style="margin-top:5rpx;">{{item.storeFullAddress}}</view>
<view style="margin-top:5rpx;">{{item.storeFullAddress}}</view>
<view style="margin-top:5rpx;">营业时间:{{item.businessTimeText}}</view>
<view style="margin-top:5rpx;">营业时间:{{item.businessTimeText}}</view>
</view>
</view>
<view class="rg-to-buy" bindtap="onTapToOrder" data-item="{{item}}">去下单</view>
<view class="rg-to-buy" bindtap="onTapToOrder" data-item="{{item}}">
{{isFrom == 'order' ? '去下单' : '去导航'}}
</view>
</view>
</view>
</view>
</view>
<!-- 空时 -->
<!-- 空时 -->
...
...
src/subPackage/page/pages/h5/h5page.js
View file @
30dc7441
...
@@ -20,13 +20,14 @@ wxService.page({
...
@@ -20,13 +20,14 @@ wxService.page({
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
let
url
=
options
.
url
;
let
url
=
options
.
url
;
console
.
log
(
options
)
if
(
url
)
{
if
(
url
)
{
url
=
decodeURIComponent
(
url
);
url
=
decodeURIComponent
(
url
);
this
.
data
.
title
=
options
.
title
;
this
.
data
.
title
=
options
.
title
;
if
(
this
.
data
.
title
){
wx
.
setNavigationBarTitle
({
wx
.
setNavigationBarTitle
({
title
:
this
.
data
.
title
,
title
:
this
.
data
.
title
,
});
});
}
this
.
setData
({
this
.
setData
({
path
:
url
path
:
url
...
...
src/wxParser/html2json.js
View file @
30dc7441
...
@@ -86,7 +86,6 @@ const html2json = (html, bindName) => {
...
@@ -86,7 +86,6 @@ const html2json = (html, bindName) => {
}
}
nodeStyles
=
[]
nodeStyles
=
[]
if
(
attrs
.
length
)
{
if
(
attrs
.
length
)
{
node
.
attr
=
{}
node
.
attr
=
{}
attrs
.
map
((
item
)
=>
{
attrs
.
map
((
item
)
=>
{
...
...
src/wxParser/index.js
View file @
30dc7441
...
@@ -41,7 +41,7 @@ const parse = ({ bind = 'wxParserData', html, target, enablePreviewImage = true,
...
@@ -41,7 +41,7 @@ const parse = ({ bind = 'wxParserData', html, target, enablePreviewImage = true,
})
})
}
}
}
}
// debugger
// 点击超链接
// 点击超链接
if
(
Object
.
prototype
.
toString
.
call
(
tapLink
)
===
'[object Function]'
)
{
if
(
Object
.
prototype
.
toString
.
call
(
tapLink
)
===
'[object Function]'
)
{
that
.
tapWxParserA
=
(
e
)
=>
{
that
.
tapWxParserA
=
(
e
)
=>
{
...
...
src/wxParser/index.wxss
View file @
30dc7441
...
@@ -118,10 +118,13 @@
...
@@ -118,10 +118,13 @@
.wxParser-video {
.wxParser-video {
text-align: center;
text-align: center;
margin: 10rpx 0; }
margin: 10rpx 0;
padding: 0 20rpx;
}
.wxParser-video-video {
.wxParser-video-video {
width: 100%; }
width: 100%;
}
.wxParser-audio {
.wxParser-audio {
text-align: center;
text-align: center;
...
...
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