feat: 无扫码配置时自动匹配,并修复我的页列表样式

This commit is contained in:
2026-11-03 15:39:03 +08:00
committed by xuan
parent 569b671b7b
commit fdacdfbda0
7 changed files with 399 additions and 90 deletions
+2 -1
View File
@@ -58,10 +58,11 @@
}
.u-cell_title {
flex: 1;
min-width: 0;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
min-width: 655rpx;
}
.u-border-bottom:last-child:after {
+9 -1
View File
@@ -125,6 +125,7 @@ import md5 from '@/common/md5.js';
import manifest from '@/manifest.json';
import { mapState } from 'vuex'
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js'
import { ensureScanConfigAfterLogin } from '@/common/scanAutoConfig.js'
export default {
data() {
return {
@@ -325,7 +326,7 @@ export default {
this.$u.api.pdaLogin({
'phone': this.login.username,
'password': this.login.password,
}).then((res) => {
}).then(async (res) => {
console.log('login res', res)
var aLoginUserData = res;
@@ -356,6 +357,13 @@ export default {
getApp().globalData.StoreNameID = aLoginUserData.default_physical_warehouse_id;
getApp().globalData.StoreName = aLoginUserData.default_physical_warehouse_name;
getApp().globalData.StoreTypeNo = '';
try {
await ensureScanConfigAfterLogin(this.$u.api);
} catch (scanError) {
console.log('自动匹配扫码设置失败', scanError);
}
setTimeout(() => {
uni.reLaunch({
url: '/pages/sys/workbench/index'
+53 -23
View File
@@ -36,21 +36,19 @@
!-->
</view>
<view class="list">
<view>
<u-cell-group class="personal-list">
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-item icon="question-circle" :iconStyle="{ color: '#ff8d06' }" title="常见问题" @click="navTo('problem')"></u-cell-item>
<u-cell-item icon="kefu-ermai" :iconStyle="{ color: '#5f8dff' }" title="意见反馈" @click="navTo('comment')"></u-cell-item>
<u-cell-item icon="map" :iconStyle="{ color: '#316ede' }" title="账号安全" @click="navTo('pwd')"></u-cell-item>
<u-cell-item icon="scan" :iconStyle="{ color: '#36cfc9' }" title="扫描设置" @click="navTo('scan-settings')"></u-cell-item>
<u-cell-item icon="order" :iconStyle="{ color: '#59bdf9' }" title="清除缓存" @click="navTo('clear-cache')"></u-cell-item>
<!--<u-cell-item icon="account" :iconStyle="{ color: '#27c0dc' }" title="关于我们" @click="navTo('about')"></u-cell-item>
<u-cell-item icon="kefu-ermai" :iconStyle="{ color: '#ff8a00' }" title="联系客服" @click="navTo('service')"></u-cell-item>!-->
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-item icon="reload" :iconStyle="{ color: '#19be6b' }" title="版本更新" @click="upgrade"></u-cell-item>
<u-cell-item icon="setting" :iconStyle="{ color: '#2767dc' }" title="系统设置" @click="navTo('setting')"></u-cell-item>
</u-cell-group>
</view>
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-group class="personal-list" :border="false">
<u-cell-item icon="question-circle" :iconStyle="{ color: '#ff8d06' }" title="常见问题" :center="true" @click="navTo('problem')"></u-cell-item>
<u-cell-item icon="kefu-ermai" :iconStyle="{ color: '#5f8dff' }" title="意见反馈" :center="true" @click="navTo('comment')"></u-cell-item>
<u-cell-item icon="map" :iconStyle="{ color: '#316ede' }" title="账号安全" :center="true" @click="navTo('pwd')"></u-cell-item>
<u-cell-item icon="scan" :iconStyle="{ color: '#36cfc9' }" title="扫描设置" :center="true" @click="navTo('scan-settings')"></u-cell-item>
<u-cell-item icon="order" :iconStyle="{ color: '#59bdf9' }" title="清除缓存" :center="true" @click="navTo('clear-cache')"></u-cell-item>
</u-cell-group>
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
<u-cell-group class="personal-list" :border="false">
<u-cell-item icon="reload" :iconStyle="{ color: '#19be6b' }" title="版本更新" :center="true" @click="upgrade"></u-cell-item>
<u-cell-item icon="setting" :iconStyle="{ color: '#2767dc' }" title="系统设置" :center="true" @click="navTo('setting')"></u-cell-item>
</u-cell-group>
</view>
<view class="app-meta">
<text class="app-name">{{ appName }}</text>
@@ -146,20 +144,52 @@ export default {
};
</script>
<style lang="scss">
@import '@/common/pda-typography.scss';
@import 'index.scss';
page {
background-color: #f5f5f5;
}
.wrap .u-cell-box .u-cell_title{
color:#202328;
.header {
.userinfo {
position: relative;
padding: 20rpx 30rpx 24rpx;
align-items: center;
}
.info {
flex: 1;
min-width: 0;
align-items: center;
}
.username {
font-size: $pda-font-body;
line-height: 1.3;
}
}
.list {
.personal-list {
::v-deep .u-cell {
min-height: $pda-row-min-height;
padding: 24rpx 30rpx;
box-sizing: border-box;
}
::v-deep .u-cell_title {
color: #202328;
font-size: $pda-font-body;
line-height: 1.3;
}
::v-deep .u-cell__left-icon-wrap {
margin-right: 20rpx;
}
::v-deep .u-cell__right-icon-wrap {
flex-shrink: 0;
}
}
}
.sign-in-images{
width: 125rpx;
height:50rpx;
position: absolute;
right: 0;
top:5px;
uni-image{
flex-shrink: 0;
uni-image, image {
width: 125rpx;
height:50rpx;
}
@@ -171,7 +201,7 @@ page {
.app-name {
display: block;
color: #242820;
font-size: 36rpx;
font-size: $pda-font-body;
font-weight: 700;
line-height: 1.4;
}
@@ -179,7 +209,7 @@ page {
display: block;
margin-top: 8rpx;
color: #8a8f86;
font-size: 32rpx;
font-size: $pda-font-nav-sub;
line-height: 1.3;
}
</style>