zzzz
2024-04-14 6e6cd8e3315a3e26186d1d23f80b1465e1f03061
1
"use strict";(self["webpackChunkexchange"]=self["webpackChunkexchange"]||[]).push([[8232],{92266:function(t,e,i){i.d(e,{A:function(){return h}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"buy_nav",attrs:{id:"buy_nav"}},[i("van-nav-bar",{staticClass:"font-36 border-none",attrs:{title:t.title},on:{"click-left":t.onClickLeft},scopedSlots:t._u([{key:"left",fn:function(){return[t._t("left",(function(){return[i("van-icon",{attrs:{name:"arrow-left"}})]}))]},proxy:!0},{key:"title",fn:function(){return[t._t("title")]},proxy:!0},{key:"right",fn:function(){return[t._t("right")]},proxy:!0}],null,!0)})],1)},a=[],n=(i(63212),i(96874)),o=(i(64258),i(31864)),c={name:"OrderNav",props:{title:{},state:{},back:{default:!0}},data(){return{}},methods:{onClickLeft(){this.back?this.$router.back():this.$emit("back")}},components:{[o.A.name]:o.A,[n.A.name]:n.A}},l=c,r=i(81656),p=(0,r.A)(l,s,a,!1,null,"fb843b68",null),h=p.exports},75740:function(t,e,i){i.r(e),i.d(e,{default:function(){return g}});var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"w-full h-full",attrs:{id:"c2c_settings"}},[i("div",{staticClass:"flex flex-col w-full h-full"},[i("order-nav",{attrs:{title:t.$t("通知设置")}}),i("div",{staticClass:"flex-1 overflow-auto"},[i("settings-item",{attrs:{options:t.options.order},on:{changeSwitch:t.changeSwitch}},[[i("h2",{staticClass:"mb-10 font-24 font-400"},[t._v(t._s(t.$t("订单")))]),i("p",{staticClass:"font-20"},[t._v(t._s(t.$t("接收新订单和订单状态变化的消息,请至少开启1项通知。")))])]],2),i("settings-item",{staticClass:"mt-44",attrs:{options:t.options.appeal},on:{changeSwitch:t.changeSwitch}},[[i("h2",{staticClass:"mb-10 font-24 font-400"},[t._v(t._s(t.$t("申诉")))]),i("p",{staticClass:"font-20"},[t._v(t._s(t.$t("接收新申诉和申诉状态变化的消息,请至少开启1项通知。")))])]],2)],1)],1)])},a=[],n=i(92266),o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"mt-20"},[i("div",{staticClass:"pl-32 pr-32 mb-40 text-grey"},[t._t("default")],2),i("van-cell-group",{staticClass:"w-full pl-32 pr-32 border-b-grey border-light-grey box-border"},t._l(t.options,(function(e,s){return i("van-cell",{key:s,staticClass:"items-center mb-32",attrs:{title:e.title},scopedSlots:t._u([{key:"default",fn:function(){return[e.disabled?i("van-switch",{attrs:{disabled:""},model:{value:e.checked,callback:function(i){t.$set(e,"checked",i)},expression:"option.checked"}}):i("van-switch",{on:{change:function(i){return t.$emit("changeSwitch",e)}},model:{value:e.checked,callback:function(i){t.$set(e,"checked",i)},expression:"option.checked"}})]},proxy:!0}],null,!0)})})),1)],1)},c=[],l=(i(22367),i(85324)),r=(i(25481),i(49565)),p=(i(72161),i(9471)),h={name:"SettingsItem",props:["options"],components:{[p.A.name]:p.A,[r.A.name]:r.A,[l.A.name]:l.A}},d=h,u=i(81656),_=(0,u.A)(d,o,c,!1,null,"1e403047",null),f=_.exports,m=i(80668),b=i(94348),v={name:"c2cNoticeSettings",data(){return{options:{order:[{title:this.$t("邮件"),checked:!0,type:"mail"},{title:this.$t("短信"),checked:!1,type:"sms"}],appeal:[{title:this.$t("邮件"),checked:!1,type:"mail"},{title:this.$t("短信"),checked:!1,type:"sms"}]},ctc_user:{},order_mail_obj:{},order_sms_obj:{},order_app_obj:{},appeal_mail_obj:{},appeal_sms_obj:{},appeal_app_obj:{},safe_mail_obj:{},safe_sms_obj:{},safe_app_obj:{}}},components:{OrderNav:n.A,SettingsItem:f},mounted(){let t=this.$route.query.ctc_user;this.ctc_user=JSON.parse(t),this.init()},methods:{init(){this.options.order.forEach((t=>{"mail"==t.type?t.checked=Boolean(this.ctc_user.orderMailNoticeOpen):"sms"==t.type?t.checked=Boolean(this.ctc_user.orderSmsNoticeOpen):"app"==t.type&&(t.checked=Boolean(this.ctc_user.orderAppNoticeOpen))})),this.options.appeal.forEach((t=>{"mail"==t.type?t.checked=Boolean(this.ctc_user.appealMailNoticeOpen):"sms"==t.type?t.checked=Boolean(this.ctc_user.appealSmsNoticeOpen):"app"==t.type&&(t.checked=Boolean(this.ctc_user.appealAppNoticeOpen))}))},ctcUserSet(){m.Ay.ctcUserSet({order_mail_notice_open:Number(this.order_mail_obj.checked),order_sms_notice_open:Number(this.order_sms_obj.checked),order_app_notice_open:Number(this.order_app_obj.checked),appeal_mail_notice_open:Number(this.appeal_mail_obj.checked),appeal_sms_notice_open:Number(this.appeal_sms_obj.checked),appeal_app_notice_open:Number(this.appeal_app_obj.checked),chat_app_notice_open:Number(this.chat_app_obj.checked),security_mail_notice_open:Number(this.safe_mail_obj.checked),security_sms_notice_open:Number(this.safe_sms_obj.checked),security_app_notice_open:Number(this.safe_app_obj.checked)}).then((t=>{b.log(t)})).catch((t=>{}))},changeSwitch(){this.order_mail_obj=this.options.order.find((t=>"mail"==t.type)),this.order_sms_obj=this.options.order.find((t=>"sms"==t.type)),this.order_app_obj=this.options.order.find((t=>"app"==t.type)),this.appeal_mail_obj=this.options.appeal.find((t=>"mail"==t.type)),this.appeal_sms_obj=this.options.appeal.find((t=>"sms"==t.type)),this.appeal_app_obj=this.options.appeal.find((t=>"app"==t.type)),this.chat_app_obj=this.options.chat.find((t=>"app"==t.type)),this.safe_mail_obj=this.options.safe.find((t=>"mail"==t.type)),this.safe_sms_obj=this.options.safe.find((t=>"sms"==t.type)),this.safe_app_obj=this.options.safe.find((t=>"app"==t.type)),this.ctcUserSet()}}},k=v,y=(0,u.A)(k,s,a,!1,null,"e7eca074",null),g=y.exports},49565:function(t,e,i){var s=i(4250),a=i.n(s),n=i(47456),o=i(15827),c=i(56374),l=(0,n.Y)("cell-group"),r=l[0],p=l[1];function h(t,e,i,s){var n,l=t("div",a()([{class:[p({inset:e.inset}),(n={},n[c.pT]=e.border,n)]},(0,o.IL)(s,!0)]),[null==i.default?void 0:i.default()]);return e.title||i.title?t("div",{key:s.data.key},[t("div",{class:p("title",{inset:e.inset})},[i.title?i.title():e.title]),l]):l}h.props={title:String,inset:Boolean,border:{type:Boolean,default:!0}},e.A=r(h)},25481:function(t,e,i){i(76952)},72161:function(t,e,i){i(76952),i(98992),i(22795),i(90504)},77965:function(t,e,i){i.d(e,{Y:function(){return s}});var s={inject:{vanField:{default:null}},watch:{value:function(){var t=this.vanField;t&&(t.resetValidation(),t.validateWithTrigger("onChange"))}},created:function(){var t=this.vanField;t&&!t.children&&(t.children=this)}}},85324:function(t,e,i){i.d(e,{A:function(){return h}});var s=i(47456),a=i(83462),n={size:[Number,String],value:null,loading:Boolean,disabled:Boolean,activeColor:String,inactiveColor:String,activeValue:{type:null,default:!0},inactiveValue:{type:null,default:!1}},o=i(77965),c=i(90689),l=(0,s.Y)("switch"),r=l[0],p=l[1],h=r({mixins:[o.Y],props:n,computed:{checked:function(){return this.value===this.activeValue},style:function(){return{fontSize:(0,a._)(this.size),backgroundColor:this.checked?this.activeColor:this.inactiveColor}}},methods:{onClick:function(t){if(this.$emit("click",t),!this.disabled&&!this.loading){var e=this.checked?this.inactiveValue:this.activeValue;this.$emit("input",e),this.$emit("change",e)}},genLoading:function(){var t=this.$createElement;if(this.loading){var e=this.checked?this.activeColor:this.inactiveColor;return t(c.A,{class:p("loading"),attrs:{color:e}})}}},render:function(){var t=arguments[0],e=this.checked,i=this.loading,s=this.disabled;return t("div",{class:p({on:e,loading:i,disabled:s}),attrs:{role:"switch","aria-checked":String(e)},style:this.style,on:{click:this.onClick}},[t("div",{class:p("node")},[this.genLoading()])])}})},22367:function(t,e,i){i(76952),i(45396)}}]);