1 line
18 KiB
Plaintext
1 line
18 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js",null,"webpack:///D:/chenq/chen/hengmei/hengmei/pagesA/ppointmentEv/ppointmentEv.vue?aa7f","webpack:///D:/chenq/chen/hengmei/hengmei/pagesA/ppointmentEv/ppointmentEv.vue?d9d1","webpack:///D:/chenq/chen/hengmei/hengmei/pagesA/ppointmentEv/ppointmentEv.vue?d60b","uni-app:///pagesA/ppointmentEv/ppointmentEv.vue"],"names":["createPage","Page"],"mappings":";;;;;;;;;;kDAAA;AACA;AACA,kH;AACAA,UAAU,CAACC,qBAAD,CAAV,C;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAyH;AACzH;AACgE;AACL;;;AAG3D;AACmL;AACnL,gBAAgB,uLAAU;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;AAAyrB,CAAgB,wqBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACgF7sB;AACA,MADA,kBACA;AACA;AACA,gDADA;AAEA,oDAFA,EAEA;AACA,oBAHA;AAIA,kBAJA,EAIA;AACA,gBALA,EAKA;AACA,oBANA;AAOA,kBAPA;AAQA,eARA,EAQA;AACA,gBATA,EASA;AACA,cAVA,EAUA;AACA,oBAXA;AAYA,oBAZA;AAaA,2BAbA;AAcA,mBAdA;AAeA,qBAfA;AAgBA,eAhBA;AAiBA,4BAjBA;AAkBA,iBAlBA,EAkBA;AACA,cAnBA,EAmBA;AACA,cApBA,EAoBA;AACA,kBArBA,EAqBA;AACA,gBAtBA,EAsBA;AACA,gBAvBA,EAuBA;AACA,oBAxBA;;AA0BA,GA5BA;AA6BA,QA7BA,oBA6BA;AACA;AACA;AACA;AACA;AACA,GAlCA;AAmCA;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;AACA,2BADA;AAEA,iCAFA;AAGA,6BAHA;;AAKA;AACA,aAPA;AAQA;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,aAFA,MAEA;AACA;AACA;AACA;AACA,WARA,EAQA,mBARA;AASA;AACA;AACA,KAzHA;AA0HA,aA1HA,uBA0HA;AACA;AACA;AACA,KA7HA;AA8HA,QA9HA,kBA8HA;AACA;AACA,eADA;;AAGA,KAlIA;AAmIA,cAnIA,sBAmIA,KAnIA,EAmIA;AACA;AACA;AACA;AACA;AACA;AACA,KAzIA;AA0IA,YA1IA,oBA0IA,KA1IA,EA0IA;AACA;AACA;AACA;AACA;AACA,SAFA;AAGA;AACA;AACA,KAlJA;AAmJA,YAnJA,oBAmJA,KAnJA,EAmJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA5JA;AA6JA,aA7JA,qBA6JA,KA7JA,EA6JA;AACA;AACA;AACA;AACA;AACA,KAlKA;AAmKA,cAnKA,sBAmKA,KAnKA,EAmKA;AACA;AACA;AACA,KAtKA,EAnCA,E","file":"pagesA/ppointmentEv/ppointmentEv.js","sourcesContent":["import 'uni-pages';\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 \"!../../../../../../HbuilderX/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 \"-!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../HbuilderX/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 \"-!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../HbuilderX/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 \"-!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./ppointmentEv.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view>\r\n\t\t<!-- 状态栏 -->\r\n\t\t<status-nav :titleVal=\"'自主预约'\" :statusTitle=\"true\"></status-nav>\r\n\t\t<!-- 自定义二级分类 -->\r\n\t\t<!-- 列表 -->\r\n\t\t<view :style=\"{paddingTop: statusHNH+'px'}\" class=\"pad-zy20\">\r\n\t\t\t<view class=\"bacf mar-s25 pad-zy20 radius20 fon28 col3 pad-x40\">\r\n\t\t\t\t<view class=\"disac pad-s32\">\r\n\t\t\t\t\t<view class=\"flexs mar-y20\">预约类别</view>\r\n\t\t\t\t\t<view @tap=\"openXial(0)\" class=\"disjbac width100 radius10 pad-zy20 xiala posir\">\r\n\t\t\t\t\t\t<view>{{category}}</view>\r\n\t\t\t\t\t\t<image :class=\"isZhuan?'zhuan':'nozhuan'\" src=\"/static/public/sanj.png\" mode=\"aspectFill\"></image>\r\n\t\t\t\t\t\t<view v-if=\"isZhuan\" class=\"posia bacf radius10 xial-box\">\r\n\t\t\t\t\t\t\t<view class=\"pad-zy20 xial-item-box\">\r\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>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<!-- <view class=\" disac pad-s32\">\r\n\t\t\t\t\t<view class=\"flexs mar-y20\">选择医生</view>\r\n\t\t\t\t\t<view @tap=\"openXial(1)\" class=\"disjbac width100 radius10 pad-zy20 xiala posir\">\r\n\t\t\t\t\t\t<view>{{categoryT}}</view>\r\n\t\t\t\t\t\t<image :class=\"isZhuanT?'zhuan':'nozhuan'\" src=\"/static/public/sanj.png\" mode=\"aspectFill\"></image>\r\n\t\t\t\t\t\t<view v-if=\"isZhuanT\" class=\"posia bacf radius10 xial-box\">\r\n\t\t\t\t\t\t\t<view class=\"pad-zy20 xial-item-box\">\r\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>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view> -->\r\n\t\t\t\t<!-- 预约日期 -->\r\n\t\t\t\t<view class=\"mar-s20 mar-x30\">预约日期</view>\r\n\t\t\t\t<scroll-view scroll-x >\r\n\t\t\t\t\t<view class=\"disac\">\r\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\">\r\n\t\t\t\t\t\t\t<view :class=\"timeCurrent==index?'colf':'col3'\" class=\"bold fon28\">{{item.title}}</view>\r\n\t\t\t\t\t\t\t<view :class=\"timeCurrent==index?'colf':''\" class=\"fon26 mar-s10\">{{item.time}}</view>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</scroll-view>\r\n\t\t\t\t<!-- 时间段 -->\r\n\t\t\t\t<view class=\"mar-s20 mar-x10\">时 间 段</view>\r\n\t\t\t\t<view class=\"disjb fw\">\r\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\">\r\n\t\t\t\t\t\t<view :class=\"itemtd.tdStatus?'colf':''\">{{itemtd.ttime}}</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<!-- 联系人 -->\r\n\t\t\t\t<view class=\"disac mar-s30\">\r\n\t\t\t\t\t<view class=\"mar-y20 flexs titlel\">联 系 人</view>\r\n\t\t\t\t\t<view class=\"width100 radius10 pad-zy20 borbot-cc height-68\">\r\n\t\t\t\t\t\t<input v-model=\"lname\" class=\"fon28 height-68\" type=\"text\" placeholder=\"请填写联系人姓名\"/>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<!-- 联系方式 -->\r\n\t\t\t\t<view class=\"disac mar-s20\">\r\n\t\t\t\t\t<view class=\"mar-y20 flexs titlel\">联系方式</view>\r\n\t\t\t\t\t<view class=\"width100 radius10 pad-zy20 borbot-cc height-68\">\r\n\t\t\t\t\t\t<input v-model=\"lphone\" maxlength=\"11\" class=\"fon28 height-68\" type=\"text\" placeholder=\"请输入联系电话\"/>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<!-- 留言信息 -->\r\n\t\t\t\t<view class=\"dis mar-s20\">\r\n\t\t\t\t\t<view class=\"mar-y20 flexs mar-s20 titlel\">留言信息</view>\r\n\t\t\t\t\t<view class=\"width100 radius10 pad20 borbot-cc\" style=\"height: 300rpx;\">\r\n\t\t\t\t\t\t<textarea v-model=\"lmsg\" class=\"fon28\" maxlength=\"500\" style=\"height: 300rpx;width: auto;\" placeholder=\"请填写内容\"/>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<!-- 底部按钮 -->\r\n\t\t\t\t<view @tap=\"submit\" class=\"fon30 radius20 tc colf bold0 btnl\" :style=\"{background:publicColor}\">{{btnCon}}</view>\r\n\t\t\t</view>\r\n\t\t\t<!-- 弹框 -->\r\n\t\t\t<pu-po :isShowT=\"isShowT\" :isCenter=\"true\" :contentVal=\"'提交成功!等待审核'\" :comfrimVal=\"'好的'\" @comfirmev=\"comfirmev\"></pu-po>\r\n\t\t</view>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tstatusHNH:uni.getStorageSync('statusHNH'),\r\n\t\t\t\tpublicColor:uni.getStorageSync('publicColor'),//主题颜色\r\n\t\t\t\ttimeCurrent:0,\r\n\t\t\t\tdataList:[],//日期\r\n\t\t\t\tdataTD:[],//时间段\r\n\t\t\t\tisShowT:false,\r\n\t\t\t\tcategory:'',\r\n\t\t\t\tlname:'',//联系人姓名\r\n\t\t\t\tlphone:'',//联系方式\r\n\t\t\t\tlmsg:'',//留言信息\r\n\t\t\t\tisZhuan:false,\r\n\t\t\t\txialCurrent:0,\r\n\t\t\t\txialone:['植发','脱发'],\r\n\t\t\t\tcategoryT:'',\r\n\t\t\t\tisZhuanT:false,\r\n\t\t\t\txialCT:0,\r\n\t\t\t\txialTwo:['杨幂','周星驰'],\r\n\t\t\t\ttype_id:'',//预约类别ID\r\n\t\t\t\tgday:'',//日期\r\n\t\t\t\tdtId:[],//暂存禁选时间段ID\r\n\t\t\t\tzanTimeD:[],//暂存时间段\r\n\t\t\t\tzanDay:[],//暂存日期\r\n\t\t\t\tdangId:'',//当前预约时间段ID\r\n\t\t\t\tbtnCon:'立即提交'\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad() {\r\n\t\t\tthis.category = this.xialone[0]\r\n\t\t\tthis.categoryT = this.xialTwo[0]\r\n\t\t\tthis.checkZParmas()\r\n\t\t\t// this.$toolAll.tools.weekDate()\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tgtimeD(id,gday){\r\n\t\t\t\tthis.$requst.post('user/appointment-period-full',{type_id:id,day:gday}).then(res=>{\r\n\t\t\t\t\t// console.log('查询预约分类某天已约满的时间段:',res);\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tthis.dtId = res.data\r\n\t\t\t\t\t\tthis.dataTD = []\r\n\t\t\t\t\t\tif(this.dtId.length!=0){\r\n\t\t\t\t\t\t\tthis.zanTimeD.forEach((item,index)=>{\r\n\t\t\t\t\t\t\t\tlet newNum = 1\r\n\t\t\t\t\t\t\t\tlet newTdStatus = false\r\n\t\t\t\t\t\t\t\tthis.dtId.forEach(item1=>{\r\n\t\t\t\t\t\t\t\t\tif(item.id==item1.id){\r\n\t\t\t\t\t\t\t\t\t\tnewNum = 0\r\n\t\t\t\t\t\t\t\t\t\tnewTdStatus = false\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\tlet tdObj = {\r\n\t\t\t\t\t\t\t\t\tid:item.id,\r\n\t\t\t\t\t\t\t\t\tttime:item.ttime,\r\n\t\t\t\t\t\t\t\t\tnum:newNum,\r\n\t\t\t\t\t\t\t\t\tstatus:item.status,\r\n\t\t\t\t\t\t\t\t\ttdStatus:newTdStatus\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tthis.dataTD.push(tdObj)\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthis.zanTimeD.forEach(item=>{\r\n\t\t\t\t\t\t\t\tlet tdObj = {\r\n\t\t\t\t\t\t\t\t\tid:item.id,\r\n\t\t\t\t\t\t\t\t\tttime:item.ttime,\r\n\t\t\t\t\t\t\t\t\tnum:1,\r\n\t\t\t\t\t\t\t\t\tstatus:item.status,\r\n\t\t\t\t\t\t\t\t\ttdStatus:false\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tthis.dataTD.push(tdObj)\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},error=>{})\r\n\t\t\t},\r\n\t\t\tcheckZParmas(){//查询参数\r\n\t\t\t\tthis.$requst.post('user/appointment-parameters',{page:1,size:20}).then(res=>{\r\n\t\t\t\t\t// console.log('查询自主预约列表:',res);\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tthis.gtimeD(res.data.types[0].id,res.data.days[0].day)\r\n\t\t\t\t\t\t// 预约类别\r\n\t\t\t\t\t\tif(res.data.types.length!=0){\r\n\t\t\t\t\t\t\tthis.type_id = res.data.types[0].id\r\n\t\t\t\t\t\t\tres.data.types.forEach(item=>{\r\n\t\t\t\t\t\t\t\tlet ycateObj = {\r\n\t\t\t\t\t\t\t\t\tid:item.id,\r\n\t\t\t\t\t\t\t\t\ttitle:item.title,\r\n\t\t\t\t\t\t\t\t\tmax:item.max\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tthis.xialone.push(ycateObj)\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tthis.category = this.xialone[0].title\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//预约日期\r\n\t\t\t\t\t\tif(res.data.days.length!=0){\r\n\t\t\t\t\t\t\tthis.gday = res.data.days[0].day\r\n\t\t\t\t\t\t\tthis.zanDay = res.data.days\r\n\t\t\t\t\t\t\tres.data.days.forEach(item=>{\r\n\t\t\t\t\t\t\t\tlet arr = item.day.split('-')\r\n\t\t\t\t\t\t\t\tlet newDay = arr[1]+'月'+arr[2]+'日'\r\n\t\t\t\t\t\t\t\tlet dayObj = {\r\n\t\t\t\t\t\t\t\t\ttitle:item.week,\r\n\t\t\t\t\t\t\t\t\ttime:newDay,\r\n\t\t\t\t\t\t\t\t\tstatus:item.status\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tthis.dataList.push(dayObj)\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// 时间段\r\n\t\t\t\t\t\tif(res.data.times.length!=0){\r\n\t\t\t\t\t\t\tres.data.times.forEach((item,index)=>{\r\n\t\t\t\t\t\t\t\tlet tdObj = {\r\n\t\t\t\t\t\t\t\t\tid:item.id,\r\n\t\t\t\t\t\t\t\t\tttime:item.name,\r\n\t\t\t\t\t\t\t\t\tstatus:item.status,\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// this.dataTD.push(tdObj)\r\n\t\t\t\t\t\t\t\tthis.zanTimeD.push(tdObj)\r\n\t\t\t\t\t\t\t})\r\n\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},error=>{})\r\n\t\t\t},\r\n\t\t\tsubmit(){\r\n\t\t\t\tif(!this.lname){\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请输入联系人姓名')\r\n\t\t\t\t} else if(!this.lphone){\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请输入联系电话')\r\n\t\t\t\t} else if(this.$toolAll.tools.isPhone(this.lphone)){\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请输入正确的联系电话')\r\n\t\t\t\t} else if(!this.dangId){\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请选择时间段')\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlet parmas = {\r\n\t\t\t\t\t\ttype_id:this.type_id,//预约类型ID\r\n\t\t\t\t\t\tday:this.gday,//预约日期,如:2021-08-11\r\n\t\t\t\t\t\tperiod_id:this.dangId,//预约时间段ID\r\n\t\t\t\t\t\tuser_name:this.lname,//联系人姓名\r\n\t\t\t\t\t\tuser_phone:this.lphone,//联系人电话\r\n\t\t\t\t\t\tremarks:this.lmsg//预约留言信息,(500字以内)\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(this.btnCon=='立即提交'){\r\n\t\t\t\t\t\tthis.btnCon = \"正在提交...\"\r\n\t\t\t\t\t\tthis.$requst.post('user/appointment-apply',parmas).then(res=>{\r\n\t\t\t\t\t\t\t// console.log('提交预约申请:',res);\r\n\t\t\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\t\t\tthis.isShowT = true\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.btnCon = \"立即提交\"\r\n\t\t\t\t\t\t\t\tthis.$toolAll.tools.showToast(res.msg)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},error=>{})\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tcomfirmev(){\r\n\t\t\t\tthis.isShowT = false\r\n\t\t\t\tuni.navigateBack({delta:1})\r\n\t\t\t},\r\n\t\t\tgoYu(){//去预约\r\n\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\turl:''\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\tchooseTime(index){\r\n\t\t\t\tif(this.dataList[index].status!=0){\r\n\t\t\t\t\tthis.timeCurrent = index\r\n\t\t\t\t\tthis.gday = this.zanDay[index].day\r\n\t\t\t\t\tthis.gtimeD(this.type_id,this.gday)\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tchooseTD(index){//时间段选择事件\r\n\t\t\t\tif(this.dataTD[index].num!=0){\r\n\t\t\t\t\tthis.dangId = this.zanTimeD[index].id\r\n\t\t\t\t\tthis.dataTD.forEach(item=>{//发现为true的改为false,即控制单选,注释就表示多选\r\n\t\t\t\t\t\tif(item.tdStatus==true) item.tdStatus = false\r\n\t\t\t\t\t})\r\n\t\t\t\t\tthis.dataTD[index].tdStatus = !this.dataTD[index].tdStatus\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\topenXial(index){\r\n\t\t\t\tif(index==0) {\r\n\t\t\t\t\tthis.isZhuanT = false\r\n\t\t\t\t\tthis.isZhuan = !this.isZhuan\r\n\t\t\t\t}\r\n\t\t\t\tif(index==1) {\r\n\t\t\t\t\tthis.isZhuan = false\r\n\t\t\t\t\tthis.isZhuanT = !this.isZhuanT\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tchooseXia(index){//预约类别选择事件\r\n\t\t\t\tthis.xialCurrent = index\r\n\t\t\t\tthis.category = this.xialone[index].title\r\n\t\t\t\tthis.type_id = this.xialone[index].id\r\n\t\t\t\tthis.gtimeD(this.type_id,this.gday)\r\n\t\t\t},\r\n\t\t\tchooseXiaT(index){\r\n\t\t\t\tthis.xialCT = index\r\n\t\t\t\tthis.categoryT = this.xialTwo[index]\r\n\t\t\t},\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n</style>\r\n"],"sourceRoot":""} |