调整 发布

This commit is contained in:
浅念
2026-03-12 16:47:27 +08:00
parent 12bc0f8ba9
commit f892dbcb32
13 changed files with 536 additions and 111 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
// const baseUrl = "https://api.collect.hs.hnzhwlkj.club/"; //这里放置url域名32044
// const baseUrl = "https://userdcar-server.hnxinyouhe.com/"; //这里放置url域名32044
const baseUrl = "https://usedcar.dev.hnxinyouhe.com/"; //这里放置url域名32044
const baseUrl = "https://userdcar-server.hnxinyouhe.com/"; //这里放置url域名32044
// const baseUrl = "https://usedcar.dev.hnxinyouhe.com/"; //这里放置url域名32044
// const baseUrl = "http://219.157.255.213:36010/"; //这里放置url域名32044
export function request(options){//封装的requset
let { url,data,method,loginType } = options;
+2 -2
View File
@@ -25,7 +25,7 @@ export const tabBarConfig = [
pagePath: 'pages/index/publish',
iconPath: '/static/image/publish1.png',
selectedIconPath: '/static/image/publish.png',
text: '发布',
text: '发布(二手车)',
// 发布:卖家可见
roles: [ROLE_TYPES.PROCUREMENT]
},
@@ -33,7 +33,7 @@ export const tabBarConfig = [
pagePath: 'pages/index/publishPro',
iconPath: '/static/image/publish1.png',
selectedIconPath: '/static/image/publish.png',
text: '发布',
text: '发布(smartcar)',
// 专业发布:有供应商身份可见
isSupplier: true
},
+31 -2
View File
@@ -7,7 +7,8 @@
<text class="status-text">{{ getStatusText(item.status) }}</text>
</view>
</view>
<view v-if="ismy">
<!-- <view v-if="ismy"> -->
<view v-if="item.status==0 ||item.status==2">
<u-icon @click="editfn(item)" name="edit-pen-fill" size="25" />
</view>
</view>
@@ -88,7 +89,11 @@
const statusMap = {
0: '待审核',
1: '审核通过',
2: '审核拒绝'
2: '审核拒绝',
3: '推送中',
4: '推送成功',
5: '推送失败'
}
return statusMap[status] || '未知'
}
@@ -349,6 +354,30 @@
background: #FFF2F0;
border: 1px solid #FFCCC7;
.status-text {
color: #F5222D;
}
}
&.status-3 {
background: #FFF7E6;
border: 1px solid #FFD591;
.status-text {
color: #FA8C16;
}
}
&.status-4 {
background: #F6FFED;
border: 1px solid #B7EB8F;
.status-text {
color: #52C41A;
}
}
&.status-5 {
background: #FFF2F0;
border: 1px solid #FFCCC7;
.status-text {
color: #F5222D;
}
+16 -4
View File
@@ -18,7 +18,7 @@
</template>
<script>
import { getVisibleTabBar, getCurrentTabIndex, getUserRole } from '@/common/tabbar.js'
import { getVisibleTabBar, getCurrentTabIndex } from '@/common/tabbar.js'
export default {
name: 'CustomTabBar',
@@ -27,19 +27,27 @@
current: 0,
safeAreaInsets: {
bottom: 0
}
},
forceUpdate: 0
}
},
computed: {
tabList() {
// 根据权限获取可见的 tabbar 列表
const userRole = getUserRole()
return getVisibleTabBar(userRole)
// 添加 forceUpdate 依赖,确保角色变化时重新计算
void this.forceUpdate
return getVisibleTabBar()
}
},
onLoad() {
this.updateCurrent()
this.initSafeArea()
// 监听角色变化事件
uni.$on('userRoleChanged', this.onRoleChanged)
},
onUnload() {
// 移除监听
uni.$off('userRoleChanged', this.onRoleChanged)
},
onShow() {
// 页面显示时更新当前 tab 索引
@@ -55,6 +63,10 @@
}
},
methods: {
// 角色变化时触发更新
onRoleChanged() {
this.forceUpdate++
},
initSafeArea() {
// 获取安全区域信息(适配 iPhone X 等)
// #ifdef APP-PLUS || H5
+22 -10
View File
@@ -1,15 +1,15 @@
<template>
<view class="custom-tabbar" :style="{ paddingBottom: safeAreaInsets.bottom + 'px' }">
<view
v-for="(item, index) in tabList"
<view
v-for="(item, index) in tabList"
:key="index"
class="tab-item"
:class="{ active: current === index }"
@tap="switchTab(item, index)"
>
<image
class="tab-icon"
:src="current === index ? item.selectedIconPath : item.iconPath"
<image
class="tab-icon"
:src="current === index ? item.selectedIconPath : item.iconPath"
mode="aspectFit"
/>
<text class="tab-text">{{ item.text }}</text>
@@ -18,7 +18,7 @@
</template>
<script>
import { getVisibleTabBar, getCurrentTabIndex, getUserRole } from '@/common/tabbar.js'
import { getVisibleTabBar, getCurrentTabIndex } from '@/common/tabbar.js'
export default {
name: 'CustomTabBar',
@@ -27,18 +27,26 @@
current: 0,
safeAreaInsets: {
bottom: 0
}
},
forceUpdate: 0
}
},
computed: {
tabList() {
// 根据权限获取可见的 tabbar 列表
const userRole = getUserRole()
return getVisibleTabBar(userRole)
// 添加 forceUpdate 依赖,确保角色变化时重新计算
void this.forceUpdate
return getVisibleTabBar()
}
},
created() {
this.initSafeArea()
// 监听角色变化事件
uni.$on('userRoleChanged', this.onRoleChanged)
},
onUnload() {
// 移除监听
uni.$off('userRoleChanged', this.onRoleChanged)
},
mounted() {
this.updateCurrent()
@@ -57,6 +65,10 @@
}
},
methods: {
// 角色变化时触发更新
onRoleChanged() {
this.forceUpdate++
},
initSafeArea() {
// 获取安全区域信息(适配 iPhone X 等)
// #ifdef APP-PLUS || H5
@@ -71,7 +83,7 @@
updateCurrent() {
const pages = getCurrentPages()
if (pages.length === 0) return
const currentPage = pages[pages.length - 1]
const currentPath = currentPage.route || currentPage.$route?.path || ''
const index = getCurrentTabIndex(currentPath)
+2 -2
View File
@@ -166,11 +166,11 @@
},
{
"pagePath": "pages/index/publish",
"text": "发布"
"text": "发布(二手车)"
},
{
"pagePath": "pages/index/publishPro",
"text": "发布"
"text": "发布(smartcar)"
},
{
"pagePath": "pages/index/mine",
+2 -2
View File
@@ -96,7 +96,7 @@
</view>
<!-- FAQ 问答区域(专业发布特有) -->
<view class="card faq-card" v-if="faqList.length > 0">
<!-- <view class="card faq-card" v-if="faqList.length > 0">
<view class="section-title">
<u-icon name="question-circle" size="18" color="#FF972F"></u-icon>
<text class="title-text">常见问题 FAQ</text>
@@ -114,7 +114,7 @@
</view>
</view>
</view>
</view>
</view> -->
<!-- 产品图 -->
<view class="hero">
+2 -2
View File
@@ -21,7 +21,7 @@
<view class="menu-icon">
<u-icon name="list-dot" size="24" color="#3F435B"></u-icon>
</view>
<text class="menu-text">我的发布</text>
<text class="menu-text">我的发布(二手车)</text>
<view class="menu-arrow">
<u-icon name="arrow-right" size="18" color="#999"></u-icon>
</view>
@@ -39,7 +39,7 @@
<view class="menu-icon">
<u-icon name="list-dot" size="24" color="#3F435B"></u-icon>
</view>
<text class="menu-text">我的发布</text>
<text class="menu-text">我的发布(smartcar)</text>
<view class="menu-arrow">
<u-icon name="arrow-right" size="18" color="#999"></u-icon>
</view>
+440 -54
View File
@@ -1,46 +1,41 @@
<template>
<view class="page">
<!-- 列表 -->
<z-paging
ref="paging"
v-model="list"
@query="queryList"
empty-view-text="暂无发布数据!"
>
<!-- 顶部:标题 + 搜索 -->
<z-paging ref="paging" v-model="list" @query="queryList" empty-view-text="暂无发布数据!">
<template #top>
<view class="page-head">
<view class="head-search">
<u-search
v-model="keyword"
placeholder="请输入关键词"
:show-action="false"
shape="round"
@change="onKeywordChange"
@search="onSearch"
@clear="onSearch"
/>
<view class="statussearch" @click="show=true">
<text class="year-text">{{status_name || '状态'}}</text>
<u-icon name="arrow-down" size="14" color="#999"></u-icon>
</view>
</view>
<u-picker
:show="show"
:columns="columns"
keyName="label"
@confirm="onstatus"
@cancel="show = false"
></u-picker>
<!-- 搜索抓取 -->
<view class="dcd-search">
<u-search v-model="urls" placeholder="请输入抓取链接" :show-action="false" shape="round"></u-search>
<view class="bind-btn" @tap.stop="onBindByName">抓取</view>
</view>
</template>
<!-- 列表内容 -->
<!-- 顶部:标题 + 搜索(放到底部) -->
<view class="page-head">
<view class="head-search">
<u-search
v-model="keyword"
placeholder="请输入关键词"
:show-action="false"
shape="round"
@change="onKeywordChange"
@search="onSearch"
@clear="onSearch"
/>
<view class="statussearch" @click="show=true">
<text class="year-text">{{status_name || '状态'}}</text>
<u-icon name="arrow-down" size="14" color="#999"></u-icon>
</view>
</view>
<u-picker :show="show" :columns="columns" keyName="label" @confirm="onstatus" @cancel="show = false"></u-picker>
</view>
<view class="list-wrap">
<uni-swipe-action-item
v-for="item in list"
:key="item.id"
:right-options="options1"
@click="swipeClick($event, item)"
>
<CarCardPro
:item="item"
@@ -51,6 +46,70 @@
</uni-swipe-action-item>
</view>
</z-paging>
<!-- 抓取信息弹出层 -->
<uni-popup ref="crawlDialog" type="dialog">
<view class="crawl-dialog">
<view class="crawl-title">抓取信息</view>
<view class="crawl-content" v-if="crawlLoading">
<view class="crawl-loading">正在抓取中...</view>
</view>
<view class="crawl-content" v-else-if="crawlData">
<view class="crawl-item">
<view class="crawl-label">车辆名称</view>
<u-input v-model="crawlForm.product_name" placeholder="请输入车辆名称" border="none" :custom-style="inputStyle"></u-input>
</view>
<view class="crawl-item">
<view class="crawl-label">价格</view>
<u-input v-model="crawlForm.price" placeholder="请输入价格" type="number" border="none" :custom-style="inputStyle"></u-input>
</view>
<view class="crawl-item">
<view class="crawl-label">车源地</view>
<u-input v-model="crawlForm.source_place" placeholder="请输入车源地" border="none" :custom-style="inputStyle"></u-input>
</view>
<view class="crawl-item">
<view class="crawl-label">上牌时间</view>
<u-input v-model="crawlForm.plate_time" placeholder="请输入上牌时间" border="none" :custom-style="inputStyle"></u-input>
</view>
<view class="crawl-item">
<view class="crawl-label">排量</view>
<u-input v-model="crawlForm.displacement" placeholder="请输入排量" border="none" :custom-style="inputStyle"></u-input>
</view>
<view class="crawl-item">
<view class="crawl-label">功率</view>
<u-input v-model="crawlForm.power" placeholder="请输入功率" border="none" :custom-style="inputStyle"></u-input>
</view>
<view class="crawl-item">
<view class="crawl-label">车身颜色</view>
<u-input v-model="crawlForm.body_color" placeholder="请输入车身颜色" border="none" :custom-style="inputStyle"></u-input>
</view>
<view class="crawl-item">
<view class="crawl-label">里程</view>
<u-input v-model="crawlForm.mileage" placeholder="请输入里程" type="number" border="none" :custom-style="inputStyle"></u-input>
</view>
<view class="crawl-item">
<view class="crawl-label">车况描述</view>
<u-textarea v-model="crawlForm.condition_desc" placeholder="请输入车况描述" border="none" :custom-style="textareaStyle"></u-textarea>
</view>
<view class="crawl-item" v-if="crawlData.image_pull && crawlData.image_pull.length > 0">
<view class="crawl-label">图片</view>
<view class="crawl-images">
<image
v-for="(img, idx) in crawlData.image_pull"
:key="idx"
:src="img"
mode="aspectFill"
class="crawl-image"
/>
</view>
</view>
</view>
<view class="crawl-actions">
<view class="crawl-btn crawl-confirm1" @tap="closeCrawlDialog">关闭</view>
<view class="crawl-btn crawl-confirm" @tap="handleFetchConfirm">保存</view>
</view>
</view>
</uni-popup>
</view>
</template>
@@ -64,9 +123,34 @@
},
data() {
return {
urls:'',
show: false,
status_id: '',
status_name: '',
crawlData: null,
crawlLoading: false,
crawlForm: {
product_name: '',
price: '',
source_place: '',
plate_time: '',
displacement: '',
power: '',
body_color: '',
mileage: '',
condition_desc: ''
},
inputStyle: {
background: '#f5f5f5',
borderRadius: '8rpx',
padding: '16rpx 20rpx'
},
textareaStyle: {
background: '#f5f5f5',
borderRadius: '8rpx',
padding: '16rpx 20rpx',
minHeight: '120rpx'
},
keyword: '',
page: 1,
pageSize: 10,
@@ -75,8 +159,11 @@
[
{ label: '全部', value: '' },
{ label: '待审核', value: 0 },
{ label: '审核通过', value: 1 },
{ label: '审核拒绝', value: 2 }
{ label: '通过', value: 1 },
{ label: '拒绝', value: 2 },
{ label: '推送中', value: 3 },
{ label: '推送成功', value: 4 },
{ label: '推送失败', value: 5 }
]
],
options1: [
@@ -146,12 +233,13 @@
},
// 关键词变化(防抖)
onKeywordChange() {
// 防抖处理
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
onKeywordChange(val) {
this.keyword = val
// 防抖:300ms 内持续输入只触发一次
if (this._kwTimer) clearTimeout(this._kwTimer)
this._kwTimer = setTimeout(() => {
this.onSearch()
}, 500)
}, 300)
},
// 状态筛选
@@ -215,6 +303,174 @@
icon: 'none'
})
})
},
// 抓取链接
onBindByName() {
if (!this.urls || !this.urls.trim()) {
uni.showToast({ title: '请输入抓取链接', icon: 'none' })
return
}
this.crawlLoading = true
this.crawlData = null
this.$nextTick(() => {
this.$refs.crawlDialog && this.$refs.crawlDialog.open()
})
request({
url: 'common/usedcardetail/crawl',
method: 'post',
data: { url: this.urls }
}).then(res => {
this.crawlLoading = false
if (res.data.code == 200) {
this.crawlData = res.data.data || res.data
// 填充表单数据
this.crawlForm = {
product_name: this.crawlData.product_name || '',
price: this.crawlData.price || '',
source_place: this.crawlData.source_place || '',
plate_time: this.crawlData.plate_time || '',
displacement: this.crawlData.displacement || '',
power: this.crawlData.power || '',
body_color: this.crawlData.body_color || '',
mileage: this.crawlData.mileage || '',
condition_desc: this.crawlData.condition_desc || ''
}
uni.showToast({ title: res.data.message, icon: 'success' })
} else {
uni.showToast({ title: res.data.message || '抓取失败', icon: 'none' })
this.crawlData = null
}
}).catch(err => {
this.crawlLoading = false
this.crawlData = null
uni.showToast({ title: '抓取失败', icon: 'none' })
})
},
// 关闭抓取弹窗
closeCrawlDialog() {
this.$refs.crawlDialog && this.$refs.crawlDialog.close()
this.crawlData = null
this.crawlLoading = false
this.urls = ''
// 清空表单
this.crawlForm = {
product_name: '',
price: '',
source_place: '',
plate_time: '',
displacement: '',
power: '',
body_color: '',
mileage: '',
condition_desc: ''
}
},
// 确认保存抓取数据
handleFetchConfirm() {
const formData = {
...this.crawlData, // 所有抓取接口返回的原始数据
product_name: this.crawlForm.product_name,
price: this.crawlForm.price,
source_place: this.crawlForm.source_place,
plate_time: this.crawlForm.plate_time,
displacement: this.crawlForm.displacement,
power: this.crawlForm.power,
body_color: this.crawlForm.body_color,
condition_desc: this.crawlForm.condition_desc,
mileage: this.crawlForm.mileage
}
uni.showLoading({ title: '保存中...' })
request({
url: 'common/usedcardetail/crawl/store',
method: 'post',
data: formData
}).then(res => {
uni.hideLoading()
if (res.data.code === 200) {
uni.showToast({
title: res.data.message || '保存成功',
icon: 'success'
})
this.$refs.crawlDialog && this.$refs.crawlDialog.close()
this.crawlData = null
this.crawlLoading = false
this.urls = ''
// 清空表单
this.crawlForm = {
product_name: '',
price: '',
source_place: '',
plate_time: '',
displacement: '',
power: '',
body_color: '',
mileage: '',
condition_desc: ''
}
// 刷新列表
setTimeout(() => {
this.$refs.paging && this.$refs.paging.reload()
}, 1000)
} else {
uni.showToast({
title: res.data.message || '保存失败',
icon: 'none'
})
}
}).catch(err => {
uni.hideLoading()
console.error('[save error]', err)
uni.showToast({
title: '保存失败,请稍后重试',
icon: 'none'
})
})
},
// 保存抓取数据
saveCrawlDialog() {
function formatCnYearMonth(str) {
const match = str.match(/(\d{4})年(\d{1,2})月/)
if (!match) return str
const year = match[1]
const month = match[2].padStart(2, '0')
return `${year}-${month}-01`
}
const payload = {
...this.crawlData,
plate_time: formatCnYearMonth(this.crawlData.plate_time),
// images 数组 => "url1,url2,url3"
images: (this.crawlData.images || [])
.map(s => String(s || '').trim())
.filter(Boolean)
.join(',')
}
request({
url: 'common/usedcardetail/store',
method: 'post',
data: payload
}).then(res => {
this.$refs.crawlDialog && this.$refs.crawlDialog.close()
this.crawlData = null
this.crawlLoading = false
this.urls = ''
uni.showToast({
title: res.data.message || '保存成功',
icon: 'none'
})
setTimeout(() => {
this.$refs.paging && this.$refs.paging.reload()
}, 1000)
})
}
}
}
@@ -230,38 +486,66 @@
/* #endif */
}
.page-head {
position: sticky;
top: 0;
z-index: 10;
/* 抓取搜索区域 */
.dcd-search {
display: flex;
align-items: center;
gap: 12px;
padding: 12px;
background: #fff;
padding: 20rpx 24rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
}
.bind-btn {
padding: 8px 24px;
background: #3F435B;
color: #fff;
border-radius: 8px;
font-size: 28rpx;
white-space: nowrap;
cursor: pointer;
}
.bind-btn:active {
opacity: 0.8;
}
/* 搜索区域(放到底部) */
.page-head {
position: fixed;
width: 100%;
bottom: 0;
left: 0;
z-index: 99;
}
.head-search {
display: flex;
align-items: center;
gap: 16rpx;
gap: 10px;
background: rgba(255, 255, 255, 1);
border-radius: 18rpx;
padding: 20rpx 10px;
box-shadow: 0 10rpx 28rpx rgba(0, 0, 0, 0.06);
}
.statussearch {
border: 1px solid #eae9e9;
border-radius: 4px;
padding: 4px 8px;
font-size: 24rpx;
display: flex;
align-items: center;
padding: 12rpx 20rpx;
background: #F5F6F8;
border-radius: 24rpx;
white-space: nowrap;
gap: 6px;
}
.year-text {
font-size: 26rpx;
color: #333;
margin-right: 4rpx;
}
.year-text {
font-size: 26rpx;
color: #333;
}
.list-wrap {
padding: 20rpx 24rpx;
padding-bottom: 120rpx;
}
/* 列表项过渡动画 */
@@ -297,4 +581,106 @@
color: #999;
padding: 20rpx 0;
}
/* 抓取信息弹出层样式 */
.crawl-dialog {
width: 680rpx;
max-height: 80vh;
background: #fff;
border-radius: 24rpx;
padding: 28rpx;
box-sizing: border-box;
overflow: hidden;
display: flex;
flex-direction: column;
}
.crawl-title {
font-size: 36rpx;
font-weight: 600;
color: #111;
margin-bottom: 30rpx;
text-align: center;
}
.crawl-content {
flex: 1;
overflow-y: auto;
max-height: 60vh;
}
.crawl-loading {
text-align: center;
padding: 60rpx 0;
font-size: 28rpx;
color: #999;
}
.crawl-item {
margin-bottom: 24rpx;
padding-bottom: 24rpx;
border-bottom: 1px solid #f0f0f0;
}
.crawl-item:last-child {
border-bottom: none;
margin-bottom: 0;
padding-bottom: 0;
}
.crawl-label {
font-size: 26rpx;
color: #999;
margin-bottom: 12rpx;
}
.crawl-value {
font-size: 30rpx;
color: #333;
word-break: break-all;
line-height: 1.6;
}
.crawl-images {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
margin-top: 12rpx;
}
.crawl-image {
width: 180rpx;
height: 180rpx;
border-radius: 12rpx;
background: #f5f5f5;
}
.crawl-actions {
display: flex;
gap: 18rpx;
margin-top: 30rpx;
padding-top: 30rpx;
border-top: 1px solid #f0f0f0;
}
.crawl-btn {
flex: 1;
height: 84rpx;
border-radius: 18rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
}
.crawl-confirm1 {
border: 1px solid #3F435B;
font-weight: 600;
}
.crawl-confirm {
background: #3F435B;
color: #fff;
font-weight: 600;
}
</style>
+4 -9
View File
@@ -156,13 +156,10 @@
</view>
<!-- ========== FAQ 问题答案设置(专业发布专属功能)========== -->
<view class="faq-section">
<!-- <view class="faq-section">
<view class="section-title">
<text class="title-text">FAQ</text>
<!-- <text class="title-desc">设置常见问题和答案</text> -->
</view>
<!-- FAQ 列表 -->
<view class="faq-list">
<view
class="faq-item"
@@ -196,13 +193,11 @@
</view>
</view>
</view>
<!-- 添加 FAQ 按钮 -->
<view class="add-faq-btn" @tap="addFaq">
<uni-icons type="plus" size="18" color="#2E6CF6"></uni-icons>
<text class="add-faq-text">添加问题</text>
</view>
</view>
</view> -->
</view>
<!-- 底部提交按钮 -->
@@ -450,7 +445,7 @@
});
return new Promise((resolve, reject) => {
uni.uploadFile({
url: 'https://usedcar.dev.hnxinyouhe.com/upload?scene=' + scene,
url: 'https://userdcar-server.hnxinyouhe.com/upload?scene=' + scene,
filePath: imgUrl,
name: 'file',
header: {
@@ -482,7 +477,7 @@
});
return new Promise((resolve, reject) => {
uni.uploadFile({
url: 'https://usedcar.dev.hnxinyouhe.com/upload?scene=' + scene,
url: 'https://userdcar-server.hnxinyouhe.com/upload?scene=' + scene,
filePath: imgUrl,
name: 'file',
header: {
+4 -8
View File
@@ -156,12 +156,10 @@
</view>
<!-- ========== FAQ 问题答案设置(专业发布专属功能)========== -->
<view class="faq-section">
<!-- <view class="faq-section">
<view class="section-title">
<text class="title-text">FAQ</text>
</view>
<!-- FAQ 列表 -->
<view class="faq-list">
<view
class="faq-item"
@@ -195,13 +193,11 @@
</view>
</view>
</view>
<!-- 添加 FAQ 按钮 -->
<view class="add-faq-btn" @tap="addFaq">
<uni-icons type="plus" size="18" color="#2E6CF6"></uni-icons>
<text class="add-faq-text">添加问题</text>
</view>
</view>
</view> -->
</view>
<!-- 底部提交按钮 -->
@@ -577,7 +573,7 @@
});
return new Promise((resolve, reject) => {
uni.uploadFile({
url: 'https://usedcar.dev.hnxinyouhe.com/upload?scene=' + scene,
url: 'https://userdcar-server.hnxinyouhe.com/upload?scene=' + scene,
filePath: imgUrl,
name: 'file',
header: {
@@ -609,7 +605,7 @@
});
return new Promise((resolve, reject) => {
uni.uploadFile({
url: 'https://usedcar.dev.hnxinyouhe.com/upload?scene=' + scene,
url: 'https://userdcar-server.hnxinyouhe.com/upload?scene=' + scene,
filePath: imgUrl,
name: 'file',
header: {
+3 -6
View File
@@ -123,12 +123,9 @@
uni.setStorageSync('userInfo', userInfo)
// 处理角色信息(统一使用 role.js 工具)
if (data.role) {
saveRoles(data.role, data.role_wp)
// 通知自定义 TabBar 刷新
uni.$emit && uni.$emit('userRoleChanged')
}
saveRoles(data.role, data.role_wp)
// 通知自定义 TabBar 刷新
uni.$emit && uni.$emit('userRoleChanged')
this.title = '登录成功'
this.desc = '正在进入页面'
+6 -8
View File
@@ -61,11 +61,12 @@
<view class="input-wrapper">
<uni-icons type="locked" size="20" color="#999"></uni-icons>
<input
class="input-field"
class="input-field uni-input-input"
:type="showPassword ? 'text' : 'password'"
placeholder="请输入密码"
v-model="formData.password"
placeholder-class="input-placeholder"
step="" enterkeyhint="done" autocomplete="off"
/>
<uni-icons
:type="showPassword ? 'eye' : 'eye-slash'"
@@ -345,6 +346,9 @@
// 处理角色信息(统一使用 role.js 工具)
saveRoles(data.role, data.role_wp)
// 通知自定义 TabBar 刷新
uni.$emit && uni.$emit('userRoleChanged')
// 保存记住的密码
this.saveRememberedPassword()
@@ -878,13 +882,7 @@
border-radius: 16rpx;
border: 2rpx solid transparent;
transition: all 0.3s;
&:focus-within {
background: #fff;
border-color: #FF972F;
box-shadow: 0 0 0 6rpx rgba(255, 151, 47, 0.08);
}
.input-field {
flex: 1;
margin: 0 16rpx;