| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304 |
- "use strict";
- (wx["webpackJsonp"] = wx["webpackJsonp"] || []).push([["common"],{
- /***/ "./src/components/Buttons.tsx":
- /*!************************************!*\
- !*** ./src/components/Buttons.tsx ***!
- \************************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Buttons; }
- /* harmony export */ });
- /* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
- /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
- /* harmony import */ var _utils_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/types */ "./src/utils/types.ts");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
- function Buttons(props) {
- var myStyle = props.status == _utils_types__WEBPACK_IMPORTED_MODULE_0__.ComponentStatus.disable ? {
- opacity: 0.4
- } : {};
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.View, {
- style: (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__["default"])({}, myStyle),
- children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
- className: props.type == _utils_types__WEBPACK_IMPORTED_MODULE_0__.ButtonType.outline ? 'outline_btn' : 'btn',
- style: (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_3__["default"])({}, props.style),
- onClick: props.onClick,
- children: props.title
- })
- });
- }
- /***/ }),
- /***/ "./src/components/Rings.weapp.tsx":
- /*!****************************************!*\
- !*** ./src/components/Rings.weapp.tsx ***!
- \****************************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Rings; }
- /* harmony export */ });
- /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
- /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tarojs/taro */ "webpack/container/remote/@tarojs/taro");
- /* harmony import */ var _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
- function Rings(props) {
- var progress = 0.85;
- var r = props.radius || 80;
- var strokeWidth = props.strokeWidth || 10;
- var color = props.color || 'orange';
- var canvasRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);
- var canvasId = props.canvasId ? 'canvas_' + props.canvasId : 'progress-canvas';
- var dpr = _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().getSystemInfoSync().pixelRatio; // 获取设备的像素比
- var radius = r; // 圆形进度条的半径
- var lineWidth = strokeWidth; // 圆形进度条的线宽
- (0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.useDidShow)(function () {
- // drawCircle()
- });
- (0,_tarojs_taro__WEBPACK_IMPORTED_MODULE_0__.useReady)(function () {
- drawCircle();
- });
- function drawCircle() {
- var query = _tarojs_taro__WEBPACK_IMPORTED_MODULE_0___default().createSelectorQuery();
- query.select(".".concat(canvasId)).fields({
- node: true,
- size: true
- });
- query.exec(function (res) {
- var _canvas = res[0].node;
- _canvas.width = res[0].width * dpr;
- _canvas.height = res[0].height * dpr;
- var ctx = _canvas.getContext('2d');
- // const ctx = Taro.createCanvasContext(canvasId);
- var center = radius + lineWidth / 2; // 圆心坐标
- // 设置画布尺寸
- ctx.scale(dpr, dpr);
- // 绘制背景圆
- ctx.beginPath();
- ctx.arc(center, center, radius, 0, 2 * Math.PI);
- ctx.lineWidth = lineWidth;
- ctx.strokeStyle = 'lightgray';
- ctx.lineCap = 'round'; // 设置为圆角
- ctx.stroke();
- // 绘制进度圆
- ctx.beginPath();
- ctx.arc(center, center, radius, -Math.PI / 2 + 1, 2 * Math.PI * progress - Math.PI / 2);
- ctx.lineWidth = lineWidth;
- ctx.strokeStyle = color;
- ctx.lineCap = 'round'; // 设置为圆角
- ctx.stroke();
- // ctx.draw();
- });
- }
- (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
- // const ctx = Taro.createCanvasContext(canvasId);
- // const center = radius + lineWidth / 2; // 圆心坐标
- // // 设置画布尺寸
- // ctx.scale(1 / dpr, 1 / dpr);
- // // 绘制背景圆
- // ctx.beginPath();
- // ctx.arc(center, center, radius, 0, 2 * Math.PI);
- // ctx.setLineWidth(lineWidth);
- // ctx.setStrokeStyle('lightgray');
- // ctx.setLineCap('round'); // 设置为圆角
- // ctx.stroke();
- // // 绘制进度圆
- // ctx.beginPath();
- // ctx.arc(center, center, radius, -Math.PI / 2 + 1, (2 * Math.PI * progress) - Math.PI / 2);
- // ctx.setLineWidth(lineWidth);
- // ctx.setStrokeStyle(color);
- // ctx.setLineCap('round'); // 设置为圆角
- // ctx.stroke();
- // ctx.draw();
- }, [progress]);
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_3__.Canvas, {
- canvasId: canvasId,
- id: canvasId,
- className: canvasId,
- type: "2d",
- style: {
- width: radius * 2 + lineWidth,
- height: radius * 2 + lineWidth,
- zIndex: 0
- },
- ref: canvasRef
- });
- }
- /***/ }),
- /***/ "./src/components/SingleSelect.tsx":
- /*!*****************************************!*\
- !*** ./src/components/SingleSelect.tsx ***!
- \*****************************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Component; }
- /* harmony export */ });
- /* harmony import */ var _Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
- /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "webpack/container/remote/react");
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
- /* harmony import */ var _assets_svg_check_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../assets/svg/check.svg */ "./src/assets/svg/check.svg");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
- function Component(props) {
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(-1),
- _useState2 = (0,_Users_Work_hola2_node_modules_babel_runtime_helpers_esm_slicedToArray_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_useState, 2),
- selIndex = _useState2[0],
- setSelIndex = _useState2[1];
- function isString(variable) {
- return typeof variable === 'string';
- }
- function itemClick(index) {
- setSelIndex(index);
- if (props.itemSelect) {
- props.itemSelect(index);
- }
- }
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
- children: props.items.map(function (item, index) {
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.View, {
- className: selIndex == index ? 'item item_select' : 'item',
- onClick: function onClick() {
- return itemClick(index);
- },
- children: [isString(item) ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Text, {
- style: {
- color: '#fff'
- },
- children: item
- }) : item, selIndex == index ? /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_4__.Image, {
- style: "width:12px;height:12px;",
- src: _assets_svg_check_svg__WEBPACK_IMPORTED_MODULE_1__
- }) : null]
- }, index);
- })
- });
- }
- /***/ }),
- /***/ "./src/components/Texts.tsx":
- /*!**********************************!*\
- !*** ./src/components/Texts.tsx ***!
- \**********************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ "default": function() { return /* binding */ Component; }
- /* harmony export */ });
- /* harmony import */ var _tarojs_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tarojs/components */ "./node_modules/@tarojs/plugin-platform-weapp/dist/components-react.js");
- /* harmony import */ var _utils_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/types */ "./src/utils/types.ts");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ "webpack/container/remote/react/jsx-runtime");
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
- function Component(props) {
- function render() {
- switch (props.type) {
- case _utils_types__WEBPACK_IMPORTED_MODULE_0__.TextType.primary:
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Text, {
- className: "primary",
- children: props.text
- });
- case _utils_types__WEBPACK_IMPORTED_MODULE_0__.TextType.secondary:
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Text, {
- className: "secondary",
- children: props.text
- });
- case _utils_types__WEBPACK_IMPORTED_MODULE_0__.TextType.big:
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Text, {
- className: "big",
- children: props.text
- });
- default:
- return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_tarojs_components__WEBPACK_IMPORTED_MODULE_2__.Text, {
- children: props.text
- });
- }
- }
- return render();
- }
- /***/ }),
- /***/ "./src/utils/types.ts":
- /*!****************************!*\
- !*** ./src/utils/types.ts ***!
- \****************************/
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
- /* harmony export */ ButtonType: function() { return /* binding */ ButtonType; },
- /* harmony export */ ComponentStatus: function() { return /* binding */ ComponentStatus; },
- /* harmony export */ TextType: function() { return /* binding */ TextType; }
- /* harmony export */ });
- var ButtonType = /*#__PURE__*/function (ButtonType) {
- ButtonType["primary"] = "primary";
- ButtonType["outline"] = "outline";
- return ButtonType;
- }({});
- var TextType = /*#__PURE__*/function (TextType) {
- TextType["primary"] = "primary";
- TextType["secondary"] = "secondary";
- TextType["big"] = "big";
- return TextType;
- }({});
- var ComponentStatus = /*#__PURE__*/function (ComponentStatus) {
- ComponentStatus["enable"] = "enable";
- ComponentStatus["disable"] = "disable";
- return ComponentStatus;
- }({});
- /***/ }),
- /***/ "./src/assets/svg/check.svg":
- /*!**********************************!*\
- !*** ./src/assets/svg/check.svg ***!
- \**********************************/
- /***/ (function(module) {
- module.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBmaWxsPSJub25lIiB2ZXJzaW9uPSIxLjEiIHdpZHRoPSIxOCIgaGVpZ2h0PSIxMyIgdmlld0JveD0iMCAwIDE4IDEzIj48Zz48cGF0aCBkPSJNMTcuNzA3MSwwLjI5Mjg5M0MxOC4wOTc2LDAuNjgzNDE3LDE4LjA5NzYsMS4zMTY1OCwxNy43MDcxLDEuNzA3MTFDMTcuNzA3MSwxLjcwNzExLDYuNzA3MTEsMTIuNzA3MSw2LjcwNzExLDEyLjcwNzFDNi4zMTY1OCwxMy4wOTc2LDUuNjgzNDIsMTMuMDk3Niw1LjI5Mjg5LDEyLjcwNzFDNS4yOTI4OSwxMi43MDcxLDAuMjkyODkzLDcuNzA3MTEsMC4yOTI4OTMsNy43MDcxMUMtMC4wOTc2MzExLDcuMzE2NTgsLTAuMDk3NjMxMSw2LjY4MzQyLDAuMjkyODkzLDYuMjkyODlDMC42ODM0MTcsNS45MDIzNywxLjMxNjU4LDUuOTAyMzcsMS43MDcxMSw2LjI5Mjg5QzEuNzA3MTEsNi4yOTI4OSw2LDEwLjU4NTgsNiwxMC41ODU4QzYsMTAuNTg1OCwxNi4yOTI5LDAuMjkyODkzLDE2LjI5MjksMC4yOTI4OTNDMTYuNjgzNCwtMC4wOTc2MzExLDE3LjMxNjYsLTAuMDk3NjMxMSwxNy43MDcxLDAuMjkyODkzQzE3LjcwNzEsMC4yOTI4OTMsMTcuNzA3MSwwLjI5Mjg5MywxNy43MDcxLDAuMjkyODkzWiIgZmlsbC1ydWxlPSJldmVub2RkIiBmaWxsPSIjQUFGRjAwIiBmaWxsLW9wYWNpdHk9IjEiLz48L2c+PC9zdmc+";
- /***/ })
- }]);
- //# sourceMappingURL=common.js.map
|