From 1cb57919fbfd5ccc9b0489d16391bcd4909e21f9 Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期五, 18 八月 2023 08:59:05 +0800
Subject: [PATCH] 08.17
---
minipro_standard/pages/index/index.vue | 188 ++++++++++++++--------------------------------
1 files changed, 58 insertions(+), 130 deletions(-)
diff --git a/minipro_standard/pages/index/index.vue b/minipro_standard/pages/index/index.vue
index 32bb5b8..7308129 100644
--- a/minipro_standard/pages/index/index.vue
+++ b/minipro_standard/pages/index/index.vue
@@ -1,149 +1,77 @@
<template>
- <view class="content">
- <view class="p40 nav bbox">
- <view class="">鍚堣偉甯傛櫤鏀规暟杞瘖鏂湇鍔″钩鍙�</view>
- <view class="">娆㈣繋鐧诲綍</view>
- </view>
- <view class="p40 mt30">
- <u--input
- placeholder="璇疯緭鍏ヨ处鍙�"
- prefixIcon="account"
- clearable
- v-model="form.account"
- prefixIconStyle="font-size: 40rpx;color: #AAAAAA"
- ></u--input>
- <view class="p20"></view>
- <u--input
- placeholder="璇疯緭鍏ュ瘑鐮�"
- prefixIcon="lock"
- password
- clearable
- v-model="form.password"
- prefixIconStyle="font-size: 40rpx;color: #AAAAAA"
- ></u--input>
- <view class="ptb50"></view>
- <u-button
- :loading="logining"
- type="primary"
- color="#216EEE"
- text="鐧诲綍"
- size="large"
- @click="loginAction"
- ></u-button>
- </view>
+ <view>
+ <myTabbar :index="0" />
</view>
</template>
-<script>
-
- import { coustomLogin, wxEmpower } from '@/util/api/index'
+<script>
+ // import { coustomLogin, wxEmpower } from '@/util/api/index'
+
+
+ import myTabbar from "@/components/myTabber.vue"
export default {
+ components: {
+ myTabbar
+ },
data() {
return {
- form: {
- account: '',
- password: '',
- },
- logining: false,
+ form: {
+ account: '',
+ password: '',
+ },
+ logining: false,
openId: ''
}
- },
- onLoad() {
- uni.login({
- success: data => {
- this.wxLogin(data.code)
- },
- fail: err => {
- uni.$u.toast(err)
- }
- })
+ },
+ onLoad() {
+ // uni.login({
+ // success: data => {
+ // this.wxLogin(data.code)
+ // },
+ // fail: err => {
+ // uni.$u.toast(err)
+ // }
+ // })
},
methods: {
- loginAction() {
- if (!this.form.account || !this.form.password) {
- uni.$u.toast('璐﹀彿鎴栬�呭瘑鐮佷笉鑳戒负绌�')
- }
- this.logining = true
- coustomLogin({...this.form, openid: this.openId})
- .then(res => {
- this.$store.commit('SETTOKEN', res.token)
- this.$store.commit('SETUSERINFO', res)
- uni.navigateTo({
- url:'/pages/projectList/projectList'
- })
- })
- .finally(() => {
- this.logining = false
- })
- },
- wxLogin(code) {
- wxEmpower({code})
- .then(res => {
- this.openId = res.openid
- if (res.userInfo) {
- this.$store.commit('SETTOKEN', res.userInfo.token)
- this.$store.commit('SETUSERINFO', res.userInfo)
- uni.navigateTo({
- url:'/pages/projectList/projectList'
- })
- }
- })
- .catch(err => {
- uni.$u.toast(err)
- })
- }
+ // loginAction() {
+ // if (!this.form.account || !this.form.password) {
+ // uni.$u.toast('璐﹀彿鎴栬�呭瘑鐮佷笉鑳戒负绌�')
+ // }
+ // this.logining = true
+ // coustomLogin({...this.form, openid: this.openId})
+ // .then(res => {
+ // this.$store.commit('SETTOKEN', res.token)
+ // this.$store.commit('SETUSERINFO', res)
+ // uni.navigateTo({
+ // url:'/pages/projectList/projectList'
+ // })
+ // })
+ // .finally(() => {
+ // this.logining = false
+ // })
+ // },
+ // wxLogin(code) {
+ // wxEmpower({code})
+ // .then(res => {
+ // this.openId = res.openid
+ // if (res.userInfo) {
+ // this.$store.commit('SETTOKEN', res.userInfo.token)
+ // this.$store.commit('SETUSERINFO', res.userInfo)
+ // uni.navigateTo({
+ // url:'/pages/projectList/projectList'
+ // })
+ // }
+ // })
+ // .catch(err => {
+ // uni.$u.toast(err)
+ // })
+ // }
}
}
</script>
<style lang="scss" scoped>
- .content {
- // display: flex;
- // flex-direction: column;
- // align-items: center;
- // justify-content: center;
- height: 100vh;
- background-color: #FFFFFF;
- .nav {
-
- width: 750rpx;
- height: 520rpx;
- background: linear-gradient(180deg, #C7EBFF 0%, #FFFFFF 100%);
- display: flex;
- flex-direction: column-reverse;
- color: #293C5B;
- :first-child {
- height: 52rpx;
- font-size: 36rpx;
- line-height: 52rpx;
- }
- :last-child {
- height: 80rpx;
- font-size: 56rpx;
- font-weight: 500;
- line-height: 80rpx;
- margin-bottom: 16rpx;
- }
- }
- }
- .logo {
- height: 200rpx;
- width: 200rpx;
- margin-top: 200rpx;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 50rpx;
- }
-
- .text-area {
- display: flex;
- justify-content: center;
- }
-
- .title {
- font-size: 36rpx;
- color: #8f8f94;
- }
</style>
--
Gitblit v1.9.3