Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
walk_daka_wx
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
穆启卓
walk_daka_wx
Commits
685eb983
Commit
685eb983
authored
May 09, 2019
by
穆启卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改title的返回按钮
不同小程序切换的配置(新加logo切换)
parent
a5503bd9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
15 deletions
+24
-15
navBar.js
components/navBar/navBar.js
+3
-7
navBar.wxml
components/navBar/navBar.wxml
+2
-2
config.js
config.js
+12
-2
logo1.png
images/authorization/logo1.png
+0
-0
logo2.png
images/authorization/logo2.png
+0
-0
authorization.js
pages/authorization/authorization.js
+4
-2
authorization.wxml
pages/authorization/authorization.wxml
+2
-2
index.js
pages/index/index.js
+1
-0
No files found.
components/navBar/navBar.js
View file @
685eb983
...
...
@@ -39,13 +39,9 @@ Component({
type
:
Boolean
,
value
:
true
},
whiteBack
:
{
type
:
Boolean
,
value
:
false
},
blackBack
:
{
type
:
Boolean
,
value
:
false
backColor
:
{
type
:
String
,
value
:
'white'
},
paddingColor
:
{
type
:
String
,
...
...
components/navBar/navBar.wxml
View file @
685eb983
...
...
@@ -7,8 +7,8 @@
<image src="/images/all_people/nyhb_ic_back.png" class="icon" mode="aspectFit"></image>
</navigator>
<view class="back item" wx:if="{{showBack}}" catch:tap="tapNavBack">
<image src="/images/all_people/nyhb_ic_back.png" class="icon" mode="aspectFit" wx:if="{{
whiteBack
}}"></image>
<image src="/images/all_people/black_back.png" class="icon" mode="aspectFit" wx:elif="{{b
lackBack
}}"></image>
<image src="/images/all_people/nyhb_ic_back.png" class="icon" mode="aspectFit" wx:if="{{
backColor === 'white'
}}"></image>
<image src="/images/all_people/black_back.png" class="icon" mode="aspectFit" wx:elif="{{b
ackColor === 'black'
}}"></image>
</view>
<view class="home item" wx:if="{{showHome}}" bind:tap="tapNavHome">
<image src="/images/all_people/nyhb_ic_home.png" class="icon" mode="aspectFit"></image>
...
...
config.js
View file @
685eb983
...
...
@@ -2,9 +2,17 @@
const
host
=
'miniapp-api.wxatech.com'
;
// const content = 'game-bsdk'; // 步数打卡
// const appName = '步步运动赚'; // 步数打卡
const
content
=
'game-team_walk'
;
// 组队打卡
const
appName
=
'步数运动馆'
;
// 组队打卡
let
appName
=
''
;
let
appLogo
=
''
;
if
(
content
===
'game-bsdk'
)
{
// 步数打卡
appName
=
'步步运动赚'
;
appLogo
=
'logo1'
;
}
else
if
(
content
===
'game-team_walk'
)
{
// 组队打卡
appName
=
'步数运动馆'
;
appLogo
=
'logo2'
;
}
const
config
=
{
// 下面的地址配合云端 Demo 工作
...
...
@@ -25,6 +33,8 @@ const config = {
version
:
'1.0.0'
,
},
appName
,
//小程序的公众号名字
appLogo
,
//授权页用到的logo
pixelRate
:
0.5
,
//px与rpx换算关系
platform
:
'ios'
,
//操作平台 用于适配胶囊高度
capsuleHeight
:
44
,
//胶囊高度
...
...
images/authorization/logo.png
→
images/authorization/logo
1
.png
View file @
685eb983
File moved
images/authorization/logo2.png
0 → 100644
View file @
685eb983
41.9 KB
pages/authorization/authorization.js
View file @
685eb983
...
...
@@ -6,12 +6,14 @@ Page({
userAuth
:
false
,
stepAuth
:
false
,
stepGoSetting
:
true
,
// 步数授权是否变成直接去openSetting页的按钮
appName
:
''
appName
:
''
,
appLogo
:
'logo1'
,
// 这个是给图片src用的,不给默认有效的初始化会有报错,虽然不影响
},
onLoad
()
{
this
.
setData
({
appName
:
config
.
appName
appName
:
config
.
appName
,
appLogo
:
config
.
appLogo
,
});
wx
.
getSetting
({
success
:(
res
)
=>
{
...
...
pages/authorization/authorization.wxml
View file @
685eb983
<navbar
showHome="{{false}}" navTitle="{{navTitle}}"
navColor="#fff"></navbar>
<navbar navColor="#fff"></navbar>
<view class="page-container">
<image class="app-logo" src="/images/authorization/
logo
.png"></image>
<image class="app-logo" src="/images/authorization/
{{appLogo}}
.png"></image>
<view class="app-name">{{appName}}</view>
<view class="title">请允许{{appName}}获取以下权限</view>
<view class="explain">以下信息仅用于您登录{{appName}},我们将严格保密绝不外泄,更不会对您发送垃圾信息造成骚扰</view>
...
...
pages/index/index.js
View file @
685eb983
...
...
@@ -133,6 +133,7 @@ Page({
},
method
:
'POST'
,
success
:
myres
=>
{
console
.
log
(
'询问后端是否需要unionId授权'
,
myres
)
if
(
myres
.
data
.
code
===
0
)
{
app
.
globalData
.
userInfo
=
myres
.
data
.
data
;
app
.
globalData
.
token
=
myres
.
data
.
data
.
token
;
...
...
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