| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <template>
- <view>
- <cu-custom :bgColor="'bg-'+theme.backgroundColor" :isBack="true">
- <block slot="backText">返回</block>
- <block slot="content">登录</block>
- </cu-custom>
- <view class="nav text-center login padding-top" style="" :class="'bg-'+theme.backgroundColor">
- <view :class="'cu-item '+ (1==TabCur?'text-white cur':'')" @click="tabSelect(1)" class="quick-login">
- <text class="">快速登录</text>
- </view>
- <view :class="'cu-item '+ (0==TabCur?'text-white cur':'')" @click="tabSelect(0)">
- <text class="">账号登录</text>
- </view>
- </view>
- <userLogin v-if="TabCur===0" :reUrl="reUrl"></userLogin>
- <codeLogin v-if="TabCur===1" :reUrl="reUrl"></codeLogin>
- </view>
- </template>
- <script>
- const app = getApp();
- const util = require("utils/util.js");
- import api from 'utils/api';
- import userLogin from "./userlogin";
- import codeLogin from "./codelogin";
- import register from "./register";
- export default {
- data() {
- return {
- theme: app.globalData.theme, //全局颜色变量
- CustomBar: this.CustomBar,
- TabCur: 1,
- reUrl: ''
- };
- },
- components: {
- userLogin,
- codeLogin,
- register
- },
- props: {
- },
- onLoad(options) {
- // 保存别人分享来的 userCode
- util.saveSharerUserCode(options);
- let reUrl = options.reUrl
- this.reUrl = reUrl
- },
- onShow() {
- // #ifdef MP-WEIXIN
- app.doLogin()
- // #endif
- },
- methods: {
- tabSelect(index){
- this.TabCur = index
- }
- }
- };
- </script>
- <style>
- .quick-login{
- margin-right: 150rpx !important;
- }
- .login{
- margin-left: -20rpx;
- }
- </style>
|