再次打包主模板一次
This commit is contained in:
parent
e81dae83d1
commit
b16ae83686
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,2 +1 @@
|
|||
var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,s=(t,a,o)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[a]=o,c=(e,t)=>{for(var a in t||(t={}))l.call(t,a)&&s(e,a,t[a]);if(o)for(var a of o(t))n.call(t,a)&&s(e,a,t[a]);return e},r=(e,o)=>t(e,a(o)),i=(e,t,a)=>new Promise(((o,l)=>{var n=e=>{try{c(a.next(e))}catch(t){l(t)}},s=e=>{try{c(a.throw(e))}catch(t){l(t)}},c=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,s);c((a=a.apply(e,t)).next())}));import{r as u,s as d,d as v,g as p,a as y,b as _,c as m,e as f,u as g,n as b,f as $,o as w,h as O,i as h,j,k,w as I,l as P,m as x,p as D,q,t as T,v as E,x as S,_ as C}from"./index-ity87CM3.js";const L=e=>new Promise(((t,a)=>{u(r(c({},e),{dataType:"json",header:{"content-type":"application/json"},responseType:"json",success(e){var o,l,n;(null==(o=e.data)?void 0:o.code)>=200&&(null==(l=e.data)?void 0:l.code)<300?t(e.data):401===(null==(n=e.data)?void 0:n.code)?(window.parent.postMessage({data:{type:"logout"}},"*"),a(e)):t(e.data)},fail(e){d({icon:"none",title:"网络错误,换个网络试试"}),a(e)}}))}));L.get=(e,t)=>L({url:e,query:t,method:"GET"}),L.post=(e,t,a,o=!1)=>L({url:e,query:a,data:t,method:"POST",hideErrorToast:o});const U=e=>L.get("/v1/content",e),J=C(v(r(c({},{name:"Home"}),{__name:"index",setup(e){const{safeAreaInsets:t}=p(),a=y({}),o=_(""),l=_("");let n="activity",s=null;const c={Interface:"api_code",lottery:"lottery_code",activity:"activity_code"},r=y({url:"",title:""}),{MODE:u}=T(),v="production"===u?m():f();o.value=v.activity_code,n=v.codeS;const C=g(o.value),L=e=>Object.entries(e).reduce(((e,t)=>e+`${t[0]}=${t[1]}`),"");function J(){return i(this,null,(function*(){const e={};e[c[n]]=o.value||"",C.reset();M(yield U(e))}))}function M(e){if(200===e.code){const{login_content_template:t,login_content_templates:n,content_templates:s,token:c}=e.data;o.value=e.data.activity_code,Object.assign(a,e.data),1===t.validate_login?(r.url=N(n.source+`?activity_code=${o.value}`),r.title=n.moduledesc):2===t.validate_login&&(r.url=N(s.source+`?activity_code=${o.value}&token=${c}&lottery_code=${l.value}`),r.title=s.moduledesc),$({title:r.title}),C.setUserInfo({srcList:r,contentData:a,activityCode:o.value,token:c,lottery:l.value})}else d({title:e.message,icon:"none"})}function N(e){const t=(new Date).getTime();return e+(e.includes("?")?"×tamp=":"?timestamp=")+t}window.addEventListener("message",(function(e){switch(e.data.data.type){case"login":case"couponBack":r.url=a.content_templates.source+`?activity_code=${o.value}`,r.title=a.content_templates.moduledesc;break;case"coupon":const t=e.data.data.url?`#${e.data.data.url}`:"",n=e.data.data.query?L(e.data.data.query)+"&":"";r.url=a.user_content_templates.source+`${t}?${n}activity_code=${o.value}&lottery_code=${l.value}`,r.title=a.user_content_templates.moduledesc;break;case"location":window.location.replace(e.data.data.url);break;case"orderDetail":const s=e.data.data.query?L(e.data.data.query)+"&":"";r.url=a.order_detail_templates.source+`?${s}activity_code=${o.value}&lottery_code=${l.value}`,r.title=a.order_detail_templates.moduledesc;break;case"product":const c=`product_id=${e.data.data.product_id}&id=${e.data.data.id}&activity_code=${o.value}`;r.url=a.user_content_templates.source+`#/pages/coupon/product?url=${encodeURIComponent(c)}`,r.title=a.user_content_templates.moduledesc;break;case"logout":return J()}b((()=>{r.url=N(r.url),$({title:r.title}),C.setUserInfo({srcList:r,contentData:a,activityCode:o.value,token:a.token,lottery:l.value})}))}));const A=()=>{s=setInterval((()=>i(this,null,(function*(){const e={};e[c[n]]=l.value||"";const t=yield U(e);JSON.stringify(t.data)!==JSON.stringify(C.userInfo.contentData)&&(d({title:"活动发生变更",icon:"none"}),M(t))}))),6e4)};return w((()=>{const{srcList:e,lottery:t,activityCode:n,contentData:s}=C.userInfo;l.value=o.value,!e.url||t!==l.value&&n!==o.value?J():(o.value=n,r.url=s.content_templates.source+`?activity_code=${o.value}&lottery_code=${l.value}`,r.title=s.content_templates.moduledesc,Object.assign(r,{url:N(r.url)}),Object.assign(a,s),$({title:r.title})),A()})),O((()=>{clearInterval(s),s=null})),(e,a)=>{const o=E,l=S,n=h("layout-default-uni");return j(),k(n,null,{default:I((()=>{var e;return[P(l,{class:"bg-white overflow-hidden pt-2 px-4",style:q({marginTop:(null==(e=x(t))?void 0:e.top)+"px"})},{default:I((()=>[x(r).url?(j(),k(o,{key:0,src:x(r).url},null,8,["src"])):D("",!0)])),_:1},8,["style"])]})),_:1})}}})),[["__scopeId","data-v-a7081132"]]);export{J as default};
|
||||
//# sourceMappingURL=pages-index-index.C95LVO3o.js.map
|
||||
var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,s=(t,a,o)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[a]=o,c=(e,t)=>{for(var a in t||(t={}))l.call(t,a)&&s(e,a,t[a]);if(o)for(var a of o(t))n.call(t,a)&&s(e,a,t[a]);return e},r=(e,o)=>t(e,a(o)),i=(e,t,a)=>new Promise(((o,l)=>{var n=e=>{try{c(a.next(e))}catch(t){l(t)}},s=e=>{try{c(a.throw(e))}catch(t){l(t)}},c=e=>e.done?o(e.value):Promise.resolve(e.value).then(n,s);c((a=a.apply(e,t)).next())}));import{r as u,s as d,d as v,g as p,a as y,b as _,c as m,e as f,u as g,n as b,f as $,o as w,h as O,i as h,j,k,w as I,l as P,m as x,p as D,q,t as T,v as E,x as S,_ as C}from"./index-DEtueelp.js";const L=e=>new Promise(((t,a)=>{u(r(c({},e),{dataType:"json",header:{"content-type":"application/json"},responseType:"json",success(e){var o,l,n;(null==(o=e.data)?void 0:o.code)>=200&&(null==(l=e.data)?void 0:l.code)<300?t(e.data):401===(null==(n=e.data)?void 0:n.code)?(window.parent.postMessage({data:{type:"logout"}},"*"),a(e)):t(e.data)},fail(e){d({icon:"none",title:"网络错误,换个网络试试"}),a(e)}}))}));L.get=(e,t)=>L({url:e,query:t,method:"GET"}),L.post=(e,t,a,o=!1)=>L({url:e,query:a,data:t,method:"POST",hideErrorToast:o});const U=e=>L.get("/v1/content",e),J=C(v(r(c({},{name:"Home"}),{__name:"index",setup(e){const{safeAreaInsets:t}=p(),a=y({}),o=_(""),l=_("");let n="activity",s=null;const c={Interface:"api_code",lottery:"lottery_code",activity:"activity_code"},r=y({url:"",title:""}),{MODE:u}=T(),v="production"===u?m():f();o.value=v.activity_code,n=v.codeS;const C=g(o.value),L=e=>Object.entries(e).reduce(((e,t)=>e+`${t[0]}=${t[1]}`),"");function J(){return i(this,null,(function*(){const e={};e[c[n]]=o.value||"",C.reset();M(yield U(e))}))}function M(e){if(200===e.code){const{login_content_template:t,login_content_templates:n,content_templates:s,token:c}=e.data;o.value=e.data.activity_code,Object.assign(a,e.data),1===t.validate_login?(r.url=N(n.source+`?activity_code=${o.value}`),r.title=n.moduledesc):2===t.validate_login&&(r.url=N(s.source+`?activity_code=${o.value}&token=${c}&lottery_code=${l.value}`),r.title=s.moduledesc),$({title:r.title}),C.setUserInfo({srcList:r,contentData:a,activityCode:o.value,token:c,lottery:l.value})}else d({title:e.message,icon:"none"})}function N(e){const t=(new Date).getTime();return e+(e.includes("?")?"×tamp=":"?timestamp=")+t}window.addEventListener("message",(function(e){switch(e.data.data.type){case"login":case"couponBack":r.url=a.content_templates.source+`?activity_code=${o.value}`,r.title=a.content_templates.moduledesc;break;case"coupon":const t=e.data.data.url?`#${e.data.data.url}`:"",n=e.data.data.query?L(e.data.data.query)+"&":"";r.url=a.user_content_templates.source+`${t}?${n}activity_code=${o.value}&lottery_code=${l.value}`,r.title=a.user_content_templates.moduledesc;break;case"location":window.location.replace(e.data.data.url);break;case"orderDetail":const s=e.data.data.query?L(e.data.data.query)+"&":"";r.url=a.order_detail_templates.source+`?${s}activity_code=${o.value}&lottery_code=${l.value}`,r.title=a.order_detail_templates.moduledesc;break;case"product":const c=`product_id=${e.data.data.product_id}&id=${e.data.data.id}&activity_code=${o.value}`;r.url=a.user_content_templates.source+`#/pages/coupon/product?url=${encodeURIComponent(c)}`,r.title=a.user_content_templates.moduledesc;break;case"logout":return J()}b((()=>{r.url=N(r.url),$({title:r.title}),C.setUserInfo({srcList:r,contentData:a,activityCode:o.value,token:a.token,lottery:l.value})}))}));const A=()=>{s=setInterval((()=>i(this,null,(function*(){const e={};e[c[n]]=l.value||"";const t=yield U(e);JSON.stringify(t.data)!==JSON.stringify(C.userInfo.contentData)&&(d({title:"活动发生变更",icon:"none"}),M(t))}))),6e4)};return w((()=>{const{srcList:e,lottery:t,activityCode:n,contentData:s}=C.userInfo;l.value=o.value,!e.url||t!==l.value&&n!==o.value?J():(o.value=n,r.url=s.content_templates.source+`?activity_code=${o.value}&lottery_code=${l.value}`,r.title=s.content_templates.moduledesc,Object.assign(r,{url:N(r.url)}),Object.assign(a,s),$({title:r.title})),A()})),O((()=>{clearInterval(s),s=null})),(e,a)=>{const o=E,l=S,n=h("layout-default-uni");return j(),k(n,null,{default:I((()=>{var e;return[P(l,{class:"bg-white overflow-hidden pt-2 px-4",style:q({marginTop:(null==(e=x(t))?void 0:e.top)+"px"})},{default:I((()=>[x(r).url?(j(),k(o,{key:0,src:x(r).url},null,8,["src"])):D("",!0)])),_:1},8,["style"])]})),_:1})}}})),[["__scopeId","data-v-a7081132"]]);export{J as default};
|
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html build-date="2024-09-14 16:18:44">
|
||||
<html build-date="2024-09-14 16:34:30">
|
||||
<head>
|
||||
<link rel="stylesheet" href="./assets/uni.ad4bcb33.css">
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
<title>场景营销</title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
<script type="module" crossorigin src="./assets/index-ity87CM3.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-DEtueelp.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-DqQ4aJDv.css">
|
||||
</head>
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@ NODE_ENV = 'test'
|
|||
# 是否去除console 和 debugger
|
||||
VITE_DELETE_CONSOLE = false
|
||||
# 是否开启sourcemap
|
||||
VITE_SHOW_SOURCEMAP = true
|
||||
VITE_SHOW_SOURCEMAP = false
|
||||
|
||||
# VITE_APP_PUBLIC_BASE = ./
|
||||
VITE_APP_PUBLIC_BASE = ./
|
||||
# 测试线上
|
||||
VITE_SERVER_BASEURL = 'https://gateway.dev.cdlsxd.cn'
|
||||
# 正式环境
|
||||
|
|
Loading…
Reference in New Issue