merchapp/java-mall-app-shop-admin/pages/index/index.vue
2025-06-21 19:10:14 +08:00

125 lines
2.7 KiB
Vue

<template>
<view class="login-select-index-container">
<view class="logo-content"></view>
<view class="app-name">小发同城</view>
<view class="app-title">商家中心</view>
<view class="btn-content">
<view class="btn-block">
<u-button class="btn" :hairline="false" @click="skipuLogin()">
登录
</u-button>
<view class="btn-tips">已有门店&nbsp;&nbsp;直接登录</view>
</view>
<view class="btn-block">
<u-button class="btn btn-register" @click="skipuRegister()">
注册开店
</u-button>
<view class="btn-tips">新开门店&nbsp;&nbsp;前去注册</view>
</view>
</view>
</view>
</template>
<script>
import { mapState, mapActions } from "vuex";
export default {
data() {
return {};
},
computed: {
...mapState("user", ["userInfo"]),
},
onShow() {
if (this.userInfo && Object.keys(this.userInfo).length > 0) {
var _userinfo = JSON.parse(JSON.stringify(this.userInfo));
var mobile = "";
let isContain = _userinfo.user_mobile.indexOf("86");
if (isContain != -1 && _userinfo.user_mobile.length > 11) {
mobile = _userinfo.user_mobile.slice(2);
} else {
mobile = _userinfo.user_mobile;
}
this.checkAccountIsPass({ userInfo: _userinfo, mobile: mobile });
}
},
methods: {
...mapActions("user", ["checkAccountIsPass"]),
skipuLogin() {
uni.navigateTo({
url: "/pages/login/login",
});
},
skipuRegister() {
uni.navigateTo({
url: "/pages/register/register",
});
},
},
};
</script>
<style lang="scss">
@import "@/styles/variables.scss";
.login-select-index-container {
overflow: hidden;
position: relative;
color: #333333;
.logo-content {
background-image: url("../../static/logo-2.png");
background-size: 100% 100%;
width: 260rpx;
height: 240rpx;
margin: 50% auto;
margin-bottom: 32rpx;
border-radius: 12rpx;
overflow: hidden;
}
.app-name {
font-size: 72rpx;
text-align: center;
font-weight: bold;
color: #000;
}
.app-title {
font-size: 40rpx;
text-align: center;
margin: 20rpx 0;
}
.btn-content {
position: fixed;
bottom: 14%;
width: 100%;
display: flex;
justify-content: space-around;
.btn-block {
.btn {
width: 280rpx;
height: 80rpx;
border: none;
}
.btn-register {
background: $base-color;
color: #fff;
&::after {
border: none;
}
}
.btn-tips {
margin-top: 40rpx;
font-size: 26rpx;
text-align: center;
color: #555555;
}
}
}
}
</style>