Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mini-program-wepy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
mini-program-wepy
Commits
d6c147c3
Commit
d6c147c3
authored
May 19, 2020
by
ziyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: 代码暂存
parent
d5b8ee06
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
57 deletions
+0
-57
app.wpy
src/app.wpy
+0
-6
auth.wpy
src/pages/auth.wpy
+0
-51
No files found.
src/app.wpy
View file @
d6c147c3
...
@@ -32,11 +32,6 @@ wepy.app({
...
@@ -32,11 +32,6 @@ wepy.app({
// store.dispatch('setUserInfo',res.userInfo);
// store.dispatch('setUserInfo',res.userInfo);
})
})
}
}
},
fail: ()=> {
wx.reLaunch({
url: '/pages/auth',
})
}
}
})
})
}else{
}else{
...
@@ -55,7 +50,6 @@ wepy.app({
...
@@ -55,7 +50,6 @@ wepy.app({
{
{
pages: [
pages: [
'pages/index',
'pages/index',
'pages/auth'
],
],
window: {
window: {
navigationStyle: "custom",
navigationStyle: "custom",
...
...
src/pages/auth.wpy
deleted
100644 → 0
View file @
d5b8ee06
<style lang="less">
.contain {
padding:200rpx 0;
}
</style>
<template>
<div class="contain">
<p>需要进行微信授权</p>
<button open-type="getUserInfo" bindgetuserinfo="getUserInfo">授权登录</button>
</div>
</template>
<script>
import wepy from '@wepy/core';
import store from '../store';
wepy.page({
hooks: {
'before-setData': function (dirty) {
}
},
data: {
canIUse: wx.canIUse('button.open-type.getUserInfo')
},
computed: {
},
methods: {
getUserInfo (e) {
store.dispatch('setUserInfo',e.$wx.detail.userInfo);
wx.reLaunch({
url: '/pages/index',
})
}
},
created () {
}
});
</script>
<config>
{
navigationBarTitleText: '微信授权',
usingComponents: {
'van-button': '../components/vant/button/index',
}
}
</config>
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