line_push/.nuxt/dist/client/3a9ae06.js
2022-07-21 03:28:35 +00:00

1 line
9.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{258:function(e,t,n){var content=n(271);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(35).default)("48bbbfbd",content,!0,{sourceMap:!1})},270:function(e,t,n){"use strict";n(258)},271:function(e,t,n){var r=n(34)(!1);r.push([e.i,"button.airplug.theme--dark.v-btn[data-v-27c3eb76]:not(.v-btn--flat):not(.v-btn--text):not(.v-btn--outlined){background-color:#44d62c!important;color:#fff!important}button.airplug.theme--dark.v-btn.v-btn--disabled[data-v-27c3eb76]:not(.v-btn--flat):not(.v-btn--text):not(.v-btn--outlined){opacity:.3}",""]),e.exports=r},304:function(e,t,n){"use strict";n.r(t);n(55);var r=n(15),o=n(8),c=n(9),l=n(26),f=n(20),d=n(6),y=n(18),h=(n(65),n(21),n(99),n(43),n(266)),v=(n(14),{});function m(e){return v[e]||(v[e]=new Promise((function(t,n){var script=document.createElement("script");script.onload=function(){return t()},script.onerror=n,script.src=e,document.head.appendChild(script)}))),v[e]}function x(e){return w.apply(this,arguments)}function w(){return(w=Object(r.a)(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m("https://static.line-scdn.net/liff/edge/2.1/sdk.js");case 2:return n=window.liff,e.next=5,new Promise((function(e,r){n.init({liffId:t},e)}));case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(d.a)(e);if(t){var o=Object(d.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(f.a)(this,n)}}var R=function(e,t,n,desc){var r,o=arguments.length,c=o<3?t:null===desc?desc=Object.getOwnPropertyDescriptor(t,n):desc;if("object"===("undefined"==typeof Reflect?"undefined":Object(y.a)(Reflect))&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,n,desc);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(c=(o<3?r(c):o>3?r(t,n,c):r(t,n))||c);return o>3&&c&&Object.defineProperty(t,n,c),c},V=function(e){Object(l.a)(y,e);var t,n,f,d=k(y);function y(){var e;return Object(o.a)(this,y),(e=d.apply(this,arguments)).isValid=!0,e.form={WalletAddress:"",VerifyRemarks:"",LINEUserID:"",LINEdisplayName:"",LINEpictureUrl:"",LINEstatusMessage:"",VerifyNUM:"",VerifySys:"",Veify_Checked:""},e}return Object(c.a)(y,[{key:"mounted",value:(f=Object(r.a)(regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,x("1657251293-7LagMEa1");case 3:if((t=this.liff=e.sent).isLoggedIn()){e.next=8;break}t.login(),e.next=22;break;case 8:return e.next=10,t.getProfile();case 10:return n=e.sent,this.form.LINEUserID=n.userId,this.form.LINEdisplayName=n.displayName,this.form.LINEpictureUrl=n.pictureUrl,this.form.LINEstatusMessage=n.statusMessage,e.next=17,this.autofill(n.userId);case 17:console.log(this.form),console.log("---------------------------------------------"),console.log(this.form.Veify_Checked),console.log("---------------------------------------------"),"OK"==this.form.Veify_Checked&&(console.log("---------------------------------------------"),alert("您已經綁定過囉如重新綁定需24小時解綁時間"),console.log("---------------------------------------------"));case 22:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"autofill",value:(n=Object(r.a)(regeneratorRuntime.mark((function e(t){var n,object,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.$axios.get("//".concat(window.location.host,"/autofill"),{params:{LINEUserID:t}});case 2:if(n=e.sent,object=n.data[0]){e.next=6;break}return e.abrupt("return");case 6:for(r in this.form)this.form[r]=object[r];case 7:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"submit",value:(t=Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.form.VerifyNUM="Contree-"+Math.floor(999*Math.random())+"-"+Math.floor(999*Math.random()),e.prev=1,e.next=4,this.$axios.$post("//".concat(window.location.host,"/submit"),this.form);case 4:if(!this.liff.isInClient()){e.next=14;break}return e.next=7,this.liff.sendMessages([{type:"flex",altText:"this is a carousel template",contents:{type:"carousel",contents:[{type:"bubble",direction:"ltr",hero:{type:"image",url:"https:/web.gsct.tw/Contree/verify/walletadd.png",size:"full",aspectRatio:"1:1",aspectMode:"cover"},body:{type:"box",layout:"vertical",contents:[{type:"text",text:"Step.1",weight:"bold",align:"center",contents:[]},{type:"text",text:"輸入錢包位置",weight:"bold",align:"center",contents:[]}]}},{type:"bubble",direction:"ltr",hero:{type:"image",url:"https:/web.gsct.tw/Contree/verify/biono.png",size:"full",aspectRatio:"1:1",aspectMode:"cover"},body:{type:"box",layout:"vertical",contents:[{type:"text",text:"Step.1",weight:"bold",align:"center",contents:[]},{type:"text",text:"獲得Bio驗證碼",weight:"bold",align:"center",contents:[]}]}},{type:"bubble",direction:"ltr",hero:{type:"image",url:"https:/web.gsct.tw/Contree/verify/opensea.png",size:"full",aspectRatio:"1:1",aspectMode:"cover"},body:{type:"box",layout:"vertical",contents:[{type:"text",text:"Step.3",weight:"bold",align:"center",contents:[]},{type:"text",text:"進入錢包位置",weight:"bold",align:"center",contents:[]}]}},{type:"bubble",direction:"ltr",hero:{type:"image",url:"https:/web.gsct.tw/Contree/verify/contect.png",size:"full",aspectRatio:"1:1",aspectMode:"cover"},body:{type:"box",layout:"vertical",contents:[{type:"text",text:"Step.4",weight:"bold",align:"center",contents:[]},{type:"text",text:"完成opensea簽署",weight:"bold",align:"center",contents:[]}]}},{type:"bubble",direction:"ltr",hero:{type:"image",url:"https:/web.gsct.tw/Contree/verify/bio.png",size:"full",aspectRatio:"1:1",aspectMode:"cover"},body:{type:"box",layout:"vertical",contents:[{type:"text",text:"Step.5",weight:"bold",align:"center",contents:[]},{type:"text",text:"在Account的Bio 填入驗證碼 ",weight:"bold",align:"center",contents:[]}]}},{type:"bubble",direction:"ltr",hero:{type:"image",url:"https:/web.gsct.tw/Contree/verify/fin.png",size:"full",aspectRatio:"1:1",aspectMode:"cover"},body:{type:"box",layout:"vertical",contents:[{type:"text",text:"Step.6",weight:"bold",align:"center",contents:[]},{type:"text",text:"綁定完成",weight:"bold",align:"center",contents:[]}]}}]}}]);case 7:return e.next=9,this.liff.sendMessages([{type:"text",text:this.form.VerifyNUM}]);case 9:return e.next=11,this.liff.sendMessages([{type:"text",text:"下面就是驗證碼喔"}]);case 11:this.liff.closeWindow(),e.next=15;break;case 14:this.liff.isLoggedIn()&&(alert("您使用的是外部瀏覽器"),window.location.assign("https://api.contree.io/posts/1"));case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(1),alert("送出失敗");case 20:case"end":return e.stop()}}),e,this,[[1,17]])}))),function(){return t.apply(this,arguments)})},{key:"requireInput",value:function(e){return!!(e=e||"").trim()||"這個欄位也要填喔"}},{key:"isEmail",value:function(e){return!!e.match(/.+@.+[.].+/g)||"email 格式不正確"}},{key:"isPhone",value:function(e){return e.replace(/[^0-9]/g,"").length>=9||"電話號碼不正確, 市話記得加區碼喔"}},{key:"isWeb3Address",value:function(e){return e.replace(/[^a-z0-9]/g,"").length>=9||"只能打英文數字喔"}}]),y}(h.Vue),M=V=R([h.Component],V),C=(n(270),n(62)),I=n(91),O=n.n(I),j=n(305),E=n(264),N=n(257),_=n(253),L=n(302),U=n(303),component=Object(C.a)(M,(function(){var e=this,t=e._self._c;e._self._setupProxy;return t("v-container",{attrs:{fluid:""}},[t("v-card",{staticClass:"elevation-0"},[t("v-card-title",[e._v("您好!")]),t("v-card-text",[t("p",[e._v("請填入您所要綁定的以太錢包地址")]),t("br"),e._v("Enter your Ethereum address below"),t("v-form",{on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}},model:{value:e.isValid,callback:function(t){e.isValid=t},expression:"isValid"}},[t("v-text-field",{attrs:{label:"錢包地址",rules:[e.requireInput]},model:{value:e.form.WalletAddress,callback:function(t){e.$set(e.form,"WalletAddress",t)},expression:"form.WalletAddress"}}),t("p",{staticClass:"grey--text"},[e._v("註1: 以太網錢包地址 Ethereum address")]),t("v-text-field",{attrs:{label:"備註"},model:{value:e.form.VerifyRemarks,callback:function(t){e.$set(e.form,"VerifyRemarks",t)},expression:"form.VerifyRemarks"}}),t("v-btn",{staticClass:"airplug",attrs:{type:"submit",dark:"",block:"",depressed:"",large:"",disabled:!e.isValid}},[e._v(e._s(e.isValid?"填好送出完成報到":"您還沒填好喔"))])],1)],1)],1)],1)}),[],!1,null,"27c3eb76",null);t.default=component.exports;O()(component,{VBtn:j.a,VCard:E.a,VCardText:N.a,VCardTitle:N.b,VContainer:_.a,VForm:L.a,VTextField:U.a})}}]);