|
@@ -1,150 +1,215 @@
|
|
|
-<route lang="json5" type="page">
|
|
|
+<!-- 使用 type="home" 属性设置首页,其他页面不需要设置,默认为page;推荐使用json5,更强大,且允许注释 -->
|
|
|
+<route lang="json5" type="home">
|
|
|
{
|
|
|
style: {
|
|
|
- navigationBarTitleText: '欢迎登录',
|
|
|
- navigationBarBackgroundColor: '#f6d7a7',
|
|
|
+ navigationStyle: 'custom',
|
|
|
+ navigationBarTitleText: '首页',
|
|
|
},
|
|
|
}
|
|
|
</route>
|
|
|
-
|
|
|
<template>
|
|
|
- <view class="text-center container">
|
|
|
- <view class="px-5 pt-20 pb-20 top-box">
|
|
|
- <view class="con-top">
|
|
|
- <view class="h1 mb-6 mt-8">科湃腾肉牛系统</view>
|
|
|
- <view class="h3 mb-14 pt-4">简化牧场管理,从这里开始!</view>
|
|
|
- </view>
|
|
|
- <!-- <view class="btn mt-10 user" @click="handleWX">用户一键登录</view> -->
|
|
|
- <view class="footer mt-10">
|
|
|
- <wd-button
|
|
|
- type="primary"
|
|
|
- size="large"
|
|
|
- open-type="getUserInfo"
|
|
|
- getuserinfo="loginWithWeChat"
|
|
|
- block
|
|
|
- >
|
|
|
- 用户一键登录
|
|
|
- </wd-button>
|
|
|
+ <view class="containe">
|
|
|
+ <!-- 渐变色 -->
|
|
|
+ <view class="top-content px-6 pt-18">
|
|
|
+ <view class="user-box flex">
|
|
|
+ <!-- 左边 -->
|
|
|
+ <view class="flex">
|
|
|
+ <image src="../../static/logo.png" mode="scaleToFill" class="imgs" />
|
|
|
+ <view class="user-text pt-4">
|
|
|
+ <text>好闪闪</text>
|
|
|
+ <view>技术部:888888</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 右边 -->
|
|
|
+ <!-- <view>hhhh</view> -->
|
|
|
</view>
|
|
|
- <view class="footer mt-5">
|
|
|
- <wd-button size="large" type="success" @click="getPhone" block>手机号安全登录</wd-button>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <!-- 工具 -->
|
|
|
+ <view class="px-4">
|
|
|
+ <view class="tool px-4 pt-2 pb-2">
|
|
|
+ <view class="title">工具栏</view>
|
|
|
+ <view class="tool-box">
|
|
|
+ <view class="tool-item">
|
|
|
+ <image
|
|
|
+ class="icon pb-1"
|
|
|
+ src="../../static/images/tool/editPsd.png"
|
|
|
+ mode="scaleToFill"
|
|
|
+ />
|
|
|
+ <view>脖环管理</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="tool-item">
|
|
|
+ <image
|
|
|
+ class="icon pb-1"
|
|
|
+ src="../../static/images/tool/editPsd.png"
|
|
|
+ mode="scaleToFill"
|
|
|
+ />
|
|
|
+ <view>脖环管理</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="tool-item">
|
|
|
+ <image
|
|
|
+ class="icon pb-1"
|
|
|
+ src="../../static/images/tool/editPsd.png"
|
|
|
+ mode="scaleToFill"
|
|
|
+ />
|
|
|
+ <view>脖环管理</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="tool-item">
|
|
|
+ <image
|
|
|
+ class="icon pb-1"
|
|
|
+ src="../../static/images/tool/editPsd.png"
|
|
|
+ mode="scaleToFill"
|
|
|
+ />
|
|
|
+ <view>脖环管理</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="tool-item">
|
|
|
+ <image
|
|
|
+ class="icon pb-1"
|
|
|
+ src="../../static/images/tool/editPsd.png"
|
|
|
+ mode="scaleToFill"
|
|
|
+ />
|
|
|
+ <view>脖环管理</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="tool-item">
|
|
|
+ <image
|
|
|
+ class="icon pb-1"
|
|
|
+ src="../../static/images/tool/editPsd.png"
|
|
|
+ mode="scaleToFill"
|
|
|
+ />
|
|
|
+ <view>脖环管理</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <!-- <view class="btn mt-10 tel" @click="getPhone">手机号安全登录</view> -->
|
|
|
+ </view>
|
|
|
|
|
|
- <view class="mt-5">
|
|
|
- <wd-radio-group :modelValue="isChecked" inline checked-color="#eea441" @change="setChecked">
|
|
|
- <wd-radio :value="true" shape="dot" class="title" inline>
|
|
|
- 我已认真阅读并同意《服务协议》、《隐私政策》
|
|
|
- </wd-radio>
|
|
|
- <!-- <text> 我已认真阅读并同意《服务协议》、《隐私政策》</text> -->
|
|
|
- </wd-radio-group>
|
|
|
+ <!-- 个人信息 -->
|
|
|
+ <view class="user-tool px-4 pt-1 pb-1 flex mb-2">
|
|
|
+ <view>
|
|
|
+ <image class="icons mr-1" src="../../static/images/tool/editPsd.png" mode="scaleToFill" />
|
|
|
+ 修改密码
|
|
|
+ </view>
|
|
|
+ <navigator url="/pages/editPassword/editPassword">
|
|
|
+ <wd-icon name="arrow-right" color="#8e8e8e" size="22px"></wd-icon>
|
|
|
+ </navigator>
|
|
|
+ </view>
|
|
|
+ <view class="user-tool px-4 pt-1 pb-1 flex mb-2">
|
|
|
+ <view>
|
|
|
+ <image class="icons mr-1" src="../../static/images/tool/user.png" mode="scaleToFill" />
|
|
|
+ 客服服务
|
|
|
</view>
|
|
|
+ <wd-icon name="arrow-right" color="#8e8e8e" size="22px"></wd-icon>
|
|
|
+ </view>
|
|
|
+ <view class="user-tool px-4 pt-1 pb-1 flex">
|
|
|
+ <view>
|
|
|
+ <image class="icons mr-1" src="../../static/images/tool/advice.png" mode="scaleToFill" />
|
|
|
+ 服务条款
|
|
|
+ </view>
|
|
|
+ <navigator url="/pages/serviceText/serviceText">
|
|
|
+ <wd-icon name="arrow-right" color="#8e8e8e" size="20px"></wd-icon>
|
|
|
+ </navigator>
|
|
|
+ </view>
|
|
|
+ <view class="user-tool px-4 pt-1 pb-1 flex">
|
|
|
+ <view>
|
|
|
+ <image class="icons mr-1" src="../../static/images/tool/service.png" mode="scaleToFill" />
|
|
|
+ 意见反馈
|
|
|
+ </view>
|
|
|
+ <navigator url="/pages/feedBack/feedBack">
|
|
|
+ <wd-icon name="arrow-right" color="#8e8e8e" size="22px"></wd-icon>
|
|
|
+ </navigator>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { ref } from 'vue'
|
|
|
defineOptions({
|
|
|
- name: 'Login',
|
|
|
+ name: 'Home',
|
|
|
})
|
|
|
|
|
|
-const isChecked = ref(false)
|
|
|
-const getPhone = () => {
|
|
|
- uni.navigateTo({ url: '/pages/phone/phone' })
|
|
|
-}
|
|
|
+onMounted(() => {})
|
|
|
|
|
|
-// 选择微信登录
|
|
|
-const handleWX = () => {}
|
|
|
-// 勾选同意
|
|
|
-const setChecked = (val) => {
|
|
|
- console.log(val, isChecked.value, '000')
|
|
|
- if (isChecked.value) {
|
|
|
- isChecked.value = false
|
|
|
- } else {
|
|
|
- isChecked.value = true
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-// 微信授权登录
|
|
|
-const loginWithWeChat = (e) => {
|
|
|
- if (e.detail.userInfo) {
|
|
|
- uni.login({
|
|
|
- provider: 'weixin',
|
|
|
- success: (loginRes) => {
|
|
|
- console.log(loginRes)
|
|
|
- // 获取微信登录的授权码
|
|
|
- const code = loginRes.code
|
|
|
- // TODO: 获取code码 给到后端接口获取用户信息
|
|
|
- // uni.request({
|
|
|
- // url: 'https://your-api.com/wechat-login',
|
|
|
- // method: 'POST',
|
|
|
- // data: {
|
|
|
- // code: loginRes.code,
|
|
|
- // },
|
|
|
- // success: (res) => {
|
|
|
- // if (res.data.success) {
|
|
|
- // uni.setStorageSync('userToken', res.data.token)
|
|
|
- // uni.showToast({
|
|
|
- // title: '登录成功',
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // uni.showToast({
|
|
|
- // title: '登录失败',
|
|
|
- // icon: 'none',
|
|
|
- // })
|
|
|
- // }
|
|
|
- // },
|
|
|
- // })
|
|
|
- },
|
|
|
- })
|
|
|
- }
|
|
|
-}
|
|
|
+onLoad(() => {})
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-//
|
|
|
-.con-top {
|
|
|
- color: #f99304;
|
|
|
- font-size: 56rpx;
|
|
|
+.containe {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #333;
|
|
|
}
|
|
|
-.h3 {
|
|
|
- font-size: 36rpx;
|
|
|
+.top-content {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ right: 0;
|
|
|
+ left: 0;
|
|
|
+ z-index: -1;
|
|
|
+ height: 260rpx;
|
|
|
+ // border: 1px solid red;
|
|
|
+ color: #fbeed8;
|
|
|
+ text-align: center;
|
|
|
+ background: linear-gradient(to bottom, #f59e0b, #f6c986);
|
|
|
}
|
|
|
-
|
|
|
-.btn {
|
|
|
- color: #fff;
|
|
|
- border-radius: 60rpx;
|
|
|
- height: 80rpx;
|
|
|
- line-height: 80rpx;
|
|
|
- font-size: 16px;
|
|
|
- margin: 30rpx auto;
|
|
|
- font-family: PingFang SC;
|
|
|
+.user-box {
|
|
|
+ justify-content: space-between;
|
|
|
+ height: 160rpx;
|
|
|
+ // border: 4px solid #000;
|
|
|
+ .imgs {
|
|
|
+ width: 160rpx;
|
|
|
+ height: 160rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ background: #fff;
|
|
|
+ border: 1px solid #fff;
|
|
|
+ border-radius: 50%;
|
|
|
+ }
|
|
|
+ .user-text {
|
|
|
+ color: #fff;
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
-.user {
|
|
|
- background-color: #eea441;
|
|
|
- margin-bottom: 50rpx;
|
|
|
+.tool {
|
|
|
+ position: relative;
|
|
|
+ top: -60rpx;
|
|
|
+ margin-top: 400rpx;
|
|
|
+ font-size: 24rpx;
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 28rpx;
|
|
|
+ box-shadow: 0 0 15px 0 rgba(0, 0, 0, 0.1);
|
|
|
}
|
|
|
-.tel {
|
|
|
- background-color: #2a9d8f;
|
|
|
+.title {
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
}
|
|
|
-.container {
|
|
|
- // background-color: #fafafa;
|
|
|
- height: 100vh;
|
|
|
+.icon {
|
|
|
+ width: 80rpx;
|
|
|
+ height: 80rpx;
|
|
|
}
|
|
|
-.top-box {
|
|
|
- // background-color: #fff;
|
|
|
- background: linear-gradient(to bottom, #f6d7a7, #fff);
|
|
|
+.icons {
|
|
|
+ width: 50rpx;
|
|
|
+ height: 50rpx;
|
|
|
}
|
|
|
-::v-deep .wd-radio-group.data-v-a6e3f5b0,
|
|
|
-.wd-radio-group {
|
|
|
- background-color: transparent;
|
|
|
+.tool-item {
|
|
|
+ width: 22%;
|
|
|
+ padding: 10rpx 0;
|
|
|
+ margin-right: 14rpx;
|
|
|
+ margin-bottom: 10rpx;
|
|
|
+ // border: 1px solid red;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
-::v-deep .title > .wd-radio__label {
|
|
|
- font-size: 20rpx !important;
|
|
|
+.tool-box {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ justify-content: left;
|
|
|
}
|
|
|
-::v-deep .wd-button.is-success.data-v-aa3a6253 {
|
|
|
- background-color: #2a9d8f !important;
|
|
|
+
|
|
|
+.user-tool {
|
|
|
+ justify-content: space-between;
|
|
|
+ height: 60rpx;
|
|
|
+ margin-bottom: 1rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ border-bottom: 1px dotted #f5f5f5;
|
|
|
}
|
|
|
</style>
|