update: 优化细节
This commit is contained in:
parent
b0e31d9d9e
commit
a761ecbeba
20
src/App.vue
20
src/App.vue
|
@ -1,7 +1,19 @@
|
|||
<script setup lang="ts">
|
||||
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
|
||||
const isFirstLaunch = ref(true);
|
||||
|
||||
onLaunch(() => {
|
||||
console.log("App Launch");
|
||||
// 当应用启动时,检查是否已显示过启动页
|
||||
if (Boolean(uni.getStorageSync("hasLaunched"))) {
|
||||
// 如果已显示过,不再显示启动页
|
||||
isFirstLaunch.value = false;
|
||||
console.log("不再显示启动页");
|
||||
} else {
|
||||
// 如果未显示过,标记为已显示,并保存到存储
|
||||
uni.setStorageSync("hasLaunched", true);
|
||||
uni.redirectTo({ url: "pagesLaunch/index" });
|
||||
}
|
||||
});
|
||||
onShow(() => {
|
||||
console.log("App Show");
|
||||
|
@ -12,9 +24,9 @@ onHide(() => {
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||
@import "uview-plus/index.scss";
|
||||
body {
|
||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||
@import "uview-plus/index.scss";
|
||||
body {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -30,12 +30,14 @@ const props = withDefaults(
|
|||
show: false
|
||||
}
|
||||
);
|
||||
const emit = defineEmits(["handleModal", "handleOk"]);
|
||||
const emit = defineEmits(["handleModal", "handleOk", "handleCancel"]);
|
||||
const handleClose = (v: string) => {
|
||||
emit("handleModal", false);
|
||||
if (v === 'ok') {
|
||||
// 走确认操作
|
||||
emit("handleOk");
|
||||
} else {
|
||||
emit("handleCancel")
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,85 +1,96 @@
|
|||
{
|
||||
"name": "",
|
||||
"name" : "在生万有",
|
||||
// 应用标识 由DCloud 云端分配 (安卓 ios)
|
||||
"appid": "",
|
||||
"description": "",
|
||||
"versionName": "1.0.0",
|
||||
"versionCode": "100",
|
||||
"transformPx": false,
|
||||
"appid" : "__UNI__898003A",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
"app-plus" : {
|
||||
"ignoreVersion": false,
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules": {},
|
||||
"modules" : {},
|
||||
/* 应用发布信息 */
|
||||
"distribute": {
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {},
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {}
|
||||
"sdkConfigs" : {
|
||||
"ad" : {}
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 72 x 72.png",
|
||||
"xhdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 96 x 96.png",
|
||||
"xxhdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 144 x144.png",
|
||||
"xxxhdpi" : "/Users/admin/workspace/aifanda/project/在生万有/logo 192 x192.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/* 快应用特有相关 */
|
||||
"quickapp": {},
|
||||
"quickapp" : {},
|
||||
// h5
|
||||
"h5": {
|
||||
"router": {
|
||||
"base": "./"
|
||||
"h5" : {
|
||||
"router" : {
|
||||
"base" : "./"
|
||||
}
|
||||
},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin": {
|
||||
"appid": "wx9251d74fe0e87028",
|
||||
"logoPath": "https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/logo-simple.png",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx9251d74fe0e87028",
|
||||
"logoPath" : "https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLogin/logo-simple.png",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents": true,
|
||||
"optimization": {
|
||||
"subPackages": true //是否启用分包优化
|
||||
"usingComponents" : true,
|
||||
"optimization" : {
|
||||
"subPackages" : true //是否启用分包优化
|
||||
},
|
||||
"lazyCodeLoading": "requiredComponents"
|
||||
"lazyCodeLoading" : "requiredComponents"
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion": "3"
|
||||
"vueVersion" : "3"
|
||||
}
|
||||
|
|
|
@ -247,8 +247,8 @@ const state = reactive({
|
|||
const currentSpl = ref<any>(null);
|
||||
const splBtnList = [
|
||||
{ key: null, name: "全部" },
|
||||
{ key: false, name: "手工补单" },
|
||||
{ key: true, name: "系统单" },
|
||||
{ key: true, name: "手工补单" },
|
||||
{ key: false, name: "系统单" },
|
||||
];
|
||||
const deliveryMethod = ref<any>(null);
|
||||
const deliveryMethodBtnList = [
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
:customStyle="{}"
|
||||
border="none"
|
||||
:disabled="item.type === 'select'"
|
||||
:disabledColor="['卡号'].indexOf(item.name) > -1?'#ffffff':'#f5f7fa'"
|
||||
:disabledColor="
|
||||
['卡号'].indexOf(item.name) > -1 ? '#ffffff' : '#f5f7fa'
|
||||
"
|
||||
@clear="handleClear(item)"
|
||||
>
|
||||
<template #suffix>
|
||||
|
@ -61,6 +63,16 @@
|
|||
<view class="btn-box">
|
||||
<u-button type="primary" text="保存" @click="save()"></u-button>
|
||||
</view>
|
||||
<SmallModal
|
||||
:title="'确认作废旧卡号吗?'"
|
||||
:content="`确认作废${model1.formData.cardCode}后,不能恢复!`"
|
||||
:okText="'确认作废'"
|
||||
:isMain="true"
|
||||
:show="isShowCancelModal"
|
||||
@handleModal="(v:boolean) => {handleModal(v)}"
|
||||
@handleOk="handleOk()"
|
||||
@handleCancel="handleCancel()"
|
||||
/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { CustomerApi, StockCardApi } from "@/services";
|
||||
|
@ -68,9 +80,22 @@ import { formatDate } from "@/utils";
|
|||
import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import _ from "underscore";
|
||||
const handleClear = (item:any) => {
|
||||
(model1.formData as any)[item.key] = '';
|
||||
}
|
||||
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||
const isShowCancelModal = ref(false);
|
||||
|
||||
const handleModal = (v: boolean) => {
|
||||
isShowCancelModal.value = v;
|
||||
};
|
||||
const handleOk = () => {
|
||||
handleCheck(true);
|
||||
};
|
||||
const handleCancel = () => {
|
||||
handleCheck(false);
|
||||
};
|
||||
|
||||
const handleClear = (item: any) => {
|
||||
(model1.formData as any)[item.key] = "";
|
||||
};
|
||||
const model1 = reactive<any>({
|
||||
formData: {},
|
||||
});
|
||||
|
@ -116,8 +141,8 @@ const formAttrList = reactive<any>([
|
|||
required: true,
|
||||
fn: () => {
|
||||
if (contrlModalParams.stockCard.list.length === 0) {
|
||||
uni.showToast({icon: 'none', title: '当前无可用卡号,请添加出库卡'})
|
||||
return
|
||||
uni.showToast({ icon: "none", title: "当前无可用卡号,请添加出库卡" });
|
||||
return;
|
||||
}
|
||||
contrlModalParams.stockCard.isShow = true;
|
||||
contrlModalParams.stockCard.title = "卡号";
|
||||
|
@ -165,36 +190,47 @@ const check = () => {
|
|||
};
|
||||
|
||||
const save = () => {
|
||||
if (
|
||||
model1.formData.cardCode &&
|
||||
model1.formData.stockCardName !== model1.formData.cardCode
|
||||
) {
|
||||
handleModal(true);
|
||||
} else {
|
||||
handleCheck(false);
|
||||
}
|
||||
};
|
||||
const handleCheck = (v: boolean) => {
|
||||
check().then((res) => {
|
||||
if (res) {
|
||||
startSave();
|
||||
startSave(v);
|
||||
}
|
||||
});
|
||||
};
|
||||
const startSave = () => {
|
||||
|
||||
const startSave = (v: boolean) => {
|
||||
if (model1.formData.id) {
|
||||
CustomerApi.updateCustomUser(model1.formData).then((res) => {
|
||||
CustomerApi.updateCustomUser({ ...model1.formData, delCard: v }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
CustomerApi.addCustomUser(model1.formData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack()
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const getStockCardList = () => {
|
||||
StockCardApi.getStockCardListInfo({ vincolante: StockCardType.Shipment }).then((res) => {
|
||||
StockCardApi.getStockCardListInfo({
|
||||
vincolante: StockCardType.Shipment,
|
||||
}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
contrlModalParams.stockCard.list = (res.data as any).map(
|
||||
(item: any) => {
|
||||
contrlModalParams.stockCard.list = (res.data as any).map((item: any) => {
|
||||
return { ...item, name: item.cardCode };
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -64,8 +64,19 @@
|
|||
</block>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button type="primary" text="保存" @click="save()"></u-button>
|
||||
<u-button type="primary" text="保存" @click="save"></u-button>
|
||||
</view>
|
||||
|
||||
<SmallModal
|
||||
:title="'确认作废旧卡号吗?'"
|
||||
:content="`确认作废${model1.formData.cardCode}后,不能恢复!`"
|
||||
:okText="'确认作废'"
|
||||
:isMain="true"
|
||||
:show="isShowCancelModal"
|
||||
@handleModal="(v:boolean) => {handleModal(v)}"
|
||||
@handleOk="handleOk()"
|
||||
@handleCancel="handleCancel()"
|
||||
/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { StockCardApi, SupplierApi } from "@/services";
|
||||
|
@ -74,6 +85,18 @@ import { DeviceType, ImagesType, OrderType, StockCardType } from "@/utils/enum";
|
|||
import valid from "@/utils/validate";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import _ from "underscore";
|
||||
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||
const isShowCancelModal = ref(false);
|
||||
|
||||
const handleModal = (v: boolean) => {
|
||||
isShowCancelModal.value = v;
|
||||
};
|
||||
const handleOk = () => {
|
||||
handleCheck(true);
|
||||
};
|
||||
const handleCancel = () => {
|
||||
handleCheck(false);
|
||||
};
|
||||
const handleClear = (item: any) => {
|
||||
(model1.formData as any)[item.key] = "";
|
||||
};
|
||||
|
@ -270,19 +293,32 @@ const save = () => {
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
model1.formData.cardCode &&
|
||||
model1.formData.stockCardName !== model1.formData.cardCode
|
||||
) {
|
||||
handleModal(true);
|
||||
} else {
|
||||
handleCheck(false);
|
||||
}
|
||||
};
|
||||
const handleCheck = (v: boolean) => {
|
||||
check().then((res) => {
|
||||
if (res) {
|
||||
startSave();
|
||||
startSave(v);
|
||||
}
|
||||
});
|
||||
};
|
||||
const startSave = () => {
|
||||
const startSave = (v: boolean) => {
|
||||
if (model1.formData.id) {
|
||||
SupplierApi.updateSupplierUser(model1.formData).then((res) => {
|
||||
SupplierApi.updateSupplierUser({ ...model1.formData, delCard: v }).then(
|
||||
(res) => {
|
||||
if (res.code === 200) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
} else {
|
||||
SupplierApi.addSupplierUser(model1.formData).then((res) => {
|
||||
if (res.code === 200) {
|
||||
|
@ -319,26 +355,24 @@ onMounted(() => {
|
|||
getStockCardList();
|
||||
});
|
||||
|
||||
onLoad((option:any) => {
|
||||
onLoad((option: any) => {
|
||||
// 接收传递的标题参数
|
||||
const title = option.title;
|
||||
SupplierApi.getSupplierUserList({ id: option.item }).then(
|
||||
(res: any) => {
|
||||
SupplierApi.getSupplierUserList({ id: option.item }).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
if (res.data.length > 0) {
|
||||
model1.formData = res.data[0]
|
||||
model1.formData = res.data[0];
|
||||
if (model1.formData.cardCode) {
|
||||
model1.formData.stockCardName = model1.formData.cardCode;
|
||||
}
|
||||
} else {
|
||||
uni.showToast({ title: "未查询到供应商" });
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
// 新增供应商卡号必填 编辑供应商卡号非必填
|
||||
if (!option.item) {
|
||||
formAttrList[1].required = true
|
||||
}
|
||||
if (model1.formData.cardCode) {
|
||||
model1.formData.stockCardName = model1.formData.cardCode;
|
||||
formAttrList[1].required = true;
|
||||
}
|
||||
// 设置页面标题
|
||||
uni.setNavigationBarTitle({
|
||||
|
|
|
@ -20,10 +20,24 @@
|
|||
><u-icon name="arrow-down"></u-icon
|
||||
></view>
|
||||
<view @click="state.isShowStatus = true"
|
||||
><text>单据状态</text><u-icon name="arrow-down"></u-icon
|
||||
></view>
|
||||
><text>{{
|
||||
state.currentScaleStatus === -1
|
||||
? "单据状态"
|
||||
: getScaleStatus(state.currentScaleStatus)
|
||||
}}</text
|
||||
><u-icon name="arrow-down"></u-icon>
|
||||
</view>
|
||||
<view @click="state.isShowSort = true"
|
||||
><text>排序</text><u-icon name="arrow-down"></u-icon
|
||||
><text>{{
|
||||
state.currentSortName === undefined
|
||||
? "排序"
|
||||
: `按${
|
||||
state.currentSortName === "create_time"
|
||||
? "创建时间"
|
||||
: "更新时间"
|
||||
}降序`
|
||||
}}</text
|
||||
><u-icon name="arrow-down"></u-icon
|
||||
></view>
|
||||
<view class="btn" @click="handleDialog('showFilter', true)">筛选</view>
|
||||
</view>
|
||||
|
@ -201,6 +215,10 @@ const state = reactive({
|
|||
],
|
||||
isShowSort: false,
|
||||
sortList: [
|
||||
{
|
||||
name: "全部",
|
||||
key: undefined,
|
||||
},
|
||||
{
|
||||
name: "按创建时间降序",
|
||||
key: "create_time",
|
||||
|
|
|
@ -94,7 +94,7 @@ const edit = (item: any) => {
|
|||
});
|
||||
};
|
||||
const deleteType = (item: any) => {
|
||||
GoodsApi.editReceiveCategory({ isDeleted: true, id: item.id }).then((res) => {
|
||||
GoodsApi.deleteReceiveCategory({ id: item.id }).then((res) => {
|
||||
if (res.code === 200) {
|
||||
resetPageList();
|
||||
getList();
|
||||
|
|
|
@ -20,10 +20,24 @@
|
|||
><u-icon name="arrow-down"></u-icon
|
||||
></view>
|
||||
<view @click="state.isShowStatus = true"
|
||||
><text>单据状态</text><u-icon name="arrow-down"></u-icon
|
||||
><text>{{
|
||||
state.currentScaleStatus === -1
|
||||
? "单据状态"
|
||||
: getScaleStatus(state.currentScaleStatus)
|
||||
}}</text
|
||||
><u-icon name="arrow-down"></u-icon
|
||||
></view>
|
||||
<view @click="state.isShowSort = true"
|
||||
><text>排序</text><u-icon name="arrow-down"></u-icon
|
||||
><text>{{
|
||||
state.currentSortName === undefined
|
||||
? "排序"
|
||||
: `按${
|
||||
state.currentSortName === "create_time"
|
||||
? "创建时间"
|
||||
: "更新时间"
|
||||
}降序`
|
||||
}}</text
|
||||
><u-icon name="arrow-down"></u-icon
|
||||
></view>
|
||||
<view class="btn" @click="handleDialog('showFilter', true)">筛选</view>
|
||||
</view>
|
||||
|
@ -92,8 +106,14 @@
|
|||
<text v-if="cItem.name">{{ cItem.name }}:</text
|
||||
><text
|
||||
>{{ cItem.isBefore ? cItem.unit : "" }}
|
||||
<text v-if="item[cItem.enName as string] === DeliveryMethod.Deliver">送货</text>
|
||||
<text v-if="item[cItem.enName as string] === DeliveryMethod.SelfPickup">自提</text>
|
||||
<text
|
||||
v-if="item[cItem.enName as string] === DeliveryMethod.Deliver"
|
||||
>送货</text
|
||||
>
|
||||
<text
|
||||
v-if="item[cItem.enName as string] === DeliveryMethod.SelfPickup"
|
||||
>自提</text
|
||||
>
|
||||
{{ cItem.isBefore ? "" : cItem.unit }}
|
||||
</text>
|
||||
</block>
|
||||
|
@ -210,6 +230,10 @@ const state = reactive({
|
|||
],
|
||||
isShowSort: false,
|
||||
sortList: [
|
||||
{
|
||||
name: "全部",
|
||||
key: undefined,
|
||||
},
|
||||
{
|
||||
name: "按创建时间降序",
|
||||
key: "create_time",
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
>
|
||||
<swiper-item v-for="(item, index) in list" :key="index">
|
||||
<view class="image-box">
|
||||
<image :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLaunch/${item.imgUrl}`"></image>
|
||||
<image
|
||||
:src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pagesLaunch/${item.imgUrl}`"
|
||||
></image>
|
||||
<view class="title">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
|
@ -22,6 +24,10 @@
|
|||
</swiper>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { useMemberStore } from "@/store/index";
|
||||
const store = useMemberStore();
|
||||
const profile = store.profile;
|
||||
|
||||
const list = [
|
||||
{
|
||||
title: "智能回收 智慧未来!",
|
||||
|
@ -41,9 +47,16 @@ const list = [
|
|||
},
|
||||
];
|
||||
const start = () => {
|
||||
// 若当前存在token 直接跳到首页 若不存在则跳转登录页
|
||||
if (profile.token) {
|
||||
uni.navigateTo({
|
||||
url: "/pagesHome/index", // 要跳转到的页面路径
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "/pagesLogin/login/index", // 要跳转到的页面路径
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<view class="c-login-container">
|
||||
<!-- logo -->
|
||||
<view class="logo">
|
||||
<image :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/logo.png`" height="60rpx"></image>
|
||||
<image :src="`https://backend-common.obs.cn-east-3.myhuaweicloud.com/static/pages/logo2.png`" ></image>
|
||||
</view>
|
||||
<!-- form表单 -->
|
||||
<view class="login-form">
|
||||
|
@ -16,13 +16,15 @@
|
|||
|
||||
<style lang="scss" scoped>
|
||||
.c-login-container {
|
||||
height: 80vh;
|
||||
margin-top: 20vh;
|
||||
height: 85vh;
|
||||
margin-top: 15vh;
|
||||
.logo {
|
||||
text-align: center;
|
||||
image {
|
||||
width: 234.62rpx;
|
||||
height: 62.18rpx;
|
||||
// width: 234.62rpx;
|
||||
// height: 62.18rpx;
|
||||
width: 300rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
.login-form {
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
:customStyle="{
|
||||
'border-radius': '43rpx',
|
||||
}"
|
||||
>保存并登录</u-button
|
||||
>保存</u-button
|
||||
>
|
||||
</view>
|
||||
</template>
|
||||
|
|
|
@ -559,7 +559,6 @@ const save = () => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
check().then((res) => {
|
||||
if (res) {
|
||||
startSave();
|
||||
|
|
Loading…
Reference in New Issue