平板端快衣店
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.
 
 
 
 
 

2 lines
7.4 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/checkShop"],{290:function(e,t,n){"use strict";(function(e,t){var o=n(4);n(26);o(n(25));var i=o(n(291));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n(1)["default"],n(2)["createPage"])},291:function(e,t,n){"use strict";n.r(t);var o=n(292),i=n(294);for(var u in i)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(u);n(296),n(298);var r,s=n(38),a=Object(s["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,"243faf38",null,!1,o["components"],r);a.options.__file="pages/index/checkShop.vue",t["default"]=a.exports},292:function(e,t,n){"use strict";n.r(t);var o=n(293);n.d(t,"render",(function(){return o["render"]})),n.d(t,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(t,"components",(function(){return o["components"]}))},293:function(e,t,n){"use strict";var o;n.r(t),n.d(t,"render",(function(){return i})),n.d(t,"staticRenderFns",(function(){return r})),n.d(t,"recyclableRender",(function(){return u})),n.d(t,"components",(function(){return o}));try{o={uAlert:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-alert/u-alert")]).then(n.bind(null,1224))},uSwipeAction:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-swipe-action/u-swipe-action")]).then(n.bind(null,1232))},uSwipeActionItem:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-swipe-action-item/u-swipe-action-item")]).then(n.bind(null,1238))},uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,1142))},uButton:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-button/u-button")]).then(n.bind(null,1113))},uPopup:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-popup/u-popup")]).then(n.bind(null,1040))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-input/u-input")]).then(n.bind(null,1250))}}}catch(s){if(-1===s.message.indexOf("Cannot find module")||-1===s.message.indexOf(".vue"))throw s;console.error(s.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var e=this,t=e.$createElement;e._self._c},u=!1,r=[];i._withStripped=!0},294:function(e,t,n){"use strict";n.r(t);var o=n(295),i=n.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(u);t["default"]=i.a},295:function(e,t,n){"use strict";(function(e){var o=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n(11)),u=n(32);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var a={name:"checkShop",computed:(0,u.mapState)(["userId","shopIndex"]),data:function(){return{choose:"1",options1:[{text:"编辑",style:{backgroundColor:"#3c9cff"}}],popupShow:!1,shopName:"",shopNameOld:"",shopList:[],shopId:null,current:"",shopOwnerPhone:"",name:"",type:""}},onLoad:function(e){this.type=e.type,this.getList()},methods:s(s({},(0,u.mapMutations)(["setShopIndex"])),{},{submit:function(){var t=this;"wuliu"==this.type?this.getWuliuList():this.tui.request("/auth/chooseShop","POST",{shopId:this.current},!1,!0).then((function(n){200==n.code?(e.setStorageSync("shopName",t.name),e.setStorageSync("shopAddress",n.result.shopAddress),e.setStorageSync("shopIcon",n.result.shopIcon),e.setStorageSync("type",n.result.userType),e.setStorageSync("shopId",t.current),e.setStorageSync("shopOwnerPhone",t.shopOwnerPhone),t.tui.toast("切换店铺成功",2e3,!0),e.removeStorageSync("endTime"),setTimeout((function(){e.reLaunch({url:"/pages/index/index"})}),200)):t.tui.toast(n.message)})).catch((function(e){}))},getWuliuList:function(){var t=this,n=this;e.request({url:this.tui.interfaceUrl()+"/app/logitics/chooseCompany",data:{companyId:this.current},header:{"content-type":"application/x-www-form-urlencoded",appWLToken:this.tui.getToken()},method:"POST",dataType:"json",success:function(t){e.setStorageSync("hiver_token",t.data.result.lcomToken),e.setStorageSync("transCompany",t.data.result.logiticsCompany.id),e.setStorageSync("isOnLine",t.data.result.logiticsCompany.isOnLine),e.setStorageSync("companyMobile",t.data.result.logiticsCompany.mobile),e.setStorageSync("companyName",t.data.result.logiticsCompany.companyName),e.setStorageSync("signCompany",t.data.result.logiticsCompany.signCompany),e.setStorageSync("wayValue",n.wayValue),n.tui.toast("登录成功",2e3,!0),setTimeout((function(){e.reLaunch({url:"/package2/other/newLogisticsIndex"})}),200)},fail:function(e){t.tui.toast("网络不给力,请稍后再试~")}})},getList:function(){var t=this;"wuliu"==this.type?e.request({url:this.tui.interfaceUrl()+"/app/logitics/findByMobile",data:{mobile:e.getStorageSync("companyMobile")},header:{"content-type":"application/x-www-form-urlencoded",appWLToken:this.tui.getToken()},method:"POST",dataType:"json",success:function(n){t.shopList=n.data.result;for(var o=0;o<n.data.result.length;o++)n.data.result[o].companyName==e.getStorageSync("companyName")&&(t.current=n.data.result[o].id)},fail:function(e){t.tui.toast("网络不给力,请稍后再试~")}}):this.tui.request("/auth/getShopByUser","post",{},!1,!0).then((function(n){if(200==n.code){for(var o=0;o<n.result.length;o++)n.result[o].shopName==e.getStorageSync("shopName")&&(t.current=n.result[o].shopId);t.shopList=n.result}else t.tui.toast(n.message)}))},onPopupClose:function(){this.popupShow=!1,this.shopName="",this.shopId="",this.shopNameOld=""},onActionItemSwipe:function(e){this.popupShow=!0,this.shopNameOld=e.shopName,this.shopId=e.shopId},onActionItemClick:function(e){"wuliu"==this.type?(this.current=e.id,this.name=e.companyName):(this.current=e.shopId,this.name=e.shopName,this.shopOwnerPhone=e.shopOwnerPhone)},onEditSave:function(){var e=this;if(!this.shopName)return this.tui.toast("请输入新店铺名称",2e3);this.tui.request("/app/shop/modifyShopNameById","put",{id:this.shopId,shopName:this.shopName},!1,!0).then((function(t){200===t.code?(e.getList(),e.onPopupClose()):e.tui.toast(t.message)}))}})};t.default=a}).call(this,n(2)["default"])},296:function(e,t,n){"use strict";n.r(t);var o=n(297),i=n.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(u);t["default"]=i.a},297:function(e,t,n){},298:function(e,t,n){"use strict";n.r(t);var o=n(299),i=n.n(o);for(var u in o)["default"].indexOf(u)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(u);t["default"]=i.a},299:function(e,t,n){}},[[290,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/checkShop.js.map