Compare commits
2 Commits
fa6525bfd4
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3c874e11d | ||
|
|
eca6c0539d |
@@ -18,7 +18,7 @@ const pages = {
|
|||||||
type: 'home',
|
type: 'home',
|
||||||
style: {
|
style: {
|
||||||
navigationStyle: 'custom',
|
navigationStyle: 'custom',
|
||||||
navigationBarTitleText: '数字广东',
|
navigationBarTitleText: '栗子科技',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"path": "pages/index/index",
|
"path": "pages/index/index",
|
||||||
"type": "home",
|
"type": "home",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "数字广东"
|
"navigationBarTitleText": "栗子科技"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { useCartStore } from '@/store/cart'
|
|||||||
|
|
||||||
definePage({
|
definePage({
|
||||||
style: {
|
style: {
|
||||||
navigationBarTitleText: '数字广东',
|
navigationBarTitleText: '栗子科技',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ async function handleSendCode() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (countdown.value > 0) return
|
if (countdown.value > 0) return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await sendCode(phone.value)
|
await sendCode(phone.value)
|
||||||
uni.showToast({ title: '验证码已发送', icon: 'none' })
|
uni.showToast({ title: '验证码已发送', icon: 'none' })
|
||||||
|
|
||||||
countdown.value = 60
|
countdown.value = 60
|
||||||
timer.value = setInterval(() => {
|
timer.value = setInterval(() => {
|
||||||
countdown.value--
|
countdown.value--
|
||||||
@@ -64,22 +64,22 @@ async function handleLogin() {
|
|||||||
uni.showToast({ title: '请输入手机号', icon: 'none' })
|
uni.showToast({ title: '请输入手机号', icon: 'none' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const res: any = await login({ phone: phone.value, code: code.value })
|
const res: any = await login({ phone: phone.value, code: code.value })
|
||||||
|
|
||||||
// 更新用户信息和客户端类型
|
// 更新用户信息和客户端类型
|
||||||
userStore.userInfo = res.data.user
|
userStore.userInfo = res.data.user
|
||||||
userStore.isLogin = true
|
userStore.isLogin = true
|
||||||
userStore.setClientType(selectedClientType.value)
|
userStore.setClientType(selectedClientType.value)
|
||||||
|
|
||||||
// 根据客户端类型切换 tabbar
|
// 根据客户端类型切换 tabbar
|
||||||
tabbarStore.setTabbarByClientType(selectedClientType.value)
|
tabbarStore.setTabbarByClientType(selectedClientType.value)
|
||||||
|
|
||||||
const config = CLIENT_TYPE_CONFIG[selectedClientType.value]
|
const config = CLIENT_TYPE_CONFIG[selectedClientType.value]
|
||||||
uni.showToast({ title: `${config.label}登录成功`, icon: 'success' })
|
uni.showToast({ title: `${config.label}登录成功`, icon: 'success' })
|
||||||
|
|
||||||
// 跳转到对应首页
|
// 跳转到对应首页
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.reLaunch({ url: config.homePage })
|
uni.reLaunch({ url: config.homePage })
|
||||||
@@ -105,7 +105,7 @@ onUnload(() => {
|
|||||||
<image src="/static/logo4.png" class="logo-image"></image>
|
<image src="/static/logo4.png" class="logo-image"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 客户端类型选择 -->
|
<!-- 客户端类型选择 -->
|
||||||
<view class="client-type-section">
|
<view class="client-type-section">
|
||||||
<view class="section-title">选择登录端</view>
|
<view class="section-title">选择登录端</view>
|
||||||
@@ -131,7 +131,7 @@ onUnload(() => {
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form">
|
<view class="form">
|
||||||
<view class="input-group">
|
<view class="input-group">
|
||||||
<text class="i-carbon-phone icon"></text>
|
<text class="i-carbon-phone icon"></text>
|
||||||
@@ -143,7 +143,7 @@ onUnload(() => {
|
|||||||
:maxlength="11"
|
:maxlength="11"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="input-group">
|
<view class="input-group">
|
||||||
<text class="i-carbon-security icon"></text>
|
<text class="i-carbon-security icon"></text>
|
||||||
<input
|
<input
|
||||||
@@ -161,22 +161,22 @@ onUnload(() => {
|
|||||||
{{ countdown > 0 ? `${countdown}s后重发` : '获取验证码' }}
|
{{ countdown > 0 ? `${countdown}s后重发` : '获取验证码' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<wd-notice-bar text="演示使用,直接点击登录~" prefix="warn-bold" custom-class="space" color="#34D19D" background-color="#f0f9eb" />
|
<wd-notice-bar text="演示使用,直接点击登录~" prefix="warn-bold" custom-class="space" color="#34D19D" background-color="#f0f9eb" />
|
||||||
|
|
||||||
<view
|
<view
|
||||||
class="submit-btn"
|
class="submit-btn"
|
||||||
:style="{ background: CLIENT_TYPE_CONFIG[selectedClientType].color }"
|
:style="{ background: CLIENT_TYPE_CONFIG[selectedClientType].color }"
|
||||||
@click="handleLogin"
|
@click="handleLogin"
|
||||||
>
|
>
|
||||||
<text v-if="!loading">{{ CLIENT_TYPE_CONFIG[selectedClientType].label }}登录</text>
|
<text v-if="!loading">{{ CLIENT_TYPE_CONFIG[selectedClientType].label }}登录</text>
|
||||||
<text v-else>登录中...</text>
|
<text v-else>登录中...</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="tips">
|
<view class="tips">
|
||||||
<text>未注册手机号验证后自动创建账号</text>
|
<text>未注册手机号验证后自动创建账号</text>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<p><text>©2025 数字广东网络建设有限公司</text></p>
|
<p><text>©2025 栗子科技有限公司</text></p>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -202,7 +202,7 @@ onUnload(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
width: 320rpx;
|
width: 320rpx;
|
||||||
height: 116rpx;
|
height: 116rpx;
|
||||||
@@ -216,20 +216,20 @@ onUnload(() => {
|
|||||||
// 客户端类型选择区域
|
// 客户端类型选择区域
|
||||||
.client-type-section {
|
.client-type-section {
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
|
|
||||||
.section-title {
|
.section-title {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
padding-left: 10rpx;
|
padding-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-type-list {
|
.client-type-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 16rpx;
|
gap: 16rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client-type-item {
|
.client-type-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -238,13 +238,13 @@ onUnload(() => {
|
|||||||
border-radius: 16rpx;
|
border-radius: 16rpx;
|
||||||
border: 2rpx solid transparent;
|
border: 2rpx solid transparent;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-color: var(--theme-color);
|
border-color: var(--theme-color);
|
||||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-icon {
|
.type-icon {
|
||||||
width: 72rpx;
|
width: 72rpx;
|
||||||
height: 72rpx;
|
height: 72rpx;
|
||||||
@@ -255,35 +255,35 @@ onUnload(() => {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active .type-icon text {
|
&.active .type-icon text {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-info {
|
.type-info {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 4rpx;
|
gap: 4rpx;
|
||||||
|
|
||||||
.type-label {
|
.type-label {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-desc {
|
.type-desc {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.type-check {
|
.type-check {
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
}
|
}
|
||||||
@@ -299,32 +299,32 @@ onUnload(() => {
|
|||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
padding: 0 40rpx;
|
padding: 0 40rpx;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
margin-right: 20rpx;
|
margin-right: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.code-btn {
|
.code-btn {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #008ef7;
|
color: #008ef7;
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
border-left: 1rpx solid #ddd;
|
border-left: 1rpx solid #ddd;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit-btn {
|
.submit-btn {
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
border-radius: 50rpx;
|
border-radius: 50rpx;
|
||||||
@@ -337,13 +337,13 @@ onUnload(() => {
|
|||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);
|
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
&:active {
|
&:active {
|
||||||
opacity: 0.9;
|
opacity: 0.9;
|
||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips {
|
.tips {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import type { ShopInfo } from '@/typings/merchant'
|
|||||||
|
|
||||||
export const mockShopInfo: ShopInfo = {
|
export const mockShopInfo: ShopInfo = {
|
||||||
id: 'shop_001',
|
id: 'shop_001',
|
||||||
name: '数字广东旗舰店',
|
name: '栗子旗舰店',
|
||||||
logo: '/static/images/shop-logo.jpg',
|
logo: '/static/images/shop-logo.jpg',
|
||||||
phone: '020-12345678',
|
phone: '020-12345678',
|
||||||
address: '广东省广州市天河区体育西路123号',
|
address: '广东省广州市天河区体育西路123号',
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 8.5 KiB |
BIN
src/static/logos/logo1.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
src/static/logos/logo2.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
src/static/logos/logo3.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
src/static/logos/logo4.png
Normal file
|
After Width: | Height: | Size: 7.2 KiB |