"use strict";const e=require("../vendor.js");require("./request.js"),require("../store/useWatermarkStore.js");const o=require("../store/useWeAppAuthStore.js");require("../store/useWorkStore.js");const r=o.useWeAppAuthStore(),n={onBindPhone(){var o;return console.log("auth?.userInfo:",null==r?void 0:r.data),!!(null==(o=null==r?void 0:r.data)?void 0:o.user)||(e.index.showModal({title:"登录",content:"请先登录体验更多功能！",success:function(o){o.confirm?(e.index.navigateTo({url:"/pages/login"}),console.log("用户点击确定")):o.cancel&&(e.index.exitMiniProgram(),console.log("用户点击取消"))}}),!1)},getLoginStatus(){var e;return!!(null==(e=null==r?void 0:r.data)?void 0:e.user)},toPageLogin(){var o;if(!(null==(o=null==r?void 0:r.data)?void 0:o.user))return e.index.navigateTo({url:"/pages/login"}),!0}};exports.getUser=n;
