edu/public/mobile/assets/pages-user_set-user_set.9b4...

2 lines
8.0 KiB
JavaScript
Raw Normal View History

2024-11-18 07:44:22 +00:00
import{r as e,a as t,o as a,b as s,w as l,n as o,e as u,l as r,t as i,f as n,g as c,F as p,h as d,k as m,j as f,a4 as _,p as h,d as x,u as b,Z as g,c as y,z as v,a6 as w,$ as k,I as C,a9 as V,al as S,aa as I,x as j,v as z,i as A,a7 as B}from"./index-f587024c.js";import{_ as $}from"./page-meta.b7dbb920.js";import{_ as T}from"./u-avatar.da810e6a.js";import{_ as R}from"./u-icon.03bca05a.js";import{_ as U}from"./u-button.19e05f63.js";import{_ as E}from"./u-popup.f52182ef.js";import{_ as N}from"./_plugin-vue_export-helper.1b428a4d.js";import{u as F}from"./useLockFn.54caab93.js";const Z=N({name:"u-action-sheet",emits:["update:modelValue","input","click","close"],props:{value:{type:Boolean,default:!1},modelValue:{type:Boolean,default:!1},maskCloseAble:{type:Boolean,default:!0},list:{type:Array,default:()=>[]},tips:{type:Object,default:()=>({text:"",color:"",fontSize:"26"})},cancelBtn:{type:Boolean,default:!0},safeAreaInsetBottom:{type:Boolean,default:!1},borderRadius:{type:[String,Number],default:0},zIndex:{type:[String,Number],default:0},cancelText:{type:String,default:"取消"},labelName:{type:String,default:"text"},blur:{type:[Number,String],default:0}},computed:{valueCom(){return this.modelValue},tipsStyle(){let e={};return this.tips.color&&(e.color=this.tips.color),this.tips.fontSize&&(e.fontSize=this.tips.fontSize+"rpx"),e},itemStyle(){return e=>{let t={};return this.list[e].color&&(t.color=this.list[e].color),this.list[e].fontSize&&(t.fontSize=this.list[e].fontSize+"rpx"),this.list[e].disabled&&(t.color="#c0c4cc"),t}},uZIndex(){return this.zIndex?this.zIndex:this.$u.zIndex.popup}},data:()=>({popupValue:!1}),watch:{valueCom(e,t){this.popupValue=e}},methods:{close(){this.popupClose(),this.$emit("close")},popupClose(){this.$emit("input",!1),this.$emit("update:modelValue",!1)},itemClick(e){this.list[e].disabled||(this.$emit("click",e),this.$emit("input",!1),this.$emit("update:modelValue",!1))}}},[["render",function(x,b,g,y,v,w){const k=_,C=h,V=e(t("u-popup"),E);return a(),s(V,{blur:g.blur,mode:"bottom","border-radius":g.borderRadius,popup:!1,modelValue:v.popupValue,"onUpdate:modelValue":b[2]||(b[2]=e=>v.popupValue=e),maskCloseAble:g.maskCloseAble,length:"auto",safeAreaInsetBottom:g.safeAreaInsetBottom,onClose:w.popupClose,"z-index":w.uZIndex},{default:l((()=>[g.tips.text?(a(),s(C,{key:0,class:"u-tips u-border-bottom",style:o([w.tipsStyle])},{default:l((()=>[u(k,null,{default:l((()=>[r(i(g.tips.text),1)])),_:1})])),_:1},8,["style"])):n("",!0),(a(!0),c(p,null,d(g.list,((e,t)=>(a(),s(C,{key:t,onTouchmove:b[0]||(b[0]=m((()=>{}),["stop","prevent"])),onClick:e=>w.itemClick(t),style:o([w.itemStyle(t)]),class:f(["u-action-sheet-item u-line-1",[t<g.list.length-1?"u-border-bottom":""]]),"hover-stay-time":150},{default:l((()=>[u(k,null,{default:l((()=>[r(i(e[g.labelName]),1)])),_:2},1024),e.subText?(a(),s(k,{key:0,class:"u-action-sheet-item__subtext u-line-1"},{default:l((()=>[r(i(e.subText),1)])),_:2},1024)):n("",!0)])),_:2},1032,["onClick","style","class"])))),128)),g.cancelBtn?(a(),s(C,{key:1,class:"u-gab"})):n("",!0),g.cancelBtn?(a(),s(C,{key:2,onTouchmove:b[1]||(b[1]=m((()=>{}),["stop","prevent"])),class:"u-actionsheet-cancel u-action-sheet-item","hover-class":"u-hover-class","hover-stay-time":150,onClick:w.close},{default:l((()=>[r(i(g.cancelText),1)])),_:1},8,["onClick"])):n("",!0)])),_:1},8,["blur","border-radius","modelValue","maskCloseAble","safeAreaInsetBottom","onClose","z-index"])}],["__scopeId","data-v-9d990648"]]);var L=(e=>(e.PRIVACY="privacy",e.SERVICE="service",e))(L||{});const P=N(x({__name:"user_set",setup(o){const d=z(),m=b(),f=g(),_=y((()=>f.userInfo)),x=v([{text:"修改密码"},{text:"忘记密码"}]),N=v(!0);N.value=w();const P=v(!1),Y=v(!1),q=e=>{switch(e){case 0:d.navigateTo("/pages/change_password/change_password");break;case 1:d.navigateTo("/pages/forget_pwd/forget_pwd")}},D=()=>{if(!_.value.has_password)return d.navigateTo("/pages/change_password/change_password?type=set");P.value=!0},O=()=>{f.logout(),d.redirectTo("/pages/login/login")},{lockFn:G}=F((async()=>{if(!_.value.is_auth)try{V({title:"请稍后..