jiangping
2024-05-28 d9869175b92c284ed8c520a76c6391f47b079adb
h5/pages/login/login.vue
@@ -6,15 +6,20 @@
    <view class="login_list">
      <view class="login_list_item">
        <image src="@/static/login_ic_phone@2x.png" mode="widthFix" />
        <input v-model="form.idCard" maxlength="18" type="number" placeholder="账号">
        <input
          v-model="form.idCard"
          maxlength="18"
          type="number"
          placeholder="账号"
        />
      </view>
      <view class="login_list_item">
        <image src="@/static/login_ic_password@2x.png" mode="widthFix" />
        <input v-model="form.password" type="password" placeholder="密码">
        <input v-model="form.password" type="password" placeholder="密码" />
      </view>
    </view>
    <view class="login_btn">
      <view class="login_btn_n">立即登录</view>
      <view class="login_btn_n" @click="onLogin">立即登录</view>
         <view class="for_psd">忘记密码</view>
    </view>
@@ -40,12 +45,21 @@
  },
  created () {
      console.log('---');
  },
  methods: {
      dealChange(e) {
         console.log(e);
      console.log(e)
    },
    onLogin() {
      const appID = 'wx4d7c10bdec51942b'
      const AppSecret = '922c93596d134fedf5bd22a9354b3bfe'
      // const scope = 'snsapi_userinfo'
      let uri = encodeURIComponent('http://xiaopiqiu2.natapp1.cc')
      let authURL =
        `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appID}&redirect_uri=${uri}&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect`
      window.location.href = authURL
      }
  }
}
@@ -60,7 +74,11 @@
      box-sizing: border-box;
      align-items: center;
      flex-direction: column;
      background: linear-gradient( 180deg, rgba(39,155,170,0.2) 0%, rgba(39,155,170,0) 100%);
  background: linear-gradient(
    180deg,
    rgba(39, 155, 170, 0.2) 0%,
    rgba(39, 155, 170, 0) 100%
  );
      .login_logo {
         width: 180rpx;
         height: 180rpx;
@@ -87,7 +105,7 @@
            height: 98rpx;
            padding: 0 40rpx;
            box-sizing: border-box;
            background: #FFFFFF;
      background: #ffffff;
            margin-bottom: 40rpx;
            display: flex;
            align-items: center;
@@ -115,7 +133,7 @@
         box-sizing: border-box;
         margin-top: 80rpx;
         .for_psd{
            color: #279BAA;
      color: #279baa;
            margin-top: 40rpx;
            width: 140rpx;
            text-align: center;
@@ -124,14 +142,14 @@
         .login_btn_n {
            width: 100%;
            height: 98rpx;
            background: #279BAA;
      background: #279baa;
            box-shadow: 0rpx 12rpx 24rpx 0rpx rgba(39,155,170,0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 500;
            font-size: 32rpx;
            color: #FFFFFF;
      color: #ffffff;
            border-radius: 50rpx;
         }
      }
@@ -142,9 +160,8 @@
         text-align: center;
         bottom: 108rpx;
         .deal{
            color: #279BAA;
      color: #279baa;
         }
      }
  }
</style>