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 9aac25c3
authored
Oct 28, 2022
by
张晓玮
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.0' into 'zhangxw_dev_3.0'
V3.0 See merge request
!92
2 parents
c76098d7
602a742d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
4 deletions
components/sharePopup/sharePopup.wxml
pages/authentication/loading/loading.js
pages/tab/index/components/activeBox/activeBox.js
pages/tab/index/index.js
pages/tab/index/index.wxml
components/sharePopup/sharePopup.wxml
View file @
9aac25c
...
@@ -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/authentication/loading/loading.js
View file @
9aac25c
import
{
import
{
setRouteData
,
setRouteData
,
setLoginInfo
,
setLoginInfo
,
loginModal
loginModal
,
selectAccountLogin
}
from
'../lib/index'
}
from
'../lib/index'
import
{
import
{
getSessionId
,
getSessionId
,
...
@@ -35,7 +36,8 @@ Page({
...
@@ -35,7 +36,8 @@ Page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
this
.
init
()
// this.init()
this
.
drectLogin
()
},
},
/**
/**
...
@@ -127,5 +129,50 @@ Page({
...
@@ -127,5 +129,50 @@ Page({
})
})
}
else
wx
.
$router
.
reLaunch
(
'login.index'
,
obj
)
}
else
wx
.
$router
.
reLaunch
(
'login.index'
,
obj
)
}
else
wx
.
$router
.
reLaunch
(
'login.index'
,
obj
)
}
else
wx
.
$router
.
reLaunch
(
'login.index'
,
obj
)
},
// 判断是否是从其他小程序跳转过来
drectLogin
(){
const
params
=
wx
.
getLaunchOptionsSync
()
if
(
params
.
referrerInfo
.
extraData
&&
params
.
referrerInfo
.
extraData
.
inType
==
'direct'
){
const
{
phone
,
smscode
}
=
params
.
referrerInfo
.
extraData
this
.
freeHandleLogin
(
phone
,
smscode
)
}
else
{
this
.
init
()
}
},
// 免登录操作流程
freeHandleLogin
(
phone
,
smscode
){
const
para
=
{
mobile
:
phone
,
code
:
smscode
}
}
USERAPI
.
phoneSmsLogin
(
para
).
then
(({
code
,
data
,
message
,
errId
})
=>
{
if
(
code
==
'0'
)
{
this
.
checkLoginUserInfo
(
data
)
}
else
{
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
}
}).
catch
(
err
=>
{
wx
.
$api
.
showToast
(
'系统异常'
)
})
},
checkLoginUserInfo
({
loginUserInfoList
,
sessionId
})
{
if
(
loginUserInfoList
.
length
>
1
)
wx
.
$router
.
go
(
'/pages/authentication/accountItems/accountItems'
,
{
sessionId
,
...
this
.
options
})
/**只有一个账号 */
else
selectAccountLogin
({
id
:
loginUserInfoList
[
0
].
uuid
,
sessionId
})
},
})
})
\ No newline at end of file
\ No newline at end of file
pages/tab/index/components/activeBox/activeBox.js
View file @
9aac25c
...
@@ -140,6 +140,11 @@ Component({
...
@@ -140,6 +140,11 @@ Component({
// 分享活动(复制链接)
// 分享活动(复制链接)
copyActivityUrl
(
e
)
{
copyActivityUrl
(
e
)
{
wx
.
getSetting
({
success
:
(
res
)
=>
{
if
(
res
.
authSetting
[
'scope.writePhotosAlbum'
]
===
false
){
this
.
triggerEvent
(
'showAuth'
,
true
)
}
else
{
let
{
item
}
=
e
.
currentTarget
.
dataset
let
{
item
}
=
e
.
currentTarget
.
dataset
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
wx
.
$router
.
getPageInstance
()
wx
.
$api
.
showLoading
()
wx
.
$api
.
showLoading
()
...
@@ -176,6 +181,11 @@ Component({
...
@@ -176,6 +181,11 @@ Component({
},
},
})
})
})
})
}
}
})
},
},
// 活动详情
// 活动详情
goToDetail
(
e
)
{
goToDetail
(
e
)
{
...
...
pages/tab/index/index.js
View file @
9aac25c
...
@@ -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 @
9aac25c
...
@@ -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