王总上门按摩后台代码
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.
 
 
 
 
 
shangmenanmo/public/h6/static/js/user-pages-address-list.752...

1 lines
8.5 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-address-list"],{"0950":function(t,e,i){var n=i("1791");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var a=i("967d").default;a("31ba951d",n,!0,{sourceMap:!1,shadowMode:!1})},1791:function(t,e,i){var n=i("c86c");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.user-address-list .address-icon[data-v-c0899ec8]{width:%?64?%;height:%?64?%}.user-address-list .address-icon .iconfont[data-v-c0899ec8]{font-size:%?38?%}.user-address-list .address-info[data-v-c0899ec8]{max-width:%?600?%}.user-address-list .username[data-v-c0899ec8]{font-size:%?30?%}.user-address-list .oper-info[data-v-c0899ec8]{height:%?80?%}',""]),t.exports=e},2792:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"user-address-list"},[t._l(t.list.data,(function(e,n){return i("v-uni-view",{key:n,staticClass:"item-child mt-md pl-lg pr-lg fill-base radius-16",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toUpdateItem(n)}}},[i("v-uni-view",{staticClass:"flex-warp pt-lg pb-lg b-1px-b"},[i("v-uni-view",{staticClass:"address-icon flex-center c-base radius",style:{background:"linear-gradient(to right, "+t.subColor+", "+t.primaryColor+")"}},[i("i",{staticClass:"iconfont iconjuli"})]),i("v-uni-view",{staticClass:"address-info flex-1 ml-md"},[i("v-uni-view",{staticClass:"flex-y-baseline username c-title text-bold"},[t._v(t._s(e.user_name)),i("v-uni-view",{staticClass:"ml-md f-desc c-caption"},[t._v(t._s(e.mobile))])],1),i("v-uni-view",{staticClass:"f-desc c-title ellipsis"},[t._v(t._s(e.address+" "+e.address_info))])],1)],1),i("v-uni-view",{staticClass:"oper-info f-paragraph c-caption flex-between"},[i("v-uni-view",{staticClass:"flex-y-center",style:{color:t.options.check&&e.id==t.check_id||!t.options.check&&1==e.status?t.primaryColor:""}},[i("i",{staticClass:"iconfont icon-xuanze mr-sm",class:[{"icon-xuanze-fill":t.options.check&&e.id==t.check_id||!t.options.check&&1==e.status}],style:{color:t.options.check&&e.id==t.check_id||!t.options.check&&1==e.status?t.primaryColor:""}}),t.options.check?[t._v(t._s(e.id==t.check_id?"当前选择地址":"点击选择"))]:[t._v(t._s(1==e.status?"默认地址":"设为默认"))]],2),i("v-uni-view",{staticClass:"flex-center"},[i("v-uni-view",{staticClass:"pl-lg pr-lg",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.toDel(n)}}},[t._v("删除")]),i("v-uni-view",{staticClass:"pl-lg",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.goDetail(n)}}},[t._v("编辑")])],1)],1)],1)})),t.loading?i("load-more",{attrs:{noMore:t.list.current_page>=t.list.last_page&&t.list.data.length>0,loading:t.loading}}):t._e(),!t.loading&&t.list.data.length<=0&&1==t.list.current_page?i("abnor",{attrs:{tip:[{text:"你还没有添加地址哦~",color:0}]}}):t._e(),i("v-uni-view",{staticClass:"space-max-footer"}),i("fix-bottom-button",{attrs:{text:[{text:"添加新地址",type:"confirm"}],bgColor:"#fff"},on:{confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.$util.goUrl({url:"/user/pages/address/edit"})}}})],2)},a=[]},"5b4d":function(t,e,i){"use strict";var n=i("0950"),a=i.n(n);a.a},"5b95":function(t,e,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("c223"),i("dd2b");var a=n(i("5de6")),s=n(i("2634")),r=n(i("2fdc")),o=n(i("9b1b")),c=i("8f59"),l={components:{},data:function(){return{options:{},check_id:0,param:{page:1},list:{data:[]},loading:!0,lockTap:!1}},computed:(0,c.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},userInfo:function(t){return t.user.userInfo},haveOperItem:function(t){return t.order.haveOperItem}}),onLoad:function(t){var e=t.check,i=void 0===e?0:e;if(this.options=t,i){var n=this.$util.getPage(-1).orderInfo.address_info,a=void 0===n?{id:0}:n,s=a.id;this.check_id=s}this.updateOrderItem({key:"haveOperItem",val:!1}),this.initIndex()},onUnload:function(){var t=this.options.check,e=void 0===t?0:t;this.list.data;e&&this.haveOperItem&&(this.$util.getPage(-1).orderInfo.address_info={},this.$util.back())},onPullDownRefresh:function(){uni.showNavigationBarLoading(),this.initRefresh(),uni.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.param.page=this.param.page+1,this.loading=!0,this.getList())},methods:(0,o.default)((0,o.default)({},(0,c.mapMutations)(["updateUserItem","updateOrderItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,r.default)((0,s.default)().mark((function i(){var n;return(0,s.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=t.length>0&&void 0!==t[0]&&t[0],n||!e.$jweixin.isWechat()){i.next=5;break}return i.next=4,e.$jweixin.initJssdk();case 4:e.$jweixin.wxReady((function(){e.$jweixin.hideOptionMenu()}));case 5:return i.next=7,e.getList();case 7:e.$util.setNavigationBarColor({bg:e.primaryColor});case 8:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},getList:function(){var t=this;return(0,r.default)((0,s.default)().mark((function e(){var i,n,a;return(0,s.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.list,n=t.param,e.next=3,t.$api.mine.addressList(n);case 3:a=e.sent,1==t.param.page||(a.data=i.data.concat(a.data)),t.list=a,t.loading=!1,t.$util.hideAll();case 7:case"end":return e.stop()}}),e)})))()},toUpdateItem:function(t){var e=this;return(0,r.default)((0,s.default)().mark((function i(){var n,a,r;return(0,s.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=e.list.data[t],!e.options.check){i.next=7;break}e.$util.getPage(-1).orderInfo.address_info=n,e.$util.back(),e.$util.goUrl({url:1,openType:"navigateBack"}),i.next=11;break;case 7:return a=n.id,r=n.status,i.next=10,e.$api.mine.addressUpdate({id:a,status:0==r?1:0});case 10:e.initRefresh();case 11:case"end":return i.stop()}}),i)})))()},toDel:function(t){var e=this;return(0,r.default)((0,s.default)().mark((function i(){var n,r,o,c,l;return(0,s.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,uni.showModal({title:"提示",content:"请确认是否要删除此数据?"});case 2:if(n=i.sent,r=(0,a.default)(n,2),r[0],o=r[1].confirm,o){i.next=8;break}return i.abrupt("return");case 8:if(c=e.list.data[t].id,l=e.check_id,!e.lockTap){i.next=12;break}return i.abrupt("return");case 12:return e.lockTap=!0,e.$util.showLoading(),i.prev=14,i.next=17,e.$api.mine.addressDel({id:c});case 17:e.$util.hideAll(),e.$util.showToast({title:"删除成功"}),e.list.data.splice(t,1),e.lockTap=!1,c==l&&e.updateOrderItem({key:"haveOperItem",val:!0}),i.next=27;break;case 24:i.prev=24,i.t0=i["catch"](14),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 27:case"end":return i.stop()}}),i,null,[[14,24]])})))()},goDetail:function(t){var e=this.list.data[t].id,i="/user/pages/address/edit?id=".concat(e);this.$util.goUrl({url:i})}})};e.default=l},ac4a:function(t,e,i){"use strict";i.r(e);var n=i("2792"),a=i("cf2c");for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);i("5b4d");var r=i("828b"),o=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"c0899ec8",null,!1,n["a"],void 0);e["default"]=o.exports},cf2c:function(t,e,i){"use strict";i.r(e);var n=i("5b95"),a=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);e["default"]=a.a}}]);