Commit 4591d09e Harvey

登录页面返回

1 个父辈 97476fb1
...@@ -57,8 +57,9 @@ ...@@ -57,8 +57,9 @@
"name": "login", "name": "login",
"desc": "登录页", "desc": "登录页",
"style": { "style": {
"navigationBarTitleText": "登录/注册", // "navigationBarTitleText": "登录/注册",
"navigationStyle": "default" // "navigationStyle": "default",
"navigationStyle": "custom"
} }
}, },
{ {
......
<template> <template>
<view>
<uni-nav-bar fixed="true" backgroundColor="#F8F8F8" leftIcon="closeempty" title="登录/注册" @clickLeft="back" />
<view class="body"> <view class="body">
<text>首次登录创建新帐号</text> <text>首次登录创建新帐号</text>
<view class="input"> <view class="input">
...@@ -12,6 +14,7 @@ ...@@ -12,6 +14,7 @@
</view> </view>
<button type="default" class="btn" @click="login">下一步</button> <button type="default" class="btn" @click="login">下一步</button>
</view> </view>
</view>
</template> </template>
<script> <script>
...@@ -32,6 +35,20 @@ ...@@ -32,6 +35,20 @@
if (e.from) this.from = e.from if (e.from) this.from = e.from
}, },
methods: { methods: {
back() {
let pages = getCurrentPages()
if (pages.length < 2) {
uni.navigateTo({
url: '/'
})
return
}
uni.navigateBack({
delta: 1
});
},
async login() { async login() {
if (this.mobile.length != 11) { if (this.mobile.length != 11) {
uni.showToast({ uni.showToast({
...@@ -123,6 +140,10 @@ ...@@ -123,6 +140,10 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.uni-nav-bar-text {
font-size: 18px;
}
.body { .body {
font-family: Helvetica; font-family: Helvetica;
font-weight: 400; font-weight: 400;
...@@ -130,6 +151,7 @@ ...@@ -130,6 +151,7 @@
color: #333333; color: #333333;
padding: 20px; padding: 20px;
margin-top: 30px; margin-top: 30px;
} }
.input { .input {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!