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
31 KiB
1 lines
31 KiB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/pages/technician.vue?e376","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/pages/technician.vue?adb4","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/pages/technician.vue?abf5","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/pages/technician.vue?c40f","uni-app:///pages/technician.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","components","tabbar","technicianListItem","technicianListPopup","data","isLoad","options","loading","lockTap","computed","pageActive","haveOperItem","cityId","cityIndex","cityList","activeIndex","tabList","param","list","primaryColor","subColor","configInfo","loginType","userInfo","location","isGzhLogin","haveShieldOper","onLoad","pid","city_id","coach_id","coach_name","key","val","city_refresh","appAuthorizeSetting","console","onShow","onPullDownRefresh","uni","onReachBottom","onShareAppMessage","id","title","imageUrl","path","methods","initIndex","refresh","initRefresh","toAppShare","siteroot","siteInfo","pickerChange","toOpenLocation","type","toSearch","xuanzediqu","content","success","that","toChooseLocation","lat","lng","address","province","city","district","getList","page","change","oldList","ind","last_page","current_page","coach_format","handerTabChange","scrollTop","toShowPopup","toCollect","is_collect","collect_num","methodModel"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,mBAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAuH;AACvH;AAC8D;AACL;;;AAGzD;AACuM;AACvM,gBAAgB,iNAAU;AAC1B,EAAE,gFAAM;AACR,EAAE,qFAAM;AACR,EAAE,8FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,yFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACjDA;AAAA;AAAA;AAAA;AAA2xB,CAAgB,wyBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;ACqG/yB;AAKA;AAAA;AAAA;AAAA;EAAA;IAAA;EAAA;AAAA;AAAA;EAAA;IAAA;EAAA;AAAA;AAAA;EAAA;IAAA;EAAA;AAAA;AAAA,eAIA;EACAC;IACAC;IACAC;IACAC;EACA;EACAC;IACA;MACAC;MACAC;MACAC;MACAC;IACA;EACA;EACAC;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;EACA;EACAC;IAAA;IAAA;MAAA;MAAA;QAAA;UAAA;YAAA;cAEA;cAAA,eAMArB,QAJAsB,0EAIAtB,QAHAuB,2FAGAvB,QAFAwB,iGAEAxB,QADAyB;cAGAd;cACAA;cACAA;cACA;gBACAe;gBACAC;cACA;cAEA;gBACA;kBACAD;kBACAC;gBACA;cACA;;cAOA;cAAA,kBAKA,WADA7B;cAEA8B;cAAA,MACA;gBAAA;gBAAA;cAAA;cACA;cACA;cACA;cAAA;YAAA;cAGAC;cACAC;cACA;gBACA;cACA;cACA;YAAA;YAAA;cAAA;UAAA;QAAA;MAAA;IAAA;EACA;EACAC;IAAA;IAAA;MAAA;MAAA;QAAA;UAAA;YAAA;cAOA;gBACA;gBACA;kBACAL;kBACAC;gBACA;gBACA;kBACAD;kBACAC;gBACA;cACA;cACAE;cACAC;cACA;gBACA;cACA;YAAA;YAAA;cAAA;UAAA;QAAA;MAAA;IAAA;EACA;EACAE;IAEAC;IAEA;IACAA;EACA;EACAC;IACA;IACA;IACA;EACA;EACAC;IACA,wBAEA,cADAC;MAAAd;IAEA;IACA;IACA;MACAe;MACAC;MACAC;IACA;EACA;EACAC,uDACA,gGACA;IACAC;MAAA;QAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAAC;gBAAA,qBASA,eADApB;gBAGAH,aACA,OADAA;gBAAA,qBAIA,gBADAiB;gBAAA,MAEAd;kBAAA;kBAAA;gBAAA;gBAAA;gBAAA,OAWA;cAAA;gBAAA,MAIA;kBAAA;kBAAA;gBAAA;gBAAA;gBAAA,OACA;cAAA;gBAAA;gBAAA,OAEA;cAAA;gBACA;kBACAI;kBACAC;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACAgB;MACA;MACA;IACA;IACAC;MAAA;MACA,yBAEA,cADAR;QAAAd;MAEA;MACA,IACAuB,WACAC,kBADAD;MAEA;MACA;MACA;MACA;QACA;QACA;QACA;MACA;IACA;IACAE;MACA;MACA;QACArB;QACAC;MACA;MACA;QACAD;QACAC;MACA;MACA;IACA;IACAqB;MACA;QACAC;MACA;IAmBA;IACAC;MACA;MACAvC;MACAA;MACA;QACAe;QACAC;MACA;MACA;IACA;IACAwB;MACA;MACA;MACArB;MACA;QACAG;UACAI;UACAe;UACAC;YACA;cACAC;YACA;cACAxB;YACA;UACA;QACA;MACA;QACAwB;MACA;IACA;IACA;IACAC;MAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OAEA;kBACAN;gBACA;cAAA;gBAAA,kBAIA,uDAFAO,gHACAC;gBAEA9C;gBACA,2BAkBA;gBAAA;gBAAA,OAeAsB;cAAA;gBAAA;gBAAA;gBAAA;gBAAA,gDANAyB;gBAAAA;gBACAD;gBACAD;gBAAA,gDACAG;gBAAAA;gBAAA,gDACAC;gBAAAA;gBAAA,gDACAC;gBAAAA;gBAAA,IAEAJ;kBAAA;kBAAA;gBAAA;gBAAA;cAAA;gBACAvC;kBACAuC;kBACAD;kBACAE;kBACAC;kBACAC;kBACAC;gBACA;gBACA;kBACAnC;kBACAC;gBACA;gBAAA;gBAAA,OACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IAEA;IACAmC;MAAA;QAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAAC;gBAAArB;gBAAAsB;gBACA;kBACArD;kBACAA;kBACA;oBACAe;oBACAC;kBACA;gBACA;gBAEAT,WACA,OADAA;gBAAA,MAEA;kBAAA;kBAAA;gBAAA;gBAAA;gBAAA,OAyDA;cAAA;gBAAAA;gBAEA;kBACAQ;kBACAC;gBACA;cAAA;gBAAA,YAKAT,oCAFAuC,mFACAD;gBAAA,KAGAd;kBAAA;kBAAA;gBAAA;gBAAA;gBAAA,OACA;kBACAe;kBACAD;kBACAQ;gBACA;cAAA;gBAIAC,UAMA,OANArD,MACAF,UAKA,OALAA,SACAD,cAIA,OAJAA,aACAD,WAGA,OAHAA,UACAD,YAEA,OAFAA,WACAgB,UACA,OADAjB;gBAGAK;gBAEAuD;kBACA;gBACA;gBAAA,MAEAA;kBAAA;kBAAA;gBAAA;gBACA;gBACA;gBACA;gBACA;kBACAxC;kBACAC;oBACA7B;oBACAqE;oBACAC;kBACA;gBACA;gBAAA;cAAA;gBAIA7C;gBACAhB;gBAGA;kBACAmB;kBACAC;gBACA;gBAEA;kBACAD;kBACAC;gBACA;gBAEAhB;kBACA8C;kBACAD;kBACAjC;gBACA;gBAAA,wBAIA,kBADA8C;gBAGA;kBACA1D;gBACA;gBAAA;gBAAA,OAEA;cAAA;gBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACA2D;MACA;QACA5C;QACAC;MACA;MACA;MACAM;QACAsC;MACA;MACA;IACA;IACAC;MAAA;MAAA;QAAA;UAAA;YAAA;cAAA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACAC;MAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA,wBAKA,yBAHArC,+BACAsC,+CACAC;gBAEAC;gBAAA;gBAAA,OACA;kBACApD;gBACA;cAAA;gBACA;kBACAa;gBACA;gBACA;gBACA,0EACAsC;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;EAAA;AAEA;AAAA,2B","file":"pages/technician.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages/technician.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./technician.vue?vue&type=template&id=5d289ec6&\"\nvar renderjs\nimport script from \"./technician.vue?vue&type=script&lang=js&\"\nexport * from \"./technician.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pages/technician.vue\"\nexport default component.exports","export * from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./technician.vue?vue&type=template&id=5d289ec6&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var g0 = _vm.cityList && _vm.cityList.length > 0\n var g1 =\n g0 && !(_vm.cityIndex === -1)\n ? _vm.cityList[_vm.cityIndex].title.length\n : null\n var g2 =\n g0 && !(_vm.cityIndex === -1) && g1 > 3\n ? _vm.cityList[_vm.cityIndex].title.substring(0, 3)\n : null\n var m0 = _vm.$t(\"action.attendantName\")\n var g3 = _vm.pageActive && _vm.list.data && _vm.list.data.length > 0\n var g4 = _vm.loading\n ? _vm.list.current_page >= _vm.list.last_page &&\n _vm.list.data.length > 0 &&\n _vm.location.lng\n : null\n var g5 =\n !_vm.loading &&\n _vm.list.data.length <= 0 &&\n _vm.list.current_page == 1 &&\n _vm.location.lng\n if (!_vm._isMounted) {\n _vm.e0 = function ($event) {\n $event.stopPropagation()\n return _vm.$refs.choose_city_item.close()\n }\n }\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n g0: g0,\n g1: g1,\n g2: g2,\n m0: m0,\n g3: g3,\n g4: g4,\n g5: g5,\n },\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./technician.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./technician.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"pages-technician\">\r\n\t\t<fixed :initHeight=\"configInfo.coach_format\">\r\n\t\t\t<uni-nav-bar :fixed=\"false\" :shadow=\"false\" :statusBar=\"true\" :onlyLeft=\"true\" :color=\"`#fff`\"\r\n\t\t\t\t:backgroundColor=\"primaryColor\">\r\n\t\t\t\t<view @tap.stop=\"xuanzediqu\" class=\"map-info flex-y-center\" slot=\"left\">\r\n\t\t\t\t\t<view class=\"flex-y-center c-base\">\r\n\t\t\t\t\t\t<i class=\"iconfont iconjuli mr-sm\"></i>\r\n\t\t\t\t\t\t<view class=\"map-text max-400 ellipsis\">\r\n\t\t\t\t\t\t\t{{location&&location.address ?location.address : isLoad ? '定位失败' : '请选择位置'}}\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<i class=\"iconfont icon-down\"></i>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</uni-nav-bar>\r\n\t\t\t<view class=\"fix-info fill-body rel\" :style=\"{height:configInfo.coach_format == 2?'124rpx':''}\">\r\n\t\t\t\t<view class=\"space-top abs\" :style=\"{background:primaryColor}\"></view>\r\n\t\t\t\t<view class=\"search-info fill-base pt-lg pl-lg pr-lg abs\"\r\n\t\t\t\t\t:class=\"[{'pb-md':configInfo.coach_format!=2}]\">\r\n\t\t\t\t\t<view class=\"flex-center\"\r\n\t\t\t\t\t\t:class=\"[{'pb-md':configInfo.coach_format!=2},{'pb-lg':configInfo.coach_format==2}]\">\r\n\t\t\t\t\t\t<view class=\"city-info\">\r\n\t\t\t\t\t\t\t<picker @change=\"pickerChange($event)\" :value=\"cityIndex\" :range=\"cityList\"\r\n\t\t\t\t\t\t\t\trange-key=\"title\">\r\n\t\t\t\t\t\t\t\t<view class=\"city-info flex-y-center\">\r\n\t\t\t\t\t\t\t\t\t<view>\r\n\t\t\t\t\t\t\t\t\t\t<block v-if=\"cityList&&cityList.length > 0\">\r\n\t\t\t\t\t\t\t\t\t\t\t{{cityIndex === -1 ? '未知' : cityList[cityIndex].title.length > 3 ? cityList[cityIndex].title.substring(0,3) + '...':cityList[cityIndex].title}}\r\n\t\t\t\t\t\t\t\t\t\t</block>\r\n\t\t\t\t\t\t\t\t\t\t<block v-else>请选择</block>\r\n\t\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t\t<i class=\"iconfont iconshaixuanxia-1 ml-sm\"></i>\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t</picker>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t<view class=\"flex-1\">\r\n\t\t\t\t\t\t\t<search @input=\"toSearch\" type=\"input\" :keyword=\"param.coach_name\" :padding=\"0\" :radius=\"30\"\r\n\t\t\t\t\t\t\t\tbackgroundColor=\"#F0F0F0\" :placeholder=\"'请输入'+$t('action.attendantName')+'姓名'\">\r\n\t\t\t\t\t\t\t</search>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<block v-if=\"configInfo.coach_format != 2\">\r\n\t\t\t\t\t\t<tab @change=\"handerTabChange\" :list=\"tabList\" :activeIndex=\"activeIndex*1\"\r\n\t\t\t\t\t\t\t:activeColor=\"primaryColor\" width=\"25%\" height=\"90rpx\" fontSize=\"28rpx\"></tab>\r\n\t\t\t\t\t</block>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</fixed>\r\n\r\n\t\t<block v-if=\"pageActive && list.data && list.data.length>0\">\r\n\t\t\t<view class=\"mt-md ml-md mr-md\" v-for=\"(item,index) in list.data\" :key=\"index\">\r\n\t\t\t\t<technician-list-item @comment=\"toShowPopup(index,'message')\" @collect=\"toCollect(index)\"\r\n\t\t\t\t\t@order=\"toShowPopup(index,'technician')\" :info=\"item\">\r\n\t\t\t\t</technician-list-item>\r\n\t\t\t</view>\r\n\t\t</block>\r\n\r\n\t\t<!-- #ifdef H5 -->\r\n\t\t<load-more :noMore=\"list.current_page>=list.last_page&&list.data.length>0\" :loading=\"loading\" v-if=\"loading\">\r\n\t\t</load-more>\r\n\t\t<abnor v-if=\"!loading&&list.data.length<=0&&list.current_page==1\"></abnor>\r\n\t\t<!-- #endif -->\r\n\t\t<!-- #ifndef H5 -->\r\n\t\t<load-more :noMore=\"list.current_page>=list.last_page&&list.data.length>0&&location.lng\" :loading=\"loading\"\r\n\t\t\tv-if=\"loading\">\r\n\t\t</load-more>\r\n\t\t<abnor v-if=\"!loading&&list.data.length<=0&&list.current_page==1&&location.lng\"></abnor>\r\n\t\t<abnor @confirm=\"toOpenLocation\" :tip=\"[{ text: '定位失败,请开启地理位置授权后刷新页面重试~', color: 0 }]\"\r\n\t\t\t:button=\"[{ text: '开启定位' , type: 'confirm' }]\" btnSize=\"\" v-if=\"!loading && !location.lng\"> </abnor>\r\n\t\t<!-- #endif -->\r\n\r\n\t\t<view class=\"space-footer\"></view>\r\n\r\n\t\t<technician-list-popup ref=\"technician_list_popup\"></technician-list-popup>\r\n\r\n\t\t<uni-popup ref=\"choose_city_item\" type=\"top\" :custom=\"true\" :zIndex=\"999\">\r\n\t\t\t<view :style=\"{height:configInfo.navBarHeight + 8 + 'px'}\"></view>\r\n\t\t\t<view class=\"choose-city-popup rel\">\r\n\t\t\t\t<image class=\"city-img\" src=\"https://lbqny.migugu.com/admin/anmo/technician/no_city.png\"></image>\r\n\t\t\t\t<view class=\"text f-paragraph c-base abs\">\r\n\t\t\t\t\t很抱歉,该城市未开通, 点击左上角切换其他城市下单服务\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between\">\r\n\t\t\t\t\t<view></view>\r\n\t\t\t\t\t<view @tap.stop=\"$refs.choose_city_item.close()\"\r\n\t\t\t\t\t\tclass=\"item-btn flex-center f-paragraph c-title text-bold radius\">知道了</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t</uni-popup>\r\n\r\n\r\n\t\t<view :style=\"{height: `${configInfo.tabbarHeight}px`}\"></view>\r\n\t\t<tabbar :cur=\"2\"></tabbar>\r\n\r\n\t\t<!-- #ifdef APP-PLUS -->\r\n\t\t<login-info></login-info>\r\n\t\t<!-- #endif -->\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport {\r\n\t\tmapState,\r\n\t\tmapActions,\r\n\t\tmapMutations\r\n\t} from \"vuex\"\r\n\timport siteInfo from '@/siteinfo.js';\r\n\timport tabbar from \"@/components/tabbar.vue\"\r\n\timport technicianListItem from \"@/components/technician-list-item.vue\"\r\n\timport technicianListPopup from \"@/components/technician-list-popup.vue\"\r\n\texport default {\r\n\t\tcomponents: {\r\n\t\t\ttabbar,\r\n\t\t\ttechnicianListItem,\r\n\t\t\ttechnicianListPopup\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tisLoad: false,\r\n\t\t\t\toptions: {},\r\n\t\t\t\tloading: true,\r\n\t\t\t\tlockTap: false,\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: mapState({\r\n\t\t\tpageActive: state => state.technician.pageActive,\r\n\t\t\thaveOperItem: state => state.technician.haveOperItem,\r\n\t\t\tcityId: state => state.technician.cityId,\r\n\t\t\tcityIndex: state => state.technician.cityIndex,\r\n\t\t\tcityList: state => state.technician.cityList,\r\n\t\t\tactiveIndex: state => state.technician.activeIndex,\r\n\t\t\ttabList: state => state.technician.tabList,\r\n\t\t\tparam: state => state.technician.param,\r\n\t\t\tlist: state => state.technician.list,\r\n\t\t\tprimaryColor: state => state.config.configInfo.primaryColor,\r\n\t\t\tsubColor: state => state.config.configInfo.subColor,\r\n\t\t\tconfigInfo: state => state.config.configInfo,\r\n\t\t\tloginType: state => state.user.loginType,\r\n\t\t\tuserInfo: state => state.user.userInfo,\r\n\t\t\tlocation: state => state.user.location,\r\n\t\t\tisGzhLogin: state => state.user.isGzhLogin,\r\n\t\t\thaveShieldOper: state => state.user.haveShieldOper,\r\n\t\t}),\r\n\t\tasync onLoad(options) {\r\n\t\t\r\n\t\t\tthis.options = options\r\n\t\t\tlet {\r\n\t\t\t\tpid = 0,\r\n\t\t\t\t\tcity_id = 0,\r\n\t\t\t\t\tcoach_id = 0,\r\n\t\t\t\t\tcoach_name = ''\r\n\t\t\t} = options\r\n\r\n\t\t\tlet param = this.$util.deepCopy(this.param)\r\n\t\t\tparam.coach_id = coach_id\r\n\t\t\tparam.coach_name = coach_name\r\n\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\tkey: 'param',\r\n\t\t\t\tval: param\r\n\t\t\t})\r\n\r\n\t\t\tif (coach_id) {\r\n\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\tkey: 'cityId',\r\n\t\t\t\t\tval: city_id\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\t// #ifdef H5\r\n\t\t\tuni.setNavigationBarTitle({\r\n\t\t\t\ttitle: this.$t('action.attendantName')\r\n\t\t\t})\r\n\t\t\t// #endif\r\n\t\t\t// #ifndef H5\r\n\t\t\t// this.$util.showLoading()\r\n\t\t\t// #endif\r\n\r\n\t\t\tlet {\r\n\t\t\t\tdata = []\r\n\t\t\t} = this.list\r\n\t\t\tlet city_refresh = data.length == 0 || data[0].city_id != this.cityId\r\n\t\t\tif (this.pageActive && (!coach_id || !pid) && !city_refresh) {\r\n\t\t\t\tthis.isLoad = true\r\n\t\t\t\tthis.loading = false\r\n\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\treturn\r\n\t\t\t}\r\n\t\t\tconst appAuthorizeSetting = uni.getAppAuthorizeSetting()\r\n\t\t\tconsole.log(9987,appAuthorizeSetting);\r\n\t\t\tif(appAuthorizeSetting.locationAuthorized=='authorized'){\r\n\t\t\t\tthis.initIndex()\r\n\t\t\t}\r\n\t\t\t// await this.initIndex()\r\n\t\t},\r\n\t\tasync onShow() {\r\n\t\t\t// #ifdef H5\r\n\t\t\tif (this.$jweixin.isWechat()) {\r\n\t\t\t\tawait this.$jweixin.initJssdk();\r\n\t\t\t\tthis.toAppShare()\r\n\t\t\t}\r\n\t\t\t// #endif\r\n\t\t\tif (this.haveShieldOper == 2 || this.haveOperItem) {\r\n\t\t\t\t// this.initIndex()\r\n\t\t\t\tthis.updateUserItem({\r\n\t\t\t\t\tkey: 'haveShieldOper',\r\n\t\t\t\t\tval: 0\r\n\t\t\t\t})\r\n\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\tkey: 'haveOperItem',\r\n\t\t\t\t\tval: false\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\tconst appAuthorizeSetting = uni.getAppAuthorizeSetting()\r\n\t\t\tconsole.log(9987,appAuthorizeSetting);\r\n\t\t\tif(appAuthorizeSetting.locationAuthorized=='authorized'){\r\n\t\t\t\tthis.initIndex()\r\n\t\t\t}\r\n\t\t},\r\n\t\tonPullDownRefresh() {\r\n\t\t\t// #ifndef APP-PLUS\r\n\t\t\tuni.showNavigationBarLoading()\r\n\t\t\t// #endif\r\n\t\t\tthis.initRefresh();\r\n\t\t\tuni.stopPullDownRefresh()\r\n\t\t},\r\n\t\tonReachBottom() {\r\n\t\t\tif (this.list.current_page >= this.list.last_page || this.loading) return;\r\n\t\t\tthis.loading = true;\r\n\t\t\tthis.getList(this.param.page + 1);\r\n\t\t},\r\n\t\tonShareAppMessage(e) {\r\n\t\t\tlet {\r\n\t\t\t\tid: pid = 0\r\n\t\t\t} = this.userInfo\r\n\t\t\tlet path = `/pages/technician?pid=${pid}`\r\n\t\t\tthis.$util.log(path)\r\n\t\t\treturn {\r\n\t\t\t\ttitle: '',\r\n\t\t\t\timageUrl: '',\r\n\t\t\t\tpath,\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t...mapActions(['getConfigInfo', 'getUserInfo', 'getCityList', 'getServiceCoachList']),\r\n\t\t\t...mapMutations(['updateUserItem', 'updateTechnicianItem']),\r\n\t\t\tasync initIndex(refresh = false) {\r\n\t\t\t\t// #ifdef H5\r\n\t\t\t\tif (!refresh && this.$jweixin.isWechat()) {\r\n\t\t\t\t\tawait this.$jweixin.initJssdk();\r\n\t\t\t\t\tthis.toAppShare()\r\n\t\t\t\t}\r\n\t\t\t\t// #endif\r\n\t\t\t\tlet {\r\n\t\t\t\t\tpid = 0\r\n\t\t\t\t} = this.options\r\n\t\t\t\tlet {\r\n\t\t\t\t\tisGzhLogin\r\n\t\t\t\t} = this\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid: uid = 0\r\n\t\t\t\t} = this.userInfo\r\n\t\t\t\tif (pid && !uid) {\r\n\t\t\t\t\t// #ifdef H5\r\n\t\t\t\t\tif (isGzhLogin) {\r\n\t\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\t\tthis.getUserInfo()\r\n\t\t\t\t\t\t}, 1000)\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.getUserInfo()\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// #endif\r\n\t\t\t\t\t// #ifndef H5\r\n\t\t\t\t\tawait this.getUserInfo()\r\n\t\t\t\t\t// #endif \r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!this.configInfo.id || refresh) {\r\n\t\t\t\t\tawait this.getConfigInfo()\r\n\t\t\t\t}\r\n\t\t\t\tawait this.getList(1, true)\r\n\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\tkey: 'pageActive',\r\n\t\t\t\t\tval: true\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\tinitRefresh() {\r\n\t\t\t\tthis.param.page = 1\r\n\t\t\t\tthis.initIndex(true)\r\n\t\t\t},\r\n\t\t\ttoAppShare() {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid: pid = 0\r\n\t\t\t\t} = this.userInfo\r\n\t\t\t\tlet title = this.$t('action.attendantName')\r\n\t\t\t\tlet {\r\n\t\t\t\t\tsiteroot\r\n\t\t\t\t} = siteInfo\r\n\t\t\t\tlet url = siteroot.split('/index.php')[0]\r\n\t\t\t\tlet href = `${url}/h5/#/pages/technician?pid=${pid}`\r\n\t\t\t\tlet imageUrl = ''\r\n\t\t\t\tthis.$jweixin.wxReady(() => {\r\n\t\t\t\t\tthis.$jweixin.showOptionMenu()\r\n\t\t\t\t\tthis.$jweixin.shareAppMessage(title, '', href, imageUrl)\r\n\t\t\t\t\tthis.$jweixin.shareTimelineMessage(title, href, imageUrl)\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\tpickerChange(e, val) {\r\n\t\t\t\tlet ind = e.target.value\r\n\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\tkey: 'cityIndex',\r\n\t\t\t\t\tval: ind\r\n\t\t\t\t})\r\n\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\tkey: 'cityId',\r\n\t\t\t\t\tval: this.cityList[ind].id\r\n\t\t\t\t})\r\n\t\t\t\tthis.getList(1)\r\n\t\t\t},\r\n\t\t\ttoOpenLocation() {\r\n\t\t\t\tthis.$util.checkAuth({\r\n\t\t\t\t\ttype: 'userLocation'\r\n\t\t\t\t})\r\n\t\t\t\t// #ifdef APP-PLUS\r\n\t\t\t\tuni.getSystemInfo({\r\n\t\t\t\t\tsuccess: (sys) => {\r\n\t\t\t\t\t\tif (sys.platform == 'ios') {\r\n\t\t\t\t\t\t\tplus.runtime.openURL(\"app-settings://\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvar main = plus.android.runtimeMainActivity();\r\n\t\t\t\t\t\t\tvar Intent = plus.android.importClass(\r\n\t\t\t\t\t\t\t\t\"android.content.Intent\");\r\n\t\t\t\t\t\t\t//可能应该直接进入应用列表的权限设置?=> android.settings.APPLICATION_SETTINGS \r\n\t\t\t\t\t\t\tvar mIntent = new Intent(\r\n\t\t\t\t\t\t\t\t'android.settings.LOCATION_SOURCE_SETTINGS'\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tmain.startActivity(mIntent);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t})\r\n\t\t\t\t// #endif\r\n\t\t\t},\r\n\t\t\ttoSearch(val) {\r\n\t\t\t\tlet param = this.$util.deepCopy(this.param)\r\n\t\t\t\tparam.coach_id = ''\r\n\t\t\t\tparam.coach_name = val\r\n\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\tkey: 'param',\r\n\t\t\t\t\tval: param\r\n\t\t\t\t})\r\n\t\t\t\tthis.getList(1)\r\n\t\t\t},\r\n\t\t\txuanzediqu(e){\r\n\t\t\t\tlet that=this\r\n\t\t\t\tconst appAuthorizeSetting = uni.getAppAuthorizeSetting()\r\n\t\t\t\tconsole.log(9987,appAuthorizeSetting);\r\n\t\t\t\tif(appAuthorizeSetting.locationAuthorized!='authorized'){\r\n\t\t\t\t\tuni.showModal({\r\n\t\t\t\t\t\ttitle: '提示',\r\n\t\t\t\t\t\tcontent: '允许获取您的位置信息,以便获取您附近的服务人员,更好的为您服务',\r\n\t\t\t\t\t\tsuccess: function (res) {\r\n\t\t\t\t\t\t\tif (res.confirm) {\r\n\t\t\t\t\t\t\t\tthat.toChooseLocation(e)\r\n\t\t\t\t\t\t\t} else if (res.cancel) {\r\n\t\t\t\t\t\t\t\tconsole.log('用户点击取消');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}else{\r\n\t\t\t\t\tthat.toChooseLocation(e)\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\t// 选择地区\r\n\t\t\tasync toChooseLocation(e) {\r\n\t\t\t\t\r\n\t\t\t\tawait this.$util.checkAuth({\r\n\t\t\t\t\ttype: 'userLocation'\r\n\t\t\t\t})\r\n\t\t\t\tlet {\r\n\t\t\t\t\tlat: locaLat = '',\r\n\t\t\t\t\tlng: locaLng = ''\r\n\t\t\t\t} = this.location\r\n\t\t\t\tlet param = {}\r\n\t\t\t\tif (!locaLat && !locaLng) {\r\n\t\t\t\t\t// #ifdef H5\r\n\t\t\t\t\tif (this.$jweixin.isWechat()) {\r\n\t\t\t\t\t\tthis.$util.showLoading()\r\n\t\t\t\t\t\tawait this.$jweixin.wxReady2();\r\n\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\tlatitude,\r\n\t\t\t\t\t\t\tlongitude\r\n\t\t\t\t\t\t} = await this.$jweixin.getWxLocation()\r\n\t\t\t\t\t\tlocaLat = latitude\r\n\t\t\t\t\t\tlocaLng = longitude\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// #endif\r\n\t\t\t\t\t// #ifdef APP-PLUS\r\n\t\t\t\t\tlet location = await this.$util.getBmapLocation()\r\n\t\t\t\t\tlocaLat = location.lat\r\n\t\t\t\t\tlocaLng = location.lng\r\n\t\t\t\t\t// #endif\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// #ifndef MP-WEIXIN\r\n\t\t\t\tparam = {\r\n\t\t\t\t\tlatitude: locaLat,\r\n\t\t\t\t\tlongitude: locaLng\r\n\t\t\t\t}\r\n\t\t\t\t// #endif\r\n\t\t\t\tlet [, {\r\n\t\t\t\t\taddress = '',\r\n\t\t\t\t\tlongitude: lng,\r\n\t\t\t\t\tlatitude: lat,\r\n\t\t\t\t\tprovince = '',\r\n\t\t\t\t\tcity = '',\r\n\t\t\t\t\tdistrict = '',\r\n\t\t\t\t}] = await uni.chooseLocation(param);\r\n\t\t\t\tif (!lng) return\r\n\t\t\t\tlet location = {\r\n\t\t\t\t\tlng,\r\n\t\t\t\t\tlat,\r\n\t\t\t\t\taddress,\r\n\t\t\t\t\tprovince,\r\n\t\t\t\t\tcity,\r\n\t\t\t\t\tdistrict\r\n\t\t\t\t}\r\n\t\t\t\tthis.updateUserItem({\r\n\t\t\t\t\tkey: 'location',\r\n\t\t\t\t\tval: location\r\n\t\t\t\t})\r\n\t\t\t\tawait this.getList(1, true, 1)\r\n\t\t\t\t// this.initIndex()\r\n\t\t\t},\r\n\t\t\tasync getList(page = 0, refresh = false, change = 0) {\r\n\t\t\t\tif (page) {\r\n\t\t\t\t\tlet param = this.$util.deepCopy(this.param)\r\n\t\t\t\t\tparam.page = page\r\n\t\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\t\tkey: 'param',\r\n\t\t\t\t\t\tval: param\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t\tlet {\r\n\t\t\t\t\tlocation\r\n\t\t\t\t} = this\r\n\t\t\t\tif (!location.lat || (location.lat && location.address == '定位失败')) {\r\n\t\t\t\t\t// #ifdef H5\r\n\t\t\t\t\tif (this.$jweixin.isWechat()) {\r\n\t\t\t\t\t\tthis.$util.showLoading()\r\n\t\t\t\t\t\t// await this.$jweixin.initJssdk();\r\n\t\t\t\t\t\tawait this.$jweixin.wxReady2();\r\n\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\tlat = '', lng = ''\r\n\t\t\t\t\t\t} = location\r\n\t\t\t\t\t\tif (!lat && !lng) {\r\n\t\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\t\tlatitude,\r\n\t\t\t\t\t\t\t\tlongitude\r\n\t\t\t\t\t\t\t} = await this.$jweixin.getWxLocation()\r\n\t\t\t\t\t\t\tlat = latitude\r\n\t\t\t\t\t\t\tlng = longitude\r\n\t\t\t\t\t\t\tlocation = {\r\n\t\t\t\t\t\t\t\tlng,\r\n\t\t\t\t\t\t\t\tlat,\r\n\t\t\t\t\t\t\t\taddress: '定位失败',\r\n\t\t\t\t\t\t\t\tprovince: '',\r\n\t\t\t\t\t\t\t\tcity: '',\r\n\t\t\t\t\t\t\t\tdistrict: ''\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (lat && lng) {\r\n\t\t\t\t\t\t\tlet key = `${lat},${lng}`\r\n\t\t\t\t\t\t\tlet data = await this.$api.base.getMapInfo({\r\n\t\t\t\t\t\t\t\tlocation: key\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\t\tstatus,\r\n\t\t\t\t\t\t\t\tresult\r\n\t\t\t\t\t\t\t} = JSON.parse(data)\r\n\t\t\t\t\t\t\tif (status == 0) {\r\n\t\t\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\t\t\taddress,\r\n\t\t\t\t\t\t\t\t\taddress_component\r\n\t\t\t\t\t\t\t\t} = result\r\n\t\t\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\t\t\tcity,\r\n\t\t\t\t\t\t\t\t\tdistrict\r\n\t\t\t\t\t\t\t\t} = address_component\r\n\t\t\t\t\t\t\t\tlocation = {\r\n\t\t\t\t\t\t\t\t\tlng,\r\n\t\t\t\t\t\t\t\t\tlat,\r\n\t\t\t\t\t\t\t\t\taddress,\r\n\t\t\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\t\t\tcity,\r\n\t\t\t\t\t\t\t\t\tdistrict\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// #endif\r\n\t\t\t\t\t// #ifndef H5\r\n\t\t\t\t\tlocation = await this.$util.getBmapLocation()\r\n\t\t\t\t\t// #endif\r\n\t\t\t\t\tthis.updateUserItem({\r\n\t\t\t\t\t\tkey: 'location',\r\n\t\t\t\t\t\tval: location\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t\tlet {\r\n\t\t\t\t\tlng = 0,\r\n\t\t\t\t\t\tlat = 0\r\n\t\t\t\t} = location\r\n\r\n\t\t\t\tif (refresh) {\r\n\t\t\t\t\tawait this.getCityList({\r\n\t\t\t\t\t\tlng,\r\n\t\t\t\t\t\tlat,\r\n\t\t\t\t\t\tchange\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet {\r\n\t\t\t\t\tlist: oldList,\r\n\t\t\t\t\ttabList,\r\n\t\t\t\t\tactiveIndex,\r\n\t\t\t\t\tcityList,\r\n\t\t\t\t\tcityIndex,\r\n\t\t\t\t\tcityId: city_id\r\n\t\t\t\t} = this\r\n\r\n\t\t\t\tlet param = this.$util.deepCopy(this.param)\r\n\r\n\t\t\t\tlet ind = cityList.findIndex(item => {\r\n\t\t\t\t\treturn item.id == city_id\r\n\t\t\t\t})\r\n\r\n\t\t\t\tif (ind == -1) {\r\n\t\t\t\t\tthis.$refs.choose_city_item.open()\r\n\t\t\t\t\tthis.loading = false\r\n\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\t\tkey: 'list',\r\n\t\t\t\t\t\tval: {\r\n\t\t\t\t\t\t\tdata: [],\r\n\t\t\t\t\t\t\tlast_page: 1,\r\n\t\t\t\t\t\t\tcurrent_page: 1\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcity_id = ind == -1 ? 0 : city_id\r\n\t\t\t\tcityIndex = ind == -1 ? 0 : ind\r\n\r\n\r\n\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\tkey: 'cityIndex',\r\n\t\t\t\t\tval: cityIndex\r\n\t\t\t\t})\r\n\r\n\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\tkey: 'cityId',\r\n\t\t\t\t\tval: city_id\r\n\t\t\t\t})\r\n\r\n\t\t\t\tparam = Object.assign({}, param, {\r\n\t\t\t\t\tlng,\r\n\t\t\t\t\tlat,\r\n\t\t\t\t\tcity_id\r\n\t\t\t\t})\r\n\r\n\t\t\t\tlet {\r\n\t\t\t\t\tcoach_format = 1\r\n\t\t\t\t} = this.configInfo\r\n\r\n\t\t\t\tif (coach_format == 1) {\r\n\t\t\t\t\tparam.type = tabList[activeIndex].id\r\n\t\t\t\t}\r\n\r\n\t\t\t\tawait this.getServiceCoachList(param)\r\n\t\t\t\tthis.loading = false\r\n\t\t\t\tthis.$util.hideAll()\r\n\t\t\t},\r\n\t\t\thanderTabChange(index) {\r\n\t\t\t\tthis.updateTechnicianItem({\r\n\t\t\t\t\tkey: 'activeIndex',\r\n\t\t\t\t\tval: index\r\n\t\t\t\t})\r\n\t\t\t\tthis.$util.showLoading()\r\n\t\t\t\tuni.pageScrollTo({\r\n\t\t\t\t\tscrollTop: 0\r\n\t\t\t\t})\r\n\t\t\t\tthis.getList(1)\r\n\t\t\t},\r\n\t\t\tasync toShowPopup(index, key) {\r\n\t\t\t\tthis.$refs.technician_list_popup.toShowPopup(this.list.data[index], key)\r\n\t\t\t},\r\n\t\t\tasync toCollect(index) {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid,\r\n\t\t\t\t\tis_collect,\r\n\t\t\t\t\tcollect_num\r\n\t\t\t\t} = this.list.data[index]\r\n\t\t\t\tlet methodModel = is_collect ? 'delCollect' : 'addCollect'\r\n\t\t\t\tawait this.$api.mine[methodModel]({\r\n\t\t\t\t\tcoach_id: id\r\n\t\t\t\t})\r\n\t\t\t\tthis.$util.showToast({\r\n\t\t\t\t\ttitle: is_collect ? '取消成功' : '收藏成功'\r\n\t\t\t\t})\r\n\t\t\t\tthis.list.data[index].is_collect = is_collect == 1 ? 0 : 1\r\n\t\t\t\tthis.list.data[index].collect_num = is_collect == 1 ? collect_num - 1 :\r\n\t\t\t\t\tcollect_num + 1\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n\r\n<style lang=\"scss\">\r\n</style>"],"sourceRoot":""} |