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
f6ec0591
Commit
f6ec0591
authored
Sep 25, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
触点bug
parent
ada8544e
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
9 deletions
+54
-9
addAddress.js
src/pages/addAddress/addAddress.js
+4
-0
myShare.js
src/pages/myShare/myShare.js
+5
-2
productDetail.js
src/pages/productDetail/productDetail.js
+16
-2
wantToBuyDetail.js
src/pages/wantToBuyDetail/wantToBuyDetail.js
+19
-3
myRelease.js
src/subPackage/page/pages/myRelease/myRelease.js
+5
-2
city1.js
src/utils/city1.js
+0
-0
wxService.js
src/utils/wxService.js
+5
-0
No files found.
src/pages/addAddress/addAddress.js
View file @
f6ec0591
// pages/addAddress/addAddress.js
// pages/addAddress/addAddress.js
const
wxService
=
require
(
'../../utils/wxService'
)
const
wxService
=
require
(
'../../utils/wxService'
)
const
city
=
require
(
'../../utils/city'
)
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
wxService
.
page
({
wxService
.
page
({
...
@@ -64,6 +65,7 @@ wxService.page({
...
@@ -64,6 +65,7 @@ wxService.page({
init
()
{
init
()
{
wxService
.
getC1
().
then
((
c1
)
=>
{
wxService
.
getC1
().
then
((
c1
)
=>
{
console
.
log
(
'C1'
,
c1
)
return
wxService
.
Promise
.
all
([
wxService
.
Promise
.
resolve
(
c1
),
wxService
.
getC2ByC1
(
'北京'
),
wxService
.
getC3ByC2
(
'北京北京市'
)])
return
wxService
.
Promise
.
all
([
wxService
.
Promise
.
resolve
(
c1
),
wxService
.
getC2ByC1
(
'北京'
),
wxService
.
getC3ByC2
(
'北京北京市'
)])
}).
then
(
res
=>
{
}).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
...
@@ -73,6 +75,7 @@ wxService.page({
...
@@ -73,6 +75,7 @@ wxService.page({
this
.
setData
({
this
.
setData
({
citys
citys
})
})
console
.
log
(
'000000000------'
,
citys
)
})
})
},
},
...
@@ -107,6 +110,7 @@ wxService.page({
...
@@ -107,6 +110,7 @@ wxService.page({
this
.
setData
({
this
.
setData
({
citys
citys
})
})
})
})
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
...
...
src/pages/myShare/myShare.js
View file @
f6ec0591
...
@@ -64,8 +64,11 @@ wxService.page({
...
@@ -64,8 +64,11 @@ wxService.page({
*/
*/
onShow
()
{
onShow
()
{
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
time
=
Date
.
parse
(
new
Date
())
const
premiumExpireTime
=
member
&&
member
.
premiumExpireTime
||
''
if
(
member
&&
member
.
premiumExpireTime
&&
member
.
premiumExpireTime
>
time
)
{
// ios 兼容 是不是plus vip
let
currentEndTime
=
(
new
Date
(
premiumExpireTime
.
replace
(
/-/g
,
'/'
))).
getTime
();
// 到期时间
let
time
=
(
new
Date
()).
getTime
();
if
(
member
&&
member
.
premiumExpireTime
&&
currentEndTime
>
time
)
{
this
.
setData
({
this
.
setData
({
plus
:
1
plus
:
1
})
})
...
...
src/pages/productDetail/productDetail.js
View file @
f6ec0591
...
@@ -40,11 +40,17 @@ wxService.page({
...
@@ -40,11 +40,17 @@ wxService.page({
// wx.removeStorageSync('TEMP_TENTACLE_INFO');
// wx.removeStorageSync('TEMP_TENTACLE_INFO');
// wx.removeStorageSync('TIME_EXPIRATION');
// wx.removeStorageSync('TIME_EXPIRATION');
// }
// }
}
console
.
log
(
'options'
,
options
)
}
let
memberId
=
options
.
memberId
;
let
memberId
=
options
.
memberId
;
if
(
memberId
)
{
if
(
memberId
)
{
wxService
.
get
(
`/sale/product/buyer/findByProductId?productId=
${
this
.
data
.
productId
}
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
this
.
setData
({
productInfo
:
data
})
let
content
=
{
let
content
=
{
title
:
this
.
data
.
productInfo
.
productName
,
title
:
this
.
data
.
productInfo
.
productName
,
id
:
this
.
data
.
productInfo
.
productId
,
id
:
this
.
data
.
productInfo
.
productId
,
...
@@ -60,7 +66,14 @@ wxService.page({
...
@@ -60,7 +66,14 @@ wxService.page({
}
}
this
.
generatePointObject
(
tentacleInfo
);
this
.
generatePointObject
(
tentacleInfo
);
}
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
}
}
},
},
swiperChange
(
e
)
{
swiperChange
(
e
)
{
...
@@ -149,6 +162,7 @@ wxService.page({
...
@@ -149,6 +162,7 @@ wxService.page({
this
.
setData
({
this
.
setData
({
productInfo
:
data
productInfo
:
data
})
})
console
.
log
(
'111111111111'
,
this
.
data
.
productInfo
)
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
...
...
src/pages/wantToBuyDetail/wantToBuyDetail.js
View file @
f6ec0591
...
@@ -34,8 +34,19 @@ wxService.page({
...
@@ -34,8 +34,19 @@ wxService.page({
})
})
}
}
let
memberId
=
options
.
memberId
;
let
memberIdByPage
=
options
.
memberId
;
if
(
memberId
)
{
if
(
memberIdByPage
)
{
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
wxService
.
post
(
`/merchant/contentMobileTerminal/getContentParticulars`
,
{
id
:
this
.
data
.
id
,
userId
:
memberId
}).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
this
.
setData
({
contentInfo
:
data
})
let
content
=
{
let
content
=
{
title
:
this
.
data
.
contentInfo
.
headline
,
title
:
this
.
data
.
contentInfo
.
headline
,
id
:
this
.
data
.
contentInfo
.
id
,
id
:
this
.
data
.
contentInfo
.
id
,
...
@@ -45,7 +56,7 @@ wxService.page({
...
@@ -45,7 +56,7 @@ wxService.page({
let
tentacleInfo
=
{
let
tentacleInfo
=
{
content
:
JSON
.
stringify
(
content
),
content
:
JSON
.
stringify
(
content
),
contentId
:
this
.
data
.
contentInfo
.
id
,
contentId
:
this
.
data
.
contentInfo
.
id
,
tentacleId
:
memberId
,
tentacleId
:
memberIdByPage
,
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
DETAILS_OF_THE_CONTENT
,
//内容类型
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
DETAILS_OF_THE_CONTENT
,
//内容类型
title
:
this
.
data
.
contentInfo
.
headline
,
//标题
title
:
this
.
data
.
contentInfo
.
headline
,
//标题
type
:
3
// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
type
:
3
// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
...
@@ -53,6 +64,11 @@ wxService.page({
...
@@ -53,6 +64,11 @@ wxService.page({
this
.
generatePointObject
(
tentacleInfo
);
this
.
generatePointObject
(
tentacleInfo
);
}
}
}).
finally
(()
=>
{
})
}
},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
...
...
src/subPackage/page/pages/myRelease/myRelease.js
View file @
f6ec0591
...
@@ -53,8 +53,11 @@ wxService.page({
...
@@ -53,8 +53,11 @@ wxService.page({
*/
*/
onShow
()
{
onShow
()
{
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
time
=
Date
.
parse
(
new
Date
())
const
premiumExpireTime
=
member
&&
member
.
premiumExpireTime
||
''
if
(
member
&&
member
.
premiumExpireTime
&&
member
.
premiumExpireTime
>
time
)
{
// ios 兼容 是不是plus vip
let
currentEndTime
=
(
new
Date
(
premiumExpireTime
.
replace
(
/-/g
,
'/'
))).
getTime
();
// 到期时间
let
time
=
(
new
Date
()).
getTime
();
if
(
member
&&
member
.
premiumExpireTime
&&
currentEndTime
>
time
)
{
this
.
setData
({
this
.
setData
({
plus
:
1
plus
:
1
})
})
...
...
src/utils/city1.js
0 → 100644
View file @
f6ec0591
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/utils/wxService.js
View file @
f6ec0591
...
@@ -918,13 +918,16 @@ class WXService extends Http {
...
@@ -918,13 +918,16 @@ class WXService extends Http {
getCitysEnterty
()
{
getCitysEnterty
()
{
const
citys
=
citysData
const
citys
=
citysData
console
.
log
(
'8888'
,
citys
)
let
list
=
{}
let
list
=
{}
if
(
this
.
citysEntertys
)
{
if
(
this
.
citysEntertys
)
{
list
=
this
.
citysEntertys
list
=
this
.
citysEntertys
console
.
log
(
'list'
,
list
)
}
else
{
}
else
{
for
(
const
key
in
citys
)
{
for
(
const
key
in
citys
)
{
if
(
citys
.
hasOwnProperty
(
key
))
{
if
(
citys
.
hasOwnProperty
(
key
))
{
const
element
=
citys
[
key
]
const
element
=
citys
[
key
]
console
.
log
(
'element'
,
element
)
handler2citys
({
handler2citys
({
city
:
element
,
city
:
element
,
result
:
{
name
:
[],
code
:
[]
},
result
:
{
name
:
[],
code
:
[]
},
...
@@ -994,6 +997,8 @@ class WXService extends Http {
...
@@ -994,6 +997,8 @@ class WXService extends Http {
return
result
return
result
}
}
}
}
const
wxService
=
new
WXService
()
const
wxService
=
new
WXService
()
...
...
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