diff --git a/.env b/.env
index 31833e2..4b14a59 100644
--- a/.env
+++ b/.env
@@ -25,17 +25,17 @@ VITE_OAUTH2_APP_CLIENT='mini:mini'
# VITE_ZZD_CORP_ID=
# --------------------------- 开发环境 api地址 ----------------------------------
-# VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上
+VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上
#VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上
# VITE_APP_DEV_SERVICE = https://dzc-test-1.fy.takin.cc # 邓-本地
-VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地
+# VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地
# VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上
# --------------------------- 开发环境 图片访问基础地址 ---------------------------
-# VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上
+VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上
#VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上
-#VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地
-VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999
+# VITE_IMAGE_DEV_PATH = https://dzc-test-1.fy.takin.cc # 邓-本地
+# VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999
# VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上
# --------------------------- 生产环境 api地址 ----------------------------------
diff --git a/src/pages/integrated/notice/detail.vue b/src/pages/integrated/notice/detail.vue
index 6f836d6..3c4cf33 100644
--- a/src/pages/integrated/notice/detail.vue
+++ b/src/pages/integrated/notice/detail.vue
@@ -60,9 +60,36 @@ const getActDetail = async () => {
const goGetCoupon = () => {
uni.navigateTo({ url: `/pages/merchant/merchant-activity?actId=${actDetail.value.actId}&actType=${actDetail.value.actType}` })
}
+const normalizeRichText = (html: string) => {
+ const origin = "https://stgl.pj.gov.cn"
+ return html.replace(/
]*>/gi, (imgTag) => {
+ let next = imgTag
+
+ next = next.replace(/\bsrc\s*=\s*(['"])(.*?)\1/i, (_m, quote: string, src: string) => {
+ let resolved = src
+ if (resolved?.startsWith("/api")) resolved = `${origin}${resolved}`
+ if (resolved?.startsWith("//")) resolved = `https:${resolved}`
+ return `src=${quote}${resolved}${quote}`
+ })
+
+ const styleMatch = next.match(/\bstyle\s*=\s*(['"])([\s\S]*?)\1/i)
+ const required = "max-width: 100%; height: auto; display: block;"
+ if (styleMatch) {
+ const quote = styleMatch[1]
+ const styleValue = styleMatch[2] ?? ""
+ if (styleValue.includes("max-width") || styleValue.includes("width")) return next
+ const merged = styleValue.trim().length ? `${styleValue.replace(/;?\s*$/, "; ")}${required}` : required
+ return next.replace(/\bstyle\s*=\s*(['"])([\s\S]*?)\1/i, `style=${quote}${merged}${quote}`)
+ }
+
+ return next.replace(/
{
- return detail.value.description?.replaceAll(`
-
+
兑换券
@@ -68,10 +68,6 @@
天内使用
-
- {{ state.actDetail.description }}
-
@@ -85,6 +81,9 @@
+
+
+
我的礼券
@@ -95,7 +94,7 @@
diff --git a/src/pages/order/detail.vue b/src/pages/order/detail.vue
index b4f7deb..07e85a2 100644
--- a/src/pages/order/detail.vue
+++ b/src/pages/order/detail.vue
@@ -1,18 +1,40 @@
-
+
-
+
-
+
订单信息
@@ -141,10 +190,8 @@ const doCancelRefund = async () => {
-
+
@@ -174,12 +221,20 @@ const doCancelRefund = async () => {
售后类型:
{{ state.refundDetail.applyReason }}
+
+ 补充图片:
+
+
+
+
相关描述:
{{ state.refundDetail.applyDescription }}
-
+
审核人:
{{ state.refundDetail.auditUsername }}
@@ -197,22 +252,33 @@ const doCancelRefund = async () => {
-
- 取消申请
-
-
- 重新申请
-
+
+
+
+ 拒绝退款
+
+
+ 同意退款
+
+
+
+
+
+ 取消申请
+
+
+ 重新申请
+
+
+
diff --git a/src/sheep/components/order/order-status-tag.vue b/src/sheep/components/order/order-status-tag.vue
new file mode 100644
index 0000000..61feb64
--- /dev/null
+++ b/src/sheep/components/order/order-status-tag.vue
@@ -0,0 +1,26 @@
+
+
+
+
+ 待使用
+ 待发货
+ 已支付
+
+ 待发货
+ 待收货
+ 已收货
+ 已评价
+ 售后
+ 已核销
+ 已取消(智能柜)
+ 配送中
+
\ No newline at end of file
diff --git a/src/sheep/components/time-range-picker.vue b/src/sheep/components/time-range-picker.vue
index 30d0b3d..d752072 100644
--- a/src/sheep/components/time-range-picker.vue
+++ b/src/sheep/components/time-range-picker.vue
@@ -1,26 +1,15 @@
-
+
{{ item.week }}
{{ item.date }}
-
+
{{ item.time.slice(0, 5) }}
@@ -123,6 +112,7 @@ function onConfirm() {
margin-bottom: 30rpx;
font-size: 24rpx;
}
+
.date-time-range .date-range-item {
padding: 10rpx 16rpx;
background-color: #eee;
@@ -131,17 +121,20 @@ function onConfirm() {
white-space: nowrap;
transition: all 0.1s linear;
}
+
.date-time-range .active {
background: #0779fd;
border-color: #4988f2;
color: white;
}
+
.day-time-point-list {
display: flex;
flex-wrap: wrap;
gap: 10rpx;
margin-bottom: 20rpx;
}
+
.day-time-button {
flex: 1 0 calc(100vw / 4);
}
diff --git a/src/sheep/constant/service-enum.ts b/src/sheep/constant/service-enum.ts
index 7daa6c2..5748d1b 100644
--- a/src/sheep/constant/service-enum.ts
+++ b/src/sheep/constant/service-enum.ts
@@ -36,6 +36,13 @@ const hardwareRefundStatusEnum = {
30: "售后失败",
}
+const hardSaleStatusEnum = {
+ 0: "售后中",
+ 50: "售后完成",
+ 61: "买家取消",
+ 62: "卖家拒绝",
+}
+
const carTypeEnum = {
1: "私家车",
2: "公车",
@@ -98,4 +105,5 @@ export default {
actCouponLimitTypeEnum,
actCouponTypeEnum,
actUserReceiveEnum,
+ hardSaleStatusEnum,
}
diff --git a/src/sheep/hooks/use-scan-code.ts b/src/sheep/hooks/use-scan-code.ts
index 8a004c2..ebde816 100644
--- a/src/sheep/hooks/use-scan-code.ts
+++ b/src/sheep/hooks/use-scan-code.ts
@@ -7,6 +7,7 @@ export function useScanCode(actModalShow) {
const appInfo = await getAppInfo()
if (isDevEnv()) {
+ let testQrCode = ""
// 开发环境模拟扫码
// const testQrCode = "eyJpZCI6IjE5MDU4ODg4NjQ0NTQ1MzMxMjEiLCJuYW1lIjoi6ICB5Y6/5bqc6aOf5aCCIn0=" // 测试线上-老县府食堂-收款二维码
// const testQrCode = "eyJoYXJkRG9vcklkIjoiMTkxNDIxNTYwODQzNzQxMTg0MSIsImNhYmluZXRObyI6IjEifQ==" // 测试线上-智能柜-收款二维码
@@ -15,7 +16,13 @@ export function useScanCode(actModalShow) {
// const testQrCode = "http://192.168.101.45:8889/h5/#/pages/pay/scanPay?id=1905816751043452930&name=测试新县府超市" // 邓本地-测试环境-新县府超市收款二维码
// const testQrCode = "http://192.168.101.45:8889/h5/#/pages/pay/scanPay?hardDoorId=1913157080418295809&cabinetNo=1" // 测试智能柜柜门二维码
// const testQrCode = "eyJjYW5jZWxJZCI6IjE5ODQyNDA4MzM5NDMyMDc5MzcifQ==" // 测试商户活动核销
- const testQrCode = "https://stgl.pj.gov.cn/h5/#/pages/pay/scanPay?id=1931916121241079810"
+ // const testQrCode = "https://stgl.pj.gov.cn/h5/#/pages/pay/scanPay?id=1931916121241079810"
+ // 测试环境(自营食堂)-新县府食堂
+ // testQrCode = "https://stgl.pj.gov.cn/h5/#/pages/pay/scanPay?id=1905816666859577346"
+ // 测试环境(合作商家)-测试部门超市
+ testQrCode = "https://stgl.pj.gov.cn/h5/#/pages/pay/scanPay?id=1931916121241079810"
+ // 测试环境(自营商家)-老县府超市
+ // testQrCode = "https://stgl.pj.gov.cn/h5/#/pages/pay/scanPay?id=1905816898011865090"
uni.showModal({ content: "开发环境不是浙政钉和诗画环境,扫码仅供测试" })
return Promise.resolve(testQrCode)
}
diff --git a/src/sheep/scss/font/iconfont.scss b/src/sheep/scss/font/iconfont.scss
index dd51a98..a0ee45d 100644
--- a/src/sheep/scss/font/iconfont.scss
+++ b/src/sheep/scss/font/iconfont.scss
@@ -1,9 +1,9 @@
@font-face {
font-family: "iconfont";
/* Project id 4740692 */
- src: url('//at.alicdn.com/t/c/font_4740692_uwg9mtj0d0p.woff2?t=1770172172940') format('woff2'),
- url('//at.alicdn.com/t/c/font_4740692_uwg9mtj0d0p.woff?t=1770172172940') format('woff'),
- url('//at.alicdn.com/t/c/font_4740692_uwg9mtj0d0p.ttf?t=1770172172940') format('truetype');
+ src: url('https://at.alicdn.com/t/c/font_4740692_ol93veips6n.woff2?t=1782372215492') format('woff2'),
+ url('https://at.alicdn.com/t/c/font_4740692_ol93veips6n.woff?t=1782372215492') format('woff'),
+ url('https://at.alicdn.com/t/c/font_4740692_ol93veips6n.ttf?t=1782372215492') format('truetype');
}
.iconfont {
@@ -14,6 +14,114 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-jisuwuliu:before {
+ content: "\e61a";
+}
+
+.icon-add:before {
+ content: "\e79e";
+}
+
+.icon-add1:before {
+ content: "\e6aa";
+}
+
+.icon-bianji:before {
+ content: "\e763";
+}
+
+.icon-address1:before {
+ content: "\e605";
+}
+
+.icon-address:before {
+ content: "\e659";
+}
+
+.icon-address-f:before {
+ content: "\e604";
+}
+
+.icon-zhifufangshi:before {
+ content: "\e759";
+}
+
+.icon-zhifufangshi-yuezhifu:before {
+ content: "\e68c";
+}
+
+.icon-zhifufangshi1:before {
+ content: "\e603";
+}
+
+.icon-rili:before {
+ content: "\e60e";
+}
+
+.icon-hexiaoicon:before {
+ content: "\e602";
+}
+
+.icon-hexiao1:before {
+ content: "\e7fe";
+}
+
+.icon-hexiao:before {
+ content: "\e63f";
+}
+
+.icon-fanhui:before {
+ content: "\e8fb";
+}
+
+.icon-tongzhi:before {
+ content: "\e61b";
+}
+
+.icon-dangqianweizhi:before {
+ content: "\e678";
+}
+
+.icon-sousuo:before {
+ content: "\e619";
+}
+
+.icon-yizuofei1:before {
+ content: "\e60d";
+}
+
+.icon-yizuofei:before {
+ content: "\f2d8";
+}
+
+.icon-jilu1:before {
+ content: "\e631";
+}
+
+.icon-jilu:before {
+ content: "\e664";
+}
+
+.icon-kefu:before {
+ content: "\e677";
+}
+
+.icon-kefu1:before {
+ content: "\e612";
+}
+
+.icon-info:before {
+ content: "\e64a";
+}
+
+.icon-setting:before {
+ content: "\e8d8";
+}
+
+.icon-shezhi:before {
+ content: "\e601";
+}
+
.icon-yiguoqi:before {
content: "\e642";
}
diff --git a/src/sheep/utils/request.ts b/src/sheep/utils/request.ts
index b69201f..383949c 100644
--- a/src/sheep/utils/request.ts
+++ b/src/sheep/utils/request.ts
@@ -226,8 +226,7 @@ const autoLogin = async (): Promise => {
function isZzdNeedSmsVerify(data: unknown): data is { needSmsVerify: true; bindSessionId: string; displayName?: string } {
if (!data || typeof data !== "object") return false
const o = data as Record
- const need =
- o.needSmsVerify === true || o.needSmsVerify === "true" || o.needSmsVerify === 1 || o.needSmsVerify === "1"
+ const need = o.needSmsVerify === true || o.needSmsVerify === "true" || o.needSmsVerify === 1 || o.needSmsVerify === "1"
const sid = o.bindSessionId
const sidStr = typeof sid === "string" ? sid : sid != null ? String(sid) : ""
return need && sidStr.length > 0
diff --git a/src/sheep/utils/user-role.ts b/src/sheep/utils/user-role.ts
new file mode 100644
index 0000000..97b4d53
--- /dev/null
+++ b/src/sheep/utils/user-role.ts
@@ -0,0 +1,76 @@
+import { constant } from "@@/index"
+import { userApi } from "@@/api"
+
+export const ROLE_ONLINE_CANTEEN_MCH = "ONLINE_CANTEEN_MCH"
+export const ROLE_CANTEEN_RIDER = "CANTEEN_RIDER"
+// 移动端商户角色(核销订餐二维码)
+export const MCH_USER = "MCH_USER"
+/** 移动端后台管理入口角色 */
+export const ROLE_MOBILE_ADMIN_PC = "MOBILE_ADMIN_PC"
+/** 新增用户默认角色 */
+export const ROLE_GENERAL_USER = "GENERAL_USER"
+export const ROLE_WALLET_AUTO_CREATE = "WALLET_AUTO_CREATE"
+
+const DEFAULT_NEW_USER_ROLES = [
+ { roleCode: ROLE_GENERAL_USER, roleId: "2" },
+ { roleCode: ROLE_WALLET_AUTO_CREATE, roleId: "1873557615006810113" },
+] as const
+
+/** 新增用户时默认勾选的角色 ID(优先按 roleCode 从列表解析) */
+export const resolveDefaultNewUserRoleIds = (roleList: { roleId?: string | number; roleCode?: string }[]): string[] =>
+ DEFAULT_NEW_USER_ROLES.map(({ roleCode, roleId }) => {
+ const hit = roleList.find((r) => r.roleCode === roleCode)
+ return hit ? String(hit.roleId) : roleId
+ })
+
+export const getUserRoleCodes = (): string[] => {
+ const userInfo: any = uni.getStorageSync(constant.storageConstant.USERINFO) || {}
+ const codes = userInfo?.roleCodes
+ if (Array.isArray(codes)) return codes.filter(Boolean)
+ return []
+}
+
+export const hasRoleCode = (code: string) => getUserRoleCodes().includes(code)
+
+/** 刷新用户信息中的 roleCodes(我的页菜单、统计页鉴权用) */
+export const refreshUserRoleCodes = async (): Promise => {
+ try {
+ const res: any = await userApi.userInfo()
+ if (res?.code === 0 && res.data) {
+ uni.setStorageSync(constant.storageConstant.USERINFO, res.data)
+ return Array.isArray(res.data.roleCodes) ? res.data.roleCodes : []
+ }
+ } catch (e) {
+ console.warn("refreshUserRoleCodes failed", e)
+ }
+ return getUserRoleCodes()
+}
+
+/** 移动端后台管理 - 权限码(与 PC 角色菜单分配一致) */
+export const PERM_SYS_USER_ADD = "sys_user_add"
+export const PERM_SYS_USER_EDIT = "sys_user_edit"
+export const PERM_SYS_USER_DEL = "sys_user_del"
+export const PERM_WALLET_MANAGE_VIEW = "wallet_walletManage_view"
+export const PERM_WALLET_MANAGE_EDIT = "wallet_walletManage_edit"
+export const PERM_WALLET_UPDATE_BALANCE = "wallet_walletTransaction_update_balance"
+
+export const ADMIN_USER_PERMS = [PERM_SYS_USER_ADD, PERM_SYS_USER_EDIT, PERM_SYS_USER_DEL]
+export const ADMIN_WALLET_PERMS = [PERM_WALLET_MANAGE_VIEW, PERM_WALLET_MANAGE_EDIT, PERM_WALLET_UPDATE_BALANCE]
+export const ADMIN_HUB_PERMS = [...ADMIN_USER_PERMS, ...ADMIN_WALLET_PERMS]
+
+export const getUserPermissions = (): string[] => {
+ const userInfo: any = uni.getStorageSync(constant.storageConstant.USERINFO) || {}
+ const perms = userInfo?.permissions
+ if (Array.isArray(perms)) return perms.filter(Boolean)
+ return []
+}
+
+export const hasPermission = (code: string) => getUserPermissions().includes(code)
+
+export const hasAnyPermission = (codes: string[]) => codes.some((code) => hasPermission(code))
+
+/** 刷新 permissions(顺带刷新 roleCodes) */
+export const refreshUserPermissions = async (): Promise => {
+ await refreshUserRoleCodes()
+ return getUserPermissions()
+}