Compare commits
6
Commits
55f13bb47b
...
30e20853df
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30e20853df | ||
|
|
6688fb3867 | ||
|
|
d9d1458b58 | ||
|
|
4faf1bf41a | ||
|
|
2347b84a8a | ||
|
|
8ec38126e6 |
@@ -34,6 +34,10 @@ const install = (Vue, vm) => {
|
||||
data: req.data,
|
||||
header: req.header
|
||||
}, null, 2));
|
||||
// #ifdef APP-PLUS
|
||||
// Android 5.x 等老 PDA 不信任 Let's Encrypt 新证书链,关闭校验证书
|
||||
req.sslVerify = false;
|
||||
// #endif
|
||||
if (!req.header){
|
||||
req.header = [];
|
||||
}
|
||||
@@ -176,6 +180,9 @@ const install = (Vue, vm) => {
|
||||
uni.request({
|
||||
url,
|
||||
method: 'PUT',
|
||||
// #ifdef APP-PLUS
|
||||
sslVerify: false,
|
||||
// #endif
|
||||
header: {
|
||||
...header,
|
||||
'Platform': 2,
|
||||
|
||||
@@ -48,6 +48,13 @@ export default {
|
||||
dataKey: 'data',
|
||||
needSetup: false
|
||||
},
|
||||
{
|
||||
brand: 'nlscan',
|
||||
name: '新大陆',
|
||||
action: 'nlscan.action.SCANNER_RESULT',
|
||||
dataKey: 'SCAN_BARCODE1',
|
||||
needSetup: false
|
||||
},
|
||||
{ ...PHONE_SCAN_CONFIG },
|
||||
];
|
||||
},
|
||||
@@ -267,7 +274,8 @@ export default {
|
||||
if (!self.isPageActive) return;
|
||||
|
||||
try {
|
||||
plus.android.importClass('android.content.Intent');
|
||||
// 广播回调里的 intent 需要按实例导入,否则 getStringExtra 不可用
|
||||
plus.android.importClass(intent);
|
||||
const scanResult = intent.getStringExtra(config.dataKey);
|
||||
|
||||
console.log(`${config.name}扫码结果:`, scanResult);
|
||||
|
||||
@@ -23,6 +23,9 @@ export function request(options) {
|
||||
url: apiurl + options.url,
|
||||
method: options.method || 'GET',
|
||||
data: options.data,
|
||||
// #ifdef APP-PLUS
|
||||
sslVerify: false,
|
||||
// #endif
|
||||
header: {
|
||||
'Platform': 2,
|
||||
'Authorization': token,
|
||||
|
||||
+19
@@ -17,6 +17,25 @@ import VueI18n from '@/common/vue-i18n.min.js';
|
||||
import lang_zh_CN from '@/common/locales/zh_CN.js';
|
||||
import lang_en from '@/common/locales/en.js';
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// Android 5.x 等老 PDA 不信任 Let's Encrypt 新证书链,全局关闭 HTTPS 证书校验
|
||||
(() => {
|
||||
const patchSslVerify = (methodName) => {
|
||||
const original = uni[methodName];
|
||||
if (typeof original !== 'function') {
|
||||
return;
|
||||
}
|
||||
uni[methodName] = (options = {}) => original({
|
||||
...options,
|
||||
sslVerify: false
|
||||
});
|
||||
};
|
||||
patchSslVerify('request');
|
||||
patchSslVerify('downloadFile');
|
||||
patchSslVerify('uploadFile');
|
||||
})();
|
||||
// #endif
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
App.mpType = 'app';
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@
|
||||
"name" : "浩拓ERP",
|
||||
"appid" : "__UNI__F79F300",
|
||||
"description" : "浩拓ERP",
|
||||
"versionName" : "1.1.5",
|
||||
"versionCode" : 105,
|
||||
"versionName" : "1.1.6",
|
||||
"versionCode" : 106,
|
||||
"transformPx" : false,
|
||||
"app-plus" : {
|
||||
"optimization" : {
|
||||
|
||||
@@ -8,22 +8,20 @@
|
||||
<!-- <u-tabs :list="list" :is-scroll="false" :current="current" @change="onClickItem"></u-tabs> -->
|
||||
<!-- <view v-if="current === 0"> -->
|
||||
<view class="list">
|
||||
<template v-if="isDevelopment">
|
||||
<view class="list-call">
|
||||
<view class="iconfont icon-link" style="font-size: 22px;color:#5473e8;"></view>
|
||||
<view style="width: 100%;">
|
||||
<view class="server-selector" @click="showServerPicker">
|
||||
<text>{{ getApiUrlLabel() }}</text>
|
||||
<view class="iconfont icon-arrow-down" style="font-size: 16px;"></view>
|
||||
</view>
|
||||
<view class="list-call env-call">
|
||||
<view class="iconfont icon-link" style="font-size: 28px;color:#5473e8;"></view>
|
||||
<view style="width: 100%;">
|
||||
<view class="server-selector" @click="showServerPicker">
|
||||
<text>{{ getApiUrlLabel() }}</text>
|
||||
<view class="iconfont icon-arrow-down"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-call" v-if="selectedApiUrl === 'custom'">
|
||||
<!-- 当选择自定义时显示输入框 -->
|
||||
<input class="u-input" type="text" v-model="customApiUrl" maxlength="100" placeholder="请输入服务器地址"
|
||||
@blur="handleBlurInputUrl" />
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<view class="list-call" v-if="selectedApiUrl === 'custom'">
|
||||
<!-- 当选择自定义时显示输入框 -->
|
||||
<input class="u-input" type="text" v-model="customApiUrl" maxlength="100" placeholder="请输入服务器地址"
|
||||
@blur="handleBlurInputUrl" />
|
||||
</view>
|
||||
<view class="list-call">
|
||||
<view class="iconfont icon-avatar" style="font-size: 22px;color:#5473e8;"></view>
|
||||
<input class="u-input" type="text" v-model="login.username" maxlength="32"
|
||||
@@ -105,7 +103,7 @@
|
||||
<!-- </view>-->
|
||||
<!-- </view>-->
|
||||
<!-- </div>-->
|
||||
<u-select v-model="showApiUrlPicker" :list="apiUrlList" title="选择服务器"
|
||||
<u-select class="login-env-picker" v-model="showApiUrlPicker" :list="apiUrlList" title="选择服务器"
|
||||
@confirm="onApiUrlConfirm" @cancel="showApiUrlPicker = false"></u-select>
|
||||
<!-- 版本信息显示 -->
|
||||
<view class="version-info">
|
||||
@@ -137,10 +135,12 @@ export default {
|
||||
password: ""
|
||||
},
|
||||
showApiUrlPicker: false,
|
||||
// 根据环境设置默认URL和选项
|
||||
selectedApiUrl: config.isDevelopment ? config.devApiUrlOptions[0].value : config.productionApiUrl,
|
||||
// 暂时在打包后也展示服务器选项;生产包默认正式环境
|
||||
selectedApiUrl: config.isDevelopment
|
||||
? config.devApiUrlOptions[0].value
|
||||
: ((config.devApiUrlOptions.find(item => item.label === '正式环境') || {}).value || config.productionApiUrl),
|
||||
customApiUrl: 'http://192.168.1.66:50002/hcscm/pda/v1',
|
||||
apiUrlList: config.isDevelopment ? config.devApiUrlOptions : [],
|
||||
apiUrlList: config.devApiUrlOptions,
|
||||
phoneNo: '',
|
||||
//username: '',
|
||||
//password: '',
|
||||
@@ -169,16 +169,13 @@ export default {
|
||||
},
|
||||
|
||||
onShow() {
|
||||
// 只在开发环境读取存储的URL
|
||||
if (config.isDevelopment) {
|
||||
uni.getStorage({
|
||||
key: 'ApiUrl',
|
||||
success: (e) => {
|
||||
util.updateApiUrl(e.data);
|
||||
this.selectedApiUrl = e.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
uni.getStorage({
|
||||
key: 'ApiUrl',
|
||||
success: (e) => {
|
||||
util.updateApiUrl(e.data);
|
||||
this.selectedApiUrl = e.data;
|
||||
}
|
||||
});
|
||||
|
||||
uni.getStorage({
|
||||
key: 'UserInfo',
|
||||
@@ -300,21 +297,12 @@ export default {
|
||||
title: '登录中...'
|
||||
});
|
||||
|
||||
let currentApiUrl;
|
||||
|
||||
if (config.isDevelopment) {
|
||||
// 开发环境:使用选择的URL
|
||||
currentApiUrl = this.selectedApiUrl === 'custom' ? this.customApiUrl : this.selectedApiUrl;
|
||||
if (!currentApiUrl || currentApiUrl.length === 0) {
|
||||
this.$u.toast('请输入服务器地址');
|
||||
return;
|
||||
}
|
||||
// 更新store中的URL
|
||||
this.$store.dispatch('updateApiUrl', currentApiUrl);
|
||||
} else {
|
||||
// 生产环境:使用固定的生产URL
|
||||
currentApiUrl = config.productionApiUrl;
|
||||
const currentApiUrl = this.selectedApiUrl === 'custom' ? this.customApiUrl : this.selectedApiUrl;
|
||||
if (!currentApiUrl || currentApiUrl.length === 0) {
|
||||
this.$u.toast('请输入服务器地址');
|
||||
return;
|
||||
}
|
||||
this.$store.dispatch('updateApiUrl', currentApiUrl);
|
||||
|
||||
if (this.login.username.length == 0) {
|
||||
this.$u.toast('请输入账号');
|
||||
@@ -338,14 +326,14 @@ export default {
|
||||
console.log('login res', res)
|
||||
var aLoginUserData = res;
|
||||
|
||||
// 只在开发环境保存 apiurl 到本地存储
|
||||
if (config.isDevelopment) {
|
||||
uni.setStorage({
|
||||
key: 'ApiUrl',
|
||||
data: currentApiUrl
|
||||
});
|
||||
util.updateApiUrl(currentApiUrl);
|
||||
}
|
||||
//console.log('--aLoginUserData->>' + JSON.stringify(aLoginUserData));
|
||||
uni.setStorage({
|
||||
key: 'ApiUrl',
|
||||
data: currentApiUrl
|
||||
});
|
||||
util.updateApiUrl(currentApiUrl);
|
||||
// 保存 token 到本地存储
|
||||
uni.setStorageSync('RemoteTokenData', aLoginUserData);
|
||||
|
||||
applyLoginData(aLoginUserData);
|
||||
|
||||
@@ -445,18 +433,14 @@ export default {
|
||||
},
|
||||
|
||||
handleBlurInputUrl(e) {
|
||||
// 只在开发环境处理自定义URL
|
||||
if (config.isDevelopment) {
|
||||
const url = e.detail.value.trim();
|
||||
if (url) {
|
||||
this.customApiUrl = url;
|
||||
// 保存到本地存储
|
||||
uni.setStorage({
|
||||
key: 'ApiUrl',
|
||||
data: url
|
||||
});
|
||||
util.updateApiUrl(url);
|
||||
}
|
||||
const url = e.detail.value.trim();
|
||||
if (url) {
|
||||
this.customApiUrl = url;
|
||||
uni.setStorage({
|
||||
key: 'ApiUrl',
|
||||
data: url
|
||||
});
|
||||
util.updateApiUrl(url);
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -465,14 +449,25 @@ export default {
|
||||
<style lang="scss">
|
||||
@import 'index.scss';
|
||||
|
||||
.env-call {
|
||||
height: auto;
|
||||
min-height: 140rpx;
|
||||
}
|
||||
|
||||
.server-selector {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10rpx 0;
|
||||
min-height: 80rpx;
|
||||
padding: 16rpx 0;
|
||||
font-size: 40rpx;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
.server-selector .icon-arrow-down {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.list-call {
|
||||
.u-select {
|
||||
margin-bottom: 10rpx;
|
||||
@@ -587,3 +582,23 @@ export default {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
.login-env-picker {
|
||||
::v-deep .u-select__header,
|
||||
::v-deep .u-select__header__btn {
|
||||
height: 100rpx;
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
::v-deep .u-select__body {
|
||||
height: 560rpx;
|
||||
}
|
||||
|
||||
::v-deep .u-select__body__picker-view__item,
|
||||
::v-deep .u-line-1 {
|
||||
height: 88rpx;
|
||||
font-size: 40rpx;
|
||||
line-height: 88rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<!--<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>
|
||||
@@ -55,6 +56,8 @@
|
||||
</template>
|
||||
<script>
|
||||
import CommonNavbar from "@/components/common-navbar/index";
|
||||
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js';
|
||||
import config from '@/common/config.js';
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
||||
*/
|
||||
@@ -102,25 +105,29 @@ export default {
|
||||
},
|
||||
upgrade(){
|
||||
// #ifdef APP-PLUS
|
||||
this.$u.api.upgradeCheck().then(res => {
|
||||
if (res.result == 'true'){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.message + '是否下载更新?',
|
||||
showCancel: true,
|
||||
success: function (res2) {
|
||||
if (res2.confirm) {
|
||||
plus.runtime.openURL(res.data.apkUrl);
|
||||
}
|
||||
}
|
||||
app_upgrade(async () => {
|
||||
const appInfo = await new Promise((resolve) => {
|
||||
plus.runtime.getProperty(plus.runtime.appid, (inf) => {
|
||||
resolve(inf);
|
||||
});
|
||||
}else{
|
||||
this.$u.toast(res.message);
|
||||
});
|
||||
const res = await this.$u.api.upgradeCheck({
|
||||
app_name: config.upgradeName,
|
||||
current_version: appInfo.version
|
||||
});
|
||||
if (!res.download_url) {
|
||||
this.$u.toast('当前版本已是最新版');
|
||||
return;
|
||||
}
|
||||
});
|
||||
return {
|
||||
changelog: res.message + ',最新版本:' + res.latest_version,
|
||||
status: res.need_update ? 1 : 0,
|
||||
path: res.download_url
|
||||
};
|
||||
}, 1);
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
this.$u.toast('小程序端或H5端无需检查更新')
|
||||
this.$u.toast('小程序端或H5端已是最新版,无需检查更新!');
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
const res = await this.$u.api.dictionary.getDetailEnumList({
|
||||
dictionary_id: DICTIONARY_TYPE_SCANNER,
|
||||
});
|
||||
const list = Array.isArray(res) ? res : [];
|
||||
const list = Array.isArray(res) ? res : (Array.isArray(res && res.list) ? res.list : []);
|
||||
const builtinConfigs = this.getScannerConfigs();
|
||||
if (list.length) {
|
||||
this.configList = list
|
||||
@@ -98,6 +98,7 @@ export default {
|
||||
this.useFallbackConfigList();
|
||||
}
|
||||
this.ensurePhoneScanOption();
|
||||
this.ensureNlscanOption();
|
||||
this.initFormFromSaved();
|
||||
},
|
||||
useFallbackConfigList() {
|
||||
@@ -110,6 +111,24 @@ export default {
|
||||
this.configList.push(phoneConfig);
|
||||
}
|
||||
},
|
||||
ensureNlscanOption() {
|
||||
const nlscanConfig = this.getScannerConfigs().find((item) => item.brand === 'nlscan');
|
||||
if (!nlscanConfig) {
|
||||
return;
|
||||
}
|
||||
const exists = this.configList.some((item) => {
|
||||
return item.brand === nlscanConfig.brand || item.action === nlscanConfig.action;
|
||||
});
|
||||
if (exists) {
|
||||
return;
|
||||
}
|
||||
const phoneIndex = this.configList.findIndex((item) => item.brand === PHONE_SCAN_BRAND);
|
||||
if (phoneIndex >= 0) {
|
||||
this.configList.splice(phoneIndex, 0, nlscanConfig);
|
||||
return;
|
||||
}
|
||||
this.configList.push(nlscanConfig);
|
||||
},
|
||||
initFormFromSaved() {
|
||||
const savedConfig = getScanConfig(this.getScannerConfigs());
|
||||
if (savedConfig) {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<u-cell-group :border="false">
|
||||
<u-cell-item title="通用" @click="navTo('/pages/sys/user/currency')" :arrow="true"></u-cell-item>
|
||||
<u-gap height="20" bg-color="#f5f5f5"></u-gap>
|
||||
<u-cell-item title="版本更新" @click="upgrade()" :arrow="true"></u-cell-item>
|
||||
<u-cell-item title="隐私政策" @click="navTo('')" :arrow="true"></u-cell-item>
|
||||
<u-cell-item title="用户协议" @click="navTo('')" :arrow="true"></u-cell-item>
|
||||
</u-cell-group>
|
||||
@@ -18,9 +17,6 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
||||
*/
|
||||
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js'
|
||||
import util from '@/common/util.js';
|
||||
import config from '../../../common/config';
|
||||
import { clearUserSession } from '@/common/userSession.js';
|
||||
|
||||
export default {
|
||||
@@ -35,36 +31,6 @@ export default {
|
||||
url: url
|
||||
});
|
||||
},
|
||||
upgrade(){
|
||||
// #ifdef APP-PLUS
|
||||
app_upgrade(async ()=>{
|
||||
// 获取应用信息
|
||||
const appInfo = await new Promise((resolve) => {
|
||||
plus.runtime.getProperty(plus.runtime.appid, (inf) => {
|
||||
resolve(inf);
|
||||
});
|
||||
});
|
||||
const res = await this.$u.api.upgradeCheck({
|
||||
app_name: config.upgradeName,
|
||||
current_version: appInfo.version
|
||||
})
|
||||
console.log('res',res)
|
||||
if(!res.download_url){
|
||||
this.$u.toast('当前版本已是最新版');
|
||||
return
|
||||
}
|
||||
return {
|
||||
changelog: res.message + ',最新版本:' + res.latest_version,
|
||||
|
||||
status: res.need_update ? 1 : 0, // 0 无新版本 | 1 有新版本
|
||||
path: res.download_url // 新apk地址
|
||||
}
|
||||
}, 1)
|
||||
// #endif
|
||||
// #ifndef APP-PLUS
|
||||
this.$u.toast('小程序端或H5端已是最新版,无需检查更新!');
|
||||
// #endif
|
||||
},
|
||||
openSettings() {
|
||||
// #ifdef APP-PLUS
|
||||
uni.getSystemInfo({
|
||||
|
||||
@@ -1,37 +1,50 @@
|
||||
<template>
|
||||
<view class="wrap">
|
||||
<common-navbar title="工作台" :showBack="false">
|
||||
<view class="workbench-page">
|
||||
<common-navbar
|
||||
title="应用中心"
|
||||
:showBack="false"
|
||||
backgroundColor="#f4f5e8"
|
||||
:showShadow="false"
|
||||
>
|
||||
<template #left>
|
||||
<text class="app-version">v{{ appVersion }}</text>
|
||||
</template>
|
||||
<template #right>
|
||||
<view class="scan_box">
|
||||
<u-icon name="scan" color="#333333" size="46" @click="handleScan"></u-icon>
|
||||
<view class="settings-entry" @click="openSettings">
|
||||
<u-icon name="setting-fill" color="#242820" size="32"></u-icon>
|
||||
<text class="settings-text">设置</text>
|
||||
</view>
|
||||
</template>
|
||||
</common-navbar>
|
||||
<view v-for="group in visibleMenuGroups" :key="group.title">
|
||||
<view class="workbench-title">{{ group.title }}</view>
|
||||
<view class="toolbar">
|
||||
<u-grid class="grid" :col="4" :border="false">
|
||||
<u-grid-item
|
||||
v-for="(item, index) in group.items"
|
||||
:key="item.router"
|
||||
:index="index"
|
||||
@click="navTo(item.url)"
|
||||
>
|
||||
<view class="home-icon" :class="item.color">
|
||||
<i class="iconfont" :class="item.icon"></i>
|
||||
</view>
|
||||
<view class="grid-text">{{ item.name }}</view>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
|
||||
<view class="menu-grid">
|
||||
<view
|
||||
v-for="(item, index) in visibleMenuItems"
|
||||
:key="item.router"
|
||||
class="menu-card"
|
||||
:class="`menu-card--${index % 6}`"
|
||||
hover-class="menu-card--active"
|
||||
@click="navTo(item.url)"
|
||||
>
|
||||
<image class="card-background" :src="item.backgroundImage" mode="aspectFill"></image>
|
||||
<text class="card-mark">“</text>
|
||||
<view class="card-content">
|
||||
<view class="card-title">{{ item.name }}</view>
|
||||
<view class="card-subtitle">{{ item.subtitle }}</view>
|
||||
</view>
|
||||
<view class="card-arrow">
|
||||
<u-icon name="arrow-right" color="#5b6257" size="22"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="!visibleMenuItems.length" class="empty-state">暂无可用功能</view>
|
||||
</view>
|
||||
<view v-if="!visibleMenuGroups.length" class="textCenter">暂无可用功能</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import CommonNavbar from "@/components/common-navbar/index";
|
||||
import scanMixin from '@/common/scanMixin.js';
|
||||
import { hasResourceRouter } from '@/common/userSession.js';
|
||||
import manifest from '@/manifest.json';
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://aidex.vip All rights reserved.
|
||||
*/
|
||||
@@ -56,6 +69,8 @@ export default {
|
||||
items: [
|
||||
{
|
||||
name: '成品配布',
|
||||
subtitle: 'FINISHED GOODS',
|
||||
backgroundImage: '/static/workbench/finished-goods.png',
|
||||
url: '/pages/saleship/salepickscan',
|
||||
router: 'CashCommodityClothOrder',
|
||||
icon: 'icon-hetongguanli',
|
||||
@@ -68,6 +83,8 @@ export default {
|
||||
items: [
|
||||
{
|
||||
name: '加工进仓',
|
||||
subtitle: 'PROCESSING IN',
|
||||
backgroundImage: '/static/workbench/processing-in.png',
|
||||
url: '/pages/storegoods/storeGoodsProcessInList',
|
||||
router: 'FpProcessingEntryOrder',
|
||||
icon: 'icon-hetongguanli',
|
||||
@@ -75,6 +92,8 @@ export default {
|
||||
},
|
||||
{
|
||||
name: '加工出仓',
|
||||
subtitle: 'PROCESSING OUT',
|
||||
backgroundImage: '/static/workbench/processing-out.png',
|
||||
url: '/pages/storegoods/storeGoodsProcessOutList',
|
||||
router: 'FpProcessingDeliverFromGodownOrder',
|
||||
icon: 'icon-hetongguanli',
|
||||
@@ -82,6 +101,8 @@ export default {
|
||||
},
|
||||
{
|
||||
name: '加工退货进仓',
|
||||
subtitle: 'RETURN ENTRY',
|
||||
backgroundImage: '/static/workbench/return-entry.png',
|
||||
url: '/pages/storegoods/storeGoodsProcessReturnInList',
|
||||
router: 'FpProcessingReturnEntryOrder',
|
||||
icon: 'icon-hetongguanli',
|
||||
@@ -89,6 +110,8 @@ export default {
|
||||
},
|
||||
{
|
||||
name: '采购进仓',
|
||||
subtitle: 'PURCHASE ENTRY',
|
||||
backgroundImage: '/static/workbench/purchase-entry.png',
|
||||
url: '/pages/storegoods/storeGoodsPurchaseInList',
|
||||
router: 'FinishPurchaseWarehouseEntry',
|
||||
icon: 'icon-hetongguanli',
|
||||
@@ -106,11 +129,8 @@ export default {
|
||||
// onUnload, onHide, onShow 已由 scanMixin 自动处理
|
||||
|
||||
computed: {
|
||||
contentStyle() {
|
||||
const navHeight = getStatusBarHeight() + 44;
|
||||
return {
|
||||
height: `${navHeight}px`,
|
||||
};
|
||||
appVersion() {
|
||||
return manifest.versionName;
|
||||
},
|
||||
visibleMenuGroups() {
|
||||
return this.menuGroups
|
||||
@@ -119,6 +139,11 @@ export default {
|
||||
items: group.items.filter((item) => hasResourceRouter(item.router))
|
||||
}))
|
||||
.filter((group) => group.items.length > 0);
|
||||
},
|
||||
visibleMenuItems() {
|
||||
return this.visibleMenuGroups.reduce((items, group) => {
|
||||
return items.concat(group.items);
|
||||
}, []);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -136,6 +161,11 @@ export default {
|
||||
url: url,
|
||||
});
|
||||
},
|
||||
openSettings() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/sys/user/setting'
|
||||
});
|
||||
},
|
||||
imgListClick(index) {
|
||||
console.log(`点击了第${index + 1}页图片`);
|
||||
},
|
||||
@@ -205,63 +235,186 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import "index.scss";
|
||||
page {
|
||||
min-height: 100%;
|
||||
background: #f4f5e8;
|
||||
}
|
||||
|
||||
.scan_box {
|
||||
.workbench-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: 40rpx;
|
||||
background:
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 220rpx),
|
||||
#f4f5e8;
|
||||
}
|
||||
|
||||
.workbench-page .navbar_left,
|
||||
.workbench-page .navbar_right {
|
||||
min-width: 68px !important;
|
||||
}
|
||||
|
||||
.workbench-page .navbar_center {
|
||||
padding: 0 8px !important;
|
||||
}
|
||||
|
||||
.app-version {
|
||||
color: #444a40;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.settings-entry {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
color: #242820;
|
||||
font-size: 26rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.settings-text {
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
|
||||
.menu-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 14rpx 19rpx 40rpx;
|
||||
}
|
||||
|
||||
.menu-card {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
width: calc(50% - 30rpx);
|
||||
height: 218rpx;
|
||||
margin: 14rpx 15rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 12rpx 28rpx 12rpx 28rpx;
|
||||
color: #ffffff;
|
||||
box-shadow: 0 12rpx 24rpx rgba(49, 58, 45, 0.14);
|
||||
transition: transform 120ms ease, opacity 120ms ease;
|
||||
}
|
||||
|
||||
.menu-card--active {
|
||||
opacity: 0.88;
|
||||
transform: scale(0.97);
|
||||
}
|
||||
|
||||
.menu-card--0 {
|
||||
background: linear-gradient(145deg, #ed4052, #cf263e);
|
||||
}
|
||||
|
||||
.menu-card--1 {
|
||||
background: linear-gradient(145deg, #1787f0, #1768d6);
|
||||
}
|
||||
|
||||
.menu-card--2 {
|
||||
background: linear-gradient(145deg, #6558eb, #4639c8);
|
||||
}
|
||||
|
||||
.menu-card--3 {
|
||||
background: linear-gradient(145deg, #ff6a2b, #ea3d19);
|
||||
}
|
||||
|
||||
.menu-card--4 {
|
||||
background: linear-gradient(145deg, #149de4, #1977d1);
|
||||
}
|
||||
|
||||
.menu-card--5 {
|
||||
background: linear-gradient(145deg, #20bea8, #0c9789);
|
||||
}
|
||||
|
||||
.card-background {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0.72;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.card-mark {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
left: 18rpx;
|
||||
color: rgba(255, 255, 255, 0.2);
|
||||
font-family: Georgia, serif;
|
||||
font-size: 74rpx;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.card-content {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
right: 16rpx;
|
||||
bottom: 42rpx;
|
||||
left: 22rpx;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
overflow: hidden;
|
||||
font-size: 40rpx;
|
||||
font-weight: 700;
|
||||
line-height: 1.25;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.card-subtitle {
|
||||
margin-top: 8rpx;
|
||||
color: rgba(255, 255, 255, 0.76);
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
letter-spacing: 1rpx;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.card-arrow {
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
width: 48rpx;
|
||||
height: 42rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 8rpx 0 0 0;
|
||||
background: rgba(244, 245, 232, 0.94);
|
||||
}
|
||||
|
||||
.scan_text {
|
||||
font-size: 12px;
|
||||
color: #2979ff;
|
||||
.empty-state {
|
||||
width: 100%;
|
||||
padding: 120rpx 0;
|
||||
color: #7e8578;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 350px) {
|
||||
.menu-grid {
|
||||
padding-right: 15rpx;
|
||||
padding-left: 15rpx;
|
||||
}
|
||||
|
||||
.menu-card {
|
||||
width: calc(50% - 22rpx);
|
||||
height: 206rpx;
|
||||
margin-right: 11rpx;
|
||||
margin-left: 11rpx;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.banner-box {
|
||||
padding: 0 2%;
|
||||
width: 96%;
|
||||
height: 170rpx;
|
||||
margin: 30rpx 0 30rpx;
|
||||
}
|
||||
|
||||
.u-swiper-wrap {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.banner-pic {
|
||||
width: 47%;
|
||||
float: left;
|
||||
display: inline-block;
|
||||
margin: 0 1.5%;
|
||||
}
|
||||
|
||||
.banner-pic image {
|
||||
width: 100%;
|
||||
height: 170rpx;
|
||||
border-radius: 12rpx;
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.u-mode-light-info {
|
||||
background-color: #ffffff;
|
||||
color: #666666;
|
||||
border: 1px solid #e9ecf6;
|
||||
font-size: 12px;
|
||||
padding: 2px 8px;
|
||||
position: relative;
|
||||
top: -3px;
|
||||
}
|
||||
|
||||
.workbench-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
padding: 15px 30rpx;
|
||||
}
|
||||
|
||||
.home-icon i.icon-tongzhi {
|
||||
font-size: 22px;
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.menu-card {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
+15
-21
@@ -26,22 +26,19 @@ function normalizeApiUrl(url) {
|
||||
|
||||
// 初始化API URL
|
||||
function initApiUrl() {
|
||||
if (config.isDevelopment) {
|
||||
// 开发环境:从存储读取,如果没有则使用测试环境
|
||||
try {
|
||||
const savedApiUrl = uni.getStorageSync('ApiUrl');
|
||||
const url = normalizeApiUrl(savedApiUrl || config.devApiUrlOptions[0].value);
|
||||
if (savedApiUrl && url !== savedApiUrl) {
|
||||
uni.setStorageSync('ApiUrl', url);
|
||||
}
|
||||
return url;
|
||||
} catch (e) {
|
||||
console.log('读取存储的 apiurl 失败', e);
|
||||
return config.devApiUrlOptions[0].value;
|
||||
const fallbackUrl = config.isDevelopment
|
||||
? config.devApiUrlOptions[0].value
|
||||
: ((config.devApiUrlOptions.find(item => item.label === '正式环境') || {}).value || config.productionApiUrl);
|
||||
try {
|
||||
const savedApiUrl = uni.getStorageSync('ApiUrl');
|
||||
const url = normalizeApiUrl(savedApiUrl || fallbackUrl);
|
||||
if (savedApiUrl && url !== savedApiUrl) {
|
||||
uni.setStorageSync('ApiUrl', url);
|
||||
}
|
||||
} else {
|
||||
// 生产环境:使用固定的生产URL
|
||||
return normalizeApiUrl(config.productionApiUrl);
|
||||
return url;
|
||||
} catch (e) {
|
||||
console.log('读取存储的 apiurl 失败', e);
|
||||
return normalizeApiUrl(fallbackUrl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,14 +111,8 @@ const store = new Vuex.Store({
|
||||
state.vuex_notificationAudio = audio;
|
||||
},
|
||||
SET_API_URL(state, url) {
|
||||
// 生产环境不允许修改URL
|
||||
if (!config.isDevelopment) {
|
||||
console.warn('生产环境不允许修改API URL');
|
||||
return;
|
||||
}
|
||||
const nextUrl = normalizeApiUrl(url);
|
||||
state.apiurl = nextUrl
|
||||
// 同时保存到本地存储
|
||||
uni.setStorageSync('ApiUrl', nextUrl)
|
||||
}
|
||||
},
|
||||
@@ -183,6 +174,9 @@ const store = new Vuex.Store({
|
||||
uni.request({
|
||||
url: util.apiurl + "/product/fpmArrangeOrder/getFpmArrangeOrderList",
|
||||
method: "GET",
|
||||
// #ifdef APP-PLUS
|
||||
sslVerify: false,
|
||||
// #endif
|
||||
header: {
|
||||
platform: "2",
|
||||
Authorization: uni.getStorageSync("RemoteTokenData").token,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Reference in New Issue
Block a user