From f2ed53b7fb41b1d15334934bf8caeea798ddcf2f Mon Sep 17 00:00:00 2001
From: xuxy <1059738716@qq.com>
Date: 星期四, 27 六月 2024 16:51:41 +0800
Subject: [PATCH] 1
---
pages/login/farmer-login.vue | 36 +++++++++++++++++++++++-------------
1 files changed, 23 insertions(+), 13 deletions(-)
diff --git a/pages/login/farmer-login.vue b/pages/login/farmer-login.vue
index 36c80da..240cf10 100644
--- a/pages/login/farmer-login.vue
+++ b/pages/login/farmer-login.vue
@@ -1,6 +1,8 @@
<template>
- <view class="main-container login-container img100" style="margin-top: 0rpx;">
+ <view class="main-container login-container img100 relative" style="margin-top: 0rpx;">
+ <!-- background-image:url('@/static/images/farmer/login/bg.png') -->
+ <image class="component-bg" src="https://hmy-flower.oss-cn-shanghai.aliyuncs.com/a5/a54508de179a4942918ecb2c5a4aa9f5bg.png" mode="scaleToFill" />
<view class="t-login top-bg">
<view class="nav-title">登录</view>
<view class="login">
@@ -26,15 +28,15 @@
<view class="t-a input" v-if="loginType=='code'">
- <input type="text" name="userName" placeholder="请输入手机验证码" v-model="smsCode" />
+ <input type="text" name="userName" placeholder="请输入手机验证码" v-model="smsCode" />
</view>
<button @tap="login()" class="bottom-button">登 录</button>
<view class="flex">
- <view class="topic-font" @click="loginType='code'">手机验证码登录</view>
- <view class="topic-font" @click="loginType='pwd'">账号密码登录</view>
-
+ <view class="topic-font" v-if="loginType=='pwd'" @click="loginType='code'">手机验证码登录</view>
+ <view class="topic-font" v-if="loginType=='code'" @click="loginType='pwd'">账号密码登录</view>
+
<view class="topic-font m-l-a m-r-0" @click="toReg">前往注册</view>
</view>
</form>
@@ -50,12 +52,14 @@
data() {
return {
openId: '-1',
- // userName: '12345678',
- // password: '12345678',
- userName: '',
+ userName: 'gzm',
+ password: '123456',
+ // userName: '',
+ // password: '',
+
phoneNumber: '',
- smsCode:'',
- password: '',
+ smsCode: '',
+
checked: false,
loginType: 'pwd', //pwd和code,密码和验证码登录
pcfvalue: undefined,
@@ -115,8 +119,8 @@
// uni.switchTab({
// url: '/pages/index/index'
// })
- uni.navigateTo({
- url: '/pages/login/farmer-reg'
+ uni.redirectTo({
+ url: '/sub_pages/farmer/farmer-reg/farmer-reg'
})
},
@@ -154,7 +158,7 @@
// const {
// code
// } = await this.$http.request('get', '/api/login/admin')
- const resp = await this.$store.dispatch('loginShop', post);
+ const resp = await this.$store.dispatch('loginSupplier', post);
// uni.hideLoading()
if (resp.code == 0) {
@@ -258,6 +262,12 @@
.t-login .t-a {
position: relative;
+
+ .get-code {
+ position: absolute;
+ right: 40rpx;
+ top: 25rpx;
+ }
}
.t-login .t-a .icon {
--
Gitblit v1.9.3