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 @@ + + + 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 @@ 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 @@