index 返回报错
This commit is contained in:
parent
7a18c03dac
commit
4cfea0e82c
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
.main-title-color[data-v-df0666e9]{color:#d14328}
|
|
@ -1 +0,0 @@
|
|||
.main-title-color[data-v-6f0ecb5c]{color:#d14328}
|
|
@ -1 +1 @@
|
|||
var t=Object.defineProperty,e=Object.defineProperties,a=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=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={}))o.call(e,a)&&l(t,a,e[a]);if(n)for(var a of n(e))s.call(e,a)&&l(t,a,e[a]);return t},r=(t,n)=>e(t,a(n)),c=(t,e,a)=>new Promise(((n,o)=>{var s=t=>{try{i(a.next(t))}catch(e){o(e)}},l=t=>{try{i(a.throw(t))}catch(e){o(e)}},i=t=>t.done?n(t.value):Promise.resolve(t.value).then(s,l);i((a=a.apply(t,e)).next())}));import{r as u,s as d,d as p,g as f,a as y,b as v,u as m,n as _,c as g,o as h,e as w,f as O,h as b,i as j,w as I,j as x,k as P,l as k,m as $,p as T,q,_ as D}from"./index-DTtbQBfI.js";const L=t=>new Promise(((e,a)=>{u(r(i({},t),{dataType:"json",header:{"content-type":"application/json"},responseType:"json",success(t){var n,o,s;(null==(n=t.data)?void 0:n.code)>=200&&(null==(o=t.data)?void 0:o.code)<300?e(t.data):401===(null==(s=t.data)?void 0:s.code)?(window.parent.postMessage({data:{type:"logout"}},"*"),a(t)):e(t.data)},fail(t){d({icon:"none",title:"网络错误,换个网络试试"}),a(t)}}))}));L.get=(t,e)=>L({url:t,query:e,method:"GET"}),L.post=(t,e,a,n=!1)=>L({url:t,query:a,data:e,method:"POST",hideErrorToast:n});const E=t=>L.get("/v1/content",t),S=D(p(r(i({},{name:"Home"}),{__name:"index",setup(t){const{safeAreaInsets:e}=f(),a=y({}),n=v(""),o=v(""),s=m();let l="activity",i=null;const r={Interface:"api_code",lottery:"lottery_code",activity:"activity_code"},u=y({url:"",title:""});function p(){return c(this,null,(function*(){const t={};t[r[l]]=o.value||"",s.reset();D(yield E(t))}))}function D(t){if(200===t.code){const{login_content_template:e,login_content_templates:o,content_templates:l,token:i}=t.data;n.value=t.data.activity_code,Object.assign(a,t.data),1===e.validate_login?Object.assign(u,{url:L(o.source),title:o.moduledesc}):2===e.validate_login&&Object.assign(u,{url:L(l.source+`?activity_code=${n.value}&token=${i}`),title:l.moduledesc}),g({title:u.title}),s.setUserInfo({srcList:u,contentData:a,query:n.value,token:i,href:window.location.href})}else d({title:t.message,icon:"none"})}function L(t){const e=(new Date).getTime();return t+(t.includes("?")?"×tamp=":"?timestamp=")+e}window.parent.addEventListener("message",(function(t){let e={url:"",title:""};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 o=`product_id=${t.data.data.product_id}&id=${t.data.data.id}&activity_code=${n.value}`,s=encodeURIComponent(o);e={url:a.user_content_templates.source+`#/pages/coupon/product?url=${s}`,title:a.user_content_templates.moduledesc}}else{if("couponBack"===t.data.data.type)return p();"logout"===t.data.data.type&&(e={url:a.login_content_templates.source,title:a.login_content_templates.moduledesc})}_((()=>{Object.assign(u,{url:L(e.url),title:u.title}),g({title:u.title}),s.setUserInfo({srcList:u,contentData:a,query:n.value,token:a.token,href:window.location.href})}))}));const S=()=>{i=setInterval((()=>c(this,null,(function*(){const t={};t[r[l]]=o.value||"";const e=yield E(t);JSON.stringify(e.data)!==JSON.stringify(s.userInfo.contentData)&&(d({title:"活动发生变更",icon:"none"}),D(e))}))),6e4)};return h((()=>{o.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("/"),a=e[e.length-1];let n="";return-1===a.indexOf("-")?(n=a,l="activity"):(l=a.split("-")[0],n=a.split("-")[1]),n}})(),s.userInfo.srcList.url&&s.userInfo.query===n.value&&s.userInfo.href!==window.location.href?(Object.assign(u,s.userInfo.srcList,{url:L(s.userInfo.srcList.url)}),Object.assign(a,s.userInfo.contentData),g({title:u.title})):p(),S()})),w((()=>{clearInterval(i),i=null})),(t,a)=>{const n=T,o=q,s=O("layout-default-uni");return b(),j(s,null,{default:I((()=>{var t;return[x(o,{class:"bg-white overflow-hidden pt-2 px-4",style:$({marginTop:(null==(t=P(e))?void 0:t.top)+"px"})},{default:I((()=>[P(u).url?(b(),j(n,{key:0,src:P(u).url},null,8,["src"])):k("",!0)])),_:1},8,["style"])]})),_:1})}}})),[["__scopeId","data-v-6f0ecb5c"]]);export{S as default};
|
||||
var t=Object.defineProperty,e=Object.defineProperties,a=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=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={}))o.call(e,a)&&l(t,a,e[a]);if(n)for(var a of n(e))s.call(e,a)&&l(t,a,e[a]);return t},r=(t,n)=>e(t,a(n)),c=(t,e,a)=>new Promise(((n,o)=>{var s=t=>{try{i(a.next(t))}catch(e){o(e)}},l=t=>{try{i(a.throw(t))}catch(e){o(e)}},i=t=>t.done?n(t.value):Promise.resolve(t.value).then(s,l);i((a=a.apply(t,e)).next())}));import{r as u,s as d,d as p,g as f,a as y,b as v,u as m,n as _,c as g,o as h,e as w,f as O,h as b,i as j,w as I,j as x,k as P,l as $,m as k,p as T,q,_ as D}from"./index-DCbokaGN.js";const L=t=>new Promise(((e,a)=>{u(r(i({},t),{dataType:"json",header:{"content-type":"application/json"},responseType:"json",success(t){var n,o,s;(null==(n=t.data)?void 0:n.code)>=200&&(null==(o=t.data)?void 0:o.code)<300?e(t.data):401===(null==(s=t.data)?void 0:s.code)?(window.parent.postMessage({data:{type:"logout"}},"*"),a(t)):e(t.data)},fail(t){d({icon:"none",title:"网络错误,换个网络试试"}),a(t)}}))}));L.get=(t,e)=>L({url:t,query:e,method:"GET"}),L.post=(t,e,a,n=!1)=>L({url:t,query:a,data:e,method:"POST",hideErrorToast:n});const E=t=>L.get("/v1/content",t),S=D(p(r(i({},{name:"Home"}),{__name:"index",setup(t){const{safeAreaInsets:e}=f(),a=y({}),n=v(""),o=v(""),s=m();let l="activity",i=null;const r={Interface:"api_code",lottery:"lottery_code",activity:"activity_code"},u=y({url:"",title:""});function p(){return c(this,null,(function*(){const t={};t[r[l]]=o.value||"",s.reset();D(yield E(t))}))}function D(t){if(200===t.code){const{login_content_template:e,login_content_templates:o,content_templates:l,token:i}=t.data;n.value=t.data.activity_code,Object.assign(a,t.data),1===e.validate_login?Object.assign(u,{url:L(o.source),title:o.moduledesc}):2===e.validate_login&&Object.assign(u,{url:L(l.source+`?activity_code=${n.value}&token=${i}`),title:l.moduledesc}),g({title:u.title}),s.setUserInfo({srcList:u,contentData:a,query:n.value,token:i,href:window.location.href})}else d({title:t.message,icon:"none"})}function L(t){const e=(new Date).getTime();return t+(t.includes("?")?"×tamp=":"?timestamp=")+e}window.parent.addEventListener("message",(function(t){let e={url:"",title:""};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 o=`product_id=${t.data.data.product_id}&id=${t.data.data.id}&activity_code=${n.value}`,s=encodeURIComponent(o);e={url:a.user_content_templates.source+`#/pages/coupon/product?url=${s}`,title:a.user_content_templates.moduledesc}}else if("couponBack"===t.data.data.type)e={url:a.content_templates.source+`?activity_code=${n.value}`,title:a.content_templates.moduledesc};else if("logout"===t.data.data.type)return p();_((()=>{Object.assign(u,{url:L(e.url),title:u.title}),g({title:u.title}),s.setUserInfo({srcList:u,contentData:a,query:n.value,token:a.token,href:window.location.href})}))}));const S=()=>{i=setInterval((()=>c(this,null,(function*(){const t={};t[r[l]]=o.value||"";const e=yield E(t);JSON.stringify(e.data)!==JSON.stringify(s.userInfo.contentData)&&(d({title:"活动发生变更",icon:"none"}),D(e))}))),6e4)};return h((()=>{o.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("/"),a=e[e.length-1];let n="";return-1===a.indexOf("-")?(n=a,l="activity"):(l=a.split("-")[0],n=a.split("-")[1]),n}})(),s.userInfo.srcList.url&&s.userInfo.query===n.value&&s.userInfo.href!==window.location.href?(Object.assign(u,s.userInfo.srcList,{url:L(s.userInfo.srcList.url)}),Object.assign(a,s.userInfo.contentData),g({title:u.title})):p(),S()})),w((()=>{clearInterval(i),i=null})),(t,a)=>{const n=T,o=q,s=O("layout-default-uni");return b(),j(s,null,{default:I((()=>{var t;return[x(o,{class:"bg-white overflow-hidden pt-2 px-4",style:k({marginTop:(null==(t=P(e))?void 0:t.top)+"px"})},{default:I((()=>[P(u).url?(b(),j(n,{key:0,src:P(u).url},null,8,["src"])):$("",!0)])),_:1},8,["style"])]})),_:1})}}})),[["__scopeId","data-v-df0666e9"]]);export{S as default};
|
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html build-date="2024-06-24 11:47:37">
|
||||
<html build-date="2024-06-24 11:57:16">
|
||||
<head>
|
||||
<link rel="stylesheet" href="./assets/uni.ad4bcb33.css">
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
<title>unibest</title>
|
||||
<!--preload-links-->
|
||||
<!--app-context-->
|
||||
<script type="module" crossorigin src="./assets/index-DTtbQBfI.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-DCbokaGN.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-DfE4H0b6.css">
|
||||
</head>
|
||||
|
||||
|
|
|
@ -96,16 +96,16 @@ window.parent.addEventListener('message', function (event) {
|
|||
title: contentData.user_content_templates.moduledesc,
|
||||
}
|
||||
} else if (event.data.data.type === 'couponBack') {
|
||||
srcData = {
|
||||
url: contentData.content_templates.source + `?activity_code=${query.value}`,
|
||||
title: contentData.content_templates.moduledesc,
|
||||
}
|
||||
} else if (event.data.data.type === 'logout') {
|
||||
return initContent()
|
||||
// srcData = {
|
||||
// url: contentData.content_templates.source + `?activity_code=${query.value}`,
|
||||
// title: contentData.content_templates.moduledesc,
|
||||
// url: contentData.login_content_templates.source,
|
||||
// title: contentData.login_content_templates.moduledesc,
|
||||
// }
|
||||
} else if (event.data.data.type === 'logout') {
|
||||
srcData = {
|
||||
url: contentData.login_content_templates.source,
|
||||
title: contentData.login_content_templates.moduledesc,
|
||||
}
|
||||
}
|
||||
nextTick(() => {
|
||||
Object.assign(srcList, {
|
||||
|
|
Loading…
Reference in New Issue