MainPage.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  1. <template>
  2. <div class="page">
  3. <Head :activeTab='activeTab' :allMoudles='allMoudles' :progress='progress'/>
  4. <!-- <div class="progress-bar">
  5. <div class="title">
  6. <span :class="{'active':activeTab==i.type}" :style="{width:(100/allMoudles.length)+'%'}" v-for="i in allMoudles">{{i.name}}</span>
  7. </div>
  8. <div class="progress">
  9. <p :style="{width:progress}"></p>
  10. </div>
  11. </div> -->
  12. <div class="wrapper">
  13. <div class="scrollPart" :style="{'paddingBottom':pdbm}">
  14. <!--<div class="right clearfix">
  15. <img src="../assets/patient.png" alt="" class="fr">
  16. <div class="content fr">
  17. <p>医生您好!我想咨询新型冠状病毒。(个人信息:{{userInfo.patientName}}{{userInfo.patientSex?','+userInfo.patientSex:''}}{{userInfo.patientAge?','+userInfo.patientAge+'岁':''}})</p>
  18. </div>
  19. </div>-->
  20. <div class="left clearfix">
  21. <img src="../images/doctor.png" alt="" class="fl">
  22. <div class="content fl">
  23. <p>欢迎来到{{userInfo.hospitalName}}!候诊期间请先填写自己的实际症状,信息会马上传送到您的预约医生,便于您实现快速就诊。</p>
  24. </div>
  25. </div>
  26. <!--<div class="left clearfix" @click="selectToggle(2,disData.symptom.result,true)">
  27. <img src="../assets/doctor.png" alt="" class="fl">
  28. <div class="content fl">
  29. <p>您哪里不舒服?</p>
  30. </div>
  31. </div>-->
  32. <UsualSymptom v-if="showUsual" @selectUsual="selectUsual"></UsualSymptom>
  33. <div class="right clearfix" v-if="selectedSymptom.name">
  34. <img src="../images/patient.png" alt="" class="fr">
  35. <div class="content fr">
  36. <p>{{selectedSymptom.description||selectedSymptom.name}}</p>
  37. </div>
  38. <span v-if="!canceledSym&&activeNum==0&&cancelNum===-1" class="edit" @click="cancelSymptom">修改</span>
  39. </div>
  40. <div v-for="(item,idx) in symptomQasList" :key="'0'+idx+item.id" v-if="activeTab">
  41. <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="activeNum" :cancelNum="cancelNum" :extNum ="[]"/>
  42. </div>
  43. <div v-for="(item,idx) in diagnoseQasList" :key="'1'+idx+item.id" v-if="activeTab==moduleKeys[1]||activeTab==moduleKeys[2]||activeTab==moduleKeys[3]">
  44. <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="activeNum" :extNum ="[symptomQasList.length]" :cancelNum="cancelNum"/>
  45. </div>
  46. <div v-for="(item,idx) in othersQasList" :key="'2'+idx+item.id" v-if="activeTab==moduleKeys[2]||activeTab==moduleKeys[3]">
  47. <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="activeNum" :extNum ="[symptomQasList.length,diagnoseQasList.length]" :cancelNum="cancelNum"/>
  48. </div>
  49. <div v-for="(item,idx) in addContentQasList" :key="'3'+idx+item.id" v-if="activeTab==moduleKeys[3]">
  50. <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="activeNum" :extNum ="[symptomQasList.length,diagnoseQasList.length,othersQasList.length]" :cancelNum="cancelNum"/>
  51. </div>
  52. </div>
  53. </div>
  54. <MultSelect @updataResult="updataResultSingle" :num="num" :symptomResult="symptomResult" v-if="type==3"></MultSelect>
  55. <Select @updataResult="updataResultSingle" :num="num" @warning="showWarn" @getExtQa="addExtQa" :symptomResult="symptomResult" v-if="type == 2"></Select>
  56. <Radio @updataResultSingle="updataResultSingle" @warning="showWarn" @getExtQa="addExtQa" :num="num" :symptomResult="symptomResult" v-if="type == 1"></Radio>
  57. <!--普通单列拨盘-->
  58. <Picker v-if="type==10" @confirm="updataResultSingle" :columns="getColumns().arr" :columnsp="getColumns().arrp" :num="num" :defaultIndex = "defaultIndex"></Picker>
  59. <!--时间拨盘,拨盘内容写死-->
  60. <Picker v-if="type == 9" :symptomResult="symptomResult" :columns="timeColumns" :columnsp="timeColumns" :defaultVal="pickDVal" @confirm="updataResultSingle" :num="num" :defaultIndex = "defaultIndex"></Picker>
  61. <PushSymptom v-if="type == 99" @updataResult="updataResultSingle" :num="num" @warning="showWarn"></PushSymptom>
  62. <!-- 上传图片 -->
  63. <UploadImg v-if="type==4"
  64. :num="num"
  65. :item="symptomResult"
  66. :moduleType="symptomResult.type"
  67. @updataResult="updataResultSingle"
  68. :imgList="imgs"/>
  69. <!-- 输入框 -->
  70. <!--<Input v-if="type==7"
  71. :num="num"
  72. :item="symptomResult"
  73. :key="symptomResult.id"
  74. @updata="updataResultSingle"/>-->
  75. <!-- 文本域 -->
  76. <ComTextArea v-if="type == 5"
  77. :num="num"
  78. :item="symptomResult"
  79. width="92%"
  80. @updata="updataResultSingle"/>
  81. <div class="submit" v-if="showPreview">
  82. <a href="javascript:void(0)" @click="previewRes">提交并预览</a>
  83. </div>
  84. <!--<div v-if="wrong" class="tip">{{waring}}</div>-->
  85. <TipWarning v-if="wrong" :text="waring" @close="closeTip"/>
  86. </div>
  87. </template>
  88. <script>
  89. import BScroll from 'better-scroll';
  90. import Radio from '../common/Radio';
  91. import Select from '../common/Select';
  92. import Dialog from '../common/Dialog';
  93. import Picker from '../common/Picker';
  94. import Label from '../common/Label.vue';
  95. import ComTextArea from '../common/ComTextArea.vue';
  96. /*import Input from '../common/Input.vue';*/
  97. import PickTime from '../common/PickTime.vue';
  98. import UploadImg from '../common/UploadImg.vue';
  99. import PushSymptom from '../common/PushSymptom.vue';
  100. import ConfirmBox from '../common/ConfirmBox'
  101. import UsualSymptom from '../common/UsualSymptom';
  102. import MultSelect from '../common/MultSelect.vue';
  103. import TipWarning from '../common/TipWarning.vue';
  104. import Head from '../common/Head.vue';
  105. import api from "../utils/api.js";
  106. import {mapState} from 'vuex';
  107. import {moduleCP,moduleConfig,getValuesArr,getNSum} from '@utils/tools'
  108. export default {
  109. name:'MainPage',
  110. data(){
  111. return {
  112. num:-1,//题目计数
  113. pickDVal:'1天', //时间控件默认值
  114. allMoudles:[],
  115. showUsual:false, //常用症状显示
  116. timeColumns:[], //固定2列时间滑块数据
  117. activeTab:1, //当前模块
  118. activeNum:0, //当前问题的index,整体顺序
  119. scroll:null,
  120. canceledSym:false, //是否已修改过主症状
  121. canceledQa:-1, //在对应模块的排行
  122. cancelNum:-1, //整体排行
  123. cancelTab:-1,
  124. deledUpload:[], //被删除的上传控件数据(记录用于修改时恢复)
  125. type :-1, //当前显示的控件类型
  126. showPreview:false,//显示预览按钮
  127. selectedSymptom:{},
  128. symptomResult:'',//症状选择
  129. connectResult:[],//关联问题的id
  130. contentResult:{},//选中的结果val医生端显示,valp患者端显示
  131. symptomQasList:[],//症状详情所有的问题
  132. diagnoseQasList:[], //诊疗详情所有问题
  133. othersQasList:[],//其他情况所有问题
  134. addContentQasList:[],
  135. moduleMap:{
  136. 1:'symptom',
  137. 51:'diagnose',
  138. 3:'others',
  139. 52:'addContent'
  140. },
  141. defaultIndex: 0, //温度默认值
  142. order:0,
  143. userInfo: {}, //用户信息
  144. pdbm:'8.5rem',
  145. waring:'', //错误提示语
  146. wrong:false, //是否显示错误toast
  147. showConfirm: false,
  148. time:1000,
  149. }
  150. },
  151. created() {
  152. //const userInfo= JSON.parse(localStorage.getItem("userInfo"))
  153. const userInfo = this.$store.state.pathInfo;
  154. this.userInfo = userInfo;
  155. let tmpModule = moduleConfig(this.config,this.tmpAllMoudles);
  156. this.allMoudles = tmpModule.data;
  157. this.getTimeColumns();
  158. this.updata()
  159. },
  160. mounted(){
  161. this.$nextTick(()=>{
  162. let bs = new BScroll('.wrapper', {
  163. probeType: 3,
  164. click:true
  165. });
  166. this.scroll = bs
  167. })
  168. // this.tmpSymptom = JSON.parse(JSON.stringify(data))
  169. //this.symptomResult = data.symptom.result;
  170. },
  171. computed:{
  172. ...mapState({
  173. imgs: state => state.diagnose.imgSrc,
  174. tmpAllMoudles: state => state.allMoudles,
  175. config: state => state.sysConfig,
  176. }),
  177. moduleKeys(){
  178. return this.allMoudles.map((it)=>{
  179. return it.type;
  180. });
  181. },
  182. progress(){
  183. if(this.num===-1){
  184. return '0.1px';
  185. }
  186. const moduleName = this.moduleMap[this.activeTab]+'QasList';
  187. const precent = (this.num+1)/this[moduleName].length;
  188. return precent*100+"%";
  189. }
  190. },
  191. watch:{
  192. num:function(){
  193. let n=0;
  194. let numArr=this.moduleKeys.map((i,index)=>{
  195. if(this.activeTab!=-1&&i==this.activeTab){
  196. n=index;
  197. }
  198. return this[this.moduleMap[i]+'QasList'].length;
  199. });
  200. let numArrCopy=[...numArr];
  201. numArrCopy.length=this.cancelTab!==-1?this.cancelTab:0;
  202. numArr.length=n;
  203. this.cancelNum = getNSum(numArrCopy)+this.canceledQa;
  204. this.activeNum = getNSum(numArr)+this.num;
  205. }
  206. },
  207. methods:{
  208. getColumns(){ //后台数据为空,则使用默认值
  209. const obj=getValuesArr(this.symptomResult.questionDetailList);
  210. const arr=obj.vals?obj.vals:undefined;
  211. const arrp=obj.vals?obj.valsp:undefined;
  212. return {arr,arrp};
  213. },
  214. previewRes(){
  215. this.$router.push({
  216. path:'/preview'
  217. })
  218. },
  219. updata(){
  220. this.symptomQasList = [];
  221. //this.pdbm = '8.5rem';
  222. this.showUsual=true;
  223. this.num = 0;
  224. },
  225. selectToggle(type,result,flg,idx,order){
  226. return
  227. if(flg){
  228. this.num = 1
  229. }
  230. this.symptomResult = result
  231. this.type = type
  232. this.order = order
  233. this.scrollDown()
  234. },
  235. getTimeColumns(){
  236. let num = [];
  237. for(let i = 1; i <=60; i++) {
  238. num.push(i)
  239. }
  240. let unit = ['分钟', '小时', '天', '周', '月','年'];
  241. this.timeColumns= [
  242. {
  243. values:num,
  244. className:'column1',
  245. defaultIndex: 0
  246. },
  247. {
  248. values:unit,
  249. className:'column2',
  250. defaultIndex: 2
  251. },
  252. ]
  253. },
  254. cancelSelected(){ //修改题目
  255. let moduleName='',tmpArr=[],tmpPreItem={},tmpNowItem={};
  256. moduleName = this.moduleMap[this.activeTab]+'QasList';
  257. tmpArr = this[moduleName];
  258. tmpNowItem = tmpArr[this.num];
  259. this.type = -1;
  260. if(tmpNowItem){
  261. tmpNowItem.show = false;
  262. }else{//最后一题时没有下一题
  263. this.showPreview=false;
  264. }
  265. const keyIdx = this.moduleKeys.findIndex((i)=>i==this.activeTab);
  266. if(this.activeTab!==this.moduleKeys[0]&&this.num===0){ //取消上一阶段的最后一题时
  267. this.activeTab=this.moduleKeys[keyIdx-1];
  268. this.cancelTab=keyIdx-1;
  269. moduleName = this.moduleMap[this.activeTab]+'QasList';
  270. const n = this[moduleName].length-1;
  271. tmpPreItem = this[moduleName][n];
  272. this.num=n;
  273. }else{
  274. this.cancelTab=keyIdx;
  275. tmpPreItem = tmpArr[this.num-1];
  276. this.num=this.num-1;
  277. }
  278. this.delExtQa(tmpPreItem,this.num); //修改时已关联的问题先删除
  279. +tmpPreItem.controlType===5?'':tmpPreItem.content='';
  280. this.symptomResult = tmpPreItem;
  281. const timer = setTimeout(()=>{
  282. this.type = tmpPreItem.controlType;
  283. clearTimeout(timer);
  284. });
  285. this.canceledQa=this.num; //记录被修改过的题目,只可修改一次
  286. },
  287. formatQaArr(obj){
  288. let arr = [],nobj=JSON.parse(JSON.stringify(obj));
  289. for(let i in nobj){
  290. arr.push(Object.assign({},nobj[i]));
  291. }
  292. return arr;
  293. },
  294. addExtQa(obj,i,selectedN){
  295. const mName=this.moduleMap[this.activeTab];
  296. let moduleName = mName+'QasList';
  297. const dataArr = this.formatQaArr(obj);
  298. this[moduleName][i].selectedNum=selectedN; //选中项关联子问题的个数
  299. this[moduleName].splice(i+1,0,...dataArr);
  300. this.$store.commit("setModuleDatas",{data:this[moduleName],mName});
  301. },
  302. delExtQa(obj,i){//修改时已关联的问题先删除
  303. const mName=this.moduleMap[this.activeTab];
  304. let moduleName = mName+'QasList';
  305. let n = obj.selectedNum;
  306. if(n){
  307. this[moduleName].splice(i+1,n);
  308. }
  309. this.$store.commit("setModuleDatas",{data:this[moduleName],mName});
  310. },
  311. updataResultSingle(result,contentResult,num){
  312. this.num = num;
  313. this.type = -1;
  314. const mkeys =this.moduleKeys;
  315. let moduleName = this.moduleMap[this.activeTab]+'QasList';
  316. let tmpArr = JSON.parse(JSON.stringify(this[moduleName]));
  317. tmpArr[num-1].content = contentResult.valp;
  318. //选没有可上传报告,则上传控件不显示
  319. const noUpload = this.symptomResult.id===999999&&contentResult.valp.indexOf("没有")!==-1;
  320. if(noUpload&&this.deledUpload.length===0){ //是否可上传没有被修改过
  321. this.deledUpload=tmpArr.splice(num,1);
  322. this.$store.commit("cancelImgs");
  323. }else if(this.symptomResult.id===999999&&!noUpload&&this.deledUpload.length>0){
  324. tmpArr.splice(num,0,...this.deledUpload);
  325. this.$store.commit("cancelImgs");
  326. }
  327. this[moduleName] = tmpArr;
  328. //上传的图片及是否有可上传***答案不显示在预览所以不记录到state.diagnose.text中
  329. if(this.symptomResult.id!==999999&&this.symptomResult.controlType!=4){
  330. this.$store.commit('setText', { type: this.activeTab,
  331. text: contentResult.val,
  332. textP: contentResult.valp,
  333. idx:contentResult.idx,
  334. flag:contentResult.flag,
  335. isEdit:this.num-1==this.canceledQa
  336. });
  337. }
  338. //console.log(this.$store.state); //最后一题答完
  339. if(+num===this[moduleName].length||(noUpload&&+num===this[moduleName].length+1)){
  340. if(this.activeTab===mkeys[mkeys.length-1]){ //最后一个模块时显示预览按钮
  341. this.showPreview=true;
  342. return;
  343. }
  344. const state = this.$store.state;
  345. const tabIndx = this.moduleKeys.findIndex((i)=>i==this.activeTab);
  346. this.activeTab=this.moduleKeys[+tabIndx+1]; //进入下一个阶段问题
  347. this.num = 0;
  348. moduleName = this.moduleMap[this.activeTab]+'QasList';
  349. const mDataName = this.moduleMap[this.activeTab];
  350. this[moduleName] = JSON.parse(JSON.stringify(state[mDataName].datas));
  351. let tmpArrDetail1 = JSON.parse(JSON.stringify(this[moduleName][0]));
  352. this[moduleName][0] = tmpArrDetail1;
  353. const tmpNowItem = this[moduleName][this.num];
  354. let timer = setTimeout(() => {
  355. this.type = tmpNowItem.controlType;
  356. tmpNowItem.show = true;
  357. //console.log(tmpNowItem)
  358. this.symptomResult = tmpNowItem;
  359. });
  360. this.$nextTick(()=>{
  361. this.scroll.refresh()
  362. this.scroll.scrollTo(0, this.scroll.maxScrollY,500)
  363. })
  364. return;
  365. }
  366. let tmpArrDetailResult = JSON.parse(JSON.stringify(this[moduleName][num]));
  367. let tmpArrDetail = JSON.parse(JSON.stringify(tmpArr[num]));
  368. let timer = setTimeout(() => {
  369. this.type = tmpArrDetail.controlType;
  370. tmpArrDetail.show = true;
  371. tmpArr[num] = tmpArrDetail;
  372. this.symptomResult = tmpArrDetailResult;
  373. clearTimeout(timer)
  374. }, this.time);
  375. this.$nextTick(()=>{
  376. this.scroll.refresh()
  377. this.scroll.scrollTo(0, this.scroll.maxScrollY,500)
  378. })
  379. },
  380. showWarn(text){
  381. this.waring=text;
  382. this.wrong=true;
  383. },
  384. closeTip(){
  385. this.wrong=false;
  386. },
  387. cancelSymptom(){ //修改(即删除)已选主症
  388. this.symptomQasList = [];
  389. this.selectedSymptom=[];
  390. this.showUsual=true;
  391. this.canceledSym = true;
  392. this.type=-1;
  393. this.$store.commit('setChoose', { choose: [], type: moduleCP['symp'] });
  394. },
  395. selectUsual(sym){
  396. this.getSymptomQas(sym.questionId); //获取症状下的关联问题
  397. sym.idx=1; //标记主诉
  398. this.$store.commit('setChoose', { choose: [sym], type: moduleCP['symp'] });
  399. this.selectedSymptom = sym; //设置搜索选中症状
  400. this.showUsual=false; //关闭症状选择进入下一个问题
  401. this.pdbm = '10.2rem'
  402. setTimeout(() => {
  403. this.scrollDown()
  404. }, 0);
  405. },
  406. getSymptomQas(id){
  407. const param = {
  408. age:this.userInfo.patientAge,
  409. id:id,
  410. sexType:this.userInfo.sexType
  411. };
  412. api.getById(param).then((res) => {
  413. const result = res.data;
  414. if(result.code==='0'){
  415. const data = result.data;
  416. if(!data){
  417. return ;
  418. }
  419. let qaLis = data.questionMapping;
  420. if(qaLis.length===0){
  421. this.wrong = true;
  422. this.waring ='该症状数据未维护';
  423. return ;
  424. }
  425. //qaLis.length=2; //开发测试代码,要删除
  426. qaLis[0].show=true; //第一题自动显示
  427. this.type = qaLis[0].controlType;
  428. this.symptomResult = qaLis[0];
  429. this.$store.commit('setSymptomDatas',qaLis);
  430. this.symptomQasList = this.$store.state.symptom.origin;
  431. }else{
  432. }
  433. });
  434. },
  435. scrollDown(){
  436. this.scroll.scrollTo(0, this.scroll.maxScrollY)
  437. },
  438. },
  439. components:{
  440. Radio,
  441. Select,
  442. Dialog,
  443. Picker,
  444. Label,
  445. ComTextArea,
  446. /*Input,*/
  447. PickTime,
  448. UploadImg,
  449. PushSymptom,
  450. ConfirmBox,
  451. UsualSymptom,
  452. MultSelect,
  453. TipWarning,
  454. Head
  455. }
  456. }
  457. </script>
  458. <style lang="less" scoped>
  459. @import "../less/base.less";
  460. .wrapper {
  461. height: 100%;
  462. width: 100%;
  463. position: fixed;
  464. box-sizing: border-box;
  465. overflow: hidden;
  466. top: 0.86rem;
  467. }
  468. .scrollPart {
  469. // padding-bottom: 5rem;
  470. // padding-top: 1.44rem;
  471. // box-sizing: border-box;
  472. }
  473. .progress-bar {
  474. height: .8rem;
  475. line-height: 0.44rem;
  476. background: #fff;
  477. color: #aaa;
  478. /*margin-bottom:.4rem;*/
  479. .title{
  480. height: 100%;
  481. }
  482. span{
  483. display: inline-block;
  484. font-size: .26rem;
  485. color: #aaa;
  486. text-align: center;
  487. &:not(:last-child):after{
  488. content: ">";
  489. float: right;
  490. color: #aaa;
  491. }
  492. }
  493. .active{
  494. font-size: #font[dialog];
  495. color: #colors[theme];
  496. font-weight: 500;
  497. }
  498. .progress{
  499. height:0.06rem;
  500. background:#F5F5F5;
  501. p{
  502. width:.1px;
  503. height: 100%;
  504. background: #colors[theme];
  505. }
  506. }
  507. }
  508. .right {
  509. padding-top: .2rem;
  510. margin-bottom: .12rem;
  511. padding-right: .24rem;
  512. .content {
  513. max-width: 5rem;
  514. background-color: #colors[theme];
  515. border-radius: .24rem 0 .24rem .24rem;
  516. margin-top: .3rem;
  517. font-size: #font[dialog];
  518. padding: .24rem;
  519. display: inline-block;
  520. p {
  521. color: #fff;
  522. }
  523. }
  524. img {
  525. width: 0.8rem;
  526. height: 0.8rem;
  527. margin-left: .24rem;
  528. }
  529. }
  530. .left {
  531. margin-bottom: .2rem;
  532. padding-top: .12rem;
  533. padding-left: .24rem;
  534. .content {
  535. max-width: 5rem;
  536. background-color: #colors[bgques];
  537. border-radius: 0 .24rem .24rem .24rem;
  538. margin-top: .3rem;
  539. font-size: #font[dialog];
  540. padding: .24rem;
  541. display: inline-block;
  542. }
  543. img {
  544. width: 0.8rem;
  545. height: 0.8rem;
  546. margin-right: .24rem;
  547. }
  548. }
  549. .edit{
  550. color: #colors[theme];
  551. font-style: normal;
  552. font-size: #font[dialog];
  553. float: right;
  554. display: inline-block;
  555. margin-top: .56rem;
  556. margin-right: .24rem;
  557. }
  558. .submit{
  559. position: fixed;
  560. bottom: 0;
  561. width: 100%;
  562. a{
  563. display: inline-block;
  564. width: 100%;
  565. height: 0.88rem;
  566. font-size: #font[dialog];
  567. background-color: #colors[btn];
  568. line-height: 0.88rem;
  569. margin-top: 0.8rem;
  570. text-align: center;
  571. color: #fff;
  572. }
  573. }
  574. </style>