"use strict";const e=require("../../../common/vendor.js"),o=require("../../index.js"),n=require("../../hooks/useModal.js");require("../../url/index.js");require("../../store/index.js");require("../../store/app.js");require("../../platform/index.js");require("../../platform/provider/wechat/index.js");require("../../platform/provider/wechat/miniProgram.js");require("../../api/member/auth.js");require("../../request/index.js");require("../../config/index.js");require("../../helper/index.js");require("../../helper/test.js");require("../../helper/digit.js");require("../../api/member/social.js");require("../../api/member/user.js");require("../../platform/provider/apple/index.js");require("../../platform/share.js");require("../../router/index.js");require("../../helper/throttle.js");require("../../platform/pay.js");require("../../api/pay/order.js");require("../../store/user.js");require("../../store/cart.js");require("../../api/trade/cart.js");require("../../api/pay/wallet.js");require("../../api/trade/order.js");require("../../store/sys.js");require("../../store/modal.js");require("../../config/zIndex.js");Array||e.resolveComponent("su-popup")();const d=()=>"../../ui/su-popup/su-popup.js";Math||(v+q+_+$+w+A+d)();const v=()=>"./components/account-login.js",q=()=>"./components/sms-login.js",_=()=>"./components/reset-password.js",$=()=>"./components/change-mobile.js",w=()=>"./components/change-password.js",A=()=>"./components/mp-authorization.js",L={__name:"s-auth-modal",setup(h){e.computed(()=>o.sheep.$store("app").info);const f=o.sheep.$store("modal"),r=e.computed(()=>f.auth),t=e.reactive({protocol:!1}),a=e.ref(!1);function i(){t.protocol=!t.protocol}function p(s){n.closeAuthModal(),o.sheep.$router.go("/pages/public/richtext",{title:s})}function c(s){a.value=s,setTimeout(()=>{a.value=!1},1e3)}const l=async s=>{if(!t.protocol){a.value=!0,setTimeout(()=>{a.value=!1},1e3),o.sheep.$helper.toast("请勾选同意");return}await o.sheep.$platform.useProvider(s).login()&&(n.closeAuthModal(),n.showAuthModal("mpAuthorization"))},g=async s=>{if(s.detail.errMsg!=="getPhoneNumber:ok"){o.sheep.$helper.toast("快捷登录失败");return}await o.sheep.$platform.useProvider().mobileLogin(s.detail)&&n.closeAuthModal()};return(s,m)=>e.e({a:r.value==="accountLogin"},r.value==="accountLogin"?{b:e.o(c),c:e.p({agreeStatus:t.protocol})}:{},{d:r.value==="smsLogin"},r.value==="smsLogin"?{e:e.o(c),f:e.p({agreeStatus:t.protocol})}:{},{g:r.value==="resetPassword"},r.value==="resetPassword"?{}:{},{h:r.value==="changeMobile"},r.value==="changeMobile"?{}:{},{i:r.value==="changePassword"},r.value==="changePassword"?{}:{},{j:r.value==="mpAuthorization"},r.value==="mpAuthorization"?{}:{},{k:["accountLogin","smsLogin"].includes(r.value)},["accountLogin","smsLogin"].includes(r.value)?e.e({l:e.unref(o.sheep).$platform.name==="WechatMiniProgram"},e.unref(o.sheep).$platform.name==="WechatMiniProgram"?{m:e.o(g)}:{},{n:["WechatOfficialAccount","WechatMiniProgram","App"].includes(e.unref(o.sheep).$platform.name)&&e.unref(o.sheep).$platform.isWechatInstalled},["WechatOfficialAccount","WechatMiniProgram","App"].includes(e.unref(o.sheep).$platform.name)&&e.unref(o.sheep).$platform.isWechatInstalled?{o:e.unref(o.sheep).$url.static("/static/img/shop/platform/wechat.png"),p:e.o(u=>l("wechat"))}:{},{q:e.unref(o.sheep).$platform.os==="ios"&&e.unref(o.sheep).$platform.name==="App"},e.unref(o.sheep).$platform.os==="ios"&&e.unref(o.sheep).$platform.name==="App"?{r:e.unref(o.sheep).$url.static("/static/img/shop/platform/apple.png"),s:e.o(u=>l("apple"))}:{}):{},{t:["accountLogin","smsLogin"].includes(r.value)},["accountLogin","smsLogin"].includes(r.value)?{v:t.protocol,w:e.o(i),x:e.o(u=>p("用户协议")),y:e.o(u=>p("隐私协议")),z:e.o(i),A:a.value?1:""}:{},{B:e.o(e.unref(n.closeAuthModal)),C:e.p({show:r.value!=="",round:"10",showClose:!0})})}},P=e._export_sfc(L,[["__scopeId","data-v-21181321"],["__file","D:/xiangmu/佰安出行/app/s-applet/sheep/components/s-auth-modal/s-auth-modal.vue"]]);wx.createComponent(P);