修改浙政钉登录
This commit is contained in:
1 parent
a8c7b33331
commit
ec3d9cdd38
9 files changed
+484
-281
No files matched your search
@@ -19,19 +19,25 @@ VITE_OAUTH2_APP_CLIENT='mini:mini'
|
||||
# 图片访问基础地址
|
||||
#VITE_IMAGE_BASE_PATH = http://localhost:9999
|
||||
# VITE_IMAGE_BASE_PATH = http://192.168.101.29:9999 # 邓-本地
|
||||
# VITE_IMAGE_BASE_PATH = http://192.168.101.37:9999 # 邓-本地
|
||||
VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api # 线上
|
||||
# VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc # 张
|
||||
VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api # 信创线上
|
||||
# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api # 信创线上
|
||||
|
||||
# ******************** start 开发环境 start ********************
|
||||
VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上
|
||||
# ******************** start 开发环境 start ****************
|
||||
# VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上
|
||||
# VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/app-api
|
||||
# VITE_APP_DEV_SERVICE = http://192.168.101.29:9999 # 邓-本地
|
||||
# VITE_APP_DEV_SERVICE = http://192.168.101.37:9999 # 邓-本地
|
||||
# VITE_APP_DEV_SERVICE = http://127.0.0.1:9999
|
||||
# VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api
|
||||
VITE_APP_DEV_SERVICE = http://123.156.230.15:8089/api/ # 线上
|
||||
# VITE_APP_DEV_SERVICE = http://localhost:9999
|
||||
# ******************** end 开发环境 end ********************
|
||||
|
||||
# ******************** start 生产环境 start ********************
|
||||
# ******************** start 生产环境 start ****************
|
||||
#VITE_APP_PROD_SERVICE = http://123.156.228.134:48080/app-api
|
||||
VITE_APP_PROD_SERVICE = http://59.202.170.152:81/api
|
||||
# ******************** end 生产环境 end ********************
|
||||
|
||||
# VITE_DEV_ENV = dev
|
||||
VITE_DEV_ENV = prod
|
||||
Generated
+131
-1
@@ -68,6 +68,9 @@ dependencies:
|
||||
pinia:
|
||||
specifier: ^2.2.6
|
||||
version: 2.2.6(typescript@4.9.5)(vue@3.5.12)
|
||||
qs:
|
||||
specifier: ^6.13.1
|
||||
version: 6.14.0
|
||||
radash:
|
||||
specifier: ^12.1.0
|
||||
version: 12.1.0
|
||||
@@ -4248,6 +4251,14 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/call-bind-apply-helpers@1.0.1:
|
||||
resolution: {integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
es-errors: 1.3.0
|
||||
function-bind: 1.1.2
|
||||
dev: false
|
||||
|
||||
/call-bind@1.0.7:
|
||||
resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -4259,6 +4270,14 @@ packages:
|
||||
set-function-length: 1.2.2
|
||||
dev: true
|
||||
|
||||
/call-bound@1.0.3:
|
||||
resolution: {integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
call-bind-apply-helpers: 1.0.1
|
||||
get-intrinsic: 1.2.7
|
||||
dev: false
|
||||
|
||||
/callsites@3.1.0:
|
||||
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
|
||||
engines: {node: '>=6'}
|
||||
@@ -4613,6 +4632,15 @@ packages:
|
||||
webidl-conversions: 5.0.0
|
||||
dev: true
|
||||
|
||||
/dunder-proto@1.0.1:
|
||||
resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
call-bind-apply-helpers: 1.0.1
|
||||
es-errors: 1.3.0
|
||||
gopd: 1.2.0
|
||||
dev: false
|
||||
|
||||
/duplexer@0.1.2:
|
||||
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
|
||||
dev: true
|
||||
@@ -4673,14 +4701,25 @@ packages:
|
||||
get-intrinsic: 1.2.4
|
||||
dev: true
|
||||
|
||||
/es-define-property@1.0.1:
|
||||
resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: false
|
||||
|
||||
/es-errors@1.3.0:
|
||||
resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: true
|
||||
|
||||
/es-module-lexer@1.5.4:
|
||||
resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==}
|
||||
|
||||
/es-object-atoms@1.1.1:
|
||||
resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
es-errors: 1.3.0
|
||||
dev: false
|
||||
|
||||
/esbuild@0.20.2:
|
||||
resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -5009,11 +5048,35 @@ packages:
|
||||
hasown: 2.0.2
|
||||
dev: true
|
||||
|
||||
/get-intrinsic@1.2.7:
|
||||
resolution: {integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
call-bind-apply-helpers: 1.0.1
|
||||
es-define-property: 1.0.1
|
||||
es-errors: 1.3.0
|
||||
es-object-atoms: 1.1.1
|
||||
function-bind: 1.1.2
|
||||
get-proto: 1.0.1
|
||||
gopd: 1.2.0
|
||||
has-symbols: 1.1.0
|
||||
hasown: 2.0.2
|
||||
math-intrinsics: 1.1.0
|
||||
dev: false
|
||||
|
||||
/get-package-type@0.1.0:
|
||||
resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
dev: true
|
||||
|
||||
/get-proto@1.0.1:
|
||||
resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
dunder-proto: 1.0.1
|
||||
es-object-atoms: 1.1.1
|
||||
dev: false
|
||||
|
||||
/get-stream@6.0.1:
|
||||
resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -5058,6 +5121,11 @@ packages:
|
||||
get-intrinsic: 1.2.4
|
||||
dev: true
|
||||
|
||||
/gopd@1.2.0:
|
||||
resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: false
|
||||
|
||||
/graceful-fs@4.2.11:
|
||||
resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
|
||||
|
||||
@@ -5089,6 +5157,11 @@ packages:
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: true
|
||||
|
||||
/has-symbols@1.1.0:
|
||||
resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: false
|
||||
|
||||
/hash-sum@2.0.0:
|
||||
resolution: {integrity: sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==}
|
||||
|
||||
@@ -6031,6 +6104,11 @@ packages:
|
||||
tmpl: 1.0.5
|
||||
dev: true
|
||||
|
||||
/math-intrinsics@1.1.0:
|
||||
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: false
|
||||
|
||||
/mdn-data@2.0.30:
|
||||
resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
|
||||
dev: true
|
||||
@@ -6208,6 +6286,11 @@ packages:
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: true
|
||||
|
||||
/object-inspect@1.13.3:
|
||||
resolution: {integrity: sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dev: false
|
||||
|
||||
/ofetch@1.4.1:
|
||||
resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==}
|
||||
dependencies:
|
||||
@@ -6586,6 +6669,13 @@ packages:
|
||||
side-channel: 1.0.6
|
||||
dev: true
|
||||
|
||||
/qs@6.14.0:
|
||||
resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==}
|
||||
engines: {node: '>=0.6'}
|
||||
dependencies:
|
||||
side-channel: 1.1.0
|
||||
dev: false
|
||||
|
||||
/querystringify@2.2.0:
|
||||
resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
|
||||
dev: true
|
||||
@@ -6905,6 +6995,35 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
dev: true
|
||||
|
||||
/side-channel-list@1.0.0:
|
||||
resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
es-errors: 1.3.0
|
||||
object-inspect: 1.13.3
|
||||
dev: false
|
||||
|
||||
/side-channel-map@1.0.1:
|
||||
resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
call-bound: 1.0.3
|
||||
es-errors: 1.3.0
|
||||
get-intrinsic: 1.2.7
|
||||
object-inspect: 1.13.3
|
||||
dev: false
|
||||
|
||||
/side-channel-weakmap@1.0.2:
|
||||
resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
call-bound: 1.0.3
|
||||
es-errors: 1.3.0
|
||||
get-intrinsic: 1.2.7
|
||||
object-inspect: 1.13.3
|
||||
side-channel-map: 1.0.1
|
||||
dev: false
|
||||
|
||||
/side-channel@1.0.6:
|
||||
resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@@ -6915,6 +7034,17 @@ packages:
|
||||
object-inspect: 1.13.2
|
||||
dev: true
|
||||
|
||||
/side-channel@1.1.0:
|
||||
resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
dependencies:
|
||||
es-errors: 1.3.0
|
||||
object-inspect: 1.13.3
|
||||
side-channel-list: 1.0.0
|
||||
side-channel-map: 1.0.1
|
||||
side-channel-weakmap: 1.0.2
|
||||
dev: false
|
||||
|
||||
/signal-exit@3.0.7:
|
||||
resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==}
|
||||
dev: true
|
||||
|
||||
+190
-152
@@ -1,188 +1,226 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { ref, reactive, computed } from "vue"
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app"
|
||||
import { isEmpty } from "radash"
|
||||
|
||||
import { hooks, router } from "@@/index"
|
||||
import { orderApi, refundApi, commonApi } from "@@/api"
|
||||
|
||||
import { filePath } from "@@/utils/file";
|
||||
import { filePath } from "@@/utils/file"
|
||||
|
||||
const data = {
|
||||
payType: [
|
||||
{ text: "仅退款", disabled: false, visible: true, type: "10", value: "10" },
|
||||
{ text: "退款退货", disabled: true, visible: false, type: "20", value: "20" },
|
||||
]
|
||||
payType: [
|
||||
{ text: "仅退款", disabled: false, visible: true, type: "10", value: "10" },
|
||||
{ text: "退款退货", disabled: true, visible: false, type: "20", value: "20" },
|
||||
],
|
||||
}
|
||||
const state = reactive<any>({
|
||||
detailId: null,
|
||||
detail: {},
|
||||
shopCarList: [],
|
||||
setting: {},
|
||||
selectList: []
|
||||
detailId: null,
|
||||
detail: {},
|
||||
shopCarList: [],
|
||||
setting: {},
|
||||
selectList: [],
|
||||
})
|
||||
const uploadApplyPicUrls = ref<Array<Record<string, any> | string>>([]) // 补充凭证图片
|
||||
const applyPicUrls = computed(() =>
|
||||
uploadApplyPicUrls.value.map((item: any) => JSON.parse(item.response).data.url).join(","),
|
||||
)
|
||||
|
||||
const applyForm = reactive<any>({
|
||||
way: data.payType[0].type,
|
||||
remark: "",
|
||||
reason: "",
|
||||
reasonStr: "",
|
||||
way: data.payType[0].type,
|
||||
remark: "",
|
||||
reason: "",
|
||||
reasonStr: "",
|
||||
})
|
||||
|
||||
onLoad((options: any) => {
|
||||
if (!isEmpty(options.id)) {
|
||||
state.detailId = options.id
|
||||
}
|
||||
});
|
||||
if (!isEmpty(options.id)) {
|
||||
state.detailId = options.id
|
||||
}
|
||||
state.header = hooks.useDefaultHeader()
|
||||
})
|
||||
onShow(() => {
|
||||
getDetail()
|
||||
getSetting()
|
||||
getShopCarList()
|
||||
getDetail()
|
||||
getSetting()
|
||||
getShopCarList()
|
||||
})
|
||||
|
||||
const getSetting = async () => {
|
||||
const _pa = {};
|
||||
const { data } = await commonApi.setting(_pa)
|
||||
state.setting = data
|
||||
state.selectList = data.afterSaleRefundReasons?.split(",").map(v => {
|
||||
return {
|
||||
id: v,
|
||||
title: v,
|
||||
}
|
||||
})
|
||||
const _pa = {}
|
||||
const { data } = await commonApi.setting(_pa)
|
||||
state.setting = data
|
||||
state.selectList = data.afterSaleRefundReasons?.split(",").map((v) => {
|
||||
return {
|
||||
id: v,
|
||||
title: v,
|
||||
}
|
||||
})
|
||||
}
|
||||
const getDetail = async () => {
|
||||
if (isEmpty(state.detailId)) return
|
||||
const _pa = { id: state.detailId };
|
||||
const { data } = await orderApi.detail(_pa)
|
||||
state.detail = data
|
||||
if (isEmpty(state.detailId)) return
|
||||
const _pa = { id: state.detailId }
|
||||
const { data } = await orderApi.detail(_pa)
|
||||
state.detail = data
|
||||
}
|
||||
const getShopCarList = async () => {
|
||||
if (isEmpty(state.detailId)) return
|
||||
const _pa = { orderId: state.detailId };
|
||||
const { data } = await orderApi.shopCarList(_pa)
|
||||
state.shopCarList = data
|
||||
if (isEmpty(state.detailId)) return
|
||||
const _pa = { orderId: state.detailId }
|
||||
const { data } = await orderApi.shopCarList(_pa)
|
||||
state.shopCarList = data
|
||||
}
|
||||
|
||||
const radioChange = (e: any) => {
|
||||
switch (e) {
|
||||
case "10":
|
||||
state.selectList = state.setting.afterSaleRefundReasons.map(v => {
|
||||
return {
|
||||
id: v,
|
||||
title: v,
|
||||
}
|
||||
})
|
||||
break
|
||||
case "20":
|
||||
state.selectList = state.setting.afterSaleReturnReasons.map(v => {
|
||||
return {
|
||||
id: v,
|
||||
title: v,
|
||||
}
|
||||
})
|
||||
break
|
||||
}
|
||||
switch (e) {
|
||||
case "10":
|
||||
state.selectList = state.setting.afterSaleRefundReasons.map((v) => {
|
||||
return {
|
||||
id: v,
|
||||
title: v,
|
||||
}
|
||||
})
|
||||
break
|
||||
case "20":
|
||||
state.selectList = state.setting.afterSaleReturnReasons.map((v) => {
|
||||
return {
|
||||
id: v,
|
||||
title: v,
|
||||
}
|
||||
})
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
const doSubmit = async () => {
|
||||
if (isEmpty(applyForm.reasonStr)) {
|
||||
uni.showToast({ title: '请选择申请原因', icon: "none" });
|
||||
return
|
||||
}
|
||||
const _pa = {
|
||||
way: applyForm.way,
|
||||
refundPrice: state.detail.practicalTotalPrice,
|
||||
orderId: state.detailId,
|
||||
images: [],
|
||||
applyReason: applyForm.reasonStr,
|
||||
applyDescription: applyForm.remark,
|
||||
}
|
||||
try {
|
||||
uni.showLoading({ title: '申请中...', mask: false });
|
||||
const data = await refundApi.create(_pa)
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: '申请成功', icon: "none" });
|
||||
router.jump("/pages/order/detail", { id: state.detailId }, 2)
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
uni.hideLoading()
|
||||
}
|
||||
if (isEmpty(applyForm.reasonStr)) {
|
||||
uni.showToast({ title: "请选择申请原因", icon: "none" })
|
||||
return
|
||||
}
|
||||
const _pa = {
|
||||
way: applyForm.way,
|
||||
refundPrice: state.detail.practicalTotalPrice,
|
||||
orderId: state.detailId,
|
||||
images: [],
|
||||
applyReason: applyForm.reasonStr,
|
||||
applyDescription: applyForm.remark,
|
||||
applyPicUrls: applyPicUrls.value,
|
||||
}
|
||||
try {
|
||||
uni.showLoading({ title: "申请中...", mask: false })
|
||||
const data = await refundApi.create(_pa)
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: "申请成功", icon: "none" })
|
||||
router.jump("/pages/order/detail", { id: state.detailId }, 2)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
uni.hideLoading()
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<crud-layout title="申请售后" mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view class="h-30rpx" />
|
||||
<view class="flex-col justify-center card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="m-t-15rpx">
|
||||
<view class="flex-row items-start justify-between" v-for="(v, i) in state.shopCarList" :key="i"
|
||||
@tap.stop="router.jump('/pages/merchant/product-detail', { id: v.productId })">
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-160rpx h-160rpx rounded-8rpx" :src="filePath(v.productPic)" mode="aspectFill" />
|
||||
<view class="flex-col m-l-15rpx second-text-26">
|
||||
<view class="sub-text-28">{{ v.productName }}</view>
|
||||
<view class="m-t-5rpx">¥ {{ hooks.useMoney(v.productPrice) }}</view>
|
||||
<view class="m-t-5rpx">x {{ v.productCount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row-center">
|
||||
<view class="sub-text-32">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-y-15rpx h-1px bg-#999 bg-opacity-5" />
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="sub-text-28">实付款</view>
|
||||
<view class="flex-row items-end">
|
||||
<view class="sub-text-28">¥</view>
|
||||
<view class="m-l-5rpx sub-text-28">{{ hooks.useMoney(state.detail.payPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="sub-text-28">售后类型</view>
|
||||
<view class="m-t-20rpx">
|
||||
<tm-radio-group @change="radioChange" direction="column" gap="20" v-model="applyForm.way">
|
||||
<tm-radio :disabled="v.disabled" v-for="(v, i) in data.payType" :key="i" v-show="v.visible"
|
||||
:value="v.type" :label="v.text" />
|
||||
</tm-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row items-center justify-between card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="sub-text-28">退款金额</view>
|
||||
<view class="sub-text-28 color-red!">¥{{ hooks.useMoney(state.detail.payPrice) }}</view>
|
||||
</view>
|
||||
<view class="card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<tm-picker rang-key="title" rang-text="title" v-model="applyForm.reason"
|
||||
v-model:model-str="applyForm.reasonStr" :list="state.selectList">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="sub-text-28">申请原因</view>
|
||||
<view class="flex-row items-center second-text-24">
|
||||
<text>{{ applyForm.reasonStr || '请选择申请原因' }} </text>
|
||||
<text class="m-l-10rpx color-#b1b1b1 iconfont icon-xiangxiajiantouxiao" />
|
||||
</view>
|
||||
</view>
|
||||
</tm-picker>
|
||||
</view>
|
||||
<view class="flex-col justify-center card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="sub-text-28">相关描述</view>
|
||||
<view class="m-t-20rpx">
|
||||
<tm-input v-model="applyForm.remark" type="textarea" :showClear="false"
|
||||
placeholder="客官~请描述您遇到的问题"></tm-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-30rpx" />
|
||||
<template #main-bottom>
|
||||
<view v-if="state.detailType != 'view'"
|
||||
class="bg-#0094ff p-y-20rpx text-center rounded-40rpx m-x-30rpx m-y-30rpx sub-text-30 color-white!"
|
||||
@tap="doSubmit">
|
||||
提交申请
|
||||
</view>
|
||||
</template>
|
||||
</crud-layout>
|
||||
<crud-layout title="申请售后" mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view class="h-30rpx" />
|
||||
<view class="flex-col justify-center card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="m-t-15rpx">
|
||||
<view
|
||||
class="flex-row items-start justify-between"
|
||||
v-for="(v, i) in state.shopCarList"
|
||||
:key="i"
|
||||
@tap.stop="router.jump('/pages/merchant/product-detail', { id: v.productId })"
|
||||
>
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-160rpx h-160rpx rounded-8rpx" :src="filePath(v.productPic)" mode="aspectFill" />
|
||||
<view class="flex-col m-l-15rpx second-text-26">
|
||||
<view class="sub-text-28">{{ v.productName }}</view>
|
||||
<view class="m-t-5rpx">¥ {{ hooks.useMoney(v.productPrice) }}</view>
|
||||
<view class="m-t-5rpx">x {{ v.productCount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row-center">
|
||||
<view class="sub-text-32">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-y-15rpx h-1px bg-#999 bg-opacity-5" />
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="sub-text-28">实付款</view>
|
||||
<view class="flex-row items-end">
|
||||
<view class="sub-text-28">¥</view>
|
||||
<view class="m-l-5rpx sub-text-28">{{ hooks.useMoney(state.detail.payPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="sub-text-28">售后类型</view>
|
||||
<view class="m-t-20rpx">
|
||||
<tm-radio-group @change="radioChange" direction="column" gap="20" v-model="applyForm.way">
|
||||
<tm-radio
|
||||
:disabled="v.disabled"
|
||||
v-for="(v, i) in data.payType"
|
||||
:key="i"
|
||||
v-show="v.visible"
|
||||
:value="v.type"
|
||||
:label="v.text"
|
||||
/>
|
||||
</tm-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row items-center justify-between card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="sub-text-28">退款金额</view>
|
||||
<view class="sub-text-28 color-red!">¥{{ hooks.useMoney(state.detail.payPrice) }}</view>
|
||||
</view>
|
||||
<view class="card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<tm-picker
|
||||
rang-key="title"
|
||||
rang-text="title"
|
||||
v-model="applyForm.reason"
|
||||
v-model:model-str="applyForm.reasonStr"
|
||||
:list="state.selectList"
|
||||
>
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="sub-text-28">申请原因</view>
|
||||
<view class="flex-row items-center second-text-24">
|
||||
<text>{{ applyForm.reasonStr || "请选择申请原因" }} </text>
|
||||
<text class="m-l-10rpx color-#b1b1b1 iconfont icon-xiangxiajiantouxiao" />
|
||||
</view>
|
||||
</view>
|
||||
</tm-picker>
|
||||
</view>
|
||||
<view class="flex-col justify-center card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="sub-text-28">补充凭证图片</view>
|
||||
<view class="m-t-20rpx">
|
||||
<tm-upload-photo
|
||||
v-model="uploadApplyPicUrls"
|
||||
:maxFileSize="1024 * 1024 * 5"
|
||||
:url="'/api/admin/sys-file/upload'"
|
||||
:header="state.header"
|
||||
:maxCount="6"
|
||||
/>
|
||||
</view>
|
||||
<view class="sub-text-20 c-red!">注:图片大小不超过5M,最多上传6张</view>
|
||||
</view>
|
||||
<view class="flex-col justify-center card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="sub-text-28">相关描述</view>
|
||||
<view class="m-t-20rpx">
|
||||
<tm-input
|
||||
v-model="applyForm.remark"
|
||||
type="textarea"
|
||||
:showClear="false"
|
||||
placeholder="客官~请描述您遇到的问题"
|
||||
></tm-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-30rpx" />
|
||||
<template #main-bottom>
|
||||
<view
|
||||
v-if="state.detailType != 'view'"
|
||||
class="bg-#0094ff p-y-20rpx text-center rounded-40rpx m-x-30rpx m-y-30rpx sub-text-30 color-white!"
|
||||
@tap="doSubmit"
|
||||
>
|
||||
提交申请
|
||||
</view>
|
||||
</template>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped></style>
|
||||
+67
-67
@@ -1,83 +1,83 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { ref, reactive } from "vue"
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app"
|
||||
|
||||
import { hooks, router } from "@@/index";
|
||||
import { merchantApi } from "@@/api";
|
||||
import { filePath } from "@@/utils/file";
|
||||
import { hooks, router } from "@@/index"
|
||||
import { merchantApi } from "@@/api"
|
||||
import { filePath } from "@@/utils/file"
|
||||
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
pagesize: 10,
|
||||
type: "1",
|
||||
},
|
||||
});
|
||||
pa: {
|
||||
pagesize: 10,
|
||||
type: "1",
|
||||
},
|
||||
})
|
||||
|
||||
onLoad(() => {});
|
||||
onLoad(() => {})
|
||||
onShow(() => {
|
||||
if (pageRef.value) {
|
||||
pageRef.value.reload(false);
|
||||
}
|
||||
});
|
||||
if (pageRef.value) {
|
||||
pageRef.value.reload(false)
|
||||
}
|
||||
})
|
||||
|
||||
const pageRef = ref<any>(null);
|
||||
const pageHook = hooks.usePage(pageRef, merchantApi.page, null, "data.records");
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(pageRef, merchantApi.page, null, "data.records")
|
||||
const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa);
|
||||
};
|
||||
pageHook.startPage(page, pagesize, false, state.pa)
|
||||
}
|
||||
|
||||
const toDetail = async (v: any) => {
|
||||
const isLogin = await hooks.useCheckLogin();
|
||||
if (isLogin) {
|
||||
router.jump("/pages/merchant/detail", { id: v.id });
|
||||
}
|
||||
};
|
||||
const isLogin = await hooks.useCheckLogin()
|
||||
if (isLogin) {
|
||||
router.jump("/pages/merchant/detail", { id: v.id })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="10"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<template #top> </template>
|
||||
<view class="flex-row card p-20rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i" @tap="toDetail(v)">
|
||||
<image class="w-160rpx h-160rpx rounded-12rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row-center sub-text-34">
|
||||
<text> {{ v.name }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<tm-tag size="s">{{ v.deptName }}</tm-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-t-10rpx second-text-28">
|
||||
<text>营业时间</text>
|
||||
<text class="m-l-10rpx">
|
||||
{{ v.jobStartTime }}
|
||||
~
|
||||
{{ v.jobEndTime }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-if="v.addressDes" class="m-t-10rpx second-text-28">
|
||||
<text>食堂地址</text>
|
||||
<text class="m-l-10rpx">{{ v.addressDes }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="10"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<template #top> </template>
|
||||
<view class="flex-row card p-20rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i" @tap="toDetail(v)">
|
||||
<image class="w-160rpx h-160rpx rounded-12rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row-center sub-text-34">
|
||||
<text> {{ v.name }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<tm-tag size="s">{{ v.deptName }}</tm-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-t-10rpx second-text-28">
|
||||
<text>营业时间</text>
|
||||
<text class="m-l-10rpx">
|
||||
{{ v.jobStartTime }}
|
||||
~
|
||||
{{ v.jobEndTime }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-if="v.addressDes" class="m-t-10rpx second-text-28">
|
||||
<text>食堂地址</text>
|
||||
<text class="m-l-10rpx">{{ v.addressDes }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
+38
-13
@@ -5,6 +5,7 @@ import { isEmpty } from "radash"
|
||||
|
||||
import { hooks, router, constant } from "@@/index"
|
||||
import { merchantApi, userApi, walletApi } from "@@/api"
|
||||
import isDevEnv from "@/sheep/utils/isDevEnv"
|
||||
|
||||
const data = {
|
||||
serviceList: [
|
||||
@@ -13,7 +14,6 @@ const data = {
|
||||
{ text: "外来人员就餐", icon: "/static/icon/service_1.png", router: "/pages/apply/foreign-list" },
|
||||
{ text: "跨单位就餐", icon: "/static/icon/service_1.png", router: "/pages/apply/stride-list" },
|
||||
{ text: "人脸管理", icon: "/static/icon/service_5.png", router: "/pages/human-face/list" },
|
||||
{ text: "测试登录", icon: "/static/icon/login.png", router: "/pages/test/login" },
|
||||
],
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ const state = reactive<any>({
|
||||
userInfo: {},
|
||||
})
|
||||
|
||||
onLoad((options) => {
|
||||
// 开发环境可以账号密码登录,生产环境不可
|
||||
const checkAppInfo = () => {
|
||||
;(window as any).CP2.getAppInfo().then((res) => {
|
||||
console.log(res)
|
||||
if (res.code == 1) {
|
||||
//诗画
|
||||
console.log("诗画环境")
|
||||
@@ -34,17 +34,26 @@ onLoad((options) => {
|
||||
doLogin(1, null, accountId, sessionId)
|
||||
})
|
||||
} else {
|
||||
//浙政钉或者h5
|
||||
console.log("浙政钉或者h5环境")
|
||||
const url = window.location.href
|
||||
const params = new URL(url).searchParams
|
||||
const token = params.get("uabaseToken") // 获取 uabaseToken 参数值
|
||||
console.log("Token:", token)
|
||||
// const token =
|
||||
// "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjJiZGQzODE1LWFlMWYtNDFmZi04MTE2LTU3OWVkMjY3MDI5OCJ9.nuCBrYAkGh5-FG8S_ZTe8mcVVORAuUT7bl0qUIspL9gCNtwtcae2D6DhOO8Q2RtVhuFO5IKtOQ65Xd2Vd7pAUg"
|
||||
console.log("uabaseToken:", token)
|
||||
if (null != token) {
|
||||
//浙政钉
|
||||
doLogin(2, token, null, null)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
if (isDevEnv()) {
|
||||
data.serviceList.push({ text: "测试登录", icon: "/static/icon/login.png", router: "/pages/test/login" })
|
||||
}
|
||||
checkAppInfo()
|
||||
})
|
||||
onShow(() => {
|
||||
getUserInfo()
|
||||
@@ -80,21 +89,29 @@ const doLogin = async (loginType, token, accountId, sessionId) => {
|
||||
authData = response.data
|
||||
} else if (loginType == 2) {
|
||||
//浙政钉
|
||||
const response = await userApi.auth(token)
|
||||
const response: any = await userApi.auth(token)
|
||||
if (!response) return
|
||||
authData = response.data
|
||||
} else {
|
||||
//后期手机号+验证码登录
|
||||
router.jump("/pages/test/login")
|
||||
if (isDevEnv()) router.jump("/pages/test/login")
|
||||
uni.hideLoading()
|
||||
return
|
||||
}
|
||||
// const {data: authData} = await userApi.auth(token);
|
||||
console.log("authData", authData)
|
||||
|
||||
uni.setStorageSync(tokenKey, authData)
|
||||
const { data: userData } = await userApi.userInfo()
|
||||
uni.setStorageSync(userInfoKey, userData)
|
||||
getUserInfo()
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: "登录成功", icon: "none" })
|
||||
try {
|
||||
const { data: userData } = await userApi.userInfo()
|
||||
uni.setStorageSync(userInfoKey, userData)
|
||||
getUserInfo()
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: "登录成功", icon: "none" })
|
||||
} catch (error) {
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: "登录失败", icon: "none" })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +141,14 @@ const doLogout = async () => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: "退出登录成功", icon: "none" })
|
||||
}
|
||||
|
||||
const onTabLogin = () => {
|
||||
if (isDevEnv()) {
|
||||
router.jump("/pages/test/login")
|
||||
} else {
|
||||
checkAppInfo()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -143,7 +168,7 @@ const doLogout = async () => {
|
||||
</view>
|
||||
<text class="sub-text-26">ID {{ state.userInfo?.sysUser?.userId }}</text>
|
||||
</view>
|
||||
<view v-else class="flex-row items-center m-l-30rpx" @tap="doLogin">
|
||||
<view v-else class="flex-row items-center m-l-30rpx" @tap="onTabLogin">
|
||||
<text class="sub-text-32">请先登录</text>
|
||||
<text class="iconfont icon-youjiantou"></text>
|
||||
</view>
|
||||
|
||||
@@ -16,7 +16,8 @@ export default {
|
||||
|
||||
auth: (str: any) =>
|
||||
request({
|
||||
url: `/sys/auth/zzdsso/${str}`,
|
||||
// url: `/sys/auth/zzdsso/${str}`,
|
||||
url: `/thirdparty/thirdPartyOAth2/zzdsso/${str}`,
|
||||
method: "GET",
|
||||
custom: {
|
||||
showLoading: false,
|
||||
|
||||
@@ -1,49 +1,50 @@
|
||||
import storageConstant from "../constant/storage-constant";
|
||||
import { jump } from "../router/index";
|
||||
import storageConstant from "../constant/storage-constant"
|
||||
import { jump } from "../router/index"
|
||||
import isDevEnv from "../utils/isDevEnv"
|
||||
|
||||
export const useToken = () => {
|
||||
const tokenKey = storageConstant.TOKEN;
|
||||
const tokenStorage = uni.getStorageSync(tokenKey);
|
||||
if (!tokenStorage.access_token) return "";
|
||||
return `Bearer ${tokenStorage.access_token}`;
|
||||
};
|
||||
const tokenKey = storageConstant.TOKEN
|
||||
const tokenStorage = uni.getStorageSync(tokenKey)
|
||||
if (!tokenStorage.access_token) return ""
|
||||
return `Bearer ${tokenStorage.access_token}`
|
||||
}
|
||||
|
||||
export const useDefaultHeader = () => {
|
||||
const token = useToken();
|
||||
return {
|
||||
"TENANT-ID": "1",
|
||||
"CLIENT-TOC": "Y",
|
||||
Authorization: token,
|
||||
};
|
||||
};
|
||||
const token = useToken()
|
||||
return {
|
||||
"TENANT-ID": "1",
|
||||
"CLIENT-TOC": "Y",
|
||||
Authorization: token,
|
||||
}
|
||||
}
|
||||
|
||||
export const useStaticCheckLogin = () => {
|
||||
const tokenKey = storageConstant.TOKEN;
|
||||
const tokenStorage = uni.getStorageSync(tokenKey);
|
||||
if (tokenStorage) return true;
|
||||
return false;
|
||||
};
|
||||
const tokenKey = storageConstant.TOKEN
|
||||
const tokenStorage = uni.getStorageSync(tokenKey)
|
||||
if (tokenStorage) return true
|
||||
return false
|
||||
}
|
||||
|
||||
export const useCheckLogin = async (): Promise<boolean> => {
|
||||
const tokenKey = storageConstant.TOKEN;
|
||||
const tokenStorage = uni.getStorageSync(tokenKey);
|
||||
if (tokenStorage) return true;
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您还未登录,请先登录",
|
||||
confirmColor: "#0094ff",
|
||||
cancelText: "取消",
|
||||
confirmText: "去登录",
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
jump("/pages/test/login", {}, 3);
|
||||
return;
|
||||
}
|
||||
if (!res.confirm) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
},
|
||||
});
|
||||
return false;
|
||||
};
|
||||
const tokenKey = storageConstant.TOKEN
|
||||
const tokenStorage = uni.getStorageSync(tokenKey)
|
||||
if (tokenStorage) return true
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "您还未登录,请先登录",
|
||||
confirmColor: "#0094ff",
|
||||
cancelText: "取消",
|
||||
confirmText: "去登录",
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
isDevEnv() ? jump("/pages/test/login", {}, 3) : jump("/pages/tabbar/my", {}, 3)
|
||||
return
|
||||
}
|
||||
if (!res.confirm) {
|
||||
return
|
||||
}
|
||||
return
|
||||
},
|
||||
})
|
||||
return false
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export default () => import.meta.env.VITE_DEV_ENV === "dev"
|
||||
@@ -3,6 +3,7 @@ import { isEmpty } from "radash"
|
||||
|
||||
import { userApi } from "@@/api"
|
||||
import { router, constant } from "@@/index"
|
||||
import isDevEnv from "./isDevEnv"
|
||||
|
||||
const options = {
|
||||
// 显示操作成功消息 默认不显示
|
||||
@@ -149,7 +150,7 @@ http.interceptors.response.use(
|
||||
const tokenKey = constant.storageConstant.TOKEN
|
||||
uni.removeStorageSync(tokenKey)
|
||||
uni.showToast({ title: "登录已过期,请重新登录", icon: "none" })
|
||||
router.jump("/pages/test/login")
|
||||
isDevEnv() ? router.jump("/pages/test/login") : undefined
|
||||
return false
|
||||
}
|
||||
let errorMessage = error.data.msg
|
||||
|
||||
Reference in new issue
Block a user