You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
4.4 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/sqruzhu"],{1493:function(e,t,n){"use strict";n.r(t);var i=n("1861"),o=n.n(i);for(var r in i)"default"!==r&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=o.a},1861:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("a34a"));function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t,n,i,o,r,u){try{var c=e[r](u),a=c.value}catch(s){return void n(s)}c.done?t(a):Promise.resolve(a).then(i,o)}function u(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var u=e.apply(t,n);function c(e){r(u,i,o,c,a,"next",e)}function a(e){r(u,i,o,c,a,"throw",e)}c(void 0)}))}}var c=function(){Promise.all([n.e("common/vendor"),n.e("components/mpvue-citypicker/mpvueCityPicker")]).then(function(){return resolve(n("ae08"))}.bind(null,n)).catch(n.oe)},a=function(){n.e("components/xfl-select/xfl-select").then(function(){return resolve(n("4a0c"))}.bind(null,n)).catch(n.oe)},s={components:{mpvueCityPicker:c,xflSelect:a},data:function(){return{editType:"edit",id:"",name:"",tel:"",detailed:"",isDefault:!1,cityPickerValue:[0,0,1],themeColor:"#007AFF",region:{label:"请点击选择地址",value:[],cityCode:""},list:["龙湖区","花园小区","黑谷街道"],listBoxStyle:"border: none;",xqtext:"",issq:0,statedesc:"正在审核中"}},methods:{getarealist:function(){var e=this;return u(i.default.mark((function t(){var n;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$api.getarealist({action:"getarealist"});case 2:n=t.sent,e.list=n.data;case 4:case"end":return t.stop()}}),t)})))()},onCancel:function(e){console.log(e)},chooseCity:function(){this.$refs.mpvueCityPicker.show()},onConfirm:function(e){this.region=e,this.cityPickerValue=e.value},isDefaultChange:function(e){this.isDefault=e.detail.value},sqruzhu:function(){var t=this;return u(i.default.mark((function n(){var o,r;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=e.getStorageSync("userinfo"),n.next=3,t.$api.sqruzhu({action:"sqruzhu",uid:o.uid,name:t.name,phone:t.tel,address:t.region.label,beiz:t.detailed,xiaoqu:t.xqtext});case 3:r=n.sent,1==r.code?(e.showToast({title:r.msg,icon:"none"}),setTimeout((function(){e.hideLoading(),e.navigateBack({delta:1})}),1e3)):(e.hideLoading(),e.showToast({title:r.msg,icon:"none"}));case 5:case"end":return n.stop()}}),n)})))()},checkruzhu:function(){var t=this;return u(i.default.mark((function n(){var o,r;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=e.getStorageSync("userinfo"),n.next=3,t.$api.checkruzhu({action:"checkruzhu",uid:o.uid});case 3:r=n.sent,1==r.code&&(t.statedesc=r.data.desc,t.issq=1);case 5:case"end":return n.stop()}}),n)})))()},change:function(e){var t=e.newVal,n=e.oldVal,i=e.index,o=e.orignItem;console.log(t,n,i,o),this.xqtext=t},save:function(){if(this.name)if(this.tel)if(""!=this.region.value){if(""==this.xqtext)return e.showToast({title:"请填所属小区",icon:"none"}),!1;e.showLoading({title:"正在提交"}),this.sqruzhu()}else e.showToast({title:"请选择地址",icon:"none"});else e.showToast({title:"请输入手机号",icon:"none"});else e.showToast({title:"请输入姓名",icon:"none"})}},onLoad:function(e){this.getarealist(),this.checkruzhu()},onBackPress:function(){if(this.$refs.mpvueCityPicker.showPicker)return this.$refs.mpvueCityPicker.pickerCancel(),!0},onUnload:function(){this.$refs.mpvueCityPicker.showPicker&&this.$refs.mpvueCityPicker.pickerCancel()}};t.default=s}).call(this,n("543d")["default"])},5917:function(e,t,n){"use strict";var i=n("f521"),o=n.n(i);o.a},"9f60":function(e,t,n){"use strict";var i;n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i}));var o=function(){var e=this,t=e.$createElement;e._self._c},r=[]},bbb8:function(e,t,n){"use strict";(function(e){n("8d0c");i(n("66fd"));var t=i(n("cb66"));function i(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n("543d")["createPage"])},cb66:function(e,t,n){"use strict";n.r(t);var i=n("9f60"),o=n("1493");for(var r in o)"default"!==r&&function(e){n.d(t,e,(function(){return o[e]}))}(r);n("5917");var u,c=n("f0c5"),a=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],u);t["default"]=a.exports},f521:function(e,t,n){}},[["bbb8","common/runtime","common/vendor"]]]);