nginx 问题

This commit is contained in:
lf 2024-06-20 11:14:01 +08:00
parent e50fee84d4
commit 0ad0f3cdd4
6 changed files with 38 additions and 38 deletions

31
dist/build/h5/assets/index-CLbOINcq.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
var t=Object.defineProperty,e=Object.defineProperties,a=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,l=(e,a,n)=>a in e?t(e,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[a]=n,i=(t,e)=>{for(var a in e||(e={}))s.call(e,a)&&l(t,a,e[a]);if(n)for(var a of n(e))o.call(e,a)&&l(t,a,e[a]);return t},r=(t,n)=>e(t,a(n)),c=(t,e,a)=>new Promise(((n,s)=>{var o=t=>{try{i(a.next(t))}catch(e){s(e)}},l=t=>{try{i(a.throw(t))}catch(e){s(e)}},i=t=>t.done?n(t.value):Promise.resolve(t.value).then(o,l);i((a=a.apply(t,e)).next())}));import{r as u,s as d,d as p,g as m,a as f,b as _,u as y,n as v,o as g,c as O,e as w,f as b,h,i as j,w as I,j as x,k as P,l as T,m as D,p as L,q as $,t as q,_ as E}from"./index-M00MbjTc.js";const S=t=>new Promise(((e,a)=>{u(r(i({},t),{dataType:"json",header:{"content-type":"application/json"},responseType:"json",success(t){var n,s,o;(null==(n=t.data)?void 0:n.code)>=200&&(null==(s=t.data)?void 0:s.code)<300?e(t.data):401===(null==(o=t.data)?void 0:o.code)?(window.parent.postMessage({data:{type:"logout"}},"*"),a(t)):e(t.data)},fail(t){d({icon:"none",title:"网络错误,换个网络试试"}),a(t)}}))}));S.get=(t,e)=>S({url:t,query:e,method:"GET"}),S.post=(t,e,a,n=!1)=>S({url:t,query:a,data:e,method:"POST",hideErrorToast:n});const k=t=>S.get("/v1/content",t),U=E(p(r(i({},{name:"Home"}),{__name:"index",setup(t){const{safeAreaInsets:e}=m(),a=f({}),n=_(""),s=y();let o=null;const l=f({url:"",title:""});window.parent.addEventListener("message",(function(t){let e={};const o=(new Date).getTime();if("login"===t.data.data.type)e={url:a.content_templates.source+`?activity_code=${n.value}`,title:a.content_templates.moduledesc};else if("coupon"===t.data.data.type)e={url:a.user_content_templates.source+`?activity_code=${n.value}`,title:a.user_content_templates.moduledesc};else if("product"===t.data.data.type){const s=`product_id=${t.data.data.product_id}&id=${t.data.data.id}&activity_code=${n.value}`,o=encodeURIComponent(s);e={url:a.user_content_templates.source+`#/pages/coupon/product?url=${o}`,title:a.user_content_templates.moduledesc}}else"couponBack"===t.data.data.type?e={url:a.content_templates.source+`?activity_code=${n.value}`,title:a.content_templates.moduledesc}:"logout"===t.data.data.type&&(e={url:a.login_content_templates.source,title:a.login_content_templates.moduledesc});l.url=l.url+(l.url.includes("?")?"&timestamp=":"?timestamp=")+o,v((()=>{Object.assign(l,e),O({title:l.title}),s.setUserInfo({srcList:l,contentData:a,query:n.value})}))}));const i=()=>c(this,null,(function*(){const t={activity_code:n.value||""},e=yield k(t);if(Object.assign(a,e.data),200===(null==e?void 0:e.code)&&1===e.data.login_content_template.validate_login){const t=(new Date).getTime(),a=e.data.login_content_templates.source+(e.data.login_content_templates.source.includes("?")?"&timestamp=":"?timestamp=")+t;Object.assign(l,{url:a,title:e.data.login_content_templates.moduledesc}),O({title:l.title})}else d({title:e.message,icon:"none"});s.setUserInfo({srcList:l,contentData:a,query:n.value})}));return g((()=>{if(o=setInterval((()=>c(this,null,(function*(){const t={activity_code:n.value||""},e=yield k(t);JSON.stringify(e.data)!==JSON.stringify(s.userInfo.contentData)&&(d({title:"活动发生变更",icon:"none"}),i())}))),6e4),n.value=(()=>{const t=window.location.href;if(-1!==t.indexOf("#/")){const e=-1!==t.indexOf("#/")?t.split("#/")[1]:t.split("/")[t.split("/").length-1];return-1===e.indexOf("/")?e||"":e.split("/")[0]}{const e=t.split("/");return e[e.length-1]}})(),s.userInfo.srcList.url&&s.userInfo.query===n.value){const t=(new Date).getTime(),e=s.userInfo.srcList.url+(s.userInfo.srcList.url.includes("?")?"&timestamp=":"?timestamp=")+t;Object.assign(l,s.userInfo.srcList,{url:e}),Object.assign(a,s.userInfo.contentData),O({title:l.title})}else i()})),w((()=>{clearInterval(o),o=null})),(t,a)=>{const n=$,s=q,o=b("layout-default-uni");return h(),j(o,null,{default:I((()=>{var t;return[x(s,{class:"bg-white overflow-hidden pt-2 px-4",style:L({marginTop:(null==(t=T(e))?void 0:t.top)+"px"})},{default:I((()=>[P(" ZGP123 "),T(l).url?(h(),j(n,{key:0,src:T(l).url},null,8,["src"])):D("",!0)])),_:1},8,["style"])]})),_:1})}}})),[["__scopeId","data-v-7e155357"]]);export{U as default};
var t=Object.defineProperty,e=Object.defineProperties,a=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,l=(e,a,n)=>a in e?t(e,a,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[a]=n,i=(t,e)=>{for(var a in e||(e={}))s.call(e,a)&&l(t,a,e[a]);if(n)for(var a of n(e))o.call(e,a)&&l(t,a,e[a]);return t},r=(t,n)=>e(t,a(n)),c=(t,e,a)=>new Promise(((n,s)=>{var o=t=>{try{i(a.next(t))}catch(e){s(e)}},l=t=>{try{i(a.throw(t))}catch(e){s(e)}},i=t=>t.done?n(t.value):Promise.resolve(t.value).then(o,l);i((a=a.apply(t,e)).next())}));import{r as u,s as d,d as p,g as m,a as f,b as _,u as y,n as v,o as g,c as O,e as w,f as b,h,i as j,w as I,j as x,k as P,l as T,m as D,p as L,q as $,t as q,_ as E}from"./index-CLbOINcq.js";const S=t=>new Promise(((e,a)=>{u(r(i({},t),{dataType:"json",header:{"content-type":"application/json"},responseType:"json",success(t){var n,s,o;(null==(n=t.data)?void 0:n.code)>=200&&(null==(s=t.data)?void 0:s.code)<300?e(t.data):401===(null==(o=t.data)?void 0:o.code)?(window.parent.postMessage({data:{type:"logout"}},"*"),a(t)):e(t.data)},fail(t){d({icon:"none",title:"网络错误,换个网络试试"}),a(t)}}))}));S.get=(t,e)=>S({url:t,query:e,method:"GET"}),S.post=(t,e,a,n=!1)=>S({url:t,query:a,data:e,method:"POST",hideErrorToast:n});const k=t=>S.get("/v1/content",t),U=E(p(r(i({},{name:"Home"}),{__name:"index",setup(t){const{safeAreaInsets:e}=m(),a=f({}),n=_(""),s=y();let o=null;const l=f({url:"",title:""});window.parent.addEventListener("message",(function(t){let e={};const o=(new Date).getTime();if("login"===t.data.data.type)e={url:a.content_templates.source+`?activity_code=${n.value}`,title:a.content_templates.moduledesc};else if("coupon"===t.data.data.type)e={url:a.user_content_templates.source+`?activity_code=${n.value}`,title:a.user_content_templates.moduledesc};else if("product"===t.data.data.type){const s=`product_id=${t.data.data.product_id}&id=${t.data.data.id}&activity_code=${n.value}`,o=encodeURIComponent(s);e={url:a.user_content_templates.source+`#/pages/coupon/product?url=${o}`,title:a.user_content_templates.moduledesc}}else"couponBack"===t.data.data.type?e={url:a.content_templates.source+`?activity_code=${n.value}`,title:a.content_templates.moduledesc}:"logout"===t.data.data.type&&(e={url:a.login_content_templates.source,title:a.login_content_templates.moduledesc});l.url=l.url+(l.url.includes("?")?"&timestamp=":"?timestamp=")+o,v((()=>{Object.assign(l,e),O({title:l.title}),s.setUserInfo({srcList:l,contentData:a,query:n.value})}))}));const i=()=>c(this,null,(function*(){const t={activity_code:n.value||""},e=yield k(t);if(Object.assign(a,e.data),200===(null==e?void 0:e.code)&&1===e.data.login_content_template.validate_login){const t=(new Date).getTime(),a=e.data.login_content_templates.source+(e.data.login_content_templates.source.includes("?")?"&timestamp=":"?timestamp=")+t;Object.assign(l,{url:a,title:e.data.login_content_templates.moduledesc}),O({title:l.title})}else d({title:e.message,icon:"none"});s.setUserInfo({srcList:l,contentData:a,query:n.value})}));return g((()=>{if(o=setInterval((()=>c(this,null,(function*(){const t={activity_code:n.value||""},e=yield k(t);JSON.stringify(e.data)!==JSON.stringify(s.userInfo.contentData)&&(d({title:"活动发生变更",icon:"none"}),i())}))),6e4),n.value=(()=>{const t=window.location.href;if(-1!==t.indexOf("#/")){const e=-1!==t.indexOf("#/")?t.split("#/")[1]:t.split("/")[t.split("/").length-1];return-1===e.indexOf("/")?e||"":e.split("/")[0]}{const e=t.split("/");return e[e.length-1]}})(),s.userInfo.srcList.url&&s.userInfo.query===n.value){const t=(new Date).getTime(),e=s.userInfo.srcList.url+(s.userInfo.srcList.url.includes("?")?"&timestamp=":"?timestamp=")+t;Object.assign(l,s.userInfo.srcList,{url:e}),Object.assign(a,s.userInfo.contentData),O({title:l.title})}else i()})),w((()=>{clearInterval(o),o=null})),(t,a)=>{const n=$,s=q,o=b("layout-default-uni");return h(),j(o,null,{default:I((()=>{var t;return[x(s,{class:"bg-white overflow-hidden pt-2 px-4",style:L({marginTop:(null==(t=T(e))?void 0:t.top)+"px"})},{default:I((()=>[P(" ZGP123 "),T(l).url?(h(),j(n,{key:0,src:T(l).url},null,8,["src"])):D("",!0)])),_:1},8,["style"])]})),_:1})}}})),[["__scopeId","data-v-7e155357"]]);export{U as default};

View File

@ -1,7 +1,7 @@
<!doctype html>
<html build-date="2024-06-20 11:10:38">
<html build-date="2024-06-20 11:13:34">
<head>
<link rel="stylesheet" href="/test/assets/uni.ad4bcb33.css">
<link rel="stylesheet" href="./assets/uni.ad4bcb33.css">
<meta charset="UTF-8" />
<!-- <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> -->
@ -19,8 +19,8 @@
<title>unibest</title>
<!--preload-links-->
<!--app-context-->
<script type="module" crossorigin src="/test/assets/index-M00MbjTc.js"></script>
<link rel="stylesheet" crossorigin href="/test/assets/index-DfE4H0b6.css">
<script type="module" crossorigin src="./assets/index-CLbOINcq.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-DfE4H0b6.css">
</head>
<body>

2
env/.env.production vendored
View File

@ -5,7 +5,7 @@ VITE_DELETE_CONSOLE = true
# 是否开启sourcemap
VITE_SHOW_SOURCEMAP = false
VITE_APP_PUBLIC_BASE = ./
VITE_APP_PUBLIC_BASE = 'test/'
VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
VITE_APP_PROXY = true
VITE_APP_PROXY_PREFIX = 'https://gateway.dev.cdlsxd.cn'

View File

@ -106,7 +106,7 @@
"h5": {
"router": {
"mode": "history",
"base": "./"
"base": "test/"
}
}
}