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
065dc74b
Commit
065dc74b
authored
Dec 23, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单相关
parent
d167bd8b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
316 additions
and
179 deletions
+316
-179
app.js
src/app.js
+2
-2
skuPopup.js
src/component/skuPopup/skuPopup.js
+16
-0
index.js
src/config/index.js
+1
-1
activateCardCallback.js
src/pages/activateCard/activateCardCallback.js
+4
-1
addAddress.js
src/pages/addAddress/addAddress.js
+7
-2
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+92
-55
confirmOrder.wxml
src/pages/confirmOrder/confirmOrder.wxml
+5
-1
myAddress.js
src/pages/myAddress/myAddress.js
+17
-15
productDetail.wxml
src/pages/productDetail/productDetail.wxml
+3
-1
inviteFriends.js
src/palette/inviteFriends.js
+60
-23
project.config.json
src/project.config.json
+3
-3
share.js
src/subPackage/page/pages/share/share.js
+61
-57
share.wxml
src/subPackage/page/pages/share/share.wxml
+4
-8
share.wxss
src/subPackage/page/pages/share/share.wxss
+12
-5
wxService.js
src/utils/wxService.js
+29
-5
No files found.
src/app.js
View file @
065dc74b
...
@@ -91,8 +91,8 @@ App({
...
@@ -91,8 +91,8 @@ App({
const
{
member
}
=
baseUserInfo
const
{
member
}
=
baseUserInfo
const
curMemberTrial
=
member
&&
member
.
trial
||
false
const
curMemberTrial
=
member
&&
member
.
trial
||
false
wx
.
setStorageSync
(
'isExperiencer'
,
curMemberTrial
)
wx
.
setStorageSync
(
'isExperiencer'
,
curMemberTrial
)
// console.log('调用微信开卡组件回调参数---', options)
if
(
options
.
referrerInfo
&&
options
.
referrerInfo
.
extraData
!=
null
){
if
(
options
.
referrerInfo
&&
options
.
referrerInfo
.
extraData
!=
null
&&
options
.
referrerInfo
.
extraData
!=
undefined
){
const
{
activate_ticket
,
card_id
,
code
,
errCode
,
wx_activate_after_submit_url
}
=
options
.
referrerInfo
.
extraData
const
{
activate_ticket
,
card_id
,
code
,
errCode
,
wx_activate_after_submit_url
}
=
options
.
referrerInfo
.
extraData
let
urlData
=
wx_activate_after_submit_url
.
split
(
"?"
);
let
urlData
=
wx_activate_after_submit_url
.
split
(
"?"
);
let
url
=
urlData
[
0
];
let
url
=
urlData
[
0
];
...
...
src/component/skuPopup/skuPopup.js
View file @
065dc74b
...
@@ -179,6 +179,22 @@ Component({
...
@@ -179,6 +179,22 @@ Component({
}
}
}
}
if
(
this
.
data
.
skuStock
==
0
){
wx
.
showToast
({
title
:
'您所选择的商品规格库存不足,请选择其他规格'
,
icon
:
'none'
})
return
;
}
if
(
this
.
data
.
skuStock
<
this
.
data
.
proNum
){
wx
.
showToast
({
title
:
'您所选择的商品规格库存不足,请选择其他规格'
,
icon
:
'none'
})
return
;
}
this
.
triggerEvent
(
'skuselect'
,
{
this
.
triggerEvent
(
'skuselect'
,
{
skuId
:
this
.
data
.
skuId
,
skuId
:
this
.
data
.
skuId
,
count
:
this
.
data
.
proNum
,
count
:
this
.
data
.
proNum
,
...
...
src/config/index.js
View file @
065dc74b
...
@@ -62,7 +62,7 @@ const needMock = '' //
...
@@ -62,7 +62,7 @@ const needMock = '' //
* appId = wxf7bc302c51166dc0 //小程序 appId
* appId = wxf7bc302c51166dc0 //小程序 appId
* tunnel-token = //token 杨辰提供
* tunnel-token = //token 杨辰提供
* brandId= 2007 //商户Id
* brandId= 2007 //商户Id
* contactUspluginId = 联系我插件id
* contactUspluginId =
64bf88d82b3f0d506bd00ed90d5706f1
联系我插件id
*/
*/
...
...
src/pages/activateCard/activateCardCallback.js
View file @
065dc74b
...
@@ -29,10 +29,13 @@ wxService.page({
...
@@ -29,10 +29,13 @@ wxService.page({
this
.
handleGoActivateCard
(
this
.
options
)
this
.
handleGoActivateCard
(
this
.
options
)
},
},
handleGoActivateCard
(
options
=
{})
{
handleGoActivateCard
(
options
=
{})
{
if
(
!
options
)
{
console
.
log
(
'options------------'
,
options
)
if
(
Object
.
keys
(
options
).
length
==
0
){
this
.
goUserCenter
()
this
.
goUserCenter
()
return
false
return
false
}
}
options
.
activate_ticket
=
decodeURIComponent
(
options
.
activate_ticket
)
options
.
activate_ticket
=
decodeURIComponent
(
options
.
activate_ticket
)
// 解析 url 参数 {}
// 解析 url 参数 {}
const
parmasSubmitUrl
=
utils
.
parseUrl
(
options
.
wx_activate_after_submit_url
)
const
parmasSubmitUrl
=
utils
.
parseUrl
(
options
.
wx_activate_after_submit_url
)
...
...
src/pages/addAddress/addAddress.js
View file @
065dc74b
...
@@ -253,7 +253,10 @@ wxService.page({
...
@@ -253,7 +253,10 @@ wxService.page({
title
:
`修改成功`
,
title
:
`修改成功`
,
icon
:
'none'
icon
:
'none'
})
})
wxService
.
router
(
`/pages/myAddress/myAddress`
)
wx
.
navigateBack
({
delta
:
1
})
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
...
@@ -267,7 +270,9 @@ wxService.page({
...
@@ -267,7 +270,9 @@ wxService.page({
title
:
`保存成功`
,
title
:
`保存成功`
,
icon
:
'none'
icon
:
'none'
})
})
wxService
.
router
(
`/pages/myAddress/myAddress`
)
wx
.
navigateBack
({
delta
:
1
})
}
}
}).
finally
(()
=>
{
}).
finally
(()
=>
{
wx
.
hideLoading
()
wx
.
hideLoading
()
...
...
src/pages/confirmOrder/confirmOrder.js
View file @
065dc74b
This diff is collapsed.
Click to expand it.
src/pages/confirmOrder/confirmOrder.wxml
View file @
065dc74b
...
@@ -166,7 +166,11 @@
...
@@ -166,7 +166,11 @@
<text class="cost-label">实付款:</text>
<text class="cost-label">实付款:</text>
<text class="cost-price">¥{{utils.numberFormat(orderPrice)}}</text>
<text class="cost-price">¥{{utils.numberFormat(orderPrice)}}</text>
</view>
</view>
<view class="theme-color buy-btn">
<view class="theme-color buy-btn positionRe">
<!-- <button wx:if="{{!currentHasUserInfo}}"
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo'
class='positionAbs' ></button> -->
<button form-type="submit" style="display: inline;" class="theme-color buy-btn">立即购买</button>
<button form-type="submit" style="display: inline;" class="theme-color buy-btn">立即购买</button>
</view>
</view>
</view>
</view>
...
...
src/pages/myAddress/myAddress.js
View file @
065dc74b
...
@@ -15,28 +15,32 @@ wxService.page({
...
@@ -15,28 +15,32 @@ wxService.page({
addressList
:[],
addressList
:[],
startX
:
''
,
startX
:
''
,
delBtnWidth
:
132
,
//删除按钮宽度单位(rpx)
delBtnWidth
:
132
,
//删除按钮宽度单位(rpx)
isFrom
:
''
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
data
.
isFrom
=
options
.
isFrom
;
wx
.
hideShareMenu
()
wx
.
hideShareMenu
()
},
},
//处理设为默认按钮
handelCheckShopAddress
(
e
)
{
handelCheckShopAddress
(
e
)
{
const
index
=
e
.
currentTarget
.
dataset
.
index
if
(
this
.
data
.
isFrom
==
'order'
){
const
item
=
this
.
data
.
addressList
[
index
]
const
index
=
e
.
currentTarget
.
dataset
.
index
item
.
fullArea
=
item
.
province
+
' '
+
item
.
city
+
' '
+
item
.
district
const
item
=
this
.
data
.
addressList
[
index
]
wx
.
setStorageSync
(
'_defalutAddress'
,
item
)
item
.
fullArea
=
item
.
province
+
' '
+
item
.
city
+
' '
+
item
.
district
let
pages
=
getCurrentPages
();
wx
.
setStorageSync
(
'_defalutAddress'
,
item
)
let
beforePage
=
pages
[
pages
.
length
-
2
];
let
pages
=
getCurrentPages
();
beforePage
.
setData
({
let
beforePage
=
pages
[
pages
.
length
-
2
];
wxAddress
:
false
beforePage
.
setData
({
})
wxAddress
:
false
console
.
log
(
'beforePage+++++++'
,
beforePage
)
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
wxService
.
router
().
back
()
wxService
.
router
().
back
()
},
300
)
},
300
)
}
},
},
/**
/**
...
@@ -64,7 +68,6 @@ wxService.page({
...
@@ -64,7 +68,6 @@ wxService.page({
})
})
},
},
//获取微信地址
//获取微信地址
chooseWxAddress
()
{
chooseWxAddress
()
{
wx
.
chooseAddress
({
wx
.
chooseAddress
({
...
@@ -90,7 +93,6 @@ wxService.page({
...
@@ -90,7 +93,6 @@ wxService.page({
//设置默认地址
//设置默认地址
settingDefalutAddress
(
e
){
settingDefalutAddress
(
e
){
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
console
.
log
(
e
)
let
params
=
{
let
params
=
{
userId
:
memberId
,
userId
:
memberId
,
id
:
e
.
currentTarget
.
dataset
.
id
id
:
e
.
currentTarget
.
dataset
.
id
...
...
src/pages/productDetail/productDetail.wxml
View file @
065dc74b
...
@@ -154,7 +154,9 @@
...
@@ -154,7 +154,9 @@
report-submit
report-submit
name='nav'
name='nav'
>
>
<button disabled="{{productInfo.productStatus != 2}}" class="buy-button get-formId--btn {{productInfo.productStatus != 2 ? 'btn-default' : 'btn-buy'}}" formType="submit">立即购买</button>
<button disabled="{{productInfo.productStatus != 2}}"
class="buy-button get-formId--btn {{productInfo.productStatus != 2 ? 'btn-default' : 'btn-buy'}}"
formType="submit">立即购买</button>
</form>
</form>
</block>
</block>
...
...
src/palette/inviteFriends.js
View file @
065dc74b
...
@@ -13,6 +13,44 @@ export default class InviteFriends {
...
@@ -13,6 +13,44 @@ export default class InviteFriends {
posterImgHeight
=
windowHeight
-
200
;
posterImgHeight
=
windowHeight
-
200
;
}
}
}
}
// explain = ['妍希送你很多豪礼的静安寺到就看', '很好三等奖啊可是很好三等奖啊可是','数据库大吉点击奥斯卡数据库大吉点击奥斯卡'];
let
textOneBottom
=
''
,
textTwoBottom
=
''
,
textThreeBottom
=
''
;
if
(
explain
.
length
==
1
){
textOneBottom
=
'80rpx'
;
if
(
explain
[
0
].
length
>
11
){
explain
[
0
]
=
explain
[
0
].
substr
(
0
,
10
)
+
'..'
;
}
}
else
if
(
explain
.
length
==
2
){
textOneBottom
=
'100rpx'
;
textTwoBottom
=
'70rpx'
;
if
(
explain
[
0
].
length
>
11
)
{
explain
[
0
]
=
explain
[
0
].
substr
(
0
,
9
)
+
'..'
;
}
if
(
explain
[
1
].
length
>
15
)
{
explain
[
1
]
=
explain
[
1
].
substr
(
0
,
14
)
+
'..'
;
}
}
else
if
(
explain
.
length
==
3
){
textOneBottom
=
'108rpx'
;
textTwoBottom
=
'78rpx'
;
textThreeBottom
=
'50rpx'
;
if
(
explain
[
0
].
length
>
11
)
{
explain
[
0
]
=
explain
[
0
].
substr
(
0
,
9
)
+
'..'
;
}
if
(
explain
[
1
].
length
>
15
)
{
explain
[
1
]
=
explain
[
1
].
substr
(
0
,
14
)
+
'..'
;
}
if
(
explain
[
2
].
length
>
15
)
{
explain
[
2
]
=
explain
[
2
].
substr
(
0
,
14
)
+
'..'
;
}
}
return
({
return
({
width
:
'750rpx'
,
width
:
'750rpx'
,
height
:
windowHeight
-
100
+
'px'
,
height
:
windowHeight
-
100
+
'px'
,
...
@@ -30,44 +68,43 @@ export default class InviteFriends {
...
@@ -30,44 +68,43 @@ export default class InviteFriends {
type
:
'image'
,
type
:
'image'
,
url
:
qrcodeImg
,
url
:
qrcodeImg
,
css
:
{
css
:
{
width
:
'1
0
0rpx'
,
width
:
'1
4
0rpx'
,
height
:
'1
0
0rpx'
,
height
:
'1
4
0rpx'
,
right
:
'28rpx'
,
right
:
'28rpx'
,
bottom
:
'
4
3rpx'
,
bottom
:
'
3
3rpx'
,
}
}
},
},
{
{
type
:
'image'
,
type
:
'image'
,
url
:
avatarUrl
,
url
:
avatarUrl
,
css
:
{
css
:
{
width
:
'
5
0rpx'
,
width
:
'
8
0rpx'
,
height
:
'
5
0rpx'
,
height
:
'
8
0rpx'
,
left
:
'2
3
rpx'
,
left
:
'2
8
rpx'
,
bottom
:
'
4
3rpx'
,
bottom
:
'
5
3rpx'
,
borderRadius
:
'
25
rpx'
borderRadius
:
'
40
rpx'
}
}
},
},
{
{
type
:
'text'
,
type
:
'text'
,
text
:
userName
+
explain
[
0
],
text
:
userName
+
explain
[
0
],
css
:
{
css
:
{
width
:
'
18
0rpx'
,
width
:
'
32
0rpx'
,
left
:
'
82
rpx'
,
left
:
'
120
rpx'
,
bottom
:
'83rpx'
,
bottom
:
textOneBottom
,
fontSize
:
'
1
8rpx'
,
fontSize
:
'
2
8rpx'
,
color
:
'#
333333
'
color
:
'#
000000
'
},
},
},
},
{
{
type
:
'text'
,
type
:
'text'
,
text
:
explain
[
1
],
text
:
explain
[
1
],
css
:
{
css
:
{
width
:
'
18
0rpx'
,
width
:
'
32
0rpx'
,
left
:
'
82
rpx'
,
left
:
'
120
rpx'
,
bottom
:
'63rpx'
,
bottom
:
textTwoBottom
,
fontSize
:
'18rpx'
,
fontSize
:
'18rpx'
,
color
:
'#
333333
'
color
:
'#
666666
'
},
},
},
},
...
@@ -75,11 +112,11 @@ export default class InviteFriends {
...
@@ -75,11 +112,11 @@ export default class InviteFriends {
type
:
'text'
,
type
:
'text'
,
text
:
explain
[
2
],
text
:
explain
[
2
],
css
:
{
css
:
{
width
:
'
18
0rpx'
,
width
:
'
32
0rpx'
,
left
:
'
82
rpx'
,
left
:
'
120
rpx'
,
bottom
:
'43rpx'
,
bottom
:
textThreeBottom
,
fontSize
:
'18rpx'
,
fontSize
:
'18rpx'
,
color
:
'#
333333
'
color
:
'#
666666
'
},
},
},
},
...
...
src/project.config.json
View file @
065dc74b
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
"list"
:
[]
"list"
:
[]
},
},
"miniprogram"
:
{
"miniprogram"
:
{
"current"
:
-1
,
"current"
:
32
,
"list"
:
[
"list"
:
[
{
{
"id"
:
-1
,
"id"
:
-1
,
...
@@ -253,8 +253,8 @@
...
@@ -253,8 +253,8 @@
"scene"
:
null
"scene"
:
null
},
},
{
{
"id"
:
-1
,
"id"
:
32
,
"name"
:
"
分享
"
,
"name"
:
"
邀请好友编辑海报页面
"
,
"pathName"
:
"subPackage/page/pages/share/share"
,
"pathName"
:
"subPackage/page/pages/share/share"
,
"query"
:
""
,
"query"
:
""
,
"scene"
:
null
"scene"
:
null
...
...
src/subPackage/page/pages/share/share.js
View file @
065dc74b
...
@@ -40,7 +40,6 @@ wxService.page({
...
@@ -40,7 +40,6 @@ wxService.page({
this
.
getMiniCode
()
this
.
getMiniCode
()
this
.
getShareImg
()
this
.
getShareImg
()
wx
.
hideShareMenu
();
wx
.
hideShareMenu
();
},
},
//轮播图的切换事件
//轮播图的切换事件
...
@@ -105,6 +104,11 @@ wxService.page({
...
@@ -105,6 +104,11 @@ wxService.page({
this
.
setData
({
this
.
setData
({
posterImgData
:
initiatorPage
,
posterImgData
:
initiatorPage
,
explain
:
explain
explain
:
explain
},()
=>
{
if
(
this
.
data
.
posterImgData
.
length
>
0
){
this
.
data
.
currentPosterImg
=
this
.
data
.
posterImgData
[
0
];
this
.
generatePoster
();
}
})
})
}
}
}
}
...
@@ -113,12 +117,23 @@ wxService.page({
...
@@ -113,12 +117,23 @@ wxService.page({
//获取二维码
//获取二维码
getMiniCode
()
{
getMiniCode
()
{
this
.
saveTentacleContent
().
then
(
res
=>
{
if
(
res
){
let
tentacleId
=
res
.
id
;
let
inner_tentacleId
=
Integer
.
digit
(
tentacleId
,
10
,
64
);
this
.
getPageQrcode
(
inner_tentacleId
)
}
});
},
//获取界面二维码
getPageQrcode
(
t
){
const
urls
=
utils
.
getCurrentPageUrlWithArgs
()
const
urls
=
utils
.
getCurrentPageUrlWithArgs
()
let
_this
=
this
;
let
_this
=
this
;
let
data
=
{
let
data
=
{
"autoColor"
:
true
,
"autoColor"
:
true
,
"page"
:
'pages/userCenter/userCenter'
,
"page"
:
'pages/userCenter/userCenter'
,
"scene"
:
'type=-1
'
,
"scene"
:
'type=-1
&t='
+
t
,
"width"
:
100
"width"
:
100
}
}
wxService
.
post
(
`/marketing/quickMark/getAppQrCodePicture`
,
data
).
then
(
res
=>
{
wxService
.
post
(
`/marketing/quickMark/getAppQrCodePicture`
,
data
).
then
(
res
=>
{
...
@@ -127,39 +142,15 @@ wxService.page({
...
@@ -127,39 +142,15 @@ wxService.page({
this
.
setData
({
this
.
setData
({
codeImg
:
app
.
globalData
.
imageUrl
+
data
codeImg
:
app
.
globalData
.
imageUrl
+
data
// codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
// codeImg: "https://hwimagecdn.ihotwind.cn/usr/201908/miniQrCode-f00c5051fef7479395efb193431762c4.jpg"
},()
=>
{
},
()
=>
{
const
{
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
_this
.
generatePoster
();
const
{
avatarUrl
}
=
wx
.
getStorageSync
(
'_userInfo'
)
wx
.
getSystemInfo
({
success
:
function
(
system
)
{
wx
.
getImageInfo
({
src
:
_this
.
data
.
posterImgData
[
0
],
success
:
function
(
res
)
{
let
posterImgWidth
=
res
.
width
,
posterImgHeight
=
res
.
height
;
_this
.
setData
({
template
:
new
Card
().
palette
(
_this
.
data
.
posterImgData
[
0
],
_this
.
data
.
codeImg
,
member
.
memberWeixin
.
nickname
,
avatarUrl
,
{
posterImgWidth
:
posterImgWidth
,
posterImgHeight
:
posterImgHeight
,
windowWidth
:
system
.
windowWidth
,
windowHeight
:
system
.
windowHeight
},
_this
.
data
.
explain
),
});
}
})
}
})
})
})
}
}
})
})
},
},
//
保存海报
//
生成触点对象信息
save
Poster
(){
save
TentacleContent
(){
let
tentacleInfo
=
{
let
tentacleInfo
=
{
content
:
"我的邀请页面"
,
content
:
"我的邀请页面"
,
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
INVITE_FRIENDS
,
//内容类型
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
INVITE_FRIENDS
,
//内容类型
...
@@ -167,34 +158,47 @@ wxService.page({
...
@@ -167,34 +158,47 @@ wxService.page({
type
:
3
// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
type
:
3
// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
}
}
wxService
.
getTentacleContent
(
tentacleInfo
).
then
(
res
=>
{
return
wxService
.
getTentacleContent
(
tentacleInfo
);
if
(
res
&&
res
.
id
)
{
},
wx
.
saveImageToPhotosAlbum
({
filePath
:
this
.
imagePath
,
// 保存海报
success
(
res
)
{
savePoster
(){
setTimeout
(()
=>
{
// let tentacleInfo = {
wx
.
showToast
({
// content: "我的邀请页面",
title
:
'保存成功,请前往相册查看~'
,
// contentType: app.globalData.contants.SHARE_TYPE.INVITE_FRIENDS, //内容类型
icon
:
'none'
// title: '我的邀请', //标题
},
2000
)
// type: 3// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
})
// }
},
fail
(
err
){
// wxService.getTentacleContent(tentacleInfo).then(res => {
console
.
log
(
err
)
// if (res && res.id) {
let
txt
=
'保存失敗'
;
if
(
err
.
errMsg
==
'saveImageToPhotosAlbum:fail auth deny'
){
// }
txt
=
'获取相册授权失败'
// })
}
wx
.
saveImageToPhotosAlbum
({
setTimeout
(()
=>
{
filePath
:
this
.
imagePath
,
wx
.
showToast
({
success
(
res
)
{
title
:
txt
,
setTimeout
(()
=>
{
icon
:
'none'
wx
.
showToast
({
},
2000
)
title
:
'保存成功,请前往相册查看~'
,
})
icon
:
'none'
}
},
2000
)
});
})
},
fail
(
err
)
{
console
.
log
(
err
)
let
txt
=
'保存失敗'
;
if
(
err
.
errMsg
==
'saveImageToPhotosAlbum:fail auth deny'
)
{
txt
=
'获取相册授权失败'
}
setTimeout
(()
=>
{
wx
.
showToast
({
title
:
txt
,
icon
:
'none'
},
2000
)
})
}
}
})
})
;
},
},
onImgOK
(
e
)
{
onImgOK
(
e
)
{
this
.
setData
({
this
.
setData
({
...
...
src/subPackage/page/pages/share/share.wxml
View file @
065dc74b
...
@@ -37,18 +37,14 @@
...
@@ -37,18 +37,14 @@
wx:for="{{posterImgData}}"
wx:for="{{posterImgData}}"
wx:for-index="idx"
wx:for-index="idx"
wx:for-item="navItem"
wx:for-item="navItem"
wx:key="idx"
wx:key="idx">
>
<view
<view
class="scroll-view-item {{currentTab == idx ?'poster-active':''}}"
class="scroll-view-item {{currentTab == idx ?'poster-active':''}}"
data-current="{{idx}}"
data-current="{{idx}}"
data-img="{{navItem}}"
data-img="{{navItem}}"
bindtap="switchPoster"
bindtap="switchPoster">
<image class="poster-img" src="{{navItem}}" mode='aspectFit'></image>
>
<view class="select-plus" wx:if="{{idx == currentTab}}">
<image class="poster-img" src="{{navItem}}"></image>
<view class="select-plus" wx:if="{{idx == currentTab}}">
<view class="circle-radio theme-color">
<view class="circle-radio theme-color">
<image class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
<image class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
</view>
</view>
...
...
src/subPackage/page/pages/share/share.wxss
View file @
065dc74b
...
@@ -39,9 +39,9 @@ swiper-item{
...
@@ -39,9 +39,9 @@ swiper-item{
}
}
.code-img{
.code-img{
position: absolute;
position: absolute;
width: 1
0
0rpx;
width: 1
2
0rpx;
height: 1
0
0rpx;
height: 1
2
0rpx;
bottom:
4
3rpx;
bottom:
2
3rpx;
right: 24rpx;
right: 24rpx;
}
}
.active{
.active{
...
@@ -90,23 +90,27 @@ swiper-item{
...
@@ -90,23 +90,27 @@ swiper-item{
}
}
.scroll-view-item {
.scroll-view-item {
display: inline-block;
display: inline-block;
width: 1
25
rpx;
width: 1
50
rpx;
height: 215rpx;
height: 215rpx;
background-color: #d8d8d8;
background-color: #d8d8d8;
margin-right: 23rpx;
margin-right: 23rpx;
position: relative;
position: relative;
}
}
.poster-tips{
.poster-tips{
position: fixed;
position: fixed;
bottom: 220rpx;
bottom: 220rpx;
left: 33rpx;
left: 33rpx;
}
}
.poster-tips image{
.poster-tips image{
width: 362rpx;
width: 362rpx;
}
}
.poster-img{
.poster-img{
width: 100%;
width: 100%;
height: 215rpx;
/* height: 215rpx; */
max-height: 215rpx;
}
}
.select-plus{
.select-plus{
position: absolute;
position: absolute;
...
@@ -161,5 +165,7 @@ swiper-item{
...
@@ -161,5 +165,7 @@ swiper-item{
height: 100vh;
height: 100vh;
/* background: #ffffff; */
/* background: #ffffff; */
z-index: -9999;
z-index: -9999;
/* z-index: 999999; */
/* top: 0; */
}
}
\ No newline at end of file
src/utils/wxService.js
View file @
065dc74b
...
@@ -604,7 +604,21 @@ class WXService extends Http {
...
@@ -604,7 +604,21 @@ class WXService extends Http {
}
}
if
(
item
[
'scene'
])
{
if
(
item
[
'scene'
])
{
pageIsFromShare
=
true
;
pageIsFromShare
=
true
;
let
idParam
=
decodeURIComponent
(
item
[
'scene'
]).
split
(
'&'
)[
0
];
let
sceneParam
=
decodeURIComponent
(
item
[
'scene'
]);
console
.
log
(
'sceneParam---'
,
sceneParam
)
let
tParam
=
''
;
//判断是不是有触点参数
if
(
sceneParam
.
indexOf
(
't='
)
>
-
1
){
let
tArr
=
sceneParam
.
split
(
'&'
);
for
(
let
i
=
0
;
i
<
tArr
.
length
;
i
++
){
if
(
tArr
[
i
].
indexOf
(
't='
)
>
-
1
){
tParam
=
tArr
[
i
].
split
(
't='
)[
1
];
break
;
}
}
}
let
idParam
=
sceneParam
.
split
(
'&'
)[
0
];
let
shareId
=
idParam
&&
idParam
.
split
(
'='
)[
1
]
||
0
;
let
shareId
=
idParam
&&
idParam
.
split
(
'='
)[
1
]
||
0
;
// console.log(shareId)
// console.log(shareId)
// console.log(idParam)
// console.log(idParam)
...
@@ -612,10 +626,12 @@ class WXService extends Http {
...
@@ -612,10 +626,12 @@ class WXService extends Http {
if
(
idParam
.
indexOf
(
'pageId'
)
>
-
1
){
if
(
idParam
.
indexOf
(
'pageId'
)
>
-
1
){
item
[
'pageId'
]
=
shareId
;
item
[
'pageId'
]
=
shareId
;
}
}
if
(
tParam
){
id
=
Integer
.
digit
(
tParam
,
64
,
10
);
}
//
//
if
(
shareId
&&
shareId
!=
0
){
if
(
shareId
&&
shareId
!=
0
){
item
[
'id'
]
=
Integer
.
digit
(
shareId
,
64
,
10
)
item
[
'id'
]
=
Integer
.
digit
(
shareId
,
64
,
10
);
id
=
item
[
'id'
];
}
}
}
}
});
});
...
@@ -624,7 +640,6 @@ class WXService extends Http {
...
@@ -624,7 +640,6 @@ class WXService extends Http {
//调用接口
//调用接口
_self
.
getTentacleContentByTentacleId
(
id
);
_self
.
getTentacleContentByTentacleId
(
id
);
}
}
config
.
onLoad
&&
config
.
onLoad
.
apply
(
page
,
args
);
config
.
onLoad
&&
config
.
onLoad
.
apply
(
page
,
args
);
},
},
onShow
:
function
(...
args
)
{
onShow
:
function
(...
args
)
{
...
@@ -843,6 +858,7 @@ class WXService extends Http {
...
@@ -843,6 +858,7 @@ class WXService extends Http {
}
}
this
.
showOpenCardModelLock
=
true
// 避免多次弹出开卡对话窗
this
.
showOpenCardModelLock
=
true
// 避免多次弹出开卡对话窗
// 开卡
// 开卡
console
.
log
(
'开卡参数为-----'
,
options
)
wx
.
navigateToMiniProgram
({
wx
.
navigateToMiniProgram
({
appId
:
'wxeb490c6f9b154ef9'
,
// 固定为此 appid,不可改动
appId
:
'wxeb490c6f9b154ef9'
,
// 固定为此 appid,不可改动
extraData
:
options
,
// 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
extraData
:
options
,
// 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
...
@@ -898,11 +914,19 @@ class WXService extends Http {
...
@@ -898,11 +914,19 @@ class WXService extends Http {
openCard
()
{
openCard
()
{
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
!
baseUserInfo
){
reject
({
state
:
0
})
return
;
}
if
(
baseUserInfo
&&
baseUserInfo
.
memberActivateStatus
)
{
if
(
baseUserInfo
&&
baseUserInfo
.
memberActivateStatus
)
{
// console.log('已开卡', baseUserInfo)
// console.log('已开卡', baseUserInfo)
wxService
.
openCardList
()
wxService
.
openCardList
()
resolve
(
baseUserInfo
)
resolve
(
baseUserInfo
)
}
else
if
(
!
baseUserInfo
||
!
baseUserInfo
.
memberActivateStatus
)
{
}
else
if
(
!
baseUserInfo
.
memberActivateStatus
)
{
// console.log('去开卡', baseUserInfo)
// console.log('去开卡', baseUserInfo)
return
this
.
navigateToMiniProgram
({
return
this
.
navigateToMiniProgram
({
biz
:
baseUserInfo
.
biz
,
biz
:
baseUserInfo
.
biz
,
...
...
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