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
16 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/mine"],{2026:function(t,e,n){"use strict";n.r(e);var i=n("6d80"),a=n("5571");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("9ff3");var o=n("828b"),s=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=s.exports},5571:function(t,e,n){"use strict";n.r(e);var i=n("dd04"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},"6d80":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.isLoad&&2==t.userPageType?t.$t("action.attendantName"):null),i=t.isLoad&&1==t.userPageType&&t.userInfo&&(!t.userInfo||t.userInfo.nickName)&&2===t.mineInfo.coach_status?t.mineInfo.coach_level&&t.mineInfo.coach_level.length>0&&t.mineInfo.coach_level.title:null,a=!t.isLoad||1!=t.userPageType||!t.userInfo||t.userInfo&&!t.userInfo.nickName||2!==t.mineInfo.coach_status||i?null:t.$t("action.attendantName"),r=t.isLoad&&1==t.userPageType&&t.toolLoad&&(2==t.mineInfo.coach_status||3==t.mineInfo.coach_status)?t.$t("action.attendantName"):null;t._isMounted||(t.e0=function(e){return e.stopPropagation(),t.$util.goUrl({url:"/user/pages/setting"})},t.e1=function(e){return t.$util.toCheckLogin({url:"/user/pages/stored/list"})},t.e2=function(e){return e.stopPropagation(),t.$util.toCheckLogin({url:"/user/pages/collect"})},t.e3=function(e){return e.stopPropagation(),t.$util.toCheckLogin({url:"/user/pages/coupon/list"})},t.e4=function(e){return e.stopPropagation(),t.$util.goUrl({url:"/agent/pages/index?agent=0"})},t.e5=function(e){return e.stopPropagation(),t.$util.goUrl({url:"/technician/pages/time-manage"})},t.e6=function(e){return e.stopPropagation(),t.$util.goUrl({url:"/technician/pages/income/index"})},t.e7=function(e){return e.stopPropagation(),t.$util.goUrl({url:"/user/pages/cash-out?type=carfee"})}),t.$mp.data=Object.assign({},{$root:{m0:n,g0:i,m1:a,m2:r}})},a=[]},"8b72":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("7043");i(n("3240"));var a=i(n("2026"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"9ff3":function(t,e,n){"use strict";var i=n("fa3a"),a=n.n(i);a.a},dd04:function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("7eb4")),r=i(n("34cf")),o=i(n("7ca3")),s=i(n("ee10")),u=n("8f59");function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){(0,o.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var f={components:{tabbar:function(){n.e("components/tabbar").then(function(){return resolve(n("ea26"))}.bind(null,n)).catch(n.oe)}},data:function(){return{isLoad:!1,toolLoad:!1,options:{},textType:{1:"可服务",2:"服务中",3:"可预约",4:"不可预约"},is_share:!0,orderList:[],orderList2:[{icon:"icon-kdd2",text:"待接单",url:"/technician/pages/order/list",number:0},{icon:"iconyijiedan",text:"待服务",url:"/technician/pages/order/list?tab=1",number:0},{icon:"icon-kll",text:"服务中",url:"/technician/pages/order/list?tab=2",number:0}],commissionList:[],toolList:[{cover:"/static/mine/dizhiguanli.png",text:"地址管理",url:"/user/pages/address/list"},{cover:"/static/mine/yijianfank.png",text:"问题反馈",url:"/user/pages/feedback/box"},{cover:"/static/mine/pingjia.png",text:"我的评价",url:"/pages/order?tab=4"},{cover:"/static/mine/tuikuan.png",text:"退款售后",url:"/user/pages/refund/list"},{cover:"/static/mine/tel.png",text:"联系客服",url:""}],toolList2:[{cover:"/static/mine/dengji.png",text:"等级管理",url:"/technician/pages/level"},{cover:"/static/mine/Wallet.png",text:"储值返佣明细",url:"/technician/pages/income/cash-integral",number:0},{cover:"/static/mine/fencheng.png",text:"分成明细",url:"/technician/pages/income/commission-list",number:0},{cover:"/static/mine/cfmx.png",text:"车费明细",url:"/technician/pages/car-fare"},{cover:"/static/mine/cftx.png",text:"车费提现记录",url:"/user/pages/distribution/record?type=3"},{cover:"/static/mine/shop.png",text:"物料商城",url:"/technician/pages/shop/list"},{cover:"/static/mine/shens.png",text:"差评申诉",url:"/technician/pages/bad-comments/box"},{cover:"/static/mine/pingbi.png",text:"屏蔽用户",url:"/technician/pages/shield"},{cover:"/static/mine/qiehuan.png",text:"切换用户端",url:"change"}],image_type:{1:"user_image",2:"coach_image"},font_type:{1:"user_font_color",2:"coach_font_color"},showAuth:!1,offsetL:360,offsetT:0}},computed:(0,u.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},commonOptions:function(t){return t.user.commonOptions},userInfo:function(t){return t.user.userInfo},userPageType:function(t){return t.user.userPageType},locationChange:function(t){return t.user.locationChange},location:function(t){return t.user.location},mineInfo:function(t){return t.user.mineInfo},coachInfo:function(t){return t.user.coachInfo}}),onLoad:function(t){this.options=t;var e=t.type,n=void 0===e?1:e;n&&this.updateUserItem({key:"userPageType",val:n});var i=this.mineInfo.id,a=void 0===i?-1:i;-1==a&&this.$util.showLoading(),this.initIndex()},onShow:function(){var t=this;return(0,s.default)(a.default.mark((function e(){return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(2!=t.userPageType){e.next=3;break}return e.next=3,Promise.all([t.getCoachInfo(),t.getOrderNumCall()]);case 3:case"end":return e.stop()}}),e)})))()},onPullDownRefresh:function(){t.showNavigationBarLoading(),this.initRefresh(),t.stopPullDownRefresh()},methods:l(l(l({},(0,u.mapActions)(["getConfigInfo","getUserInfo","getMineInfo","getCoachInfo","updateCommonOptions"])),(0,u.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var t=arguments,e=this;return(0,s.default)(a.default.mark((function n(){var i,r,o,s,u,c,l,f,p,d,g,h,m,v,x,b,I,y,_,w,L;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=t.length>0&&void 0!==t[0]&&t[0],e.configInfo.id&&!i&&(!e.configInfo.id||e.configInfo.hasOwnProperty("recharge_status"))){n.next=4;break}return n.next=4,e.getConfigInfo();case 4:return n.next=6,e.getMineInfo();case 6:if(e.isLoad=!0,r=e.configInfo,r.fx_check,o=r.plugAuth,s=void 0===o?{}:o,u=e.mineInfo,c=u.coach_status,l=u.is_admin,f=void 0===l?0:l,p=u.is_fx,d=void 0===p?0:p,2!=c&&3!=c){n.next=12;break}return n.next=12,e.getCoachInfo();case 12:e.updateUserItem({key:"userPageType",val:2==c||3==c?e.userPageType:1}),g=["coach_status","channel_status","salesman_status"],h="申请"+e.$t("action.attendantName"),m={coach_status:{text:h,list:{cover:"/static/mine/jishizhaopin.png",text:h,url:"/user/pages/apply"}},channel_status:{text:"申请渠道商",list:{cover:"/static/mine/qudao.png",text:"申请渠道商",url:"/user/pages/channel/apply"},list2:{cover:"/static/mine/qudao.png",text:"我是渠道商",url:"/user/pages/channel/income"}},salesman_status:{text:"申请业务员",list:{cover:"/static/mine/yewu.png",text:"申请业务员",url:"/user/pages/salesman/apply"},list2:{cover:"/static/mine/yewu.png",text:"我是业务员",url:"/user/pages/salesman/income"}}},g.map((function(t){if(2!=e.mineInfo[t]){var n=e.toolList.filter((function(e){return e.text===m[t].text}));if(0===n.length&&("salesman_status"!=t||"salesman_status"==t&&-1!=e.mineInfo[t])&&e.toolList.unshift(m[t].list),"coach_status"!==t){var i=e.toolList.findIndex((function(e){return e.text===m[t].list2.text}));-1!=i&&e.toolList.splice(i,1)}}else if(e.toolList.map((function(n,i){n.text===m[t].text&&e.toolList.splice(i,1)})),"coach_status"!==t){var a=e.toolList.filter((function(e){return e.text===m[t].list2.text}));0===a.length&&e.toolList.unshift(m[t].list2)}})),v=e.toolList.findIndex((function(t){return"我是代理商"==t.text||"招商加盟"==t.text})),-1==v&&e.toolList.unshift({cover:"/static/mine/Add.png",text:f?"我是代理商":"招商加盟",url:f?"/agent/pages/index?agent=1":"/agent/pages/apply"}),-1!==v&&(e.toolList[v]={cover:"/static/mine/Add.png",text:f?"我是代理商":"招商加盟",url:f?"/agent/pages/index?agent=1":"/agent/pages/apply"}),x=e.toolList.findIndex((function(t){return"申请分销商"==t.text||"分销商管理"==t.text})),-1!=x&&e.toolList.splice(x,1),e.toolList.unshift({cover:"/static/mine/fenxiao.png",text:d?"分销商管理":"申请分销商",url:d?"/user/pages/distribution/income":"/user/pages/distribution/apply"}),2==e.userPageType&&e.getOrderNumCall(),b=s.dynamic,I=void 0!==b&&b,I&&(y=e.toolList2.findIndex((function(t){return"动态发布"==t.text})),s.dynamic&&-1==y&&(_=e.toolList2.findIndex((function(t){return"差评申诉"==t.text})),e.toolList2.splice(_+1,0,{cover:"/static/mine/jishizhaopin.png",text:"动态发布",url:"/dynamic/pages/technician/list"}))),w=e.coachInfo.fdd_auth_status,L=e.toolList2.findIndex((function(t){return"电签合同"==t.text})),w&&-1==L&&e.toolList2.unshift({cover:"/static/mine/hetong.png",text:"电签合同",url:""}),w||-1===L||e.toolList2.splice(L,1),e.toolLoad=!0,e.$util.hideAll();case 32:case"end":return n.stop()}}),n)})))()},initRefresh:function(){this.initIndex(!0)},getOrderNumCall:function(){var t=this;return(0,s.default)(a.default.mark((function e(){var n;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.technician.getOrderNum();case 2:n=e.sent,t.orderList2[0].number=n.wait,t.orderList2[1].number=n.start,t.orderList2[2].number=n.progress;case 6:case"end":return e.stop()}}),e)})))()},toChooseLocation:function(){var e=this;return(0,s.default)(a.default.mark((function n(){var i,o,s,u,c,l,f,p,d,g,h,m,v;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(i=e.mineInfo.coach_status,2==i){n.next=3;break}return n.abrupt("return");case 3:return n.next=5,e.$util.checkAuth({type:"userLocation"});case 5:return o=e.coachInfo,s=o.lat,void 0===s?"":s,u=o.lng,void 0===u?"":u,c={},n.next=9,t.chooseLocation(c);case 9:if(l=n.sent,f=(0,r.default)(l,2),p=f[1],d=p.address,g=void 0===d?"":d,h=p.longitude,m=p.latitude,g){n.next=18;break}return n.abrupt("return");case 18:return n.next=20,e.$api.technician.coachUpdate({address:g,lng:h,lat:m});case 20:v=e.$util.deepCopy(e.coachInfo),v.address=g,e.updateUserItem({key:"coachInfo",val:v}),e.updateUserItem({key:"locationChange",val:!0}),e.$util.showToast({title:"更新成功"});case 25:case"end":return n.stop()}}),n)})))()},toChangeLocation:function(){var t=this;return(0,s.default)(a.default.mark((function e(){var n,i,r,o;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.mineInfo.coach_status,2==n){e.next=3;break}return e.abrupt("return");case 3:return i=t.userInfo.coach_position,r=void 0===i?0:i,o=0==r?1:0,e.next=7,t.$api.technician.coachUpdate({coach_position:o});case 7:return e.next=9,t.getUserInfo();case 9:t.$util.showToast({title:"操作成功"}),t.updateUserItem({key:"locationChange",val:1==o});case 11:case"end":return e.stop()}}),e)})))()},toJump:function(t,e){var n=this[t][e],i=n.url,a=n.text,r="申请"+this.$t("action.attendantName");if([r,"申请分销合伙人","申请渠道商","申请业务员"].includes(a))this.toApply(a==r?1:"申请分销合伙人"==a?2:"申请渠道商"==a?3:4);else if("切换用户端"!=a)if("联系客服"!=a)if("电签合同"!=a){var o="orderList"==t&&4!==e?"reLaunch":"navigateTo";this.$util.log(i),this.$util.toCheckLogin({url:i,openType:o})}else this.toFddSign();else{var s=this.configInfo,u=s.mobile,c=s.im_type;if(2==c)return;this.$util.goUrl({url:u,openType:"call"})}else this.toChange()},toEditInfo:function(){var t=this.coachInfo,e=t.status,n=t.fdd_auth_status,i=t.fdd_status;2==e&&n&&2!=i?this.$util.showToast({title:"请先签订合同哦"}):this.$util.goUrl({url:"/technician/pages/edit"})},toFddSign:function(){var t=this;return(0,s.default)(a.default.mark((function e(){var n,i,r,o,s,u,c,l,f,p,d,g,h,m;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.updateUserItem({key:"fddExtsign",val:""}),n=t.coachInfo,i=n.status,r=n.admin_id,o=void 0===r?0:r,s=n.fdd_agreement,u=void 0===s?{}:s,c=u&&u.hasOwnProperty("viewpdf_url")?u:{viewpdf_url:""},l=c.viewpdf_url,f=void 0===l?"":l,f){e.next=29;break}if(3!=i){e.next=7;break}return t.$util.showToast({title:"平台管理员已取消授权,不能签约哦"}),e.abrupt("return");case 7:return e.next=9,t.$api.technician.getFddRecord();case 9:if(p=e.sent,p){e.next=29;break}return t.updateUserItem({key:"personVerifyUrl",val:""}),e.next=14,t.$api.technician.getAttestationInfo();case 14:if(d=e.sent,g=d.status,!(g<2)){e.next=25;break}return e.next=19,t.$api.technician.getPersonVerifyUrl();case 19:return h=e.sent,t.updateUserItem({key:"personVerifyUrl",val:h}),t.$util.goUrl({url:"/user/pages/common/web?url=personVerifyUrl"}),e.abrupt("return");case 25:return e.next=27,t.$api.technician.Extsign({admin_id:o});case 27:m=e.sent,f=m;case 29:t.updateUserItem({key:"fddExtsign",val:f}),t.$util.goUrl({url:"/user/pages/common/web?url=fddExtsign"});case 31:case"end":return e.stop()}}),e)})))()},toAtv:function(){var t=this;return(0,s.default)(a.default.mark((function e(){var n;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.mineInfo.is_atv){e.next=3;break}return t.$util.showToast({title:"暂无活动"}),e.abrupt("return");case 3:return n=t.commonOptions,n.coupon_atv_id=0,e.next=7,t.updateCommonOptions(n);case 7:t.$util.toCheckLogin({url:"/user/pages/coupon/share"});case 8:case"end":return e.stop()}}),e)})))()},toApply:function(t){var e=this;return(0,s.default)(a.default.mark((function n(){var i,r,o,s,u,c,l,f,p,d,g,h,m;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:i=e.mineInfo,r=i.coach_status,o=void 0===r?-1:r,s=i.fx_status,u=void 0===s?-1:s,c=i.channel_status,l=void 0===c?-1:c,f=i.salesman_status,p=void 0===f?-1:f,d={1:o,2:u,3:l,4:p},g=d[t],h={1:"/technician/pages/apply",2:"/user/pages/distribution/apply",3:"/user/pages/channel/apply",4:"/user/pages/salesman/apply"},m=-1==g?h[t]:"/user/pages/apply-result?type=".concat(t),e.$util.log(m),e.$util.toCheckLogin({url:m});case 7:case"end":return n.stop()}}),n)})))()},toChange:function(){var e=this;return(0,s.default)(a.default.mark((function n(){var i,r;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return t.pageScrollTo({duration:500,scrollTop:0}),i=e.userPageType,r=void 0===i?1:i,n.next=4,e.getCoachInfo();case 4:1==r&&e.getOrderNumCall(),e.updateUserItem({key:"userPageType",val:2==r?1:2});case 6:case"end":return n.stop()}}),n)})))()},onChange:function(t){var e=this,n=t.detail,i=n.x,a=n.y;this.$nextTick((function(){e.offsetL=i,e.offsetT=a}))},toHelp:function(){var t=this;return(0,s.default)(a.default.mark((function e(){var n,i,r,o,s,u,c;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$util.showLoading(),e.next=3,t.$util.getBmapLocation();case 3:if(n=e.sent,i=n.lat,r=void 0===i?"":i,o=n.lng,s=void 0===o?"":o,u=n.address,c=void 0===u?"":u,r){e.next=14;break}return t.$util.hideAll(),t.$util.showToast({title:"请授权定位当前地址"}),e.abrupt("return");case 14:t.toPolice({lat:r,lng:s,address:c});case 15:case"end":return e.stop()}}),e)})))()},toPolice:function(t){var e=this;return(0,s.default)(a.default.mark((function n(){return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$api.technician.police(t);case 2:e.$util.hideAll(),e.$util.showToast({title:"求救成功"});case 4:case"end":return n.stop()}}),n)})))()}})};e.default=f}).call(this,n("df3c")["default"])},fa3a:function(t,e,n){}},[["8b72","common/runtime","common/vendor"]]]);