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
6.9 KiB
1 lines
6.9 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-collect"],{"21a1":function(t,n,e){var a=e("c86c");n=a(!1),n.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/* 文章场景相关 */',""]),t.exports=n},"2e5e":function(t,n,e){"use strict";var a=e("6057"),i=e.n(a);i.a},"3b57":function(t,n,e){"use strict";e.r(n);var a=e("cbeb"),i=e.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(o);n["default"]=i.a},"55cd":function(t,n,e){"use strict";e.r(n);var a=e("6dd3"),i=e("3b57");for(var o in i)["default"].indexOf(o)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(o);e("2e5e");var c=e("828b"),r=Object(c["a"])(i["default"],a["b"],a["c"],!1,null,"13d48141",null,!1,a["a"],void 0);n["default"]=r.exports},6057:function(t,n,e){var a=e("21a1");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=e("967d").default;i("65a0ec56",a,!0,{sourceMap:!1,shadowMode:!1})},"6dd3":function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){}));var a=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("v-uni-view",{staticClass:"pages-technician"},[t._l(t.list.data,(function(n,a){return e("v-uni-view",{key:a,staticClass:"mt-md ml-md mr-md"},[e("technician-list-item",{attrs:{from:"collect",info:n},on:{comment:function(n){arguments[0]=n=t.$handleEvent(n),t.toShowPopup(a,"message")},collect:function(n){arguments[0]=n=t.$handleEvent(n),t.toCollect(a)},order:function(n){arguments[0]=n=t.$handleEvent(n),t.toShowPopup(a,"technician")}}})],1)})),t.loading?e("load-more",{attrs:{noMore:t.list.current_page>=t.list.last_page&&t.list.data.length>0&&t.location.lng,loading:t.loading}}):t._e(),!t.loading&&t.list.data.length<=0&&1==t.list.current_page&&t.location.lng?e("abnor"):t._e(),t.loading||t.location.lng?t._e():e("abnor",{attrs:{tip:[{text:"定位失败,请开启地理位置授权后刷新页面重试~",color:0}],button:[{text:"开启定位",type:"confirm"}],btnSize:""},on:{confirm:function(n){arguments[0]=n=t.$handleEvent(n),t.$util.checkAuth({type:"userLocation"})}}}),e("v-uni-view",{staticClass:"space-footer"}),e("technician-list-popup",{ref:"technician_list_popup"})],2)},i=[]},cbeb:function(t,n,e){"use strict";e("6a54");var a=e("f5bd").default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,e("c223"),e("fd3c"),e("dd2b");var i=a(e("2634")),o=a(e("2fdc")),c=a(e("9b1b")),r=e("8f59"),s=a(e("a0e3")),u=a(e("ba2d")),l={components:{technicianListItem:s.default,technicianListPopup:u.default},data:function(){return{options:{},param:{page:1,ser_id:0,coach_name:""},list:{data:[]},loading:!0}},computed:(0,r.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},userInfo:function(t){return t.user.userInfo},location:function(t){return t.user.location}}),onLoad:function(){this.initIndex()},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,c.default)((0,c.default)((0,c.default)({},(0,r.mapActions)([])),(0,r.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var t=arguments,n=this;return(0,o.default)((0,i.default)().mark((function e(){var a;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.length>0&&void 0!==t[0]&&t[0],a||!n.$jweixin.isWechat()){e.next=5;break}return e.next=4,n.$jweixin.initJssdk();case 4:n.$jweixin.wxReady((function(){n.$jweixin.hideOptionMenu()}));case 5:return e.next=7,n.getList();case 7:n.$util.setNavigationBarColor({bg:n.primaryColor}),uni.setNavigationBarTitle({title:"收藏"+n.$t("action.attendantName")});case 9:case"end":return e.stop()}}),e)})))()},initRefresh:function(){this.param.page=1,this.initIndex(!0)},toSearch:function(t){this.param.page=1,this.param.coach_name=t,this.getList()},getList:function(){var t=this;return(0,o.default)((0,i.default)().mark((function n(){var e,a,o,c,r,s,u,l,d,f,p,h,g,m,v,w,x,b,_,$,k,y,C,L;return(0,i.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e=t.location,e.lat){n.next=22;break}if(!t.$jweixin.isWechat()){n.next=21;break}return t.$util.showLoading(),n.next=6,t.$jweixin.wxReady2();case 6:return n.next=8,t.$jweixin.getWxLocation();case 8:if(a=n.sent,o=a.latitude,c=void 0===o?0:o,r=a.longitude,s=void 0===r?0:r,e={lng:s,lat:c,address:"定位失败",province:"",city:"",district:""},!c||!s){n.next=21;break}return u="".concat(c,",").concat(s),n.next=18,t.$api.base.getMapInfo({location:u});case 18:l=n.sent,d=JSON.parse(l),f=d.status,p=d.result,0==f&&(h=p.address,g=p.address_component,m=g.province,v=g.city,w=g.district,e={lng:s,lat:c,address:h,province:m,city:v,district:w});case 21:t.updateUserItem({key:"location",val:e});case 22:return x=t.list,b=t.param,_=e,$=_.lng,k=void 0===$?0:$,y=_.lat,C=void 0===y?0:y,b=Object.assign({},b,{lng:k,lat:C}),n.next=27,t.$api.mine.coachCollectList(b);case 27:L=n.sent,L.data.map((function(t){t.is_collect=1})),1==t.param.page||(L.data=x.data.concat(L.data)),t.list=L,t.loading=!1,t.$util.hideAll();case 32:case"end":return n.stop()}}),n)})))()},handerTabChange:function(t){this.activeIndex=t,this.$util.showLoading(),this.param.page=1,this.getList()},toShowPopup:function(t,n){var e=this;return(0,o.default)((0,i.default)().mark((function a(){return(0,i.default)().wrap((function(a){while(1)switch(a.prev=a.next){case 0:e.$refs.technician_list_popup.toShowPopup(e.list.data[t],n);case 1:case"end":return a.stop()}}),a)})))()},toCollect:function(t){var n=this;return(0,o.default)((0,i.default)().mark((function e(){var a,o;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=n.list.data[t],o=a.id,a.is_collect,a.collect_num,e.next=3,n.$api.mine.delCollect({coach_id:o});case 3:n.$util.showToast({title:"取消成功"}),n.list.data.splice(t,1);case 5:case"end":return e.stop()}}),e)})))()}})};n.default=l}}]); |