1 line
19 KiB
Plaintext
1 line
19 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:////Users/Ian/dnmp/www/frontend/hengmei-mp/pagesA/ppointmentEv/ppointmentEv.vue?566e","webpack:////Users/Ian/dnmp/www/frontend/hengmei-mp/pagesA/ppointmentEv/ppointmentEv.vue?cb78","webpack:////Users/Ian/dnmp/www/frontend/hengmei-mp/pagesA/ppointmentEv/ppointmentEv.vue?bf16","webpack:////Users/Ian/dnmp/www/frontend/hengmei-mp/pagesA/ppointmentEv/ppointmentEv.vue?5e85","uni-app:///pagesA/ppointmentEv/ppointmentEv.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;kDAAA;AACA;AACA,kH,6FAFmBA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC;AAGnBC,UAAU,CAACC,qBAAD,CAAV,C;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAyH;AACzH;AACgE;AACL;;;AAG3D;AACmN;AACnN,gBAAgB,iNAAU;AAC1B,EAAE,kFAAM;AACR,EAAE,uFAAM;AACR,EAAE,gGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,2FAAU;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;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAy1B,CAAgB,0yBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACoF72B;AACA,MADA,kBACA;AACA;AACA,oBADA;AAEA,kBAFA,EAEA;AACA,gBAHA,EAGA;AACA,oBAJA;AAKA,eALA,EAKA;AACA,gBANA,EAMA;AACA,cAPA,EAOA;AACA,oBARA;AASA,oBATA;AAUA,iBAVA;AAWA,kBAXA;AAYA,mBAZA;AAaA,qBAbA;AAcA,eAdA;AAeA,4BAfA;AAgBA,iBAhBA,EAgBA;AACA,cAjBA,EAiBA;AACA,cAlBA,EAkBA;AACA,kBAnBA,EAmBA;AACA,gBApBA,EAoBA;AACA,gBArBA,EAqBA;AACA,oBAtBA;;AAwBA,GA1BA;AA2BA;AACA;AACA,eAFA,yBAEA;AACA;AACA,KAJA;AAKA,gBALA,0BAKA;AACA;AACA,KAPA,EA3BA;;AAoCA,QApCA,oBAoCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GA3CA;AA4CA;AACA,UADA,kBACA,EADA,EACA,IADA,EACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eALA;AAMA;AACA,2BADA;AAEA,iCAFA;AAGA,2BAHA;AAIA,mCAJA;AAKA,qCALA;;AAOA;AACA,aAjBA;AAkBA,WAnBA,MAmBA;AACA;AACA;AACA,2BADA;AAEA,iCAFA;AAGA,sBAHA;AAIA,mCAJA;AAKA,+BALA;;AAOA;AACA,aATA;AAUA;AACA;AACA,OArCA,EAqCA,mBArCA;AAsCA,KAxCA;AAyCA,gBAzCA,0BAyCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BADA;AAEA,iCAFA;AAGA,6BAHA;;AAKA;AACA,aAPA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCADA;AAEA,4BAFA;AAGA,mCAHA;;AAKA;AACA,aATA;AAUA;AACA;AACA;AACA;AACA;AACA,2BADA;AAEA,gCAFA;AAGA,mCAHA;;AAKA;AACA;AACA,aARA;AASA;;AAEA;AACA,OA9CA,EA8CA,mBA9CA;AA+CA,KAzFA;AA0FA,UA1FA,oBA0FA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,OAFA,MAEA;AACA;AACA,+BADA,EACA;AACA,wBAFA,EAEA;AACA,gCAHA,EAGA;AACA,+BAJA,EAIA;AACA,iCALA,EAKA;AACA,4BANA,CAMA;AANA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEADA;AAEA;AACA;AACA;AACA,iBALA;;AAOA,aATA,MASA;AACA;AACA;AACA;AACA,WAfA,EAeA,mBAfA;AAgBA;AACA;AACA,KAhIA;AAiIA,aAjIA,uBAiIA;AACA;AACA;AACA,KApIA;AAqIA,QArIA,kBAqIA;AACA;AACA,eADA;;AAGA,KAzIA;AA0IA,cA1IA,sBA0IA,KA1IA,EA0IA;AACA;AACA;AACA;AACA;AACA;AACA,KAhJA;AAiJA,YAjJA,oBAiJA,KAjJA,EAiJA;AACA;AACA;AACA;AACA;AACA,SAFA;AAGA;AACA;AACA,KAzJA;AA0JA,YA1JA,oBA0JA,KA1JA,EA0JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAnKA;AAoKA,aApKA,qBAoKA,KApKA,EAoKA;AACA;AACA;AACA;AACA;AACA,KAzKA;AA0KA,cA1KA,sBA0KA,KA1KA,EA0KA;AACA;AACA;AACA,KA7KA,EA5CA,E","file":"pagesA/ppointmentEv/ppointmentEv.js","sourcesContent":["import 'uni-pages';wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pagesA/ppointmentEv/ppointmentEv.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./ppointmentEv.vue?vue&type=template&id=1eb6a88b&\"\nvar renderjs\nimport script from \"./ppointmentEv.vue?vue&type=script&lang=js&\"\nexport * from \"./ppointmentEv.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../../Applications/HBuilderX.app/Contents/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 = \"pagesA/ppointmentEv/ppointmentEv.vue\"\nexport default component.exports","export * from \"-!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ppointmentEv.vue?vue&type=template&id=1eb6a88b&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ppointmentEv.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../../../Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ppointmentEv.vue?vue&type=script&lang=js&\"","<template>\n\t<view>\n\t\t<!-- 状态栏 -->\n\t\t<status-nav :titleVal=\"'自主预约'\" :statusTitle=\"true\"></status-nav>\n\t\t<!-- 自定义二级分类 -->\n\t\t<!-- 列表 -->\n\t\t<view :style=\"{paddingTop: statusHeight+'px'}\" class=\"pad-zy20\">\n\t\t\t<view class=\"bacf mar-s25 pad-zy20 radius20 fon28 col3 pad-x40\">\n\t\t\t\t<view class=\"disac pad-s32\">\n\t\t\t\t\t<view class=\"flexs mar-y20\">预约类别</view>\n\t\t\t\t\t<view @tap=\"openXial(0)\" class=\"disjbac width100 radius10 pad-zy20 xiala posir\">\n\t\t\t\t\t\t<view>{{category}}</view>\n\t\t\t\t\t\t<image :class=\"isZhuan?'zhuan':'nozhuan'\" src=\"/static/public/sanj.png\" mode=\"aspectFill\"></image>\n\t\t\t\t\t\t<view v-if=\"isZhuan\" class=\"posia bacf radius10 xial-box\">\n\t\t\t\t\t\t\t<view class=\"pad-zy20 xial-item-box\">\n\t\t\t\t\t\t\t\t<view @tap=\"chooseXia(indexl)\" :class=\"xialCurrent==indexl?'pcol pbord':''\" v-for=\"(iteml,indexl) in xialone\" :key=\"indexl\">{{iteml.title}}</view>\n\t\t\t\t\t\t\t</view>\n\t\t\t\t\t\t</view>\n\t\t\t\t\t</view>\n\t\t\t\t</view>\n\t\t\t\t<!-- <view class=\" disac pad-s32\">\n\t\t\t\t\t<view class=\"flexs mar-y20\">选择医生</view>\n\t\t\t\t\t<view @tap=\"openXial(1)\" class=\"disjbac width100 radius10 pad-zy20 xiala posir\">\n\t\t\t\t\t\t<view>{{categoryT}}</view>\n\t\t\t\t\t\t<image :class=\"isZhuanT?'zhuan':'nozhuan'\" src=\"/static/public/sanj.png\" mode=\"aspectFill\"></image>\n\t\t\t\t\t\t<view v-if=\"isZhuanT\" class=\"posia bacf radius10 xial-box\">\n\t\t\t\t\t\t\t<view class=\"pad-zy20 xial-item-box\">\n\t\t\t\t\t\t\t\t<view @tap=\"chooseXiaT(indext)\" :class=\"xialCT==indext?'pcol':''\" v-for=\"(itemt,indext) in xialTwo\" :key=\"indext\">{{itemt}}</view>\n\t\t\t\t\t\t\t</view>\n\t\t\t\t\t\t</view>\n\t\t\t\t\t</view>\n\t\t\t\t</view> -->\n\t\t\t\t<!-- 预约日期 -->\n\t\t\t\t<view class=\"mar-s20 mar-x30\">预约日期</view>\n\t\t\t\t<scroll-view scroll-x >\n\t\t\t\t\t<view class=\"disac\">\n\t\t\t\t\t\t<view @tap=\"chooseTime(index)\" class=\"disjcac fc flexs radius20 mar-y20 yutime borbot-df\" :class=\"item.status==0?'bcdb col3':'colc'\" :style=\"{background:timeCurrent==index?publicColor:'',border:timeCurrent==index?`2rpx solid ${publicColor}`:''}\" v-for=\"(item,index) in dataList\" :key=\"index\">\n\t\t\t\t\t\t\t<view :class=\"timeCurrent==index?'colf':'col3'\" class=\"bold fon28\">{{item.title}}</view>\n\t\t\t\t\t\t\t<view :class=\"timeCurrent==index?'colf':''\" class=\"fon26 mar-s10\">{{item.time}}</view>\n\t\t\t\t\t\t</view>\n\t\t\t\t\t</view>\n\t\t\t\t</scroll-view>\n\t\t\t\t<!-- 时间段 -->\n\t\t\t\t<view class=\"mar-s20 mar-x10\">时 间 段</view>\n\t\t\t\t<view class=\"disjb fw\">\n\t\t\t\t\t<view @tap=\"chooseTD(indextd)\" :style=\"{background:itemtd.tdStatus?publicColor:'',border:itemtd.tdStatus?`2rpx solid ${publicColor}`:''}\" :class=\"itemtd.num==0?'bcdb':''\" class=\"tc radius10 mar-x30 col3 timed borbot-df\" v-for=\"(itemtd,indextd) in dataTD\" :key=\"indextd\">\n\t\t\t\t\t\t<view :class=\"itemtd.tdStatus?'colf':''\">{{itemtd.ttime}}</view>\n\t\t\t\t\t</view>\n\t\t\t\t</view>\n\t\t\t\t<!-- 联系人 -->\n\t\t\t\t<view class=\"disac mar-s30\">\n\t\t\t\t\t<view class=\"mar-y20 flexs titlel\">联 系 人</view>\n\t\t\t\t\t<view class=\"width100 radius10 pad-zy20 borbot-cc height-68\">\n\t\t\t\t\t\t<input v-model=\"lname\" maxlength=\"10\" class=\"fon28 height-68\" type=\"text\" placeholder=\"请填写联系人姓名\"/>\n\t\t\t\t\t</view>\n\t\t\t\t</view>\n\t\t\t\t<!-- 联系方式 -->\n\t\t\t\t<view class=\"disac mar-s20\">\n\t\t\t\t\t<view class=\"mar-y20 flexs titlel\">联系方式</view>\n\t\t\t\t\t<view class=\"width100 radius10 pad-zy20 borbot-cc height-68\">\n\t\t\t\t\t\t<input v-model=\"lphone\" maxlength=\"11\" class=\"fon28 height-68\" type=\"text\" placeholder=\"请输入联系电话\"/>\n\t\t\t\t\t</view>\n\t\t\t\t</view>\n\t\t\t\t<!-- 留言信息 -->\n\t\t\t\t<view class=\"dis mar-s20\">\n\t\t\t\t\t<view class=\"mar-y20 flexs mar-s20 titlel\">留言信息</view>\n\t\t\t\t\t<view class=\"width100 radius10 pad20 borbot-cc\" style=\"height: 300rpx;\">\n\t\t\t\t\t\t<textarea v-model=\"lmsg\" class=\"fon28\" maxlength=\"500\" style=\"height: 300rpx;width: auto;\" placeholder=\"请填写内容\"/>\n\t\t\t\t\t</view>\n\t\t\t\t</view>\n\t\t\t\t<!-- 立即提交底部按钮 -->\n\t\t\t\t<view @tap=\"submit\" class=\"fon30 radius20 tc colf bold0 btnl\" :style=\"{background:publicColor}\">{{btnCon}}</view>\n\t\t\t</view>\n\t\t\t<!-- 弹框 -->\n\t\t\t<pu-po :isShowT=\"isShowT\" :isCenter=\"true\" :contentVal=\"'提交成功!等待审核'\" :comfrimVal=\"'好的'\" @comfirmev=\"comfirmev\"></pu-po>\n\t\t</view>\n\t\t<!-- 底部客服 -->\n\t\t<public-customer :nright=\"20\"></public-customer>\n\t\t<!-- 用户信息授权,手机号授权 -->\n\t\t<auth-userInfo-mobileInfo></auth-userInfo-mobileInfo>\n\t</view>\n</template>\n\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimeCurrent:0,\n\t\t\t\tdataList:[],//日期\n\t\t\t\tdataTD:[],//时间段\n\t\t\t\tisShowT:false,\n\t\t\t\tlname:'',//联系人姓名\n\t\t\t\tlphone:'',//联系方式\n\t\t\t\tlmsg:'',//留言信息\n\t\t\t\tisZhuan:false,\n\t\t\t\txialCurrent:0,\n\t\t\t\txialone:[],\n\t\t\t\tcategory:'',\n\t\t\t\tcategoryT:'',\n\t\t\t\tisZhuanT:false,\n\t\t\t\txialCT:0,\n\t\t\t\txialTwo:['杨幂','周星驰'],\n\t\t\t\ttype_id:'',//预约类别ID\n\t\t\t\tgday:'',//日期\n\t\t\t\tdtId:[],//暂存禁选时间段ID\n\t\t\t\tzanTimeD:[],//暂存时间段\n\t\t\t\tzanDay:[],//暂存日期\n\t\t\t\tdangId:'',//当前预约时间段ID\n\t\t\t\tbtnCon:'立即提交'\n\t\t\t}\n\t\t},\n\t\tcomputed: {\n\t\t\t// 主题颜色\n\t\t\tpublicColor() {\n\t\t\t\treturn this.$store.state.publicColor\n\t\t\t},\n\t\t\tstatusHeight() {\n\t\t\t\treturn this.$store.state.statusHeight\n\t\t\t}\n\t\t},\n\t\tonLoad() {\n\t\t\tthis.category = this.xialone[0]\n\t\t\tthis.categoryT = this.xialTwo[0]\n\t\t\tif(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){\n\t\t\t\tthis.checkZParmas();\n\t\t\t\tthis.lphone = uni.getStorageSync('phone');\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tgtimeD(id,gday){\n\t\t\t\tthis.$requst.post('user/appointment-period-full',{type_id:id,day:gday}).then(res=>{\n\t\t\t\t\t// console.log('查询预约分类某天已约满的时间段:',res);\n\t\t\t\t\tif(res.code==0){\n\t\t\t\t\t\tthis.dtId = res.data\n\t\t\t\t\t\tthis.dataTD = []\n\t\t\t\t\t\tif(this.dtId.length!=0){\n\t\t\t\t\t\t\tthis.zanTimeD.forEach((item,index)=>{\n\t\t\t\t\t\t\t\tlet newNum = 1\n\t\t\t\t\t\t\t\tlet newTdStatus = false\n\t\t\t\t\t\t\t\tthis.dtId.forEach(item1=>{\n\t\t\t\t\t\t\t\t\tif(item.id==item1.id){\n\t\t\t\t\t\t\t\t\t\tnewNum = 0\n\t\t\t\t\t\t\t\t\t\tnewTdStatus = false\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tlet tdObj = {\n\t\t\t\t\t\t\t\t\tid:item.id,\n\t\t\t\t\t\t\t\t\tttime:item.ttime,\n\t\t\t\t\t\t\t\t\tnum:newNum,\n\t\t\t\t\t\t\t\t\tstatus:item.status,\n\t\t\t\t\t\t\t\t\ttdStatus:newTdStatus\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.dataTD.push(tdObj)\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.zanTimeD.forEach(item=>{\n\t\t\t\t\t\t\t\tlet tdObj = {\n\t\t\t\t\t\t\t\t\tid:item.id,\n\t\t\t\t\t\t\t\t\tttime:item.ttime,\n\t\t\t\t\t\t\t\t\tnum:1,\n\t\t\t\t\t\t\t\t\tstatus:item.status,\n\t\t\t\t\t\t\t\t\ttdStatus:false\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.dataTD.push(tdObj)\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},error=>{})\n\t\t\t},\n\t\t\tcheckZParmas(){//查询参数\n\t\t\t\tthis.$requst.post('user/appointment-parameters',{page:1,size:20}).then(res=>{\n\t\t\t\t\t// console.log('查询自主预约列表:',res);\n\t\t\t\t\tif(res.code==0){\n\t\t\t\t\t\tthis.gtimeD(res.data.types[0].id,res.data.days[0].day)\n\t\t\t\t\t\t// 预约类别\n\t\t\t\t\t\tif(res.data.types.length!=0){\n\t\t\t\t\t\t\tres.data.types.forEach(item=>{\n\t\t\t\t\t\t\t\tlet ycateObj = {\n\t\t\t\t\t\t\t\t\tid:item.id,\n\t\t\t\t\t\t\t\t\ttitle:item.title,\n\t\t\t\t\t\t\t\t\tmax:item.max\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.xialone.push(ycateObj)\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\tthis.type_id = this.xialone[0].id\n\t\t\t\t\t\t\tthis.category = this.xialone[0].title\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//预约日期\n\t\t\t\t\t\tif(res.data.days.length!=0){\n\t\t\t\t\t\t\tthis.gday = res.data.days[0].day\n\t\t\t\t\t\t\tthis.zanDay = res.data.days\n\t\t\t\t\t\t\tres.data.days.forEach(item=>{\n\t\t\t\t\t\t\t\tlet arr = item.day.split('-')\n\t\t\t\t\t\t\t\tlet newDay = arr[1]+'月'+arr[2]+'日'\n\t\t\t\t\t\t\t\tlet dayObj = {\n\t\t\t\t\t\t\t\t\ttitle:item.week,\n\t\t\t\t\t\t\t\t\ttime:newDay,\n\t\t\t\t\t\t\t\t\tstatus:item.status\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.dataList.push(dayObj)\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// 时间段\n\t\t\t\t\t\tif(res.data.times.length!=0){\n\t\t\t\t\t\t\tres.data.times.forEach((item,index)=>{\n\t\t\t\t\t\t\t\tlet tdObj = {\n\t\t\t\t\t\t\t\t\tid:item.id,\n\t\t\t\t\t\t\t\t\tttime:item.name,\n\t\t\t\t\t\t\t\t\tstatus:item.status,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// this.dataTD.push(tdObj)\n\t\t\t\t\t\t\t\tthis.zanTimeD.push(tdObj)\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t},error=>{})\n\t\t\t},\n\t\t\tsubmit(){\n\t\t\t\tif(!this.lname){\n\t\t\t\t\tthis.$toolAll.tools.showToast('请输入联系人姓名')\n\t\t\t\t} else if(!this.lphone){\n\t\t\t\t\tthis.$toolAll.tools.showToast('请输入联系电话')\n\t\t\t\t} else if(this.$toolAll.tools.isPhone(this.lphone)){\n\t\t\t\t\tthis.$toolAll.tools.showToast('请输入正确的联系电话')\n\t\t\t\t} else if(!this.dangId){\n\t\t\t\t\tthis.$toolAll.tools.showToast('请选择时间段')\n\t\t\t\t} else {\n\t\t\t\t\tlet parmas = {\n\t\t\t\t\t\ttype_id:this.type_id,//预约类型ID\n\t\t\t\t\t\tday:this.gday,//预约日期,如:2021-08-11\n\t\t\t\t\t\tperiod_id:this.dangId,//预约时间段ID\n\t\t\t\t\t\tuser_name:this.lname,//联系人姓名\n\t\t\t\t\t\tuser_phone:this.lphone,//联系人电话\n\t\t\t\t\t\tremarks:this.lmsg//预约留言信息,(500字以内)\n\t\t\t\t\t}\n\t\t\t\t\tif(this.btnCon=='立即提交'){\n\t\t\t\t\t\tthis.btnCon = \"正在提交...\"\n\t\t\t\t\t\tthis.$requst.post('user/appointment-apply',parmas).then(res=>{\n\t\t\t\t\t\t\t// console.log('提交预约申请:',res);\n\t\t\t\t\t\t\tif(res.code==0){\n\t\t\t\t\t\t\t\tthis.isShowT = true\n\t\t\t\t\t\t\t\twx.requestSubscribeMessage({\n\t\t\t\t\t\t\t\t\ttmplIds: ['uvGd7RqaegheGU-uVxR-uM3y2MadZeMOHdQaNiiWm8U'],\n\t\t\t\t\t\t\t\t\tsuccess: (res)=> { \n\t\t\t\t\t\t\t\t\t\tconsole.log('res',res);\n\t\t\t\t\t\t\t\t\t\tthis.isShowT = true\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.btnCon = \"立即提交\"\n\t\t\t\t\t\t\t\tthis.$toolAll.tools.showToast(res.msg)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},error=>{})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tcomfirmev(){\n\t\t\t\tthis.isShowT = false\n\t\t\t\tuni.navigateBack({delta:1})\n\t\t\t},\n\t\t\tgoYu(){//去预约\n\t\t\t\tuni.navigateTo({\n\t\t\t\t\turl:''\n\t\t\t\t})\n\t\t\t},\n\t\t\tchooseTime(index){\n\t\t\t\tif(this.dataList[index].status!=0){\n\t\t\t\t\tthis.timeCurrent = index\n\t\t\t\t\tthis.gday = this.zanDay[index].day\n\t\t\t\t\tthis.gtimeD(this.type_id,this.gday)\n\t\t\t\t}\n\t\t\t},\n\t\t\tchooseTD(index){//时间段选择事件\n\t\t\t\tif(this.dataTD[index].num!=0){\n\t\t\t\t\tthis.dangId = this.zanTimeD[index].id\n\t\t\t\t\tthis.dataTD.forEach(item=>{//发现为true的改为false,即控制单选,注释就表示多选\n\t\t\t\t\t\tif(item.tdStatus==true) item.tdStatus = false\n\t\t\t\t\t})\n\t\t\t\t\tthis.dataTD[index].tdStatus = !this.dataTD[index].tdStatus\n\t\t\t\t}\n\t\t\t},\n\t\t\topenXial(index){\n\t\t\t\tif(index==0) {\n\t\t\t\t\tthis.isZhuanT = false\n\t\t\t\t\tthis.isZhuan = !this.isZhuan\n\t\t\t\t}\n\t\t\t\tif(index==1) {\n\t\t\t\t\tthis.isZhuan = false\n\t\t\t\t\tthis.isZhuanT = !this.isZhuanT\n\t\t\t\t}\n\t\t\t},\n\t\t\tchooseXia(index){//预约类别选择事件\n\t\t\t\tthis.xialCurrent = index\n\t\t\t\tthis.category = this.xialone[index].title\n\t\t\t\tthis.type_id = this.xialone[index].id\n\t\t\t\tthis.gtimeD(this.type_id,this.gday)\n\t\t\t},\n\t\t\tchooseXiaT(index){\n\t\t\t\tthis.xialCT = index\n\t\t\t\tthis.categoryT = this.xialTwo[index]\n\t\t\t},\n\t\t}\n\t}\n</script>\n\n<style>\n</style>\n"],"sourceRoot":""} |