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