Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 602a742d
authored
Oct 28, 2022
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改首页相册授权
1 parent
6b03a114
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
37 deletions
components/sharePopup/sharePopup.wxml
pages/tab/index/components/activeBox/activeBox.js
pages/tab/index/index.js
pages/tab/index/index.wxml
components/sharePopup/sharePopup.wxml
View file @
602a742
...
@@ -45,4 +45,4 @@
...
@@ -45,4 +45,4 @@
<canvas style="width:355px;height:370px; margin:0 auto;" canvas-id="mycanvas" />
<canvas style="width:355px;height:370px; margin:0 auto;" canvas-id="mycanvas" />
</view>
</view>
</view>
</view>
<
authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" id="auth"></authorize
>
<
!-- <authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" id="auth"></authorize> --
>
pages/tab/index/components/activeBox/activeBox.js
View file @
602a742
...
@@ -140,42 +140,52 @@ Component({
...
@@ -140,42 +140,52 @@ Component({
// 分享活动(复制链接)
// 分享活动(复制链接)
copyActivityUrl
(
e
)
{
copyActivityUrl
(
e
)
{
let
{
item
}
=
e
.
currentTarget
.
dataset
wx
.
getSetting
({
let
thisPage
=
wx
.
$router
.
getPageInstance
()
success
:
(
res
)
=>
{
wx
.
$api
.
showLoading
()
if
(
res
.
authSetting
[
'scope.writePhotosAlbum'
]
===
false
){
ActivityApi
.
getActivityPosters
({
id
:
item
.
id
}).
then
(
res
=>
{
this
.
triggerEvent
(
'showAuth'
,
true
)
// var code= QR.createQrCodeImg(res.activityUrl);
}
else
{
// /*code是指图片base64格式数据*/
let
{
item
}
=
e
.
currentTarget
.
dataset
// //声明文件系统
let
thisPage
=
wx
.
$router
.
getPageInstance
()
// const fs = wx.getFileSystemManager();
wx
.
$api
.
showLoading
()
// //随机定义路径名称
ActivityApi
.
getActivityPosters
({
id
:
item
.
id
}).
then
(
res
=>
{
// var times = new Date().getTime();
// var code= QR.createQrCodeImg(res.activityUrl);
// var codeimg = wx.env.USER_DATA_PATH + '/' + times + '.png';
// /*code是指图片base64格式数据*/
// //将base64图片写入
// //声明文件系统
// fs.writeFile({
// const fs = wx.getFileSystemManager();
// filePath: codeimg,
// //随机定义路径名称
// data: code.slice(22),
// var times = new Date().getTime();
// encoding: 'base64',
// var codeimg = wx.env.USER_DATA_PATH + '/' + times + '.png';
// success: () => {
// //将base64图片写入
// thisPage.setData({
// fs.writeFile({
// sharePopupData: {
// filePath: codeimg,
// imagePath: codeimg,
// data: code.slice(22),
// activityName: res.activityName,
// encoding: 'base64',
// address: res.activityAddressDetailName,
// success: () => {
// posterImg: res.posterImg,
// thisPage.setData({
// showSharePopup: true
// sharePopupData: {
// },
// imagePath: codeimg,
// })
// activityName: res.activityName,
// }
// address: res.activityAddressDetailName,
// });
// posterImg: res.posterImg,
thisPage
.
setData
({
// showSharePopup: true
sharePopupData
:
{
// },
posterImg
:
res
,
// })
activityName
:
item
.
activityName
,
// }
showSharePopup
:
true
// });
},
thisPage
.
setData
({
})
sharePopupData
:
{
posterImg
:
res
,
activityName
:
item
.
activityName
,
showSharePopup
:
true
},
})
})
}
}
})
})
},
},
// 活动详情
// 活动详情
goToDetail
(
e
)
{
goToDetail
(
e
)
{
...
...
pages/tab/index/index.js
View file @
602a742
...
@@ -216,5 +216,10 @@ Page({
...
@@ -216,5 +216,10 @@ Page({
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
},
toShowAuth
(){
this
.
setData
({
showAuth
:
true
})
}
}
})
})
pages/tab/index/index.wxml
View file @
602a742
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<!-- 活动中 -->
<!-- 活动中 -->
<scroll-view scroll-y class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" data-type="{{1}}" refresher-triggered="{{activeTrigger}}" hidden="{{tabIndex != 0}}">
<scroll-view scroll-y class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" data-type="{{1}}" refresher-triggered="{{activeTrigger}}" hidden="{{tabIndex != 0}}">
<block>
<block>
<active-box activeList="{{activeList}}" nothing="{{nothing}}" activeDateIndex="{{activeDateIndex}}"></active-box>
<active-box
bind:showAuth="toShowAuth"
activeList="{{activeList}}" nothing="{{nothing}}" activeDateIndex="{{activeDateIndex}}"></active-box>
</block>
</block>
</scroll-view>
</scroll-view>
<!-- 活动诊断 -->
<!-- 活动诊断 -->
...
@@ -45,3 +45,5 @@
...
@@ -45,3 +45,5 @@
</van-popup> -->
</van-popup> -->
</view>
</view>
</block>
</block>
<authorize scopeType="writePhotosAlbum" bindfail="authFail" show="{{showAuth}}" id="auth"></authorize>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment