bind.js 2.8 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["admin/shopAdmin/bind"],{"0ea3":function(e,n,t){"use strict";t.r(n);var o=t("7024"),i=t.n(o);for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(r);n["default"]=i.a},"37ed":function(e,n,t){"use strict";t.r(n);var o=t("f784"),i=t("0ea3");for(var r in i)["default"].indexOf(r)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(r);var a,c=t("8261"),d=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"70d4fcc4",null,!1,o["a"],a);n["default"]=d.exports},7024:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;t("7736");var o=t("06c0"),i=t("6436"),r=function(){t.e("components/plugin/list-cell").then(function(){return resolve(t("1861"))}.bind(null,t)).catch(t.oe)},a=t("90f4"),c={name:"bind",components:{TuiListCell:r},data:function(){return{form:{mobile:"",recommendAdminId:"",shopId:"",adminId:"",name:""},levelSelData:{},showBindArea:!0,showSuccessArea:!1}},computed:{},onLoad:function(e){console.log(e);for(var n,t,o,i=decodeURIComponent(e.scene),r=i.split("&"),a=new Array,c=0,d=r.length;c<d;c++)n=r[c].split("="),t=n[0],o=n[1],a[t]=o;this.form.recommendAdminId=a.adminId,this.form.shopId=a.shopId},methods:{confirmFn:function(){var n=this;(0,o.generateAdmin)(this.form).then((function(t){n.showBindArea=!1,n.showSuccessArea=!0,e.clearStorageSync()}))},formSubmit:function(e){var n=[{name:"mobile",rule:["required"],msg:["请填写手机号"]},{name:"shopId",rule:["required"],msg:["系统错误(shopId)"]},{name:"recommendAdminId",rule:["required"],msg:["系统错误(recommendAdminId)"]},{name:"adminId",rule:["required"],msg:["请填写昵称"]}],t=this.form,o=a.validation(t,n);o?this.$msg(o):this.confirmFn()},getWxMobile:function(n){var t=this;"getPhoneNumber:ok"===n.detail.errMsg?(0,i.getWxPhone)({iv:n.detail.iv,encryptedData:n.detail.encryptedData}).then((function(n){t.form.mobile=n.data.mobile,e.showToast({icon:"success"})})):this.$msg("获取信息失败!")},getWxAvatar:function(){var n=this;e.getUserProfile({desc:"登录",success:function(t){(0,i.getWxInfo)({iv:t.iv,encryptedData:t.encryptedData}).then((function(t){n.form.adminId=t.data.id,n.form.name=t.data.name,e.showToast({icon:"success"})}))},fail:function(e){}})},redirectToCenter:function(){this.$store.commit("setLoginInfo",{}),this.pageTo({url:"/admin/home/workbench",type:3})}}};n.default=c}).call(this,t("934e")["default"])},"77e1":function(e,n,t){"use strict";(function(e){t("6cdc");o(t("b5e3"));var n=o(t("37ed"));function o(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,t("934e")["createPage"])},f784:function(e,n,t){"use strict";var o;t.d(n,"b",(function(){return i})),t.d(n,"c",(function(){return r})),t.d(n,"a",(function(){return o}));var i=function(){var e=this,n=e.$createElement;e._self._c},r=[]}},[["77e1","common/runtime","common/vendor"]]]);