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
14 KiB
1 lines
14 KiB
{"version":3,"sources":["webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/min-countdown.vue?456e","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/min-countdown.vue?4d68","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/min-countdown.vue?337c","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/min-countdown.vue?73bb","uni-app:///components/min-countdown.vue","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/min-countdown.vue?2e49","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/components/min-countdown.vue?d8bc"],"names":["name","props","type","default","targetTime","format","countdownClass","bgColor","isPlay","data","time","audioBg","playBg","mounted","computed","primaryColor","subColor","configInfo","isHaveAudio","methods","initIndex","setTimeout","getTime","lastTime","key","toInitPlay","console","countdown_voice","val","toPlay"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAsI;AACtI;AACiE;AACL;AACqC;;;AAGjG;AACuM;AACvM,gBAAgB,iNAAU;AAC1B,EAAE,mFAAM;AACR,EAAE,oGAAM;AACR,EAAE,6GAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,wGAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;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;AAA8xB,CAAgB,2yBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;ACelzB;AAIA;AAAA;AAAA,eACA;EACAA;EACAC;IACAC;MACAA;MACAC;IACA;IACAC;MACAF;MACAC;IACA;IACAE;MACAH;MACAC;IACA;IACAG;MACAJ;MACAC;IACA;IACAI;MACAL;MACAC;IACA;IACAK;MACAN;MACAC;IACA;EACA;EACAM;IACA;MACAC;MACAC;MACAC;IACA;EACA;EACAC;IAAA;IAAA;MAAA;QAAA;UAAA;YAAA;cACA;cAAA,MACA;gBAAA;gBAAA;cAAA;cAAA;cAAA,OACA;YAAA;YAAA;cAAA;UAAA;QAAA;MAAA;IAAA;EAEA;EACAC;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;EACA;EACAC,uDACA,0DACA;IACAC;MAAA;MACAC;QACA;MACA;IACA;IACAC;MACA;MACA;MAEA;QACA;MACA;MACA;MACA;QACAZ;QACA;QACAA;QACAa;QACAb;QACAA;QACA;UACA;UACAL;UACAA;UACAA;UACAA;QACA;QACA;QACA;QACA;UACA;YACAmB;UACA;QACA;QACA;UACA;YACAA;UACA;UACA;QACA;MACA;QACA;MACA;IACA;IACAC;MAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA,IACA;kBAAA;kBAAA;gBAAA;gBAAA;gBAAA,OACA;cAAA;gBAEAC;gBAGAC,kBACA,kBADAA;gBAEA;gBACA;gBACA;gBACA;kBACAH;kBACAI;gBACA;gBACAF;gBAEA;kBACAA;kBACA;gBACA;gBACA;kBACAA;kBACA;gBACA;gBACA;kBACAA;kBACA;kBACA;gBACA;gBACA;kBACAA;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACAG;MACAH;MACA;QACA;MACA;MACA;IACA;EAAA;AAEA;AAAA,2B;;;;;;;;;;;;;AC9JA;AAAA;AAAA;AAAA;AAAipC,CAAgB,goCAAG,EAAC,C;;;;;;;;;;;ACArqC;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/min-countdown.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./min-countdown.vue?vue&type=template&id=6e77744b&scoped=true&\"\nvar renderjs\nimport script from \"./min-countdown.vue?vue&type=script&lang=js&\"\nexport * from \"./min-countdown.vue?vue&type=script&lang=js&\"\nimport style0 from \"./min-countdown.vue?vue&type=style&index=0&id=6e77744b&scoped=true&lang=css&\"\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 \"6e77744b\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/min-countdown.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!./min-countdown.vue?vue&type=template&id=6e77744b&scoped=true&\"","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 \"-!../../../../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!./min-countdown.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!./min-countdown.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view>\r\n\t\t<view class=\"min-countdown\" :class=\"countdownClass\">\r\n\t\t\t<rich-text :nodes=\"time\" v-if=\"type == 1\"></rich-text>\r\n\t\t\t<view class=\"flex-y-center\" :style=\"{color:primaryColor}\" v-if=\"type == 2\">\r\n\t\t\t\t<view class=\"count-tag flex-center\">{{time.d}}</view>天<view class=\"count-tag flex-center\">{{time.h}}\r\n\t\t\t\t</view>时\r\n\t\t\t\t<view class=\"count-tag flex-center\">{{time.m}}</view>分<view class=\"count-tag flex-center\">{{time.s}}\r\n\t\t\t\t</view>秒\r\n\t\t\t</view>\r\n\t\t</view>\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\texport default {\r\n\t\tname: 'min-countdown',\r\n\t\tprops: {\r\n\t\t\ttype: {\r\n\t\t\t\ttype: Number,\r\n\t\t\t\tdefault: 1\r\n\t\t\t},\r\n\t\t\ttargetTime: {\r\n\t\t\t\ttype: Number,\r\n\t\t\t\tdefault: 0\r\n\t\t\t},\r\n\t\t\tformat: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: '{%d}天{%h}小时{%m}分{%s}秒'\r\n\t\t\t},\r\n\t\t\tcountdownClass: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: ''\r\n\t\t\t},\r\n\t\t\tbgColor: {\r\n\t\t\t\ttype: String,\r\n\t\t\t\tdefault: ''\r\n\t\t\t},\r\n\t\t\tisPlay: {\r\n\t\t\t\ttype: Boolean,\r\n\t\t\t\tdefault: false\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\ttime: '00:00:00',\r\n\t\t\t\taudioBg: {},\r\n\t\t\t\tplayBg: false,\r\n\t\t\t}\r\n\t\t},\r\n\t\tasync mounted() {\r\n\t\t\tthis.getTime()\r\n\t\t\tif (this.isPlay && !this.configInfo.id) {\r\n\t\t\t\tawait this.getConfigInfo()\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: mapState({\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\tisHaveAudio: state => state.user.isHaveAudio,\r\n\t\t}),\r\n\t\tmethods: {\r\n\t\t\t...mapActions(['getConfigInfo', 'toPlayAudio']),\r\n\t\t\t...mapMutations(['updateUserItem']),\r\n\t\t\tinitIndex() {\r\n\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\tthis.getTime()\r\n\t\t\t\t}, 1000)\r\n\t\t\t},\r\n\t\t\tgetTime() {\r\n\t\t\t\tlet time = {}\r\n\t\t\t\tlet format = this.format\r\n\r\n\t\t\t\tfunction formatNumber(num) {\r\n\t\t\t\t\treturn num > 9 ? `${num}` : `0${num}`\r\n\t\t\t\t}\r\n\t\t\t\tconst gapTime = Math.ceil((this.targetTime - new Date().getTime()) / 1000)\r\n\t\t\t\tif (gapTime >= 0) {\r\n\t\t\t\t\ttime.d = formatNumber(parseInt(gapTime / 86400))\r\n\t\t\t\t\tlet lastTime = gapTime % 86400;\r\n\t\t\t\t\ttime.h = formatNumber(parseInt(lastTime / 3600))\r\n\t\t\t\t\tlastTime = lastTime % 3600;\r\n\t\t\t\t\ttime.m = formatNumber(parseInt(lastTime / 60))\r\n\t\t\t\t\ttime.s = formatNumber(lastTime % 60);\r\n\t\t\t\t\t['d', 'h', 'm', 's'].forEach(item => {\r\n\t\t\t\t\t\tconst day = time[item].split('');\r\n\t\t\t\t\t\tformat = format.replace('{%' + item + '}', time[item])\r\n\t\t\t\t\t\tformat = format.replace('{%' + item + '0}', day[0])\r\n\t\t\t\t\t\tformat = format.replace('{%' + item + '1}', day[1])\r\n\t\t\t\t\t\tformat = format.replace('{%' + item + '2}', day[2] ? day[2] : '0')\r\n\t\t\t\t\t})\r\n\t\t\t\t\tthis.time = this.type == 1 ? format : time\r\n\t\t\t\t\tthis.initIndex()\r\n\t\t\t\t\tif (this.isPlay && gapTime == 60 * 5) {\r\n\t\t\t\t\t\tthis.toPlayAudio({\r\n\t\t\t\t\t\t\tkey: 'countdown_voice'\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this.isPlay && gapTime == 0) {\r\n\t\t\t\t\t\tthis.toPlayAudio({\r\n\t\t\t\t\t\t\tkey: 'service_end_recording'\r\n\t\t\t\t\t\t})\n\t\t\t\t\t\tthis.$emit('end')\r\n\t\t\t\t\t}\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.$emit('callback')\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tasync toInitPlay() {\r\n\t\t\t\tif (!this.configInfo.id) {\r\n\t\t\t\t\tawait this.getConfigInfo()\r\n\t\t\t\t}\r\n\t\t\t\tconsole.log(\"======toInitPlay\")\r\n\r\n\t\t\t\tlet {\r\n\t\t\t\t\tcountdown_voice\r\n\t\t\t\t} = this.configInfo\r\n\t\t\t\tthis.audioBg = uni.createInnerAudioContext();\r\n\t\t\t\tthis.audioBg.src = countdown_voice\r\n\t\t\t\tthis.audioBg.obeyMuteSwitch = false\r\n\t\t\t\tthis.updateUserItem({\r\n\t\t\t\t\tkey: 'isHaveAudio',\r\n\t\t\t\t\tval: true\r\n\t\t\t\t})\r\n\t\t\t\tconsole.log(this.audioBg, \"=======this.audioBg\")\r\n\r\n\t\t\t\tthis.audioBg.onPlay(() => {\r\n\t\t\t\t\tconsole.log('onPlay')\r\n\t\t\t\t\tthis.playBg = true\r\n\t\t\t\t})\r\n\t\t\t\tthis.audioBg.onStop(() => {\r\n\t\t\t\t\tconsole.log('onStop')\r\n\t\t\t\t\tthis.playBg = false\r\n\t\t\t\t})\r\n\t\t\t\tthis.audioBg.onError(() => {\r\n\t\t\t\t\tconsole.log('onError')\r\n\t\t\t\t\tthis.playBg = false\r\n\t\t\t\t\tthis.audioBg.destroy()\r\n\t\t\t\t})\r\n\t\t\t\tthis.audioBg.onEnded(() => {\r\n\t\t\t\t\tconsole.log('onEnded')\r\n\t\t\t\t\tthis.playBg = false\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\ttoPlay() {\r\n\t\t\t\tconsole.log(\"=====toPlay\", this.playBg, this.audioBg)\r\n\t\t\t\tif (this.playBg) {\r\n\t\t\t\t\tthis.audioBg.stop()\r\n\t\t\t\t}\r\n\t\t\t\tthis.audioBg.play()\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style scoped>\r\n\t.min-countdown {\r\n\t\tdisplay: inline-flex;\r\n\t\tjustify-content: center;\r\n\t\talign-items: center;\r\n\t}\r\n\r\n\t.count-tag {\r\n\t\twidth: 56rpx;\r\n\t\theight: 56rpx;\r\n\t\tmargin: 0 10rpx;\r\n\t\tbackground: linear-gradient(0deg, #F7D9AD 0%, #FBEACB 100%);\r\n\t\tborder-radius: 8rpx;\r\n\t}\r\n</style>","import mod from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../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!./min-countdown.vue?vue&type=style&index=0&id=6e77744b&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../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!./min-countdown.vue?vue&type=style&index=0&id=6e77744b&scoped=true&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1725332653656\n var cssReload = require(\"C:/Users/Administrator/Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"/\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""} |