pages-index-index.3a655703.js 2.2 KB

1
  1. import{S as t,s as e,o as a,c as o,w as i,n as s,i as r,a as n,r as p}from"./index-3b24b149.js";import{P as h,d as l}from"./index.825d2484.js";import{_ as d}from"./_plugin-vue_export-helper.1b428a4d.js";import"./u-icon.72a24694.js";import"./uni-app.es.9206f90a.js";import"./index.13c90436.js";import"./mp-html.3776ff53.js";import"./myCoupon.9926c568.js";const c=d({components:{Page:h,PrivacyPopup:d({props:{hideTabBar:{type:Boolean,default:!1}},data:()=>({showPrivacy:!1,storeInfo:void 0}),created(){this.getStoreInfo()},methods:{getStoreInfo(){t.storeInfo().then((t=>this.storeInfo=t))},needAuthorization(){const t=this;uni.getPrivacySetting({success({needAuthorization:e,privacyContractName:a}){console.info("getPrivacySetting",{needAuthorization:e,privacyContractName:a}),e&&(t.showPrivacy=!0,t.hideTabBar&&uni.hideTabBar())}})},handlePrivacyContract(){uni.openPrivacyContract()},handleAgreePrivacyAuthorization(){this.hideTabBar&&uni.showTabBar(),this.showPrivacy=!1},handleDisagree(){this.$toast("很抱歉,请先同意后可继续使用~",2e3)}}},[["render",function(t,e,a,o,i,s){return null}],["__scopeId","data-v-ea097e2a"]])},data:()=>({options:{},page:{},items:[]}),onLoad(t){this.options=t,this.getPageData()},onShow(){e()},methods:{getPageData(t){const e=this,a=e.options.pageId||0;l(a).then((t=>{const{data:{pageData:a}}=t;e.page=a.page,e.items=a.items,e.setPageBar()})).finally((()=>t&&t()))},setPageBar(){const{page:t}=this;uni.setNavigationBarTitle({title:t.params.title}),uni.setNavigationBarColor({frontColor:"white"===t.style.titleTextColor?"#ffffff":"#000000",backgroundColor:t.style.titleBackgroundColor})}},onPullDownRefresh(){this.getPageData((()=>{uni.stopPullDownRefresh()}))},onShareAppMessage(){const{page:t}=this;return{title:t.params.shareTitle,path:"/pages/index/index?"+this.$getShareUrlParams()}},onShareTimeline(){const{page:t}=this;return{title:t.params.shareTitle,path:"/pages/index/index?"+this.$getShareUrlParams()}}},[["render",function(t,e,h,l,d,c){const g=p("Page"),u=r;return a(),o(u,{class:"container",style:s(t.appThemeStyle)},{default:i((()=>[n(g,{items:d.items},null,8,["items"])])),_:1},8,["style"])}],["__scopeId","data-v-83b64b2d"]]);export{c as default};