pages-index-index.028f6be1.js
9.3 KB
import{d as e,m as t,a as o,r as a,b as n,o as s,c as i,w as l,e as r,F as p,f as u,n as c,g as d,t as f,h as g,i as m,j as h,k as b,l as y,p as A,q as x,s as S,u as _,v,x as C,y as H,z as T,A as w}from"./index-7c219b35.js";import{_ as I}from"./u--text.cf08f135.js";import{_ as B,a as z}from"./u-loading-icon.700abbc1.js";import{_ as k}from"./u-icon.fbb15087.js";import{_ as M}from"./_plugin-vue_export-helper.1b428a4d.js";const N=M({name:"u-button",mixins:[t,o,{props:{hairline:{type:Boolean,default:e.button.hairline},type:{type:String,default:e.button.type},size:{type:String,default:e.button.size},shape:{type:String,default:e.button.shape},plain:{type:Boolean,default:e.button.plain},disabled:{type:Boolean,default:e.button.disabled},loading:{type:Boolean,default:e.button.loading},loadingText:{type:[String,Number],default:e.button.loadingText},loadingMode:{type:String,default:e.button.loadingMode},loadingSize:{type:[String,Number],default:e.button.loadingSize},openType:{type:String,default:e.button.openType},formType:{type:String,default:e.button.formType},appParameter:{type:String,default:e.button.appParameter},hoverStopPropagation:{type:Boolean,default:e.button.hoverStopPropagation},lang:{type:String,default:e.button.lang},sessionFrom:{type:String,default:e.button.sessionFrom},sendMessageTitle:{type:String,default:e.button.sendMessageTitle},sendMessagePath:{type:String,default:e.button.sendMessagePath},sendMessageImg:{type:String,default:e.button.sendMessageImg},showMessageCard:{type:Boolean,default:e.button.showMessageCard},dataName:{type:String,default:e.button.dataName},throttleTime:{type:[String,Number],default:e.button.throttleTime},hoverStartTime:{type:[String,Number],default:e.button.hoverStartTime},hoverStayTime:{type:[String,Number],default:e.button.hoverStayTime},text:{type:[String,Number],default:e.button.text},icon:{type:String,default:e.button.icon},iconColor:{type:String,default:e.button.icon},color:{type:String,default:e.button.color}}}],data:()=>({}),computed:{bemClass(){return this.color?this.bem("button",["shape","size"],["disabled","plain","hairline"]):this.bem("button",["type","shape","size"],["disabled","plain","hairline"])},loadingColor(){return this.plain?this.color?this.color:uni.$u.config.color[`u-${this.type}`]:"info"===this.type?"#c9c9c9":"rgb(200, 200, 200)"},iconColorCom(){return this.iconColor?this.iconColor:this.plain?this.color?this.color:this.type:"info"===this.type?"#000000":"#ffffff"},baseColor(){let e={};return this.color&&(e.color=this.plain?this.color:"white",this.plain||(e["background-color"]=this.color),-1!==this.color.indexOf("gradient")?(e.borderTopWidth=0,e.borderRightWidth=0,e.borderBottomWidth=0,e.borderLeftWidth=0,this.plain||(e.backgroundImage=this.color)):(e.borderColor=this.color,e.borderWidth="1px",e.borderStyle="solid")),e},nvueTextStyle(){let e={};return"info"===this.type&&(e.color="#323233"),this.color&&(e.color=this.plain?this.color:"white"),e.fontSize=this.textSize+"px",e},textSize(){let e=14,{size:t}=this;return"large"===t&&(e=16),"normal"===t&&(e=14),"small"===t&&(e=12),"mini"===t&&(e=10),e}},emits:["click","getphonenumber","getuserinfo","error","opensetting","launchapp"],methods:{clickHandler(){this.disabled||this.loading||uni.$u.throttle((()=>{this.$emit("click")}),this.throttleTime)},getphonenumber(e){this.$emit("getphonenumber",e)},getuserinfo(e){this.$emit("getuserinfo",e)},error(e){this.$emit("error",e)},opensetting(e){this.$emit("opensetting",e)},launchapp(e){this.$emit("launchapp",e)}}},[["render",function(e,t,o,A,x,S){const _=a(n("u-loading-icon"),B),v=b,C=a(n("u-icon"),k),H=y;return s(),i(H,{"hover-start-time":Number(e.hoverStartTime),"hover-stay-time":Number(e.hoverStayTime),"form-type":e.formType,"open-type":e.openType,"app-parameter":e.appParameter,"hover-stop-propagation":e.hoverStopPropagation,"send-message-title":e.sendMessageTitle,"send-message-path":e.sendMessagePath,lang:e.lang,"data-name":e.dataName,"session-from":e.sessionFrom,"send-message-img":e.sendMessageImg,"show-message-card":e.showMessageCard,onGetphonenumber:S.getphonenumber,onGetuserinfo:S.getuserinfo,onError:S.error,onOpensetting:S.opensetting,onLaunchapp:S.launchapp,"hover-class":e.disabled||e.loading?"":"u-button--active",class:h(["u-button u-reset-button",S.bemClass]),style:c([S.baseColor,e.$u.addStyle(e.customStyle)]),onClick:S.clickHandler},{default:l((()=>[e.loading?(s(),r(p,{key:0},[u(_,{mode:e.loadingMode,size:1.15*e.loadingSize,color:S.loadingColor},null,8,["mode","size","color"]),u(v,{class:"u-button__loading-text",style:c([{fontSize:S.textSize+"px"}])},{default:l((()=>[d(f(e.loadingText||e.text),1)])),_:1},8,["style"])],64)):(s(),r(p,{key:1},[e.icon?(s(),i(C,{key:0,name:e.icon,color:S.iconColorCom,size:1.35*S.textSize,customStyle:{marginRight:"2px"}},null,8,["name","color","size"])):g("",!0),m(e.$slots,"default",{},(()=>[u(v,{class:"u-button__text",style:c([{fontSize:S.textSize+"px"}])},{default:l((()=>[d(f(e.text),1)])),_:1},8,["style"])]),!0)],64))])),_:3},8,["hover-start-time","hover-stay-time","form-type","open-type","app-parameter","hover-stop-propagation","send-message-title","send-message-path","lang","data-name","session-from","send-message-img","show-message-card","onGetphonenumber","onGetuserinfo","onError","onOpensetting","onLaunchapp","hover-class","style","onClick","class"])}],["__scopeId","data-v-3274ac45"]]),j=M({__name:"index",setup(e){let t=new Array(6).fill(0),o=A(!1);A("041wP3ml2gJ3nb4AOFll2RgBwc0wP3mz");let c=A("wx1c3cc5b4e2006be2"),f=A("https://coupon.xp.yn.cn/h5"),m=()=>{o.value=!0,t=t.concat(new Array(6).fill(0))},b=()=>{S.$router.go("/pages/activity/activity")};const y=e=>decodeURIComponent((new RegExp("[?|&]"+e+"=([^&;]+?)(&|#|;|$)").exec(location.href)||[,""])[1].replace(/\+/g,"%20"))||null,B=()=>{let e=y("code");console.log(e,"code"),null===e||""===e?window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+c.value+"&redirect_uri="+encodeURIComponent(f.value)+"&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect":e=e.value};return x((()=>{"micromessenger"==navigator.userAgent.toLowerCase().match(/MicroMessenger/i)?((()=>{let e=y("code");e?(console.log("有code,这里获取用户信息"),S.$api.user.getUserInfo({code:e}).then((e=>{console.log(e.data),_("useInfo",e.data)}))):(console.log("没有code"),B())})(),console.log("是微信浏览器")):(window.location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx0fbe9ddb5750461b",console.log("不是微信浏览器"))})),(e,c)=>{const f=v,y=a(n("u--text"),I),A=a(n("u-input"),z),x=a(n("u-button"),N),S=w;return s(),i(f,{class:"indexContent"},{default:l((()=>[u(f,{class:"headImg"}),u(f,{class:"indexMain p"},{default:l((()=>[u(f,{class:"payBox p"},{default:l((()=>[u(f,{class:"fromTitle"},{default:l((()=>[d("特价商品·不设退款")])),_:1}),u(f,{class:"fromContent"},{default:l((()=>[u(A,{placeholder:"",class:"inp"},{prefix:l((()=>[u(y,{text:"活动门店",margin:"0 60rpx 0 0",type:"tips"})])),_:1}),u(A,{placeholder:"",suffixIcon:"map-fill",suffixIconStyle:"color: #909399",class:"inp"},{prefix:l((()=>[u(y,{text:"门店地址",margin:"0 60rpx 0 0",type:"tips"})])),_:1}),u(A,{placeholder:"",suffixIcon:"phone-fill",suffixIconStyle:"color: #909399",class:"inp"},{prefix:l((()=>[u(y,{text:"门店电话",margin:"0 60rpx 0 0",type:"tips"})])),_:1}),u(A,{placeholder:"请输入",class:"inp"},{prefix:l((()=>[u(y,{text:"姓名",margin:"0 120rpx 0 0",type:"tips"})])),_:1}),u(A,{placeholder:"请输入",class:"inp"},{prefix:l((()=>[u(y,{text:"手机号",margin:"0 95rpx 0 0",type:"tips"})])),_:1})])),_:1}),u(f,{class:"totalPrice"},{default:l((()=>[d(" 合计:"),C("span",null,"99.9"),d("元")])),_:1}),u(x,{type:"primary",text:"立即支付"})])),_:1}),u(f,{class:"joinList p"},{default:l((()=>[u(f,{class:"listTitle"},{default:l((()=>[d(" 已有"),C("span",null,"125"),d("人参与")])),_:1}),u(f,{class:"listBody"},{default:l((()=>[u(f,{class:"listItem x-f"},{default:l((()=>[u(f,{class:"itemInfo"},{default:l((()=>[d("序号")])),_:1}),u(f,{class:"itemInfo"},{default:l((()=>[d("姓名")])),_:1}),u(f,{class:"itemInfo"},{default:l((()=>[d("购买日期")])),_:1})])),_:1}),(s(!0),r(p,null,H(T(t),((e,t)=>(s(),i(f,{class:h(["listItem x-f count",t%2==0&&"listBg"]),key:e},{default:l((()=>[u(f,{class:"itemInfo"},{default:l((()=>[d("1")])),_:1}),u(f,{class:"itemInfo"},{default:l((()=>[d("姓名")])),_:1}),u(f,{class:"itemInfo"},{default:l((()=>[d("05-14 15:30")])),_:1})])),_:2},1032,["class"])))),128))])),_:1}),T(o)?g("",!0):(s(),i(f,{key:0,class:"loadMore x-c",onClick:T(m)},{default:l((()=>[u(f,{class:"loadName"},{default:l((()=>[d("加载更多")])),_:1}),u(S,{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAGZQTFRFAAAAAAD/AG3/AGD/EoD/GHn/FXX/H3b/Hnn/HHf/HHT/G3f/HXj/H3T/HHf/H3j/Hnf/Hnj/HXf/HXf/H3f/Hnj/Hnf/Hnf/HXf/H3f/Hnj/H3j/Hnj/Hnf/H3f/Hnf/H3f/H3j/nZhBVAAAACF0Uk5TAAIHCA4VGCkqLS4vNTlJZGVmaWtrf4GYnJy5v8Le3+Xpt+YO/gAAAGdJREFUGBkFwYcBgkAQALBgQ5Cu8Eq//Zc0AQAAKN/jUACQL3ua0rbmZvA8+wxZe9YBbi9AcwQA4BcAgCqgA+AaEBcAOogKABBfAEAcDeABRH22GbL+vINZvm5pSvuSA1AM46cEAAD+4S8FatRPQQEAAAAASUVORK5CYII="})])),_:1},8,["onClick"]))])),_:1})])),_:1}),u(f,{class:"btnBox",onClick:T(b)},{default:l((()=>[u(f,{class:"actBtn"},{default:l((()=>[d(" 举办活动 ")])),_:1})])),_:1},8,["onClick"]),u(f,{class:"inviteBox x-c"},{default:l((()=>[u(f,{class:"intieText"},{default:l((()=>[d(" 邀请有礼 ")])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-26e912d2"]]);export{j as default};