"use strict";const e=require("../../common/vendor.js"),o=require("../../request/api.js"),i=require("../../common/assets.js"),n={data:()=>({contentTop:"",isAgree:!1}),onLoad(){this.contentTop=e.inject("navHeight")+230/750*e.inject("windowWidth")},methods:{clickOneClickLogin(){this.isAgree?e.index.login({provider:"weixin",success(i){console.log(i.code);let n={code:i.code,isJson:1};o.loginByWx(n).then((o=>{200==o.code?(e.index.showToast({title:o.message}),e.index.setStorageSync("token",o.data.token),setTimeout((function(){e.index.switchTab({url:"/pages/index/index"})}),1e3)):e.index.showToast({title:o.message,icon:"none"})})).catch((e=>{}))},fail(){}}):e.index.showToast({title:"请阅读并同意我们的《用户服务协议》和《隐私政策》",icon:"none"})},clickCodeLogin(){e.index.navigateTo({url:"/pages/login/codeLogin/codeLogin"})},clickAgree(){this.isAgree=!this.isAgree},clickProtocol(o){e.index.navigateTo({url:"/pages/mine/web/web?type="+o})}}};if(!Array){e.resolveComponent("navBar")()}Math;const t=e._export_sfc(n,[["render",function(o,n,t,c,s,r){return e.e({a:e.p({leftText:"登录",hideNavBg:!0,backBlack:!0}),b:e.s("margin-top:"+s.contentTop+"px;"),c:i._imports_0$1,d:e.o((e=>r.clickOneClickLogin())),e:e.o((e=>r.clickCodeLogin())),f:s.isAgree},s.isAgree?{g:i._imports_3$5}:{h:i._imports_4$3},{i:e.o((e=>r.clickAgree())),j:e.o((e=>r.clickProtocol(2))),k:e.o((e=>r.clickProtocol(3)))})}]]);wx.createPage(t);
