🌈 style(eslint): add eslint rules

This commit is contained in:
xuan 2022-11-26 14:35:05 +08:00
parent f3aa20f049
commit 99a920975f
245 changed files with 14911 additions and 14351 deletions

View File

@ -1,12 +0,0 @@
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false

7
.eslintignore Normal file
View File

@ -0,0 +1,7 @@
/node_modules
/build
/key
/dist
project.*.json
*.lock
*.log

View File

@ -1,8 +1,9 @@
{ {
"extends": ["taro/react","plugin:react-hooks/recommended"], "extends": ["taro/react","@aaronghx/eslint-config-react"],
"rules": { "rules": {
"react/jsx-uses-react": "off", "no-console": "off",
"react/react-in-jsx-scope": "off" "@typescript-eslint/no-shadow": "off",
}, "@typescript-eslint/no-unused-vars": "off",
"plugins": [""] "eqeqeq": "off"
}
} }

View File

@ -1,10 +0,0 @@
module.exports = {
printWidth: 160, // 每行代码最大长度
tabWidth: 2, //一个tab代表几个空格数默认为80
useTabs: false, //是否使用tab进行缩进默认为false表示用空格进行缩减
semi: false, // 声明后带分号
singleQuote: true, // 使用单引号
jsxSingleQuote: true, // 使用单引号
jsxBracketSameLine: true, // 启用jsx语法> 放在末尾
trailingComma: 'all',
}

View File

@ -1,4 +1,5 @@
const path = require('path') const path = require('path')
module.exports = { module.exports = {
env: { env: {
NODE_ENV: '"development"', NODE_ENV: '"development"',

View File

@ -1,7 +1,8 @@
const path = require('path') const path = require('path')
const childProcess = require('child_process') const childProcess = require('child_process')
const versions =
childProcess.execSync('git rev-parse --abbrev-ref HEAD', { const versions
= childProcess.execSync('git rev-parse --abbrev-ref HEAD', {
encoding: 'utf8', encoding: 'utf8',
}) != 'HEAD\n' }) != 'HEAD\n'
? childProcess.execSync('git rev-parse --abbrev-ref HEAD', { ? childProcess.execSync('git rev-parse --abbrev-ref HEAD', {
@ -93,7 +94,7 @@ const config = {
chunkFilename: 'css/[name].[chunkhash].css', chunkFilename: 'css/[name].[chunkhash].css',
}, },
devServer: { devServer: {
https: true https: true,
}, },
publicPath: '/', publicPath: '/',
staticDirectory: 'static', staticDirectory: 'static',
@ -125,7 +126,7 @@ const config = {
plugins: [['@tarojs/plugin-framework-react', { reactMode: 'concurrent' }]], plugins: [['@tarojs/plugin-framework-react', { reactMode: 'concurrent' }]],
} }
module.exports = function (merge) { module.exports = function(merge) {
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
return merge({}, config, require('./dev')) return merge({}, config, require('./dev'))
} }

View File

@ -1,4 +1,5 @@
const path = require('path') const path = require('path')
module.exports = { module.exports = {
env: { env: {
NODE_ENV: '"pre"', NODE_ENV: '"pre"',

View File

@ -1,4 +1,5 @@
const path = require('path') const path = require('path')
module.exports = { module.exports = {
env: { env: {
NODE_ENV: '"production"', NODE_ENV: '"production"',

1
global.d.ts vendored
View File

@ -21,4 +21,3 @@ declare const CURRENT_VERSION: string
declare const CURRENT_GITHASH: string declare const CURRENT_GITHASH: string
declare const CURRENT_ENV: string declare const CURRENT_ENV: string
declare const CURRENT_BASE_URL: string declare const CURRENT_BASE_URL: string

View File

@ -1,13 +1,14 @@
{ {
"name": "EShop", "name": "wechat-lymarket",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"description": "电子商城", "description": "重构内部商城小程序",
"templateInfo": { "templateInfo": {
"name": "default", "name": "default",
"typescript": true, "typescript": true,
"css": "sass" "css": "sass"
}, },
"author": "",
"scripts": { "scripts": {
"build:weapp": "taro build --type weapp", "build:weapp": "taro build --type weapp",
"build:swan": "taro build --type swan", "build:swan": "taro build --type swan",
@ -28,14 +29,15 @@
"dev:jd": "npm run build:jd -- --watch", "dev:jd": "npm run build:jd -- --watch",
"dev:quickapp": "npm run build:quickapp -- --watch", "dev:quickapp": "npm run build:quickapp -- --watch",
"build:weapp:pre": "cross-env NODE_ENV=pre taro build --type weapp", "build:weapp:pre": "cross-env NODE_ENV=pre taro build --type weapp",
"dev:weapp:pre": "cross-env NODE_ENV=pre npm run build:weapp -- --watch" "dev:weapp:pre": "cross-env NODE_ENV=pre npm run build:weapp -- --watch",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}, },
"browserslist": [ "browserslist": [
"last 3 versions", "last 3 versions",
"Android >= 4.1", "Android >= 4.1",
"ios >= 8" "ios >= 8"
], ],
"author": "",
"dependencies": { "dependencies": {
"@babel/runtime": "^7.7.7", "@babel/runtime": "^7.7.7",
"@tarojs/components": "3.5.5", "@tarojs/components": "3.5.5",
@ -59,6 +61,7 @@
"redux-thunk": "^2.4.1" "redux-thunk": "^2.4.1"
}, },
"devDependencies": { "devDependencies": {
"@aaronghx/eslint-config-react": "^0.1.11",
"@babel/core": "^7.8.0", "@babel/core": "^7.8.0",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.4", "@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
"@tarojs/cli": "^3.5.5", "@tarojs/cli": "^3.5.5",
@ -69,16 +72,11 @@
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@types/react": "^18.0.17", "@types/react": "^18.0.17",
"@types/webpack-env": "^1.13.6", "@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^4.15.1",
"@typescript-eslint/parser": "^4.15.1",
"babel-preset-taro": "3.3.10", "babel-preset-taro": "3.3.10",
"classnames": "^2.3.2", "classnames": "^2.3.2",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^6.8.0", "eslint": "^8.28.0",
"eslint-config-taro": "3.5.5", "eslint-config-taro": "3.5.7",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^4.2.0",
"react-refresh": "0.11.0", "react-refresh": "0.11.0",
"stylelint": "9.3.0", "stylelint": "9.3.0",
"taro-iconfont-svg": "^1.0.17", "taro-iconfont-svg": "^1.0.17",

View File

@ -1,48 +1,48 @@
import { useRequest } from "@/use/useHttp" import { useRequest } from '@/use/useHttp'
/** /**
* *
*/ */
export const GetAddressListApi = () => { export const GetAddressListApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/district/list`, url: '/v2/mp/district/list',
method: "get", method: 'get',
}) })
} }
//获取客户地址 // 获取客户地址
export const mppurchaseraddresslist = () => { export const mppurchaseraddresslist = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser/address/list`, url: '/v2/mp/purchaser/address/list',
method: "get", method: 'get',
}) })
} }
//新增客户地址 // 新增客户地址
export const mppurchaseraddress = () => { export const mppurchaseraddress = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser/address`, url: '/v2/mp/purchaser/address',
method: "post", method: 'post',
}) })
} }
//获取编辑地址信息 // 获取编辑地址信息
export const mppurchaseraddressget = () => { export const mppurchaseraddressget = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser/address`, url: '/v2/mp/purchaser/address',
method: "get", method: 'get',
}) })
} }
//编辑收货地址信息 // 编辑收货地址信息
export const mppurchaseraddressput = () => { export const mppurchaseraddressput = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser/address`, url: '/v2/mp/purchaser/address',
method: "put", method: 'put',
}) })
} }
//删除收货地址信息 // 删除收货地址信息
export const mppurchaseraddressdelect = () => { export const mppurchaseraddressdelect = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser/address`, url: '/v2/mp/purchaser/address',
method: "delete", method: 'delete',
}) })
} }

View File

@ -6,7 +6,7 @@ import { useRequest } from '@/use/useHttp'
*/ */
export const GetSignApi = () => { export const GetSignApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/cdn/token`, url: '/v2/mp/cdn/token',
method: 'get', method: 'get',
}) })
} }

View File

@ -1,37 +1,37 @@
import { useRequest } from '@/use/useHttp' import { useRequest } from '@/use/useHttp'
//获取客户信息 // 获取客户信息
export const mppurchaser = () => { export const mppurchaser = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser`, url: '/v2/mp/purchaser',
method: "get", method: 'get',
}) })
} }
//新建客户 // 新建客户
export const mppurchaserpost = () => { export const mppurchaserpost = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser`, url: '/v2/mp/purchaser',
method: "post", method: 'post',
}) })
} }
//编辑客户 // 编辑客户
export const mppurchaserput = () => { export const mppurchaserput = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser`, url: '/v2/mp/purchaser',
method: "put", method: 'put',
}) })
} }
//获取标签列表 // 获取标签列表
export const mppurchaserlist = () => { export const mppurchaserlist = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser/label/list`, url: '/v2/mp/purchaser/label/list',
method: "get", method: 'get',
}) })
} }
//保存标签 // 保存标签
export const mppurchaserlabeladd = () => { export const mppurchaserlabeladd = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser/label/add`, url: '/v2/mp/purchaser/label/add',
method: "post", method: 'post',
}) })
} }

View File

@ -1,51 +1,51 @@
import { useRequest } from '@/use/useHttp' import { useRequest } from '@/use/useHttp'
//列表 // 列表
export const DeliverNoticeOrderList = () => { export const DeliverNoticeOrderList = () => {
return useRequest({ return useRequest({
url: `/v2/mp/deliveryNoticeOrder/list`, url: '/v2/mp/deliveryNoticeOrder/list',
method: 'get', method: 'get',
}) })
} }
//发货详情 // 发货详情
export const DeliverNoticeOrder = () => { export const DeliverNoticeOrder = () => {
return useRequest({ return useRequest({
url: `/v2/mp/deliveryNoticeOrder`, url: '/v2/mp/deliveryNoticeOrder',
method: 'get', method: 'get',
}) })
} }
//发货附件上传 // 发货附件上传
export const DeliveryNoticeOrderUpload = () => { export const DeliveryNoticeOrderUpload = () => {
return useRequest({ return useRequest({
url: `/v2/mp/deliveryNoticeOrder/upload`, url: '/v2/mp/deliveryNoticeOrder/upload',
method: 'put', method: 'put',
}) })
} }
//审核发货单 // 审核发货单
export const DeliveryNoticeOrderAudit = () => { export const DeliveryNoticeOrderAudit = () => {
return useRequest({ return useRequest({
url: `/v2/mp/deliveryNoticeOrder/audit`, url: '/v2/mp/deliveryNoticeOrder/audit',
method: 'put', method: 'put',
}) })
} }
//采购退货的拒收接口 // 采购退货的拒收接口
export const DeliveryNoticeOrderRejection = () => { export const DeliveryNoticeOrderRejection = () => {
return useRequest({ return useRequest({
url: `/v2/mp/deliveryNoticeOrder/rejection`, url: '/v2/mp/deliveryNoticeOrder/rejection',
method: 'put', method: 'put',
}) })
} }
//类型枚举 // 类型枚举
export const EnumDeliveryNoticeTypeList = () => { export const EnumDeliveryNoticeTypeList = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/deliveryNoticeType/list`, url: '/v2/mp/enum/deliveryNoticeType/list',
method: 'get', method: 'get',
}) })
} }
//tabs枚举 // tabs枚举
export const EnumSaleorderStatus = () => { export const EnumSaleorderStatus = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/sale/order/status`, url: '/v2/mp/enum/sale/order/status',
method: 'get', method: 'get',
}) })
} }

View File

@ -1,4 +1,6 @@
// 关于登录 // 关于登录
import { useRequest } from '@/use/useHttp'
export { LoginApi } from './login/index' export { LoginApi } from './login/index'
export { export {
@ -48,15 +50,13 @@ export {
SaleOrderDataFormdataFormStatus, SaleOrderDataFormdataFormStatus,
SaleOrderDataFormApi, SaleOrderDataFormApi,
} from './statistic/index' } from './statistic/index'
import { useRequest } from '@/use/useHttp'
/** /**
* *
* @returns * @returns
*/ */
export const kindListApi = () => { export const kindListApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/product/kind/list`, url: '/v2/mp/product/kind/list',
method: 'get', method: 'get',
}) })
} }
@ -67,7 +67,7 @@ export const kindListApi = () => {
*/ */
export const ProductListApi = () => { export const ProductListApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/product/list`, url: '/v2/mp/product/list',
method: 'get', method: 'get',
}) })
} }

View File

@ -1 +1 @@
export {LoginApi} from './login' export { LoginApi } from './login'

View File

@ -6,7 +6,7 @@ import { useRequest } from '@/use/useHttp'
*/ */
export const LoginApi = () => { export const LoginApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/login`, url: '/v2/mp/login',
method: 'post', method: 'post',
}) })
} }

View File

@ -1,37 +1,37 @@
import { useRequest } from '@/use/useHttp' import { useRequest } from '@/use/useHttp'
//收款单列表 // 收款单列表
export const mpcashManagementOrderlist = () => { export const mpcashManagementOrderlist = () => {
return useRequest({ return useRequest({
url: `/v2/mp/cashManagementOrder/list`, url: '/v2/mp/cashManagementOrder/list',
method: "get", method: 'get',
}) })
} }
//收款单详情 // 收款单详情
export const mpcashManagementOrder = () => { export const mpcashManagementOrder = () => {
return useRequest({ return useRequest({
url: `/v2/mp/cashManagementOrder`, url: '/v2/mp/cashManagementOrder',
method: "get", method: 'get',
}) })
} }
//收款账号 // 收款账号
export const mpcashManagementOrderaccount = () => { export const mpcashManagementOrderaccount = () => {
return useRequest({ return useRequest({
url: `/v2/mp/cashManagementOrder/account`, url: '/v2/mp/cashManagementOrder/account',
method: "get", method: 'get',
}) })
} }
//新建收款单 // 新建收款单
export const mpcashManagementOrderpost = () => { export const mpcashManagementOrderpost = () => {
return useRequest({ return useRequest({
url: `/v2/mp/cashManagementOrder`, url: '/v2/mp/cashManagementOrder',
method: "post", method: 'post',
}) })
} }
//扫描获取应收单的客户信息 // 扫描获取应收单的客户信息
export const mpshouldCollectOrderpurchaser = () => { export const mpshouldCollectOrderpurchaser = () => {
return useRequest({ return useRequest({
url: `/v2/mp/shouldCollectOrder/purchaser`, url: '/v2/mp/shouldCollectOrder/purchaser',
method: "get", method: 'get',
}) })
} }

View File

@ -1,10 +1,10 @@
import { useRequest } from "@/use/useHttp" import { useRequest } from '@/use/useHttp'
import { CAP_HTML_TO_IMAGE_BASE_URL } from '@/common/constant' import { CAP_HTML_TO_IMAGE_BASE_URL } from '@/common/constant'
export const mpenumsaleorderstatus = () => { export const mpenumsaleorderstatus = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/filterMPSaleOrderStatus`, url: '/v2/mp/enum/filterMPSaleOrderStatus',
method: "get", method: 'get',
}) })
} }
@ -14,8 +14,8 @@ export const mpenumsaleorderstatus = () => {
*/ */
export const OrderListApi = () => { export const OrderListApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrder/list`, url: '/v2/mp/saleOrder/list',
method: "get", method: 'get',
}) })
} }
@ -25,78 +25,78 @@ export const OrderListApi = () => {
*/ */
export const ClientListApi = () => { export const ClientListApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/purchaser/list`, url: '/v2/mp/purchaser/list',
method: "get" method: 'get',
}) })
} }
//面料种类列表 // 面料种类列表
export const mpproductcolorlist = () => { export const mpproductcolorlist = () => {
return useRequest({ return useRequest({
url: `/v2/mp/product/color/list`, url: '/v2/mp/product/color/list',
method: "get" method: 'get',
}) })
} }
//购物车提交 // 购物车提交
export const mpsaleOrderpreView = () => { export const mpsaleOrderpreView = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrder/preView`, url: '/v2/mp/saleOrder/preView',
method: "put" method: 'put',
}) })
} }
//业务员枚举 // 业务员枚举
export const mpenumsaleUserlist = () => { export const mpenumsaleUserlist = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/saleUser/list`, url: '/v2/mp/enum/saleUser/list',
method: "get" method: 'get',
}) })
} }
//订单详情 // 订单详情
export const mpsaleOrder = () => { export const mpsaleOrder = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrder`, url: '/v2/mp/saleOrder',
method: "get" method: 'get',
}) })
} }
//取消订单 // 取消订单
export const mpsaleOrdercancel = () => { export const mpsaleOrdercancel = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrder/cancel`, url: '/v2/mp/saleOrder/cancel',
method: "put", method: 'put',
}) })
} }
//再次购买 // 再次购买
export const mpshoppingCartproductColorlist = () => { export const mpshoppingCartproductColorlist = () => {
return useRequest({ return useRequest({
url: `/v2/mp/shoppingCart/productColor/list`, url: '/v2/mp/shoppingCart/productColor/list',
method: "post", method: 'post',
}) })
} }
//获取账期付款 // 获取账期付款
export const orderPaymentorderPaymentMethodInfo = () => { export const orderPaymentorderPaymentMethodInfo = () => {
return useRequest({ return useRequest({
url: `/v2/mp/orderPayment/orderPaymentMethodInfo`, url: '/v2/mp/orderPayment/orderPaymentMethodInfo',
method: "get", method: 'get',
}) })
} }
//预收单获取接口信息 // 预收单获取接口信息
export const orderPaymentpreCollectOrderorderPaymentMethodInfo = () => { export const orderPaymentpreCollectOrderorderPaymentMethodInfo = () => {
return useRequest({ return useRequest({
url: `/v2/mp/orderPayment/preCollectOrder/orderPaymentMethodInfo`, url: '/v2/mp/orderPayment/preCollectOrder/orderPaymentMethodInfo',
method: "get", method: 'get',
}) })
} }
//确认交易 // 确认交易
export const orderPaymentorderPaymentSubmission = () => { export const orderPaymentorderPaymentSubmission = () => {
return useRequest({ return useRequest({
url: `/v2/mp/orderPayment/orderPaymentSubmission`, url: '/v2/mp/orderPayment/orderPaymentSubmission',
method: "put", method: 'put',
}) })
} }
//订单预支付提交 // 订单预支付提交
export const orderPaymentpreCollectOrderorderPaymentSubmission = () => { export const orderPaymentpreCollectOrderorderPaymentSubmission = () => {
return useRequest({ return useRequest({
url: `/v2/mp/orderPayment/preCollectOrder/orderPaymentSubmission`, url: '/v2/mp/orderPayment/preCollectOrder/orderPaymentSubmission',
method: "put", method: 'put',
}) })
} }
/** /**
@ -104,7 +104,7 @@ export const orderPaymentpreCollectOrderorderPaymentSubmission = () => {
*/ */
export const GetPayCode = () => { export const GetPayCode = () => {
return useRequest({ return useRequest({
url: `/xima-caphtml/caphtml`, url: '/xima-caphtml/caphtml',
base_url: CAP_HTML_TO_IMAGE_BASE_URL, base_url: CAP_HTML_TO_IMAGE_BASE_URL,
method: 'post', method: 'post',
}) })
@ -114,100 +114,100 @@ export const GetPayCode = () => {
*/ */
export const GetReturnPayCode = () => { export const GetReturnPayCode = () => {
return useRequest({ return useRequest({
url: `/xima-caphtml/caphtml-return`, url: '/xima-caphtml/caphtml-return',
base_url: CAP_HTML_TO_IMAGE_BASE_URL, base_url: CAP_HTML_TO_IMAGE_BASE_URL,
method: 'post', method: 'post',
}) })
} }
//编辑备注信息 // 编辑备注信息
export const mpsaleOrderput = () => { export const mpsaleOrderput = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrder`, url: '/v2/mp/saleOrder',
method: "put", method: 'put',
}) })
} }
//修改销售单的收货地址 // 修改销售单的收货地址
export const mpsaleOrderaddress = () => { export const mpsaleOrderaddress = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrder/address`, url: '/v2/mp/saleOrder/address',
method: "put", method: 'put',
}) })
} }
//关键字搜索历史 // 关键字搜索历史
export const mpsearchHistorylist = () => { export const mpsearchHistorylist = () => {
return useRequest({ return useRequest({
url: `/v2/mp/searchHistory/list`, url: '/v2/mp/searchHistory/list',
method: "get", method: 'get',
}) })
} }
//添加关键字搜索 // 添加关键字搜索
export const mpsearchHistory = () => { export const mpsearchHistory = () => {
return useRequest({ return useRequest({
url: `/v2/mp/searchHistory`, url: '/v2/mp/searchHistory',
method: "post", method: 'post',
}) })
} }
//确认收货 // 确认收货
export const mpsaleOrderreceive = () => { export const mpsaleOrderreceive = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrder/receive`, url: '/v2/mp/saleOrder/receive',
method: "put", method: 'put',
}) })
} }
//退货原因 // 退货原因
export const mpenumreturnOrderreturnReason = () => { export const mpenumreturnOrderreturnReason = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/returnOrder/returnReason`, url: '/v2/mp/enum/returnOrder/returnReason',
method: "get", method: 'get',
}) })
} }
//二次选择退货原因 // 二次选择退货原因
export const mpenumreturnExplain = () => { export const mpenumreturnExplain = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/returnExplain`, url: '/v2/mp/enum/returnExplain',
method: "get", method: 'get',
}) })
} }
//货物状况 // 货物状况
export const mpenumreturngoodsStatus = () => { export const mpenumreturngoodsStatus = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/return/goodsStatus`, url: '/v2/mp/enum/return/goodsStatus',
method: "get", method: 'get',
}) })
} }
//申请退货 // 申请退货
export const mpreturnApplyOrder = () => { export const mpreturnApplyOrder = () => {
return useRequest({ return useRequest({
url: `/v2/mp/returnApplyOrder`, url: '/v2/mp/returnApplyOrder',
method: "put", method: 'put',
}) })
} }
//退款说明 // 退款说明
export const mpenumrefundExplainone = () => { export const mpenumrefundExplainone = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/refundExplain`, url: '/v2/mp/enum/refundExplain',
method: "get", method: 'get',
}) })
} }
//提交订单 // 提交订单
export const mpsaleOrderpost = () => { export const mpsaleOrderpost = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrder`, url: '/v2/mp/saleOrder',
method: "post", method: 'post',
}) })
} }
//修改销售单物流方式 // 修改销售单物流方式
export const mpsaleOrdershipmentMode = () => { export const mpsaleOrdershipmentMode = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrder/shipmentMode`, url: '/v2/mp/saleOrder/shipmentMode',
method: "put", method: 'put',
}) })
} }
//修改销售单物流方式 // 修改销售单物流方式
export const EnumPurchaserType = () => { export const EnumPurchaserType = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/purchaserType`, url: '/v2/mp/enum/purchaserType',
method: "get", method: 'get',
}) })
} }

View File

@ -1,12 +1,12 @@
import { useRequest } from "@/use/useHttp" import { useRequest } from '@/use/useHttp'
/** /**
* *
* @returns * @returns
*/ */
export const FindColorListApi = () => { export const FindColorListApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/product/color/absorb/match`, url: '/v2/mp/product/color/absorb/match',
method: 'get', method: 'get',
pagination: true pagination: true,
}) })
} }

View File

@ -1,9 +1,9 @@
import { useRequest } from '@/use/useHttp' import { useRequest } from '@/use/useHttp'
//取色对比 // 取色对比
export const productabsorbcontrast = () => { export const productabsorbcontrast = () => {
return useRequest({ return useRequest({
url: `/v2/mp/product/color/absorb/contrast`, url: '/v2/mp/product/color/absorb/contrast',
method: 'get', method: 'get',
}) })
} }
@ -14,7 +14,7 @@ export const productabsorbcontrast = () => {
*/ */
export const SelectProductListApi = () => { export const SelectProductListApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/product/list`, url: '/v2/mp/enum/product/list',
method: 'get', method: 'get',
}) })
} }

View File

@ -6,7 +6,7 @@ import { useRequest } from '@/use/useHttp'
*/ */
export const ColorListApi = () => { export const ColorListApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/product/color/absorb/list`, url: '/v2/mp/product/color/absorb/list',
method: 'get', method: 'get',
}) })
} }
@ -17,7 +17,7 @@ export const ColorListApi = () => {
*/ */
export const ColorDetailedApi = () => { export const ColorDetailedApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/product/texture`, url: '/v2/mp/product/texture',
method: 'get', method: 'get',
}) })
} }
@ -28,7 +28,7 @@ export const ColorDetailedApi = () => {
*/ */
export const ColorSamplingSaveApi = () => { export const ColorSamplingSaveApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/product/color/absorb`, url: '/v2/mp/product/color/absorb',
method: 'put', method: 'put',
}) })
} }
@ -39,7 +39,7 @@ export const ColorSamplingSaveApi = () => {
*/ */
export const TextureSaveApi = () => { export const TextureSaveApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/product/texture`, url: '/v2/mp/product/texture',
method: 'put', method: 'put',
}) })
} }

View File

@ -1,44 +1,44 @@
import { useRequest } from "@/use/useHttp" import { useRequest } from '@/use/useHttp'
//售后订单列表 // 售后订单列表
export const mpreturnApplyOrderlist = () => { export const mpreturnApplyOrderlist = () => {
return useRequest({ return useRequest({
url: `/v2/mp/returnApplyOrder/list`, url: '/v2/mp/returnApplyOrder/list',
method: "get", method: 'get',
}) })
} }
//售后状态枚举 // 售后状态枚举
export const mpenumreturnStage = () => { export const mpenumreturnStage = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/returnStage`, url: '/v2/mp/enum/returnStage',
method: "get", method: 'get',
}) })
} }
//退款类型枚举 // 退款类型枚举
export const mpenumreturnType = () => { export const mpenumreturnType = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/returnType`, url: '/v2/mp/enum/returnType',
method: "get", method: 'get',
}) })
} }
//售后详情 // 售后详情
export const mpreturnApplyOrder = () => { export const mpreturnApplyOrder = () => {
return useRequest({ return useRequest({
url: `/v2/mp/returnApplyOrder`, url: '/v2/mp/returnApplyOrder',
method: "get", method: 'get',
}) })
} }
//取消退货 // 取消退货
export const returnApplyOrdercancel = () => { export const returnApplyOrdercancel = () => {
return useRequest({ return useRequest({
url: `/v2/mp/returnApplyOrder/cancel`, url: '/v2/mp/returnApplyOrder/cancel',
method: "post", method: 'post',
}) })
} }
//售后确认上传附件 // 售后确认上传附件
export const returnApplyOrderuploadAccessory = () => { export const returnApplyOrderuploadAccessory = () => {
return useRequest({ return useRequest({
url: `/v2/mp/returnApplyOrder/uploadAccessory`, url: '/v2/mp/returnApplyOrder/uploadAccessory',
method: "put", method: 'put',
}) })
} }

View File

@ -1,8 +1,8 @@
import { useRequest } from "@/use/useHttp" import { useRequest } from '@/use/useHttp'
//搜索商品 // 搜索商品
export const mpproductlist = () => { export const mpproductlist = () => {
return useRequest({ return useRequest({
url: `/v2/mp/product/list`, url: '/v2/mp/product/list',
method: "get", method: 'get',
}) })
} }

View File

@ -15,7 +15,7 @@ import { useRequest } from '@/use/useHttp'
*/ */
export const ShoppingCartDeleteApi = () => { export const ShoppingCartDeleteApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/shoppingCart/productColor`, url: '/v2/mp/shoppingCart/productColor',
method: 'delete', method: 'delete',
}) })
} }
@ -25,7 +25,7 @@ export const ShoppingCartDeleteApi = () => {
*/ */
export const ShoppingCartListApi = () => { export const ShoppingCartListApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/shoppingCart/productColor`, url: '/v2/mp/shoppingCart/productColor',
method: 'get', method: 'get',
}) })
} }
@ -35,7 +35,7 @@ export const ShoppingCartListApi = () => {
*/ */
export const AdjestShoppingCartApi = () => { export const AdjestShoppingCartApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/shoppingCart/productColor`, url: '/v2/mp/shoppingCart/productColor',
method: 'put', method: 'put',
}) })
} }

View File

@ -1,4 +1,4 @@
import { useRequest } from "@/use/useHttp" import { useRequest } from '@/use/useHttp'
/** /**
* *
@ -6,7 +6,7 @@ import { useRequest } from "@/use/useHttp"
*/ */
export const EnumSalesTypeApi = () => { export const EnumSalesTypeApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/saleType`, url: '/v2/mp/enum/saleType',
method: 'get', method: 'get',
}) })
} }
@ -15,9 +15,9 @@ export const EnumSalesTypeApi = () => {
* *
* @returns * @returns
*/ */
export const EnumMarketingDepartmentApi = () => { export const EnumMarketingDepartmentApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/saleDepartment/list`, url: '/v2/mp/enum/saleDepartment/list',
method: "get" method: 'get',
}) })
} }

View File

@ -6,7 +6,7 @@ import { useRequest } from '@/use/useHttp'
*/ */
export const SaleOrderDataFormApi = () => { export const SaleOrderDataFormApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrderDataForm`, url: '/v2/mp/saleOrderDataForm',
method: 'get', method: 'get',
}) })
} }
@ -17,7 +17,7 @@ export const SaleOrderDataFormApi = () => {
*/ */
export const ProductRankApi = () => { export const ProductRankApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrderDataForm/product/list`, url: '/v2/mp/saleOrderDataForm/product/list',
method: 'get', method: 'get',
}) })
} }
@ -28,7 +28,7 @@ export const ProductRankApi = () => {
*/ */
export const PurchaserRankApi = () => { export const PurchaserRankApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrderDataForm/purchaser/list`, url: '/v2/mp/saleOrderDataForm/purchaser/list',
method: 'get', method: 'get',
}) })
} }
@ -39,7 +39,7 @@ export const PurchaserRankApi = () => {
*/ */
export const SupplierRankApi = () => { export const SupplierRankApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrderDataForm/supplier/list`, url: '/v2/mp/saleOrderDataForm/supplier/list',
method: 'get', method: 'get',
}) })
} }
@ -50,15 +50,15 @@ export const SupplierRankApi = () => {
*/ */
export const SalesmanRankApi = () => { export const SalesmanRankApi = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrderDataForm/saleUser/list`, url: '/v2/mp/saleOrderDataForm/saleUser/list',
method: 'get', method: 'get',
}) })
} }
//获取排行指标枚举 // 获取排行指标枚举
export const SaleOrderDataFormdataFormStatus = () => { export const SaleOrderDataFormdataFormStatus = () => {
return useRequest({ return useRequest({
url: `/v2/mp/saleOrderDataForm/dataFormStatus`, url: '/v2/mp/saleOrderDataForm/dataFormStatus',
method: 'get', method: 'get',
}) })
} }

View File

@ -1,15 +1,15 @@
import { useRequest } from '@/use/useHttp' import { useRequest } from '@/use/useHttp'
//提货类型 // 提货类型
export const EnumTakeGoodsOrderTypeList = () => { export const EnumTakeGoodsOrderTypeList = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/takeGoodsOrderType/list`, url: '/v2/mp/enum/takeGoodsOrderType/list',
method: 'get', method: 'get',
}) })
} }
//tabs枚举 // tabs枚举
export const EnumTakeGoodsOrderStatus = () => { export const EnumTakeGoodsOrderStatus = () => {
return useRequest({ return useRequest({
url: `/v2/mp/enum/takeGoodsOrderStatus/list`, url: '/v2/mp/enum/takeGoodsOrderStatus/list',
method: 'get', method: 'get',
}) })
} }

View File

@ -1,44 +1,44 @@
import { useRequest } from '@/use/useHttp' import { useRequest } from '@/use/useHttp'
import { CAP_HTML_TO_IMAGE_BASE_URL } from '@/common/constant' import { CAP_HTML_TO_IMAGE_BASE_URL } from '@/common/constant'
//列表 // 列表
export const TakeGoodsOrderList = () => { export const TakeGoodsOrderList = () => {
return useRequest({ return useRequest({
url: `/v2/mp/takeGoodsOrder/list`, url: '/v2/mp/takeGoodsOrder/list',
method: 'get', method: 'get',
}) })
} }
//拒收提货 // 拒收提货
export const TakeGoodsOrderRefuse = () => { export const TakeGoodsOrderRefuse = () => {
return useRequest({ return useRequest({
url: `/v2/mp/takeGoodsOrder/refuse`, url: '/v2/mp/takeGoodsOrder/refuse',
method: 'put', method: 'put',
}) })
} }
//审核提货单 // 审核提货单
export const TakeGoodsOrderAudit = () => { export const TakeGoodsOrderAudit = () => {
return useRequest({ return useRequest({
url: `/v2/mp/takeGoodsOrder/audit`, url: '/v2/mp/takeGoodsOrder/audit',
method: 'put', method: 'put',
}) })
} }
//详情 // 详情
export const TakeGoodsOrder = () => { export const TakeGoodsOrder = () => {
return useRequest({ return useRequest({
url: `/v2/mp/takeGoodsOrder`, url: '/v2/mp/takeGoodsOrder',
method: 'get', method: 'get',
}) })
} }
//邀请码 // 邀请码
export const UserInvitationInfoRecord = () => { export const UserInvitationInfoRecord = () => {
return useRequest({ return useRequest({
url: `/v2/mp/user/invitationInfoRecord`, url: '/v2/mp/user/invitationInfoRecord',
method: 'get', method: 'get',
}) })
} }
//生成二维码 // 生成二维码
export const GenBarCodeOrQrCode = () => { export const GenBarCodeOrQrCode = () => {
return useRequest({ return useRequest({
url: `/xima-caphtml/genBarcodeOrQrCode`, url: '/xima-caphtml/genBarcodeOrQrCode',
base_url: CAP_HTML_TO_IMAGE_BASE_URL, base_url: CAP_HTML_TO_IMAGE_BASE_URL,
method: 'post', method: 'post',
}) })

View File

@ -1,38 +1,38 @@
import { FC } from 'react' import type { FC } from 'react'
import ContextBlueTooth from '@/use/contextBlueTooth'
import { Provider } from 'react-redux' import { Provider } from 'react-redux'
import configStore from './store' import configStore from './store'
import ContextBlueTooth from '@/use/contextBlueTooth'
import './app.scss' import './app.scss'
import Taro, { onAppShow, useDidShow } from '@tarojs/taro' import Taro, { onAppShow, useDidShow } from '@tarojs/taro'
import { shareShop } from './common/util' import { shareShop } from './common/util'
type ParamsType = { interface ParamsType {
children?: React.ReactNode children?: React.ReactNode
} }
const store = configStore() const store = configStore()
const App: FC<ParamsType> = params => { const App: FC<ParamsType> = (params) => {
const { children } = params const { children } = params
if (process.env.TARO_ENV === 'weapp') { if (process.env.TARO_ENV === 'weapp') {
Taro.showShareMenu({ Taro.showShareMenu({
withShareTicket: true, withShareTicket: true,
}) })
//分享 // 分享
shareShop() shareShop()
//检查版本更新 // 检查版本更新
onAppShow(() => { onAppShow(() => {
const updateManager = Taro.getUpdateManager() const updateManager = Taro.getUpdateManager()
updateManager.onCheckForUpdate(function(res) { updateManager.onCheckForUpdate((res) => {
// 请求完新版本信息的回调 // 请求完新版本信息的回调
console.log('版本信息:', res.hasUpdate) console.log('版本信息:', res.hasUpdate)
}) })
updateManager.onUpdateReady(function() { updateManager.onUpdateReady(() => {
Taro.showModal({ Taro.showModal({
title: '更新提示', title: '更新提示',
content: '新版本已经准备好,是否重启应用?', content: '新版本已经准备好,是否重启应用?',
success: function(res) { success(res) {
if (res.confirm) { if (res.confirm) {
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
updateManager.applyUpdate() updateManager.applyUpdate()
@ -40,7 +40,7 @@ const App: FC<ParamsType> = params => {
}, },
}) })
}) })
updateManager.onUpdateFailed(function() { updateManager.onUpdateFailed(() => {
console.log('新版本更新失败') console.log('新版本更新失败')
}) })
}) })

View File

@ -4,5 +4,5 @@
export const enum EnumSaleMode { export const enum EnumSaleMode {
Bulk = 0, Bulk = 0,
Plate = 1, Plate = 1,
BulkCut = 2 BulkCut = 2,
} }

View File

@ -1,86 +1,76 @@
module.exports = function(lab1, lab2){ module.exports = function(lab1, lab2) {
const rgb2labArray1 = lab1
const rgb2labArray2 = lab2
var rgb2labArray1 = lab1; const l1 = rgb2labArray1[0]
var rgb2labArray2 = lab2; const a1 = rgb2labArray1[1]
const b1 = rgb2labArray1[2]
var l1 = rgb2labArray1[0]; const l2 = rgb2labArray2[0]
var a1 = rgb2labArray1[1]; const a2 = rgb2labArray2[1]
var b1 = rgb2labArray1[2]; const b2 = rgb2labArray2[2]
var l2 = rgb2labArray2[0]; const avg_lp = (l1 + l2) / 2
var a2 = rgb2labArray2[1]; const c1 = Math.sqrt(Math.pow(a1, 2) + Math.pow(b1, 2))
var b2 = rgb2labArray2[2]; const c2 = Math.sqrt(Math.pow(a2, 2) + Math.pow(b2, 2))
const avg_c = (c1 + c2) / 2
const g = (1 - Math.sqrt(Math.pow(avg_c, 7) / (Math.pow(avg_c, 7) + Math.pow(25, 7)))) / 2
const a1p = a1 * (1 + g)
const a2p = a2 * (1 + g)
var avg_lp = (l1 + l2) / 2; const c1p = Math.sqrt(Math.pow(a1p, 2) + Math.pow(b1, 2))
var c1 = Math.sqrt(Math.pow(a1, 2) + Math.pow(b1, 2)); const c2p = Math.sqrt(Math.pow(a2p, 2) + Math.pow(b2, 2))
var c2 = Math.sqrt(Math.pow(a2, 2) + Math.pow(b2, 2));
var avg_c = (c1 + c2) / 2;
var g = (1- Math.sqrt(Math.pow(avg_c, 7) / (Math.pow(avg_c, 7) + Math.pow(25, 7)))) / 2;
var a1p = a1 * (1 + g); const avg_cp = (c1p + c2p) / 2
var a2p = a2 * (1 + g);
var c1p = Math.sqrt(Math.pow(a1p, 2) + Math.pow(b1, 2)); let h1p = rad2deg(Math.atan2(b1, a1p))
var c2p = Math.sqrt(Math.pow(a2p, 2) + Math.pow(b2, 2)); if (h1p < 0) {
h1p = h1p + 360
var avg_cp = (c1p + c2p) / 2;
var h1p = rad2deg(Math.atan2(b1, a1p));
if(h1p < 0){
h1p = h1p + 360;
} }
var h2p = rad2deg(Math.atan2(b2, a2p)); let h2p = rad2deg(Math.atan2(b2, a2p))
if(h2p < 0){ if (h2p < 0) {
h2p = h2p + 360
h2p = h2p + 360;
} }
var avg_hp = Math.abs(h1p - h2p) > 180 ? (h1p + h2p + 360) / 2 : (h1p + h1p) / 2; const avg_hp = Math.abs(h1p - h2p) > 180 ? (h1p + h2p + 360) / 2 : (h1p + h1p) / 2
var t = 1 - 0.17 * Math.cos(deg2rad(avg_hp - 30)) + 0.24 * Math.cos(deg2rad(2 * avg_hp)) + 0.32 * Math.cos(deg2rad(3 * avg_hp + 6)) - 0.2 * Math.cos(deg2rad(4 * avg_hp - 63)) const t = 1 - 0.17 * Math.cos(deg2rad(avg_hp - 30)) + 0.24 * Math.cos(deg2rad(2 * avg_hp)) + 0.32 * Math.cos(deg2rad(3 * avg_hp + 6)) - 0.2 * Math.cos(deg2rad(4 * avg_hp - 63))
var delta_hp = h2p - h1p; let delta_hp = h2p - h1p
if(Math.abs(delta_hp) > 180){ if (Math.abs(delta_hp) > 180) {
if (h2p <= h1p) { if (h2p <= h1p) {
delta_hp += 360; delta_hp += 360
} }
else { else {
delta_hp -= 360; delta_hp -= 360
} }
} }
var delta_lp = l2 - l1; const delta_lp = l2 - l1
var delta_cp = c2p - c1p; const delta_cp = c2p - c1p
delta_hp = 2 * Math.sqrt(c1p * c2p) * Math.sin(deg2rad(delta_hp) / 2); delta_hp = 2 * Math.sqrt(c1p * c2p) * Math.sin(deg2rad(delta_hp) / 2)
var s_l = 1 + ((0.015 * Math.pow(avg_lp - 50, 2)) / Math.sqrt(20 + Math.pow(avg_lp - 50, 2))); const s_l = 1 + ((0.015 * Math.pow(avg_lp - 50, 2)) / Math.sqrt(20 + Math.pow(avg_lp - 50, 2)))
var s_c = 1 + 0.045 * avg_cp const s_c = 1 + 0.045 * avg_cp
var s_h = 1 + 0.015 * avg_cp * t; const s_h = 1 + 0.015 * avg_cp * t
var delta_ro = 30 * Math.exp( - (Math.pow((avg_hp - 275) / 25, 2))); const delta_ro = 30 * Math.exp(-(Math.pow((avg_hp - 275) / 25, 2)))
var r_c = 2 * Math.sqrt(Math.pow(avg_cp, 7) / (Math.pow(avg_cp, 7) + Math.pow(25, 7))); const r_c = 2 * Math.sqrt(Math.pow(avg_cp, 7) / (Math.pow(avg_cp, 7) + Math.pow(25, 7)))
var r_t = -r_c * Math.sin(2 * deg2rad(delta_ro)); const r_t = -r_c * Math.sin(2 * deg2rad(delta_ro))
var kl = 1, kc =1, kh = 1; const kl = 1; const kc = 1; const kh = 1
var delta_e = Math.sqrt(Math.pow(delta_lp / (kl * s_l), 2) + Math.pow(delta_cp / (kc * s_c), 2) + Math.pow(delta_hp / (kh * s_h), 2) + r_t * (delta_cp / (kc * s_c)) * (delta_hp / (kh * s_h))) const delta_e = Math.sqrt(Math.pow(delta_lp / (kl * s_l), 2) + Math.pow(delta_cp / (kc * s_c), 2) + Math.pow(delta_hp / (kh * s_h), 2) + r_t * (delta_cp / (kc * s_c)) * (delta_hp / (kh * s_h)))
return delta_e return delta_e
function rad2deg(rad) {
function rad2deg(rad){ return 360 * rad / (2 * Math.PI)
return 360 * rad / (2 * Math.PI);
} }
function deg2rad(deg){ function deg2rad(deg) {
return (2 * Math.PI * deg) / 360
return (2 * Math.PI * deg) / 360;
} }
} }

View File

@ -4,7 +4,7 @@ import XyzCom from './xyz'
import ColorDiff from './colorDiff' import ColorDiff from './colorDiff'
export const toRgb = (lab) => { export const toRgb = (lab) => {
let xyz = LabCom.xyz(lab) const xyz = LabCom.xyz(lab)
return XyzCom.rgb(xyz) return XyzCom.rgb(xyz)
} }

View File

@ -1,54 +1,54 @@
var xyz = require('./xyz'); const xyz = require('./xyz')
module.exports = { module.exports = {
name: 'lab', name: 'lab',
min: [0,-100,-100], min: [0, -100, -100],
max: [100,100,100], max: [100, 100, 100],
channel: ['lightness', 'a', 'b'], channel: ['lightness', 'a', 'b'],
alias: ['LAB', 'cielab'], alias: ['LAB', 'cielab'],
xyz: function(lab) { xyz(lab) {
var l = lab[0], const l = lab[0]
a = lab[1], const a = lab[1]
b = lab[2], const b = lab[2]
x, y, z, y2; let x; let y; let z; let y2
if (l <= 8) { if (l <= 8) {
y = (l * 100) / 903.3; y = (l * 100) / 903.3
y2 = (7.787 * (y / 100)) + (16 / 116); y2 = (7.787 * (y / 100)) + (16 / 116)
} else { }
y = 100 * Math.pow((l + 16) / 116, 3); else {
y2 = Math.pow(y / 100, 1/3); y = 100 * Math.pow((l + 16) / 116, 3)
y2 = Math.pow(y / 100, 1 / 3)
} }
x = x / 95.047 <= 0.008856 ? x = (95.047 * ((a / 500) + y2 - (16 / 116))) / 7.787 : 95.047 * Math.pow((a / 500) + y2, 3); x = x / 95.047 <= 0.008856 ? x = (95.047 * ((a / 500) + y2 - (16 / 116))) / 7.787 : 95.047 * Math.pow((a / 500) + y2, 3)
z = z / 108.883 <= 0.008859 ? z = (108.883 * (y2 - (b / 200) - (16 / 116))) / 7.787 : 108.883 * Math.pow(y2 - (b / 200), 3); z = z / 108.883 <= 0.008859 ? z = (108.883 * (y2 - (b / 200) - (16 / 116))) / 7.787 : 108.883 * Math.pow(y2 - (b / 200), 3)
return [x, y, z]; return [x, y, z]
} },
}; }
// extend xyz
xyz.lab = function(xyz) {
let x = xyz[0]
let y = xyz[1]
let z = xyz[2]
let l; let a; let b
//extend xyz x /= 95.047
xyz.lab = function(xyz){ y /= 100
var x = xyz[0], z /= 108.883
y = xyz[1],
z = xyz[2],
l, a, b;
x /= 95.047; x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116)
y /= 100; y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116)
z /= 108.883; z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116)
x = x > 0.008856 ? Math.pow(x, 1/3) : (7.787 * x) + (16 / 116); l = (116 * y) - 16
y = y > 0.008856 ? Math.pow(y, 1/3) : (7.787 * y) + (16 / 116); a = 500 * (x - y)
z = z > 0.008856 ? Math.pow(z, 1/3) : (7.787 * z) + (16 / 116); b = 200 * (y - z)
l = (116 * y) - 16; return [l, a, b]
a = 500 * (x - y); }
b = 200 * (y - z);
return [l, a, b];
};

View File

@ -1,9 +1,8 @@
module.exports = { module.exports = {
name: 'rgb', name: 'rgb',
min: [0,0,0], min: [0, 0, 0],
max: [255,255,255], max: [255, 255, 255],
channel: ['red', 'green', 'blue'], channel: ['red', 'green', 'blue'],
alias: ['RGB'] alias: ['RGB'],
}; }

View File

@ -1,13 +1,12 @@
var rgb = require('./rgb'); const rgb = require('./rgb')
var xyz = { const xyz = {
name: 'xyz', name: 'xyz',
min: [0,0,0], min: [0, 0, 0],
channel: ['X','Y','Z'], channel: ['X', 'Y', 'Z'],
alias: ['XYZ', 'ciexyz', 'cie1931'] alias: ['XYZ', 'ciexyz', 'cie1931'],
}; }
/** /**
* Whitepoint reference values with observer/illuminant * Whitepoint reference values with observer/illuminant
@ -15,18 +14,18 @@ var xyz = {
* http://en.wikipedia.org/wiki/Standard_illuminant * http://en.wikipedia.org/wiki/Standard_illuminant
*/ */
xyz.whitepoint = { xyz.whitepoint = {
//1931 2° // 1931 2°
2: { 2: {
//incadescent // incadescent
A:[109.85, 100, 35.585], A: [109.85, 100, 35.585],
// B:[], // B:[],
C: [98.074, 100, 118.232], C: [98.074, 100, 118.232],
D50: [96.422, 100, 82.521], D50: [96.422, 100, 82.521],
D55: [95.682, 100, 92.149], D55: [95.682, 100, 92.149],
//daylight // daylight
D65: [95.045592705167, 100, 108.9057750759878], D65: [95.045592705167, 100, 108.9057750759878],
D75: [94.972, 100, 122.638], D75: [94.972, 100, 122.638],
//flourescent // flourescent
// F1: [], // F1: [],
F2: [99.187, 100, 67.395], F2: [99.187, 100, 67.395],
// F3: [], // F3: [],
@ -39,33 +38,31 @@ xyz.whitepoint = {
// F10: [], // F10: [],
F11: [100.966, 100, 64.370], F11: [100.966, 100, 64.370],
// F12: [], // F12: [],
E: [100,100,100] E: [100, 100, 100],
}, },
//1964 10° // 1964 10°
10: { 10: {
//incadescent // incadescent
A:[111.144, 100, 35.200], A: [111.144, 100, 35.200],
C: [97.285, 100, 116.145], C: [97.285, 100, 116.145],
D50: [96.720, 100, 81.427], D50: [96.720, 100, 81.427],
D55: [95.799, 100, 90.926], D55: [95.799, 100, 90.926],
//daylight // daylight
D65: [94.811, 100, 107.304], D65: [94.811, 100, 107.304],
D75: [94.416, 100, 120.641], D75: [94.416, 100, 120.641],
//flourescent // flourescent
F2: [103.280, 100, 69.026], F2: [103.280, 100, 69.026],
F7: [95.792, 100, 107.687], F7: [95.792, 100, 107.687],
F11: [103.866, 100, 65.627], F11: [103.866, 100, 65.627],
E: [100,100,100] E: [100, 100, 100],
} },
}; }
/** /**
* Top values are the whitepoints top values, default are D65 * Top values are the whitepoints top values, default are D65
*/ */
xyz.max = xyz.whitepoint[2].D65; xyz.max = xyz.whitepoint[2].D65
/** /**
* Transform xyz to rgb * Transform xyz to rgb
@ -74,39 +71,40 @@ xyz.max = xyz.whitepoint[2].D65;
* *
* @return {Array} RGB values * @return {Array} RGB values
*/ */
xyz.rgb = function (_xyz, white) { xyz.rgb = function(_xyz, white) {
//FIXME: make sure we have to divide like this. Probably we have to replace matrix as well then // FIXME: make sure we have to divide like this. Probably we have to replace matrix as well then
white = white || xyz.whitepoint[2].E; white = white || xyz.whitepoint[2].E
var x = _xyz[0] / white[0], const x = _xyz[0] / white[0]
y = _xyz[1] / white[1], const y = _xyz[1] / white[1]
z = _xyz[2] / white[2], const z = _xyz[2] / white[2]
r, g, b; let r; let g; let b
// assume sRGB // assume sRGB
// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html // http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html
r = (x * 3.240969941904521) + (y * -1.537383177570093) + (z * -0.498610760293); r = (x * 3.240969941904521) + (y * -1.537383177570093) + (z * -0.498610760293)
g = (x * -0.96924363628087) + (y * 1.87596750150772) + (z * 0.041555057407175); g = (x * -0.96924363628087) + (y * 1.87596750150772) + (z * 0.041555057407175)
b = (x * 0.055630079696993) + (y * -0.20397695888897) + (z * 1.056971514242878); b = (x * 0.055630079696993) + (y * -0.20397695888897) + (z * 1.056971514242878)
r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) r = r > 0.0031308
: r = (r * 12.92); ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
: r = (r * 12.92)
g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) g = g > 0.0031308
: g = (g * 12.92); ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
: g = (g * 12.92)
b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) b = b > 0.0031308
: b = (b * 12.92); ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
: b = (b * 12.92)
r = Math.min(Math.max(0, r), 1); r = Math.min(Math.max(0, r), 1)
g = Math.min(Math.max(0, g), 1); g = Math.min(Math.max(0, g), 1)
b = Math.min(Math.max(0, b), 1); b = Math.min(Math.max(0, b), 1)
return [r * 255, g * 255, b * 255]; return [r * 255, g * 255, b * 255]
} }
/** /**
* RGB to XYZ * RGB to XYZ
* *
@ -115,24 +113,22 @@ xyz.rgb = function (_xyz, white) {
* @return {Array} XYZ channels * @return {Array} XYZ channels
*/ */
rgb.xyz = function(rgb, white) { rgb.xyz = function(rgb, white) {
var r = rgb[0] / 255, let r = rgb[0] / 255
g = rgb[1] / 255, let g = rgb[1] / 255
b = rgb[2] / 255; let b = rgb[2] / 255
// assume sRGB // assume sRGB
r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92)
g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92)
b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92)
var x = (r * 0.41239079926595) + (g * 0.35758433938387) + (b * 0.18048078840183); const x = (r * 0.41239079926595) + (g * 0.35758433938387) + (b * 0.18048078840183)
var y = (r * 0.21263900587151) + (g * 0.71516867876775) + (b * 0.072192315360733); const y = (r * 0.21263900587151) + (g * 0.71516867876775) + (b * 0.072192315360733)
var z = (r * 0.019330818715591) + (g * 0.11919477979462) + (b * 0.95053215224966); const z = (r * 0.019330818715591) + (g * 0.11919477979462) + (b * 0.95053215224966)
white = white || xyz.whitepoint[2].E; white = white || xyz.whitepoint[2].E
return [x * white[0], y * white[1], z * white[2]]; return [x * white[0], y * white[1], z * white[2]]
}; }
module.exports = xyz
module.exports = xyz;

View File

@ -1,20 +1,19 @@
import { uint32ToUint8Array, uint8ArrayToHex } from "./utils"; import { uint32ToUint8Array, uint8ArrayToHex } from './utils'
export class Command { export class Command {
// 测量序号 // 测量序号
static measureId = 1; static measureId = 1
// 命令完整响应的长度 // 命令完整响应的长度
responseSize = 0; responseSize = 0
// 命令发送的数据 // 命令发送的数据
content = new Uint8Array(0); content = new Uint8Array(0)
// 命令响应的数据 // 命令响应的数据
response = new Uint8Array(0); response = new Uint8Array(0)
// 等待响应的超时时间 // 等待响应的超时时间
timeout = 3000; timeout = 3000
// 发送的数据是否需要生成和校验值 // 发送的数据是否需要生成和校验值
needSign = true; needSign = true
/** /**
* @param {Uint8Array|ArrayBuffer|number[]} content * @param {Uint8Array|ArrayBuffer|number[]} content
@ -24,15 +23,16 @@ export class Command {
*/ */
constructor(content, responseSize, timeout = 3000, needSign = true) { constructor(content, responseSize, timeout = 3000, needSign = true) {
if (content instanceof Uint8Array) { if (content instanceof Uint8Array) {
this.content = content; this.content = content
} else {
this.content = new Uint8Array(content);
} }
this.responseSize = responseSize; else {
this.content = new Uint8Array(content)
}
this.responseSize = responseSize
if (typeof timeout === 'number' && timeout >= 0) { if (typeof timeout === 'number' && timeout >= 0) {
this.timeout = timeout; this.timeout = timeout
} }
this.needSign = needSign; this.needSign = needSign
} }
/** /**
@ -40,26 +40,26 @@ export class Command {
* @returns {ArrayBuffer[]} * @returns {ArrayBuffer[]}
*/ */
get data() { get data() {
if (this.content.length === 0) throw new Error('正文内容不能为空'); if (this.content.length === 0) { throw new Error('正文内容不能为空') }
const data = []; const data = []
const b = new Uint8Array(this.content.buffer); const b = new Uint8Array(this.content.buffer)
if (this.needSign) { if (this.needSign) {
b[b.length - 1] = Command.getSign(b); b[b.length - 1] = Command.getSign(b)
} }
for (let i = 0; i < b.length; i += 20) { for (let i = 0; i < b.length; i += 20) {
data.push(b.slice(i, i + 20).buffer); data.push(b.slice(i, i + 20).buffer)
} }
return data; return data
} }
/** 是否接收完成 */ /** 是否接收完成 */
get isComplete() { get isComplete() {
return this.response.length >= this.responseSize; return this.response.length >= this.responseSize
} }
/** 是否有效 */ /** 是否有效 */
get isValid() { get isValid() {
return Command.getSign(this.response) === this.response[this.response.length - 1]; return Command.getSign(this.response) === this.response[this.response.length - 1]
} }
/** /**
@ -67,32 +67,31 @@ export class Command {
* @param {ArrayBuffer} buffer * @param {ArrayBuffer} buffer
*/ */
fillResponse(buffer) { fillResponse(buffer) {
this.response = new Uint8Array([...this.response, ...(new Uint8Array(buffer))]); this.response = new Uint8Array([...this.response, ...(new Uint8Array(buffer))])
} }
/** /**
* 获取和校验值 * 获取和校验值
* @param {ArrayBuffer|Uint8Array} buffer * @param {ArrayBuffer|Uint8Array} buffer
*/ */
static getSign(buffer) { static getSign(buffer) {
const _b = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer); const _b = buffer instanceof Uint8Array ? buffer : new Uint8Array(buffer)
let sum = 0; let sum = 0
_b.slice(0, _b.length - 1).forEach(i => sum += i); _b.slice(0, _b.length - 1).forEach(i => sum += i)
return new Uint8Array([sum])[0]; return new Uint8Array([sum])[0]
} }
// 唤醒命令 // 唤醒命令
static WakeUp = new Command([0xf0], 0, 0, false); static WakeUp = new Command([0xF0], 0, 0, false)
/** /**
* 获取测量命令 * 获取测量命令
* @param {number} mode * @param {number} mode
*/ */
static measure(mode = 0) { static measure(mode = 0) {
Command.measureId += 1; Command.measureId += 1
const measureId = uint32ToUint8Array(Command.measureId); const measureId = uint32ToUint8Array(Command.measureId)
return new Command([0xbb, 1, mode, ...measureId, 0, 0xff, 0], 10, 1500); return new Command([0xBB, 1, mode, ...measureId, 0, 0xFF, 0], 10, 1500)
} }
/** /**
@ -100,7 +99,7 @@ export class Command {
* @param {number} mode * @param {number} mode
*/ */
static getLab(mode = 0) { static getLab(mode = 0) {
return new Command([0xbb, 3, mode, 0, 0, 0, 0, 0, 0xff, 0], 20, 1500); return new Command([0xBB, 3, mode, 0, 0, 0, 0, 0, 0xFF, 0], 20, 1500)
} }
/** /**
@ -108,7 +107,7 @@ export class Command {
* @param {number} mode * @param {number} mode
*/ */
static getRGB(mode = 0) { static getRGB(mode = 0) {
return new Command([0xbb, 4, mode, 0, 0, 0, 0, 0, 0xff, 0], 20, 1500); return new Command([0xBB, 4, mode, 0, 0, 0, 0, 0, 0xFF, 0], 20, 1500)
} }
/** /**
@ -116,7 +115,7 @@ export class Command {
* @param {number} mode * @param {number} mode
*/ */
static getSpectral(mode = 0) { static getSpectral(mode = 0) {
return new Command([0xbb, 2, 0x10 + mode, 0, 0, 0 ,0 ,0, 0xff, 0], 200, 5000); return new Command([0xBB, 2, 0x10 + mode, 0, 0, 0, 0, 0, 0xFF, 0], 200, 5000)
} }
/** /**
@ -124,23 +123,19 @@ export class Command {
* @param {number} check 是否判断校准成功 1 判断 0 不判断 * @param {number} check 是否判断校准成功 1 判断 0 不判断
*/ */
static whiteCalibrate(check = 1) { static whiteCalibrate(check = 1) {
return new Command([0xbb, 0x11, check, 0, 0, 0, 0, 0, 0xff, 0], 10, 1500); return new Command([0xBB, 0x11, check, 0, 0, 0, 0, 0, 0xFF, 0], 10, 1500)
} }
/** /**
* 黑校准 * 黑校准
* @param {number} check 是否判断校准成功 * @param {number} check 是否判断校准成功
*/ */
static blackCalibrate(check = 1) { static blackCalibrate(check = 1) {
return new Command([0xbb, 0x10, check, 0, 0, 0, 0, 0, 0xff, 0], 10, 1500); return new Command([0xBB, 0x10, check, 0, 0, 0, 0, 0, 0xFF, 0], 10, 1500)
} }
/** 获取校准状态 */ /** 获取校准状态 */
static GetCalibrationInf = new Command([0xbb, 0x1e, 0, 0, 0, 0, 0, 0, 0xff, 0], 20, 1500); static GetCalibrationInf = new Command([0xBB, 0x1E, 0, 0, 0, 0, 0, 0, 0xFF, 0], 20, 1500)
static GetDeviceInf = new Command([0xBB, 0x12, 0x01, 0, 0, 0, 0, 0, 0xFF, 0], 200, 5000)
static GetDeviceInf = new Command([0xbb, 0x12, 0x01, 0, 0, 0, 0, 0, 0xff, 0], 200, 5000);
} }

View File

@ -3,7 +3,7 @@
* @param {number} n * @param {number} n
*/ */
export function uint32ToUint8Array(n) { export function uint32ToUint8Array(n) {
return new Uint8Array(new Uint32Array([n]).buffer); return new Uint8Array(new Uint32Array([n]).buffer)
} }
/** /**
@ -11,60 +11,55 @@ export function uint32ToUint8Array(n) {
* @param {Uint8Array} raw * @param {Uint8Array} raw
*/ */
export function uint8ArrayToFloat32(raw) { export function uint8ArrayToFloat32(raw) {
return new Float32Array(raw.buffer)[0]; return new Float32Array(raw.buffer)[0]
} }
/** /**
* Uint8 数组 Uint16 * Uint8 数组 Uint16
* @param {Uint8Array} raw * @param {Uint8Array} raw
*/ */
export function uint8ArrayToUint16(raw) { export function uint8ArrayToUint16(raw) {
return new Uint16Array(raw.buffer)[0]; return new Uint16Array(raw.buffer)[0]
} }
/** /**
* Uint8 数组转 Uint32 * Uint8 数组转 Uint32
* @param {Uint8Array} raw * @param {Uint8Array} raw
* @returns * @returns
*/ */
export function uint8ArrayToUnit32(raw) { export function uint8ArrayToUnit32(raw) {
return new Uint32Array(raw.buffer)[0]; return new Uint32Array(raw.buffer)[0]
} }
/** /**
* 等待指定时长 * 等待指定时长
* @param {number} duration * @param {number} duration
*/ */
export function waitFor(duration) { export function waitFor(duration) {
return new Promise(resolve => { return new Promise((resolve) => {
setTimeout(resolve, duration); setTimeout(resolve, duration)
}); })
} }
/** /**
* uint8 数组转 hex 字符串 * uint8 数组转 hex 字符串
* @param {Uint8Array} raw * @param {Uint8Array} raw
*/ */
export function uint8ArrayToHex(raw) { export function uint8ArrayToHex(raw) {
const s = []; const s = []
raw.forEach(i => { raw.forEach((i) => {
const b = i.toString(16); const b = i.toString(16)
s.push(b.length > 1 ? b : `0${b}`); s.push(b.length > 1 ? b : `0${b}`)
}); })
return s.join(' '); return s.join(' ')
} }
// 二进制转字符串(ascii) // 二进制转字符串(ascii)
export function bufferToString(buffer) { export function bufferToString(buffer) {
let str = ""; let str = ''
for (let code of buffer) { for (const code of buffer) {
if (code === 0) break; if (code === 0) { break }
str += utf82string(code); str += utf82string(code)
} }
return str; return str
} }

View File

@ -10,9 +10,9 @@ import Qs from 'qs'
type ParamLink = 'navigateTo' | 'switchTab' | 'reLaunch' | 'redirectTo' type ParamLink = 'navigateTo' | 'switchTab' | 'reLaunch' | 'redirectTo'
export const goLink = (path = '', params = {}, way: ParamLink = 'navigateTo') => { export const goLink = (path = '', params = {}, way: ParamLink = 'navigateTo') => {
if (path) { if (path) {
let params_str = Qs.stringify(params) const params_str = Qs.stringify(params)
console.log('params_str==>', params_str) console.log('params_str==>', params_str)
path = params_str ? path + '?' + params_str : path path = params_str ? `${path}?${params_str}` : path
Taro[way]({ url: path }) Taro[way]({ url: path })
} }
} }
@ -24,12 +24,15 @@ export const goLink = (path = '', params = {}, way: ParamLink = 'navigateTo') =>
export const isEmptyObject = (object: any) => { export const isEmptyObject = (object: any) => {
if (object == undefined || object == null || Number.isNaN(object)) { if (object == undefined || object == null || Number.isNaN(object)) {
return true return true
} else { }
else {
if (object.constructor == Object) { if (object.constructor == Object) {
return Reflect.ownKeys(object).length == 0 return Reflect.ownKeys(object).length == 0
} else if (object.constructor == Array) { }
else if (object.constructor == Array) {
return object.length == 0 return object.length == 0
} else if (object.constructor == String) { }
else if (object.constructor == String) {
return object == '' return object == ''
} }
} }
@ -55,42 +58,45 @@ export const isEmptyObject = (object: any) => {
* @param message * @param message
* @returns * @returns
*/ */
export const retrieval = (data: any, rules?: Object, message: string = '请填写完信息') => { // export const retrieval = (data: any, rules?: Object, message = '请填写完信息') => {
return new Promise((resolve, reject) => { // return new Promise((resolve, reject) => {
if (rules) { // if (rules) {
const keys = Reflect.ownKeys(rules) // const keys = Reflect.ownKeys(rules)
const result = keys.some((key: any) => { // const result = keys.some((key: any) => {
for (let item of (rules as any)[key]) { // for (const item of (rules as any)[key]) {
let _res = false // let _res = false
if (item.validator) { // if (item.validator) {
if (item.validator(data[key], item)) { // if (item.validator(data[key], item)) {
_res = true // _res = true
} // }
} else if (item.regex) { // }
if (!item.regex.test(data[key])) { // else if (item.regex) {
_res = true // if (!item.regex.test(data[key])) {
} // _res = true
} else { // }
if (isEmptyObject(data[key])) { // }
_res = true // else {
} // if (isEmptyObject(data[key])) {
} // _res = true
message = item.message // }
return _res // }
} // message = item.message
}) // return _res
if (result) { // }
reject(message) // })
} // if (result) {
} else { // reject(message)
const keys = Reflect.ownKeys(data) // }
if (keys.some((key: any) => isEmptyObject(data[key]))) { // }
reject(message) // else {
} // const keys = Reflect.ownKeys(data)
} // if (keys.some((key: any) => isEmptyObject(data[key]))) {
resolve(null) // reject(message)
}) // }
} // }
// resolve(null)
// })
// }
/** /**
* toast提示 * toast提示
*/ */
@ -107,7 +113,7 @@ export const alert = {
icon: 'error', icon: 'error',
}) })
}, },
loading(title: string, mask: boolean = false) { loading(title: string, mask = false) {
Taro.showToast({ Taro.showToast({
title, title,
icon: 'loading', icon: 'loading',
@ -120,7 +126,7 @@ export const alert = {
icon: 'none', icon: 'none',
}) })
}, },
showLoading(title: string, mask: boolean = true) { showLoading(title: string, mask = true) {
Taro.showLoading({ title, mask }) Taro.showLoading({ title, mask })
}, },
hideLoading() { hideLoading() {
@ -143,13 +149,12 @@ export const formatKbPrice = (number: string) => {
return ret.reverse().join('') return ret.reverse().join('')
} }
/** /**
* *
* @param {key} key * @param {key} key
* @returns * @returns
*/ */
export const checkKey = (key = "") => { export const checkKey = (key = '') => {
let getUser = JSON.parse(Taro.getStorageSync("userInfo")); const getUser = JSON.parse(Taro.getStorageSync('userInfo'))
return getUser.mp_role_access_list?.includes(key); return getUser.mp_role_access_list?.includes(key)
}; }

View File

@ -19,30 +19,30 @@ export const BASE_URL = CURRENT_BASE_URL
// CDN // CDN
// 生成密钥 // 生成密钥
export const GET_UPLOAD_SIGN = `/upyun/getsign` // 请求签名 url export const GET_UPLOAD_SIGN = '/upyun/getsign' // 请求签名 url
export const UPLOAD_CDN_URL = `https://v0.api.upyun.com/` export const UPLOAD_CDN_URL = 'https://v0.api.upyun.com/'
// cdn // cdn
export const IMG_CND_Prefix = CURRENT_ENV.includes('production') ? 'https://cdn.zzfzyc.com' : 'https://test.cdn.zzfzyc.com' export const IMG_CND_Prefix = CURRENT_ENV.includes('production') ? 'https://cdn.zzfzyc.com' : 'https://test.cdn.zzfzyc.com'
//在线支付图片baseUrl // 在线支付图片baseUrl
export const CAP_HTML_TO_IMAGE_BASE_URL = CURRENT_ENV.includes('production') ? 'https://www.zzfzyc.com' : 'https://test.zzfzyc.com' export const CAP_HTML_TO_IMAGE_BASE_URL = CURRENT_ENV.includes('production') ? 'https://www.zzfzyc.com' : 'https://test.zzfzyc.com'
// 上传图片视频 // 上传图片视频
export const CDN_UPLOAD_IMG = `${UPLOAD_CDN_URL || ''}` export const CDN_UPLOAD_IMG = `${UPLOAD_CDN_URL || ''}`
//appid // appid
export const WX_APPID = 'wx64fe67f111d52457' export const WX_APPID = 'wx64fe67f111d52457'
export const LIST_EMPTY_IMAGE = IMG_CND_Prefix + '/list_empty.png' export const LIST_EMPTY_IMAGE = `${IMG_CND_Prefix}/list_empty.png`
export const EMPTY_IMAGE = IMG_CND_Prefix + '/empty.png' export const EMPTY_IMAGE = `${IMG_CND_Prefix}/empty.png`
export const SEARCH_EMPTY_IMAGE = IMG_CND_Prefix + '/search_empty.png' export const SEARCH_EMPTY_IMAGE = `${IMG_CND_Prefix}/search_empty.png`
//场景值 // 场景值
export const SCENE = { export const SCENE = {
SearchScene: 0, //商城面料搜索 SearchScene: 0, // 商城面料搜索
} }
//支付码单跳转链接 // 支付码单跳转链接
export const PAY_H5_CODE_URL = CURRENT_ENV.includes('production') ? 'https://www.zzfzyc.com/cashier' : 'https://test.zzfzyc.com/cashier' export const PAY_H5_CODE_URL = CURRENT_ENV.includes('production') ? 'https://www.zzfzyc.com/cashier' : 'https://test.zzfzyc.com/cashier'

View File

@ -1,73 +1,72 @@
//订单状态枚举 // 订单状态枚举
export const ORDER_STATUS = { export const ORDER_STATUS = {
SaleorderstatusWaitingPrePayment : {value:10, label:'预付款'}, // 预付款 SaleorderstatusWaitingPrePayment: { value: 10, label: '预付款' }, // 预付款
SaleOrderStatusBooking : {value:0, label:'待接单'}, // 待接单 SaleOrderStatusBooking: { value: 0, label: '待接单' }, // 待接单
SaleOrderStatusArranging : {value:1, label:'配布中'}, // 配布中 SaleOrderStatusArranging: { value: 1, label: '配布中' }, // 配布中
SaleOrderStatusArranged : {value:2, label:'已配布'}, // 已配布 SaleOrderStatusArranged: { value: 2, label: '已配布' }, // 已配布
SaleOrderStatusWaitingPayment : {value:7, label:'待付款'}, // 待付款 SaleOrderStatusWaitingPayment: { value: 7, label: '待付款' }, // 待付款
SaleOrderStatusTaking: {value: 11, label:'提货中'}, //提货中 SaleOrderStatusTaking: { value: 11, label: '提货中' }, // 提货中
SaleOrderStatusWaitingDelivery : {value:3, label:'待发货'}, // 待发货 SaleOrderStatusWaitingDelivery: { value: 3, label: '待发货' }, // 待发货
SaleOrderStatusWaitingReceipt : {value:8, label:'待收货'}, // 待收货 SaleOrderStatusWaitingReceipt: { value: 8, label: '待收货' }, // 待收货
SaleOrderStatusAlreadyReceipt : {value:9, label:'已收货'}, // 已收货 SaleOrderStatusAlreadyReceipt: { value: 9, label: '已收货' }, // 已收货
SaleOrderStatusComplete : {value:4, label:'已完成'}, // 已完成 SaleOrderStatusComplete: { value: 4, label: '已完成' }, // 已完成
SaleOrderStatusRefund : {value:6, label:'已退款'}, // 已退款 SaleOrderStatusRefund: { value: 6, label: '已退款' }, // 已退款
SaleOrderStatusCancel : {value:5, label:'已取消'}, // 已取消 SaleOrderStatusCancel: { value: 5, label: '已取消' }, // 已取消
} }
//售后单状态枚举 // 售后单状态枚举
export const AFTER_ORDER_STATUS = { export const AFTER_ORDER_STATUS = {
ReturnStageApplying : {value:0, label:'申请中'}, // 申请中 ReturnStageApplying: { value: 0, label: '申请中' }, // 申请中
ReturnStageWaitCheck : {value:1, label:'退货中'}, // 退货中 ReturnStageWaitCheck: { value: 1, label: '退货中' }, // 退货中
ReturnStageChecked : {value:2, label:'待验布'}, // 待验布 ReturnStageChecked: { value: 2, label: '待验布' }, // 待验布
ReturnStageReturned : {value:3, label:'已退款'}, // 已退款 ReturnStageReturned: { value: 3, label: '已退款' }, // 已退款
ReturnStageCancel : {value:4, label:'已取消'}, // 已取消 ReturnStageCancel: { value: 4, label: '已取消' }, // 已取消
ReturnStageQualityCheckPendingRefund : {value:5, label:'待退款'}, // 已验布 ReturnStageQualityCheckPendingRefund: { value: 5, label: '待退款' }, // 已验布
ReturnStageServiceOrderPendingRefund : {value:6, label:'待退款'}, // 待退款 ReturnStageServiceOrderPendingRefund: { value: 6, label: '待退款' }, // 待退款
ReturnStageRejected : {value:7, label:'已拒绝'}, // 已拒绝 ReturnStageRejected: { value: 7, label: '已拒绝' }, // 已拒绝
} }
//支付方式 // 支付方式
export const PAYMENT_METHOD = { export const PAYMENT_METHOD = {
PaymentMethodPreDeposit: {value:2, label:'预存款'}, PaymentMethodPreDeposit: { value: 2, label: '预存款' },
PaymentMethodAccountPeriod : {value:3, label:'账期'}, PaymentMethodAccountPeriod: { value: 3, label: '账期' },
PaymentMethodofflineRemittance: {value:1, label:'线下汇款'}, PaymentMethodofflineRemittance: { value: 1, label: '线下汇款' },
PaymentMethodScanCodeToPay: {value:4, label:'扫码支付'}, PaymentMethodScanCodeToPay: { value: 4, label: '扫码支付' },
PaymentMethodCashOnDelivery: {value:5, label:'货到付款'}, PaymentMethodCashOnDelivery: { value: 5, label: '货到付款' },
} }
// 订单类型
//订单类型
export const SALE_MODE = { export const SALE_MODE = {
SaLeModeBulk: {value:0, label:'大货'}, SaLeModeBulk: { value: 0, label: '大货' },
SaleModeLengthCut: {value:1, label:'剪版'}, SaleModeLengthCut: { value: 1, label: '剪版' },
SaLeModeWeightCut: {value:2, label:'散剪'}, SaLeModeWeightCut: { value: 2, label: '散剪' },
} }
//分享场景枚举 // 分享场景枚举
export const SHARE_SCENE = { export const SHARE_SCENE = {
ShareDetail: {value:1, label:'详情分享'}, ShareDetail: { value: 1, label: '详情分享' },
SharePage : {value:2, label:'页面分享'}, SharePage: { value: 2, label: '页面分享' },
} }
//订阅消息 // 订阅消息
export const SUBSCRIPTION_MESSAGE_SCENE = { export const SUBSCRIPTION_MESSAGE_SCENE = {
SubmitOrder: {value:1, label:'确认下单'}, SubmitOrder: { value: 1, label: '确认下单' },
ToPay : {value:2, label:'去付款'}, ToPay: { value: 2, label: '去付款' },
ApplyGoods: {value:3, label: '申请退款'} ApplyGoods: { value: 3, label: '申请退款' },
} }
//应收单退款状态枚举 // 应收单退款状态枚举
export const REFUND_STATUS = { export const REFUND_STATUS = {
ShouldCollectOrderRefundTypeUnknown: {value:0, label:'未知退款'}, ShouldCollectOrderRefundTypeUnknown: { value: 0, label: '未知退款' },
ShouldCollectOrderRefundTypeAdvanceReceiptRefund: {value:1, label:'预收退款'}, ShouldCollectOrderRefundTypeAdvanceReceiptRefund: { value: 1, label: '预收退款' },
ShouldCollectOrderRefundTypeReturnForRefund: {value:2, label:'退货退款'}, ShouldCollectOrderRefundTypeReturnForRefund: { value: 2, label: '退货退款' },
ShouldCollectOrderRefundTypeSalesRefund: {value:3, label:'销售退款'}, ShouldCollectOrderRefundTypeSalesRefund: { value: 3, label: '销售退款' },
} }
//申请单退款状态枚举 // 申请单退款状态枚举
export const REFUND_STATUS_ORDER = { export const REFUND_STATUS_ORDER = {
ReturnApplyOrderTypeAdvanceReceiptRefund: {value:2, label:'预收退款'}, // 预收退款 ReturnApplyOrderTypeAdvanceReceiptRefund: { value: 2, label: '预收退款' }, // 预收退款
ReturnApplyOrderTypeReturnForRefund: {value:1, label:'退货退款'}, // 退货退款 ReturnApplyOrderTypeReturnForRefund: { value: 1, label: '退货退款' }, // 退货退款
ReturnApplyOrderTypeSalesRefund: {value:3, label:'销售退款'}, // 销售退款 ReturnApplyOrderTypeSalesRefund: { value: 3, label: '销售退款' }, // 销售退款
} }

View File

@ -20,7 +20,8 @@ export const formatRemoveHashTag = (val = '') => {
export const formatHashTag = (code = '', name = '', mode = 'both') => { export const formatHashTag = (code = '', name = '', mode = 'both') => {
if (mode == 'both') { if (mode == 'both') {
return `${formatRemoveHashTag(code)}# ${name}` return `${formatRemoveHashTag(code)}# ${name}`
} else if (mode == 'name') { }
else if (mode == 'name') {
return `${name}` return `${name}`
} }
} }
@ -45,7 +46,7 @@ export const meterDigit = 100
* @returns * @returns
*/ */
export const formatPriceDiv = (val, digit = Digit, priceStatus = false) => { export const formatPriceDiv = (val, digit = Digit, priceStatus = false) => {
let res = strip(Number(val / digit)) || 0 const res = strip(Number(val / digit)) || 0
return priceStatus ? numberWithCommas({ number: res }) : res return priceStatus ? numberWithCommas({ number: res }) : res
} }
/** /**
@ -94,13 +95,13 @@ export const formatWeightDiv = (val, digit = weightDigit) => {
export const formatDateTime = (val, fmt = 'YYYY-MM-DD HH:mm:ss') => { export const formatDateTime = (val, fmt = 'YYYY-MM-DD HH:mm:ss') => {
if (val) { if (val) {
let time = new Date(val) const time = new Date(val)
let Y = time.getFullYear() const Y = time.getFullYear()
let M = time.getMonth() + 1 const M = time.getMonth() + 1
let d = time.getDate() const d = time.getDate()
let h = time.getHours() const h = time.getHours()
let m = time.getMinutes() const m = time.getMinutes()
let s = time.getSeconds() const s = time.getSeconds()
fmt = fmt fmt = fmt
.replace('YYYY', Y) .replace('YYYY', Y)
@ -111,7 +112,8 @@ export const formatDateTime = (val, fmt = 'YYYY-MM-DD HH:mm:ss') => {
.replace('ss', s.toString().padStart(2, '0')) .replace('ss', s.toString().padStart(2, '0'))
return fmt return fmt
} else { }
else {
return val return val
} }
} }
@ -141,18 +143,19 @@ export const formatMillionYuan = (num, digit = 10000) => {
* @param {*} x * @param {*} x
* @returns * @returns
*/ */
export const toDecimal2 = x => { export const toDecimal2 = (x) => {
var f = parseFloat(x) let f = parseFloat(x)
if (isNaN(f)) { if (isNaN(f)) {
return 0 return 0
} }
f = f + '' f = `${f}`
let index = f.lastIndexOf('.') const index = f.lastIndexOf('.')
if (index >= 0) { if (index >= 0) {
let decimal = f.substring(index + 1) const decimal = f.substring(index + 1)
if (decimal.length == 1) { if (decimal.length == 1) {
f = f.substring(0, index + 1) + decimal + '0' f = `${f.substring(0, index + 1) + decimal}0`
} else { }
else {
f = f.substring(0, index + 1) + decimal.substring(0, 2) f = f.substring(0, index + 1) + decimal.substring(0, 2)
} }
} }
@ -173,14 +176,14 @@ export const withBaseUrl = function(url) {
* 去除前缀 //xxx.com 或者 http://xxx.com 或者 https://xxx.com * 去除前缀 //xxx.com 或者 http://xxx.com 或者 https://xxx.com
* @param {string} url url路径 * @param {string} url url路径
*/ */
export const breakupUrl = url => { export const breakupUrl = (url) => {
return url?.replace(URL_REGEXP, '') ?? url return url?.replace(URL_REGEXP, '') ?? url
} }
/** /**
* 拼接前缀 http://xxx.com + /asdfsafdas/154531asdf465413.png * 拼接前缀 http://xxx.com + /asdfsafdas/154531asdf465413.png
* @param {string} url url路径 * @param {string} url url路径
*/ */
export const jointUrl = url => { export const jointUrl = (url) => {
return withBaseUrl(url) ? url : `${IMG_CND_Prefix}${url}` return withBaseUrl(url) ? url : `${IMG_CND_Prefix}${url}`
} }
@ -188,8 +191,9 @@ export const formatUrl = (url, suffix = '!w200') => {
if (url) { if (url) {
url = url.includes(',') ? url.split(',')[0] : url url = url.includes(',') ? url.split(',')[0] : url
return withBaseUrl(url) ? url + suffix : jointUrl(url) + suffix return withBaseUrl(url) ? url + suffix : jointUrl(url) + suffix
} else { }
return IMG_CND_Prefix + '/mall/no_img.png' else {
return `${IMG_CND_Prefix}/mall/no_img.png`
} }
} }
@ -202,8 +206,9 @@ export const formatUrl = (url, suffix = '!w200') => {
export const formatImgUrl = (url, suffix = '!w200') => { export const formatImgUrl = (url, suffix = '!w200') => {
if (url) { if (url) {
return url.includes('http') ? url + suffix : IMG_CND_Prefix + url + suffix return url.includes('http') ? url + suffix : IMG_CND_Prefix + url + suffix
} else { }
return IMG_CND_Prefix + '/mall/no_img.png' else {
return `${IMG_CND_Prefix}/mall/no_img.png`
} }
} }
@ -216,11 +221,13 @@ export const formatImgUrl = (url, suffix = '!w200') => {
*/ */
export const isLabImage = (imgurl, rgb, suffix = '!w200') => { export const isLabImage = (imgurl, rgb, suffix = '!w200') => {
if (imgurl) { if (imgurl) {
return { status: 1, value: IMG_CND_Prefix + '/' + imgurl + suffix } return { status: 1, value: `${IMG_CND_Prefix}/${imgurl}${suffix}` }
} else if (rgb.r != 0 || rgb.g != 0 || rgb.b != 0) { }
else if (rgb.r != 0 || rgb.g != 0 || rgb.b != 0) {
return { status: 2, value: rgb } return { status: 2, value: rgb }
} else { }
return { status: 3, value: IMG_CND_Prefix + '/mall/no_img.png' } else {
return { status: 3, value: `${IMG_CND_Prefix}/mall/no_img.png` }
} }
} }
@ -233,7 +240,8 @@ export const numberWithCommas = ({ number = 0, digit = 2 }) => {
if (!isNaN(Number(number))) { if (!isNaN(Number(number))) {
// return parseFloat(number).toFixed(digit).replace(/^\B(?<!\.\d*)(?=(\d{3})+(?!\d))$/g, ","); // return parseFloat(number).toFixed(digit).replace(/^\B(?<!\.\d*)(?=(\d{3})+(?!\d))$/g, ",");
return parseFloat(number).toLocaleString('zh', { minimumFractionDigits: digit }) return parseFloat(number).toLocaleString('zh', { minimumFractionDigits: digit })
} else { }
else {
return 0.0 return 0.0
} }
} }
@ -241,19 +249,21 @@ export const numberWithCommas = ({ number = 0, digit = 2 }) => {
// 计算数值大于指定值 // 计算数值大于指定值
export const setPriceUnit = (num, cls) => { export const setPriceUnit = (num, cls) => {
if (cls) { if (cls) {
let res = formatMillionYuan(num, 1000) const res = formatMillionYuan(num, 1000)
return { return {
cls: res.million ? cls : '', cls: res.million ? cls : '',
num: res.num, num: res.num,
} }
} else if (num > 100000000) { }
let res = formatMillionYuan(num, 100000000) else if (num > 100000000) {
const res = formatMillionYuan(num, 100000000)
return { return {
cls: res.million ? 's-e' : '', cls: res.million ? 's-e' : '',
num: res.num, num: res.num,
} }
} else { }
let res = formatMillionYuan(num) else {
const res = formatMillionYuan(num)
return { return {
cls: res.million ? 's-w' : '', cls: res.million ? 's-w' : '',
num: res.num, num: res.num,
@ -261,30 +271,34 @@ export const setPriceUnit = (num, cls) => {
} }
} }
//不四舍五入, val:原数据,num:保留位数 // 不四舍五入, val:原数据,num:保留位数
const noScale = (val, num = 2) => { const noScale = (val, num = 2) => {
val = parseFloat(val) val = parseFloat(val)
num = parseInt(num) num = parseInt(num)
const power = Math.pow(10, num) const power = Math.pow(10, num)
val = val * power + '' val = `${val * power}`
val = val.split('.')[0] val = val.split('.')[0]
val = parseInt(val) / power val = parseInt(val) / power
return val return val
} }
//处理数据单位(自然数) // 处理数据单位(自然数)
export const dataUnit = val => { export const dataUnit = (val) => {
let newVal = '' let newVal = ''
val = parseFloat(val) val = parseFloat(val)
if (val >= 100000000) { if (val >= 100000000) {
newVal = noScale(val / 100000000) + '亿' newVal = `${noScale(val / 100000000)}亿`
} else if (val >= 10000000) { }
newVal = noScale(val / 10000000) + 'kw' else if (val >= 10000000) {
} else if (val >= 10000) { newVal = `${noScale(val / 10000000)}kw`
newVal = noScale(val / 10000) + 'w' }
} else if (val >= 1000) { else if (val >= 10000) {
newVal = noScale(val / 1000) + 'k' newVal = `${noScale(val / 10000)}w`
} else { }
else if (val >= 1000) {
newVal = `${noScale(val / 1000)}k`
}
else {
newVal = val newVal = val
} }
return newVal return newVal

View File

@ -1,6 +1,6 @@
const smallToBig = function (money) { const smallToBig = function(money) {
// 将数字金额转换为大写金额 // 将数字金额转换为大写金额
var cnNums = new Array( const cnNums = [
'零', '零',
'壹', '壹',
'贰', '贰',
@ -10,79 +10,81 @@ const smallToBig = function (money) {
'陆', '陆',
'柒', '柒',
'捌', '捌',
'玖' '玖',
); //汉字的数字 ] // 汉字的数字
var cnIntRadice = new Array('', '拾', '佰', '仟'); //基本单位 const cnIntRadice = ['', '拾', '佰', '仟'] // 基本单位
var cnIntUnits = new Array('', '万', '亿', '兆'); //对应整数部分扩展单位 const cnIntUnits = ['', '万', '亿', '兆'] // 对应整数部分扩展单位
var cnDecUnits = new Array('角', '分', '毫', '厘'); //对应小数部分单位 const cnDecUnits = ['角', '分', '毫', '厘'] // 对应小数部分单位
var cnInteger = '整'; //整数金额时后面跟的字符 const cnInteger = '整' // 整数金额时后面跟的字符
var cnIntLast = '元'; //整数完以后的单位 const cnIntLast = '元' // 整数完以后的单位
//最大处理的数字 // 最大处理的数字
var maxNum = 999999999999999.9999; const maxNum = 999999999999999.9999
var integerNum; //金额整数部分 let integerNum // 金额整数部分
var decimalNum; //金额小数部分 let decimalNum // 金额小数部分
//输出的中文金额字符串 // 输出的中文金额字符串
var chineseStr = ''; let chineseStr = ''
var parts; //分离金额后用的数组,预定义 let parts // 分离金额后用的数组,预定义
if (money == '') { if (money == '') {
return ''; return ''
} }
money = parseFloat(money); money = parseFloat(money)
if (money >= maxNum) { if (money >= maxNum) {
//超出最大处理数字 // 超出最大处理数字
return '超出最大处理数字'; return '超出最大处理数字'
} }
if (money == 0) { if (money == 0) {
chineseStr = cnNums[0] + cnIntLast + cnInteger; chineseStr = cnNums[0] + cnIntLast + cnInteger
return chineseStr; return chineseStr
} }
//四舍五入保留两位小数,转换为字符串 // 四舍五入保留两位小数,转换为字符串
money = Math.round(money * 100).toString(); money = Math.round(money * 100).toString()
integerNum = money.substr(0, money.length - 2); integerNum = money.substr(0, money.length - 2)
decimalNum = money.substr(money.length - 2); decimalNum = money.substr(money.length - 2)
//获取整型部分转换 // 获取整型部分转换
if (parseInt(integerNum, 10) > 0) { if (parseInt(integerNum, 10) > 0) {
var zeroCount = 0; let zeroCount = 0
var IntLen = integerNum.length; const IntLen = integerNum.length
for (var i = 0; i < IntLen; i++) { for (var i = 0; i < IntLen; i++) {
var n = integerNum.substr(i, 1); var n = integerNum.substr(i, 1)
var p = IntLen - i - 1; const p = IntLen - i - 1
var q = p / 4; const q = p / 4
var m = p % 4; const m = p % 4
if (n == '0') { if (n == '0') {
zeroCount++; zeroCount++
} else {
if (zeroCount > 0) {
chineseStr += cnNums[0];
} }
//归零 else {
zeroCount = 0; if (zeroCount > 0) {
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]; chineseStr += cnNums[0]
}
// 归零
zeroCount = 0
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]
} }
if (m == 0 && zeroCount < 4) { if (m == 0 && zeroCount < 4) {
chineseStr += cnIntUnits[q]; chineseStr += cnIntUnits[q]
} }
} }
chineseStr += cnIntLast; chineseStr += cnIntLast
} }
//小数部分 // 小数部分
if (decimalNum != '') { if (decimalNum != '') {
var decLen = decimalNum.length; const decLen = decimalNum.length
for (var i = 0; i < decLen; i++) { for (var i = 0; i < decLen; i++) {
var n = decimalNum.substr(i, 1); var n = decimalNum.substr(i, 1)
if (n != '0') { if (n != '0') {
chineseStr += cnNums[Number(n)] + cnDecUnits[i]; chineseStr += cnNums[Number(n)] + cnDecUnits[i]
} }
} }
} }
if (chineseStr == '') { if (chineseStr == '') {
chineseStr += cnNums[0] + cnIntLast + cnInteger; chineseStr += cnNums[0] + cnIntLast + cnInteger
} else if (decimalNum == '' || /^0*$/.test(decimalNum)) {
chineseStr += cnInteger;
} }
return chineseStr; else if (decimalNum == '' || /^0*$/.test(decimalNum)) {
}; chineseStr += cnInteger
export default smallToBig; }
return chineseStr
}
export default smallToBig

View File

@ -1,33 +1,33 @@
import Taro from "@tarojs/taro" import Taro from '@tarojs/taro'
import { BASE_URL } from "../constant" import { BASE_URL } from '../constant'
//解析短码(主要用于右上角按钮分享) // 解析短码(主要用于右上角按钮分享)
export const analysisShortCodeApi = (val) => { export const analysisShortCodeApi = (val) => {
//解析短码 // 解析短码
Taro.request({ Taro.request({
url:BASE_URL+'/v1/mall/shortCode', url: `${BASE_URL}/v1/mall/shortCode`,
method:"GET", method: 'GET',
data:{md5_key: val}, data: { md5_key: val },
success:(res) => { success: (res) => {
if(res.data.code == 0) { if (res.data.code == 0) {
//绑定上下级 // 绑定上下级
bindParent(res.data.data.share_user_id) bindParent(res.data.data.share_user_id)
} }
} },
}) })
} }
//绑定上下级 // 绑定上下级
const bindParent = (share_user_id) => { const bindParent = (share_user_id) => {
//绑定上下级 // 绑定上下级
Taro.request({ Taro.request({
url:BASE_URL+'/v1/mall/shortCode/bind', url: `${BASE_URL}/v1/mall/shortCode/bind`,
method:"POST", method: 'POST',
data:{share_user_id: share_user_id}, data: { share_user_id },
success:(res) => { success: (res) => {
if(res.data.code == 0) { if (res.data.code == 0) {
//绑定上下级 // 绑定上下级
}
} }
},
}) })
} }

View File

@ -1,5 +1,4 @@
import Taro from "@tarojs/taro"; import Taro from '@tarojs/taro'
/** /**
* *
@ -37,7 +36,7 @@ export const getAccountInfo = () => {
* *
* @param {Object} info * @param {Object} info
*/ */
export const setParam = (info:Object) => { export const setParam = (info: Object) => {
Taro.setStorageSync('params', JSON.stringify(info)) Taro.setStorageSync('params', JSON.stringify(info))
} }
@ -46,5 +45,5 @@ export const setParam = (info:Object) => {
*/ */
export const getParam = () => { export const getParam = () => {
const res = Taro.getStorageSync('params') || null const res = Taro.getStorageSync('params') || null
return res?JSON.parse(res):null return res ? JSON.parse(res) : null
} }

View File

@ -1,7 +1,7 @@
import Taro from '@tarojs/taro'
import type { SelectorQuery } from '@tarojs/taro/types/index'
import { formatImgUrl } from './format' import { formatImgUrl } from './format'
import { analysisShortCodeApi } from './shortCode' import { analysisShortCodeApi } from './shortCode'
import Taro from '@tarojs/taro'
import { SelectorQuery } from '@tarojs/taro/types/index'
/** /**
* *
* @param {*} fn * @param {*} fn
@ -11,7 +11,7 @@ import { SelectorQuery } from '@tarojs/taro/types/index'
export const debounce = (fn, delay) => { export const debounce = (fn, delay) => {
let timer: any = null let timer: any = null
return (...param) => { return (...param) => {
if (timer) clearTimeout(timer) if (timer) { clearTimeout(timer) }
timer = setTimeout(() => { timer = setTimeout(() => {
fn(...param) fn(...param)
}, delay) }, delay)
@ -27,7 +27,7 @@ export const debounce = (fn, delay) => {
export const throttle = (fn, delay) => { export const throttle = (fn, delay) => {
let pre = 0 let pre = 0
return (...params) => { return (...params) => {
let now = new Date().getTime() const now = new Date().getTime()
if (now - pre > delay) { if (now - pre > delay) {
fn(...params) fn(...params)
pre = now pre = now
@ -42,15 +42,16 @@ export const throttle = (fn, delay) => {
* @returns * @returns
*/ */
export const getFilterData = (val = {}, arr: string[] = []) => { export const getFilterData = (val = {}, arr: string[] = []) => {
let res = {} const res = {}
for (let key in val) { for (const key in val) {
// undefined == null output: true // undefined == null output: true
if (val[key] != null && val[key] !== '' && !arr.includes(key)) { if (val[key] != null && val[key] !== '' && !arr.includes(key)) {
if (typeof val[key] == 'number') { if (typeof val[key] == 'number') {
if (!isNaN(val[key])) { if (!Number.isNaN(val[key])) {
res[key] = val[key] res[key] = val[key]
} }
} else { }
else {
res[key] = val[key] res[key] = val[key]
} }
} }
@ -62,19 +63,21 @@ export const getFilterData = (val = {}, arr: string[] = []) => {
* @param {*} object * @param {*} object
* @returns * @returns
*/ */
export const copyObject = object => { export const copyObject = (object) => {
if (object.constructor == Object) { if (object.constructor == Object) {
let keys = Object.keys(object) const keys = Object.keys(object)
let newObject = {} const newObject = {}
keys.map(key => { keys.forEach((key) => {
newObject[key] = copyObject(object[key]) newObject[key] = copyObject(object[key])
}) })
return newObject return newObject
} else if (object.constructor == Array) { }
return object.map(item => { else if (object.constructor == Array) {
return object.map((item) => {
return copyObject(item) return copyObject(item)
}) })
} else { }
else {
return object return object
} }
} }
@ -99,35 +102,38 @@ interface DataLoadingStatus {
total: number total: number
status: boolean status: boolean
} }
//获取数据加载状态 //0:数据从无到有加载数据1没有任何数据 2下拉加载3下拉没有数据 // 获取数据加载状态 //0:数据从无到有加载数据1没有任何数据 2下拉加载3下拉没有数据
export const dataLoadingStatus = ({ list = [], total = 0, status = false }: DataLoadingStatus) => { export const dataLoadingStatus = ({ list = [], total = 0, status = false }: DataLoadingStatus) => {
console.log('list & status',list, status); console.log('list & status', list, status)
// 类型校验 // 类型校验
if (Object.prototype.toString.call(list) !== '[object Array]') { if (Object.prototype.toString.call(list) !== '[object Array]') {
list = [] list = []
} }
if (list.length == 0 && status) { if (list.length == 0 && status) {
return 0 return 0
} else if (list.length == 0 && !status) { }
else if (list.length == 0 && !status) {
return 1 return 1
} else if (list.length < total) { }
else if (list.length < total) {
return 2 return 2
} else { }
else {
return 3 return 3
} }
} }
function delay(delayTime = 25): Promise<null> { function delay(delayTime = 25): Promise<null> {
return new Promise(resolve => { return new Promise((resolve) => {
setTimeout(() => { setTimeout(() => {
// @ts-ignore // @ts-expect-error no error
resolve() resolve()
}, delayTime) }, delayTime)
}) })
} }
export function delayQuerySelector(selectorStr: string, delayTime = 500): Promise<any[]> { export function delayQuerySelector(selectorStr: string, delayTime = 500): Promise<any[]> {
return new Promise(resolve => { return new Promise((resolve) => {
const selector: SelectorQuery = Taro.createSelectorQuery() const selector: SelectorQuery = Taro.createSelectorQuery()
delay(delayTime).then(() => { delay(delayTime).then(() => {
selector selector
@ -140,28 +146,29 @@ export function delayQuerySelector(selectorStr: string, delayTime = 500): Promis
}) })
} }
//全局分享监听 // 全局分享监听
export const shareShop = () => { export const shareShop = () => {
const page = Taro.getCurrentInstance().page const page = Taro.getCurrentInstance().page
//当有分享参数时,绑定上下级 // 当有分享参数时,绑定上下级
if (page && page.options?.share) { if (page && page.options?.share) {
analysisShortCodeApi(page.options.share) analysisShortCodeApi(page.options.share)
} }
if (page && page.onShareAppMessage) { if (page && page.onShareAppMessage) {
page.onShareAppMessage = res => { page.onShareAppMessage = (res) => {
let path = '' let path = ''
let title = '' let title = ''
let imageUrl = '' let imageUrl = ''
let sortCode = Taro.getStorageSync('sort_code') ? JSON.parse(Taro.getStorageSync('sort_code')) : '' const sortCode = Taro.getStorageSync('sort_code') ? JSON.parse(Taro.getStorageSync('sort_code')) : ''
let pageInfo: any = page const pageInfo: any = page
//商品详情分享 // 商品详情分享
if (pageInfo.route === 'pages/details/index') { if (pageInfo.route === 'pages/details/index') {
path = `/pages/details/index?share=${sortCode.shareShortDetail.code}` path = `/pages/details/index?share=${sortCode.shareShortDetail.code}`
title = sortCode.shareShortDetail.title title = sortCode.shareShortDetail.title
imageUrl = sortCode.shareShortDetail.img imageUrl = sortCode.shareShortDetail.img
} else { }
path = else {
pageInfo.route === 'pages/user/index' path
= pageInfo.route === 'pages/user/index'
? `/pages/user/index?share=${sortCode.shareShortPage.code}` ? `/pages/user/index?share=${sortCode.shareShortPage.code}`
: `/pages/index/index?share=${sortCode.shareShortPage.code}` : `/pages/index/index?share=${sortCode.shareShortPage.code}`
title = sortCode.shareShortPage.title title = sortCode.shareShortPage.title

View File

@ -1,117 +1,119 @@
import { Button, Navigator, ScrollView, Text, View } from "@tarojs/components" import { Button, Navigator, ScrollView, Text, View } from '@tarojs/components'
import { memo, useEffect, useState, forwardRef, useImperativeHandle } from "react" import { forwardRef, memo, useEffect, useImperativeHandle, useState } from 'react'
import "./index.scss" import './index.scss'
import { mppurchaseraddresslist } from "@/api/addressList" import { mppurchaseraddresslist } from '@/api/addressList'
import { alert } from "@/common/common" import { alert } from '@/common/common'
import Taro, { showModal, useDidShow, useRouter } from "@tarojs/taro" import Taro, { showModal, useDidShow, useRouter } from '@tarojs/taro'
import IconFont from '@/components/iconfont/iconfont' import IconFont from '@/components/iconfont/iconfont'
import { mpsaleOrderaddress } from '@/api/order' import { mpsaleOrderaddress } from '@/api/order'
interface Params { interface Params {
refresherEnabled?: boolean,//是否开启刷新 refresherEnabled?: boolean// 是否开启刷新
onSelect?: (item: any, index: number) => void,//列表选择 onSelect?: (item: any, index: number) => void// 列表选择
addButtonEnabled?: boolean, //是否显示添加按钮 addButtonEnabled?: boolean // 是否显示添加按钮
focusBorderEnabled?: boolean, //焦点显示蓝色边框 focusBorderEnabled?: boolean // 焦点显示蓝色边框
id?: number, //默认选择值, id?: number // 默认选择值,
purchaser_id: Number, purchaser_id: Number
// handSelect?: (any) => void // handSelect?: (any) => void
} }
// 地址列表 // 地址列表
const AddressList = memo(forwardRef((props: Params, AddressListRef) => { const AddressList = memo(forwardRef((props: Params, AddressListRef) => {
const pages = Taro.getCurrentPages() // 获取当前的页面栈
const prevPage = pages[pages.length - 2]
let pages = Taro.getCurrentPages(); // 获取当前的页面栈 const { addButtonEnabled = true, focusBorderEnabled = false } = props
let prevPage = pages[pages.length - 2];
const { addButtonEnabled = true, focusBorderEnabled = false } = props;
const { fetchData, state } = mppurchaseraddresslist() const { fetchData, state } = mppurchaseraddresslist()
// 获取数据 // 获取数据
const getData = async () => { const getData = async() => {
const result = await fetchData({ purchaser_id: props.purchaser_id }); const result = await fetchData({ purchaser_id: props.purchaser_id })
if (props.id) { if (props.id) {
setFocusId(props.id as any); setFocusId(props.id as any)
} else {
result.data.list?.every(item => {
if (item.is_default) {
setFocusId(item.id);
return false;
} }
return true; else {
result.data.list?.every((item) => {
if (item.is_default) {
setFocusId(item.id)
return false
}
return true
}) })
} }
let itemList: any[] = [] const itemList: any[] = []
result?.data?.list?.forEach(item => { result?.data?.list?.forEach((item) => {
itemList.push(item?.id) itemList.push(item?.id)
}) })
prevPage.setData({ //设置上一个页面的值 prevPage.setData({ // 设置上一个页面的值
ids: itemList ids: itemList,
}); })
} }
useDidShow(() => { useDidShow(() => {
getData(); getData()
// 监听刷新 // 监听刷新
Taro.eventCenter.on("addressList:refresh", getData); Taro.eventCenter.on('addressList:refresh', getData)
return () => { return () => {
Taro.eventCenter.off("addressList:refresh", getData); Taro.eventCenter.off('addressList:refresh', getData)
} }
}) })
// 处理刷新 // 处理刷新
const [refreshState, setRefreshState] = useState(false); const [refreshState, setRefreshState] = useState(false)
const handleRefresh = async () => { const handleRefresh = async() => {
setRefreshState(true); setRefreshState(true)
await getData(); await getData()
setRefreshState(false); setRefreshState(false)
} }
const data = Array.from({ length: 15 }); const data = Array.from({ length: 15 })
// 焦点 // 焦点
const [focusId, setFocusId] = useState(); const [focusId, setFocusId] = useState()
const router = useRouter() const router = useRouter()
const [addressObj, setAddressObj] = useState<any>({}) const [addressObj, setAddressObj] = useState<any>({})
// 列表选择 // 列表选择
const { fetchData: selectFetch } = mpsaleOrderaddress() const { fetchData: selectFetch } = mpsaleOrderaddress()
const handleSelect = async (item: any, index: number) => { const handleSelect = async(item: any, index: number) => {
if (router.params.orderId && router.params.orderId != '-100') { if (router.params.orderId && router.params.orderId != '-100') {
console.log(typeof (router.params.orderId) != 'undefined', 'router.params.orderId') console.log(typeof (router.params.orderId) != 'undefined', 'router.params.orderId')
Taro.showLoading({ Taro.showLoading({
title: '请稍等...', title: '请稍等...',
mask: true mask: true,
}) })
const res = await selectFetch({ address_id: item.id, id: Number(router.params.orderId), shipment_mode: 2 }) const res = await selectFetch({ address_id: item.id, id: Number(router.params.orderId), shipment_mode: 2 })
if (res.msg === 'success') { if (res.msg === 'success') {
Taro.hideLoading() Taro.hideLoading()
Taro.showToast({ Taro.showToast({
title: '成功', title: '成功',
icon: 'success' icon: 'success',
}) })
Taro.navigateBack({ Taro.navigateBack({
delta: 1 delta: 1,
}) })
} else { }
else {
Taro.hideLoading() Taro.hideLoading()
Taro.showToast({ Taro.showToast({
title: res.msg, title: res.msg,
icon: 'error' icon: 'error',
}) })
} }
} else { }
prevPage.setData({ //设置上一个页面的值 else {
prevPage.setData({ // 设置上一个页面的值
addressObj: item, addressObj: item,
// ids: itemList // ids: itemList
}); })
Taro.navigateBack({ Taro.navigateBack({
delta: 1 delta: 1,
}) })
} }
props.onSelect && props.onSelect(item, index)
props.onSelect && props.onSelect(item, index);
if (focusBorderEnabled) { if (focusBorderEnabled) {
setFocusId(item?.id); setFocusId(item?.id)
} }
} }
useImperativeHandle(AddressListRef, () => ({ useImperativeHandle(AddressListRef, () => ({
getData getData,
})) }))
return ( return (
@ -119,8 +121,8 @@ const AddressList = memo(forwardRef((props: Params, AddressListRef) => {
<ScrollView scrollY refresherEnabled={props.refresherEnabled} enhanced refresherTriggered={refreshState} onRefresherRefresh={handleRefresh}> <ScrollView scrollY refresherEnabled={props.refresherEnabled} enhanced refresherTriggered={refreshState} onRefresherRefresh={handleRefresh}>
<View className="address-scroll-view-content" > <View className="address-scroll-view-content" >
{ {
state?.data?.list?.length > 0 ? state?.data?.list?.length > 0
state?.data?.list?.map((item, index) => { ? state?.data?.list?.map((item, index) => {
// data.length>0? // data.length>0?
// data.map((item,index)=>{ // data.map((item,index)=>{
return ( return (
@ -143,19 +145,19 @@ const AddressList = memo(forwardRef((props: Params, AddressListRef) => {
</View> </View>
<Navigator onClick={e => e.stopPropagation()} url={`/pages/addAddress/index?type=edit&id=${item.id}&&purchaser_id=${Number(props.purchaser_id)}`} hoverClass="none" className="address-edit"> <Navigator onClick={e => e.stopPropagation()} url={`/pages/addAddress/index?type=edit&id=${item.id}&&purchaser_id=${Number(props.purchaser_id)}`} hoverClass="none" className="address-edit">
{/* <Text className="iconfont icon-bianji"></Text> */} {/* <Text className="iconfont icon-bianji"></Text> */}
<IconFont name={'icon-bianji'} size={40} color={'#717171'}></IconFont> <IconFont name="icon-bianji" size={40} color="#717171"></IconFont>
</Navigator> </Navigator>
</View> </View>
{ {
item.factory !== '' && <> item.factory !== '' && <>
<View className='line'></View> <View className="line"></View>
<View className='bottom-font'>{item.factory}</View></> <View className="bottom-font">{item.factory}</View></>
} }
</View> </View>
); )
}) : })
<View className="address-no-data"></View> : <View className="address-no-data"></View>
} }
</View> </View>
</ScrollView> </ScrollView>
@ -164,4 +166,4 @@ const AddressList = memo(forwardRef((props: Params, AddressListRef) => {
) )
})) }))
export default AddressList; export default AddressList

View File

@ -1,22 +1,23 @@
import { View } from "@tarojs/components" import { View } from '@tarojs/components'
import { memo, useEffect, useState, useMemo, forwardRef, useImperativeHandle, useRef } from "react" import { forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
import style from "./index.module.scss" import style from './index.module.scss'
interface prosObj { interface prosObj {
obj?: { obj?: {
sale_mode?: Number, sale_mode?: Number
collect_status?: Number | string, collect_status?: Number | string
status?: Number, status?: Number
payment_method?: Number, payment_method?: Number
settle_mode?: Number | string, settle_mode?: Number | string
} }
cancle?: (any) => void, cancle?: (any) => void
nextBuy?: (any) => void, nextBuy?: (any) => void
toPay?: (any) => void, toPay?: (any) => void
handSureGoods?: () => void, handSureGoods?: () => void
showTuiGoods?: boolean, showTuiGoods?: boolean
handApplyGoods?: () => void, handApplyGoods?: () => void
handApplyMoney?: () => void, handApplyMoney?: () => void
showDetail?: boolean, showDetail?: boolean
goodsObj?: any goodsObj?: any
} }
@ -27,7 +28,7 @@ export default memo(forwardRef((props: prosObj, ref) => {
collect_status: '', collect_status: '',
status: '', status: '',
payment_method: 0, payment_method: 0,
settle_mode: '' settle_mode: '',
}, },
showTuiGoods = false, showTuiGoods = false,
cancle, cancle,
@ -37,109 +38,112 @@ export default memo(forwardRef((props: prosObj, ref) => {
handApplyGoods, handApplyGoods,
handApplyMoney, handApplyMoney,
showDetail = false, showDetail = false,
goodsObj = {} goodsObj = {},
} = props } = props
//判断显示取消订单 // 判断显示取消订单
const showCancel = useMemo(() => { const showCancel = useMemo(() => {
if ( if (
(obj.sale_mode === 0 && obj.status === 0) || (obj.sale_mode === 0 && obj.status === 0)
(obj.sale_mode === 0 && obj.status === 1) || || (obj.sale_mode === 0 && obj.status === 1)
(obj.sale_mode === 0 && obj.status === 2 && obj.collect_status == 0) || || (obj.sale_mode === 0 && obj.status === 2 && obj.collect_status == 0)
(obj.sale_mode === 0 && obj.status === 7 && obj.collect_status == 0) || || (obj.sale_mode === 0 && obj.status === 7 && obj.collect_status == 0)
(obj.sale_mode === 0 && obj.status === 11 && obj.collect_status == 0) || || (obj.sale_mode === 0 && obj.status === 11 && obj.collect_status == 0)
(obj.sale_mode === 0 && obj.status === 11 && obj.settle_mode == 3) || || (obj.sale_mode === 0 && obj.status === 11 && obj.settle_mode == 3)
(obj.sale_mode === 0 && obj.status === 3 && obj.settle_mode == 3) || || (obj.sale_mode === 0 && obj.status === 3 && obj.settle_mode == 3)
(obj.sale_mode === 1 && obj.status === 10) || || (obj.sale_mode === 1 && obj.status === 10)
(obj.sale_mode === 2 && obj.status === 10) || || (obj.sale_mode === 2 && obj.status === 10)
(obj.sale_mode === 2 && obj.status === 0 && (obj.collect_status == 1 || obj.collect_status == 2)) || || (obj.sale_mode === 2 && obj.status === 0 && (obj.collect_status == 1 || obj.collect_status == 2))
(obj.sale_mode === 2 && obj.status === 0 && obj.collect_status == 0) || || (obj.sale_mode === 2 && obj.status === 0 && obj.collect_status == 0)
(obj.sale_mode === 1 && obj.status === 10) || || (obj.sale_mode === 1 && obj.status === 10)
(obj.sale_mode === 2 && obj.status === 10) || (obj.sale_mode === 2 && obj.status === 10)
) { ) {
return true return true
} else return false }
else { return false }
}, [obj]) }, [obj])
//判断显示再次购买 // 判断显示再次购买
const showBuy = useMemo(() => { const showBuy = useMemo(() => {
if ( if (
obj.sale_mode === 0 || obj.sale_mode === 0
(obj.sale_mode === 1 && obj.status !== 10) || || (obj.sale_mode === 1 && obj.status !== 10)
(obj.sale_mode === 2 && obj.status !== 10) || (obj.sale_mode === 2 && obj.status !== 10)
) { ) {
return true return true
} else return false }
else { return false }
}, [obj]) }, [obj])
//判断显示去付款 // 判断显示去付款
const canBuy = useMemo(() => { const canBuy = useMemo(() => {
if ( if (
(obj.sale_mode === 0 && obj.status === 7 && obj.collect_status == 1) || (obj.sale_mode === 0 && obj.status === 7 && obj.collect_status == 1)
(obj.sale_mode === 0 && obj.status === 7 && obj.collect_status == 0) || || (obj.sale_mode === 0 && obj.status === 7 && obj.collect_status == 0)
(obj.sale_mode === 0 && obj.status === 7 && obj.settle_mode == 3) || || (obj.sale_mode === 0 && obj.status === 7 && obj.settle_mode == 3)
(obj.sale_mode === 0 && obj.status === 3 && obj.collect_status == 1) || || (obj.sale_mode === 0 && obj.status === 3 && obj.collect_status == 1)
(obj.sale_mode === 0 && obj.status === 3 && obj.collect_status == 0) || || (obj.sale_mode === 0 && obj.status === 3 && obj.collect_status == 0)
(obj.sale_mode === 0 && obj.status === 8 && obj.collect_status == 1) || || (obj.sale_mode === 0 && obj.status === 8 && obj.collect_status == 1)
(obj.sale_mode === 0 && obj.status === 8 && obj.collect_status == 0) || || (obj.sale_mode === 0 && obj.status === 8 && obj.collect_status == 0)
(obj.sale_mode === 0 && obj.status === 9 && obj.collect_status == 1) || || (obj.sale_mode === 0 && obj.status === 9 && obj.collect_status == 1)
(obj.sale_mode === 0 && obj.status === 9 && obj.collect_status == 0) || || (obj.sale_mode === 0 && obj.status === 9 && obj.collect_status == 0)
(obj.sale_mode === 2 && obj.status === 2) || || (obj.sale_mode === 2 && obj.status === 2)
(obj.sale_mode === 2 && obj.status === 7) || || (obj.sale_mode === 2 && obj.status === 7)
(obj.sale_mode === 1 && obj.status === 10) || || (obj.sale_mode === 1 && obj.status === 10)
(obj.sale_mode === 2 && obj.status === 10) || (obj.sale_mode === 2 && obj.status === 10)
) { ) {
return true return true
} else return false }
else { return false }
}, [obj]) }, [obj])
//判断显示确认收货 // 判断显示确认收货
const showTake = useMemo(() => { const showTake = useMemo(() => {
if ( if (
(obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 0) || (obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 0)
(obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 1) || || (obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 1)
(obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 2) || || (obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 2)
(obj.sale_mode === 0 && obj.status == 8 && obj.settle_mode == 3) || || (obj.sale_mode === 0 && obj.status == 8 && obj.settle_mode == 3)
(obj.sale_mode === 1 && obj.status == 8) || || (obj.sale_mode === 1 && obj.status == 8)
(obj.sale_mode === 2 && obj.status == 8) || (obj.sale_mode === 2 && obj.status == 8)
) { ) {
return true return true
} else return false }
else { return false }
}, [obj]) }, [obj])
// 判断显示申请退货
//判断显示申请退货
const showTuihuo = useMemo(() => { const showTuihuo = useMemo(() => {
if ( if (
(obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 0 && goodsObj?.av_return_product?.length) || (obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 0 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 1 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 2 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 0 && obj.status == 9 && obj.collect_status == 2 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 0 && obj.status == 9 && obj.settle_mode == 3 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 0 && obj.status == 9 && obj.settle_mode == 3 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 2 && obj.status == 9 && goodsObj?.av_return_product?.length) || (obj.sale_mode === 2 && obj.status == 9 && goodsObj?.av_return_product?.length)
) { ) {
return true return true
} else return false }
else { return false }
}, [obj]) }, [obj])
//判断显示申请退款 // 判断显示申请退款
const showTuikuan = useMemo(() => { const showTuikuan = useMemo(() => {
if ( if (
(obj.sale_mode === 0 && obj.status == 2 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) || (obj.sale_mode === 0 && obj.status == 2 && obj.collect_status == 1 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 0 && obj.status == 7 && obj.collect_status == 2 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 0 && obj.status == 7 && obj.collect_status == 2 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 0 && obj.status == 7 && obj.collect_status == 3 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 0 && obj.status == 7 && obj.collect_status == 3 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 0 && obj.status == 11 && (obj.collect_status == 1 || obj.collect_status == 2) && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 0 && obj.status == 11 && (obj.collect_status == 1 || obj.collect_status == 2) && goodsObj?.av_return_product?.length)
(obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 0 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 0 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 2 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 2 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 1 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 1 && obj.status == 0 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 1 && obj.status == 0 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 1 && obj.status == 9 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 1 && obj.status == 9 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 1 && goodsObj?.av_return_product?.length) || || (obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 1 && goodsObj?.av_return_product?.length)
(obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 2 && goodsObj?.av_return_product?.length) || (obj.sale_mode === 2 && obj.status == 0 && obj.collect_status == 2 && goodsObj?.av_return_product?.length)
) { ) {
return true return true
} else return false }
else { return false }
}, [obj]) }, [obj])
//多的不显示别的按钮 // 多的不显示别的按钮
// const currentNums = useRef<any>({ nums: 0 }) // const currentNums = useRef<any>({ nums: 0 })
const itemNums = useMemo(() => { const itemNums = useMemo(() => {
let nums = 0 let nums = 0
@ -159,7 +163,7 @@ export default memo(forwardRef((props: prosObj, ref) => {
}, [obj]) }, [obj])
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
itemNums itemNums,
})) }))
return ( return (
@ -177,13 +181,13 @@ export default memo(forwardRef((props: prosObj, ref) => {
showTake && showTuiGoods && <View className={style.cancle} onClick={() => handSureGoods?.()}></View> showTake && showTuiGoods && <View className={style.cancle} onClick={() => handSureGoods?.()}></View>
} }
{ {
showCancel && <View className={style.cancle} onClick={(e) => cancle?.(e)}></View> showCancel && <View className={style.cancle} onClick={e => cancle?.(e)}></View>
} }
{ {
showBuy && <View className={style.nextBuy} onClick={(e) => nextBuy?.(e)}></View> showBuy && <View className={style.nextBuy} onClick={e => nextBuy?.(e)}></View>
} }
{ {
canBuy && <View className={style.toBuy} onClick={(e) => toPay?.(e)}></View> canBuy && <View className={style.toBuy} onClick={e => toPay?.(e)}></View>
} }
</View> </View>

View File

@ -1,13 +1,13 @@
import { View, Button } from '@tarojs/components' import { Button, View } from '@tarojs/components'
import { memo } from 'react'
import styles from "./index.module.scss"
import classnames from "classnames";
import Taro from '@tarojs/taro' import Taro from '@tarojs/taro'
import { memo } from 'react'
import classnames from 'classnames'
import styles from './index.module.scss'
type prosObj = { interface prosObj {
isDisabled: boolean, isDisabled: boolean
handSure?: () => void, handSure?: () => void
clientId?: Number, clientId?: Number
clientName?: string clientName?: string
} }
@ -15,15 +15,14 @@ export default memo((props: prosObj) => {
const { const {
isDisabled = true, isDisabled = true,
handSure, handSure,
clientName = '' clientName = '',
} = props } = props
const navTo = () => { const navTo = () => {
Taro.navigateTo({ Taro.navigateTo({
url: '/pages/customerPage/index?clientId=' + props?.clientId url: `/pages/customerPage/index?clientId=${props?.clientId}`,
}) })
} }
return ( return (
<View className={styles.bottomBox}> <View className={styles.bottomBox}>
<View className={styles.leftBottom} onClick={() => { navTo() }}> <View className={styles.leftBottom} onClick={() => { navTo() }}>

View File

@ -8,9 +8,10 @@
*/ */
import { View } from '@tarojs/components' import { View } from '@tarojs/components'
import React, { FC, ReactNode } from 'react' import type { FC, ReactNode } from 'react'
import styles from './index.module.scss' import React from 'react'
import classnames from 'classnames' import classnames from 'classnames'
import styles from './index.module.scss'
type BorderStype = 'solid' | 'dashed' | 'dotted' | 'double' type BorderStype = 'solid' | 'dashed' | 'dotted' | 'double'
@ -25,8 +26,8 @@ interface DividerProps {
const Divider: FC<DividerProps> = (props) => { const Divider: FC<DividerProps> = (props) => {
const { direction = 'horizontal', borderStyle = 'solid', contentPosition = 'center', customClassName = '', customStyles = {} } = props const { direction = 'horizontal', borderStyle = 'solid', contentPosition = 'center', customClassName = '', customStyles = {} } = props
const classname = classnames(styles['divider'], styles['divider-' + direction], customClassName) const classname = classnames(styles.divider, styles[`divider-${direction}`], customClassName)
const contentClassname = classnames(styles['divider-text'], styles['is-' + contentPosition]) const contentClassname = classnames(styles['divider-text'], styles[`is-${contentPosition}`])
const borderTopStyle: { borderTopStyle: BorderStype } = { const borderTopStyle: { borderTopStyle: BorderStype } = {
borderTopStyle: borderStyle, borderTopStyle: borderStyle,

View File

@ -1,47 +1,49 @@
import { Input, Text, Textarea, View } from "@tarojs/components" import { Input, Text, Textarea, View } from '@tarojs/components'
import { memo } from "react" import { memo } from 'react'
import "./index.scss" import './index.scss'
interface ListParams{ interface ListParams{
label: string, //左边label label: string // 左边label
onInput?: (ev:Object)=>void, // 输入框输入 onInput?: (ev: Object) => void // 输入框输入
onClick?:()=>any, //点击列表 onClick?: () => any // 点击列表
placeholder?:string, // 提示文本 placeholder?: string // 提示文本
children?: any, // 插槽 children?: any // 插槽
type?: string // 类型1.input,2.textarea,3.select, type?: string // 类型1.input,2.textarea,3.select,
primordialType?: 'text'|'number'|'idcard'|'digit' primordialType?: 'text'|'number'|'idcard'|'digit'
value?: any, value?: any
style?: object, //整行样式 style?: object // 整行样式
labelStyle?: object, // label样式 labelStyle?: object // label样式
contentStyle?: object, contentStyle?: object
required?: boolean required?: boolean
} }
// 表单列表 // 表单列表
const FromList = memo((props:ListParams)=>{ const FromList = memo((props: ListParams) => {
const {type="input",value="",style={},labelStyle={},contentStyle={},required=false} = props; const { type = 'input', value = '', style = {}, labelStyle = {}, contentStyle = {}, required = false } = props
return ( return (
<View style={style} className="form-list"> <View style={style} className="form-list">
<View style={labelStyle} className={`form-list-label ${required&&"form-list-label-required"}`}>{props.label}</View> <View style={labelStyle} className={`form-list-label ${required && 'form-list-label-required'}`}>{props.label}</View>
<View onClick={props?.onClick} className="form-list-right"> <View onClick={props?.onClick} className="form-list-right">
{ {
props.children?? props.children
<View style={contentStyle} onClick={props?.onClick} className="form-list-right-meet"> ?? <View style={contentStyle} onClick={props?.onClick} className="form-list-right-meet">
{ {
type=="input"? type == 'input'
<View className="form-list-input"> ? <View className="form-list-input">
<Input value={value} placeholder-class="phcolor" type={props.primordialType||'text'} onInput={props?.onInput} placeholder={props.placeholder} /> <Input value={value} placeholder-class="phcolor" type={props.primordialType || 'text'} onInput={props?.onInput} placeholder={props.placeholder} />
{value&& {value
<View><Text onClick={()=>props.onInput&&props.onInput({detail: {value: ""}})} className="iconfont icon-qingkong"/></View> && <View><Text onClick={() => props.onInput && props.onInput({ detail: { value: '' } })} className="iconfont icon-qingkong" /></View>
} }
</View>: </View>
type=="textarea"?<Textarea value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} />: : type == 'textarea'
<> ? <Textarea value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} />
: <>
{ {
props.value?<View>{value}</View>: props.value
<View className="form-list-right-placeholder"> ? <View>{value}</View>
: <View className="form-list-right-placeholder">
{props.placeholder} {props.placeholder}
</View> </View>
} }
@ -55,7 +57,7 @@ const FromList = memo((props:ListParams)=>{
) )
}) })
const A = ()=>{ const A = () => {
} }
export default FromList; export default FromList

View File

@ -1,52 +1,54 @@
import { Input, Text, Textarea, View } from "@tarojs/components" import { Input, Text, Textarea, View } from '@tarojs/components'
import { memo } from "react" import { memo } from 'react'
import "./index.scss" import './index.scss'
interface ListParams{ interface ListParams{
label: string, //左边label label: string // 左边label
onInput?: (ev:Object)=>void, // 输入框输入 onInput?: (ev: Object) => void // 输入框输入
onClick?:()=>any, //点击列表 onClick?: () => any // 点击列表
placeholder?:string, // 提示文本 placeholder?: string // 提示文本
children?: any, // 插槽 children?: any // 插槽
type?: string // 类型1.input,2.textarea,3.select type?: string // 类型1.input,2.textarea,3.select
value?: any, value?: any
style?: object, //整行样式 style?: object // 整行样式
labelStyle?: object, // label样式 labelStyle?: object // label样式
contentStyle?: object, contentStyle?: object
required?: boolean, required?: boolean
showIcon?: boolean, // 是否显示右边的箭头type=select showIcon?: boolean // 是否显示右边的箭头type=select
} }
// 表单列表 // 表单列表
const FromList = memo((props:ListParams)=>{ const FromList = memo((props: ListParams) => {
const {type="input",value="",style={},labelStyle={},contentStyle={},required=false,showIcon=true} = props; const { type = 'input', value = '', style = {}, labelStyle = {}, contentStyle = {}, required = false, showIcon = true } = props
return ( return (
<View style={style} className="From-list-certification"> <View style={style} className="From-list-certification">
<View style={labelStyle} className={`From-list-certification-label ${required&&"From-list-certification-label-required"}`}>{props.label}</View> <View style={labelStyle} className={`From-list-certification-label ${required && 'From-list-certification-label-required'}`}>{props.label}</View>
<View onClick={props?.onClick} className="From-list-certification-right"> <View onClick={props?.onClick} className="From-list-certification-right">
{ {
props.children?? props.children
<View style={contentStyle} onClick={props?.onClick} className="From-list-certification-right-meet"> ?? <View style={contentStyle} onClick={props?.onClick} className="From-list-certification-right-meet">
{ {
type=="input"? type == 'input'
<View className="From-list-certification-input"> ? <View className="From-list-certification-input">
<Input value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} /> <Input value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} />
{value&& {value
<View><Text onClick={()=>props.onInput&&props.onInput({detail: {value: ""}})} className="iconfont icon-qingkong"/></View> && <View><Text onClick={() => props.onInput && props.onInput({ detail: { value: '' } })} className="iconfont icon-qingkong" /></View>
} }
</View>: </View>
type=="textarea"?<Textarea value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} />: : type == 'textarea'
<> ? <Textarea value={value} placeholder-class="phcolor" onInput={props?.onInput} placeholder={props.placeholder} />
: <>
{ {
props.value?<View>{value}</View>: props.value
<View className="From-list-certification-right-placeholder"> ? <View>{value}</View>
: <View className="From-list-certification-right-placeholder">
{props.placeholder} {props.placeholder}
</View> </View>
} }
<View className="From-list-certification-right-enter"> <View className="From-list-certification-right-enter">
{showIcon&&<Text className="iconfont icon-a-moreback"></Text>} {showIcon && <Text className="iconfont icon-a-moreback"></Text>}
</View> </View>
</> </>
} }
@ -57,7 +59,7 @@ const FromList = memo((props:ListParams)=>{
) )
}) })
const A = ()=>{ const A = () => {
} }
export default FromList; export default FromList

View File

@ -1,5 +1,6 @@
import type { ReactNode } from 'react'
import { useEffect, useMemo, useRef, useState } from 'react'
import InfiniteScroll from '@/components/infiniteScroll' import InfiniteScroll from '@/components/infiniteScroll'
import { ReactNode, useEffect, useMemo, useRef, useState } from 'react'
import { dataLoadingStatus, getFilterData } from '@/common/util' import { dataLoadingStatus, getFilterData } from '@/common/util'
import { alert, isEmptyObject } from '@/common/common' import { alert, isEmptyObject } from '@/common/common'
@ -23,7 +24,7 @@ export default (props: Params) => {
getData({ moreStatus: true }, { moreStatus: true }) getData({ moreStatus: true }, { moreStatus: true })
} }
}, [query]) }, [query])
const getData = async (startStatus, endStatus) => { const getData = async(startStatus, endStatus) => {
const tRefreshDataRef = refreshDataRef.current as any const tRefreshDataRef = refreshDataRef.current as any
setRefreshData({ setRefreshData({
...tRefreshDataRef, ...tRefreshDataRef,
@ -44,7 +45,8 @@ export default (props: Params) => {
...endStatus, ...endStatus,
loading: false, loading: false,
}) })
} else { }
else {
setData({ setData({
list: result.data.list, list: result.data.list,
// list: tRefreshDataRef.page>1?(dataRef.current as any).list.concat(result.data.list):result.data.list, // list: tRefreshDataRef.page>1?(dataRef.current as any).list.concat(result.data.list):result.data.list,
@ -57,7 +59,8 @@ export default (props: Params) => {
loading: false, loading: false,
}) })
} }
} else { }
else {
alert.none(result.msg) alert.none(result.msg)
setRefreshData({ setRefreshData({
...tRefreshDataRef, ...tRefreshDataRef,
@ -83,8 +86,8 @@ export default (props: Params) => {
}) })
const dataRef = useRef({}) const dataRef = useRef({})
// 下拉刷新 // 下拉刷新
const handleRefresh = async () => { const handleRefresh = async() => {
let tRefreshData = refreshDataRef.current as any const tRefreshData = refreshDataRef.current as any
setRefreshData({ setRefreshData({
...tRefreshData, ...tRefreshData,
page: 1, page: 1,
@ -93,9 +96,9 @@ export default (props: Params) => {
getData({ refreshStatus: true, moreStatus: false }, { refreshStatus: false, moreStatus: true }) getData({ refreshStatus: true, moreStatus: false }, { refreshStatus: false, moreStatus: true })
} }
// 加载更多 // 加载更多
const handleMoreLoad = async () => { const handleMoreLoad = async() => {
let t = dataRef.current as any const t = dataRef.current as any
let tRefreshData = refreshDataRef.current as any const tRefreshData = refreshDataRef.current as any
if (t.list.length < t.total) { if (t.list.length < t.total) {
setRefreshData({ setRefreshData({
...tRefreshData, ...tRefreshData,
@ -112,19 +115,20 @@ export default (props: Params) => {
) )
} }
} }
//数据加载状态 // 数据加载状态
const statusMore = useMemo(() => { const statusMore = useMemo(() => {
return dataLoadingStatus({ list: data.list, total: data.total, status: refreshData.loading }) return dataLoadingStatus({ list: data.list, total: data.total, status: refreshData.loading })
}, [refreshData.loading]) }, [refreshData.loading])
return ( return (
<InfiniteScroll <InfiniteScroll
refresherEnabled={true} refresherEnabled
refresherTriggered={refreshData.refreshStatus} refresherTriggered={refreshData.refreshStatus}
moreStatus={refreshData.moreStatus} moreStatus={refreshData.moreStatus}
selfOnRefresherRefresh={handleRefresh} selfOnRefresherRefresh={handleRefresh}
selfonScrollToLower={handleMoreLoad} selfonScrollToLower={handleMoreLoad}
statusMore={statusMore}> statusMore={statusMore}
>
{props.children} {props.children}
</InfiniteScroll> </InfiniteScroll>
) )

View File

@ -1,5 +1,6 @@
import { CustomWrapper, Input, View } from "@tarojs/components" import { CustomWrapper, Input, View } from '@tarojs/components'
import React, { FC } from "react" import type { FC } from 'react'
import React from 'react'
// 解决 input 组件输入过快会出现闪烁的问题 // 解决 input 组件输入过快会出现闪烁的问题
// https://github.com/NervJS/taro/issues/9664 // https://github.com/NervJS/taro/issues/9664
interface PropsType { interface PropsType {
@ -10,7 +11,7 @@ interface PropsType {
[Property: string]: any [Property: string]: any
} }
const InputX: FC<PropsType> = (props) => { const InputX: FC<PropsType> = (props) => {
const {customClassName, customStyle,customInputStyle, customInputClassName,...inputProps} = props const { customClassName, customStyle, customInputStyle, customInputClassName, ...inputProps } = props
return ( return (
<View className={customClassName} style={customStyle}> <View className={customClassName} style={customStyle}>
<CustomWrapper> <CustomWrapper>

View File

@ -1,17 +1,17 @@
import { formatImgUrl, formatRemoveHashTag } from '@/common/format'
import Preview from '@/pages/details/components/preview'
import { Image, View } from '@tarojs/components' import { Image, View } from '@tarojs/components'
import { memo, useCallback, useEffect, useMemo, useState } from 'react'
import styles from './index.module.scss'
import Taro from '@tarojs/taro' import Taro from '@tarojs/taro'
import { memo, useCallback, useEffect, useMemo, useState } from 'react'
import LabAndImgShow from '../LabAndImgShow' import LabAndImgShow from '../LabAndImgShow'
import styles from './index.module.scss'
import Preview from '@/pages/details/components/preview'
import { formatImgUrl, formatRemoveHashTag } from '@/common/format'
//该组件宽高为100%需调整外层元素宽高 // 该组件宽高为100%需调整外层元素宽高
type Param = { interface Param {
value?: { value?: {
texture_url?: string //纹理图路径 texture_url?: string // 纹理图路径
lab?: { l: number; a: number; b: number } //lab lab?: { l: number; a: number; b: number } // lab
rgb?: { r: number; g: number; b: number } //rgb rgb?: { r: number; g: number; b: number } // rgb
title?: string title?: string
} }
showStatus?: true | false showStatus?: true | false
@ -20,18 +20,19 @@ type Param = {
export default memo(({ value, onClick, showStatus = false }: Param) => { export default memo(({ value, onClick, showStatus = false }: Param) => {
const [imgs, setImgs] = useState<string[]>([]) const [imgs, setImgs] = useState<string[]>([])
//lab是否都是0 // lab是否都是0
const rgbStyle = useMemo(() => { const rgbStyle = useMemo(() => {
if (value?.lab && (value.lab.l || value.lab.a || value.lab.b)) { if (value?.lab && (value.lab.l || value.lab.a || value.lab.b)) {
return { backgroundColor: `rgb(${value.rgb?.r} ${value.rgb?.g} ${value.rgb?.b})` } return { backgroundColor: `rgb(${value.rgb?.r} ${value.rgb?.g} ${value.rgb?.b})` }
} else { }
else {
return null return null
} }
}, [value]) }, [value])
useEffect(() => { useEffect(() => {
if (value?.texture_url) { if (value?.texture_url) {
let res = value.texture_url.split(',').map((item) => { const res = value.texture_url.split(',').map((item) => {
return formatImgUrl(item) return formatImgUrl(item)
}) })
setImgs(() => res) setImgs(() => res)
@ -44,7 +45,7 @@ export default memo(({ value, onClick, showStatus = false }: Param) => {
}, []) }, [])
const onShowLabAndImg = () => { const onShowLabAndImg = () => {
onClick?.(value) onClick?.(value)
if (!showStatus) return false if (!showStatus) { return false }
setLabAndImgShow(true) setLabAndImgShow(true)
} }
@ -55,9 +56,9 @@ export default memo(({ value, onClick, showStatus = false }: Param) => {
return ( return (
<> <>
<View className={styles.labAndImg_main} onClick={() => onShowLabAndImg()}> <View className={styles.labAndImg_main} onClick={() => onShowLabAndImg()}>
{imgs?.length > 0 && <Image mode='aspectFill' src={imgs[0]} className={styles.labAndImg_image} onError={handleImageError}></Image>} {imgs?.length > 0 && <Image mode="aspectFill" src={imgs[0]} className={styles.labAndImg_image} onError={handleImageError}></Image>}
{!imgs?.length && rgbStyle && <View className={styles.boxColor} style={{ ...rgbStyle }}></View>} {!imgs?.length && rgbStyle && <View className={styles.boxColor} style={{ ...rgbStyle }}></View>}
{!imgs?.length && !rgbStyle && <Image mode='aspectFill' src={formatImgUrl('')} className={styles.labAndImg_image}></Image>} {!imgs?.length && !rgbStyle && <Image mode="aspectFill" src={formatImgUrl('')} className={styles.labAndImg_image}></Image>}
</View> </View>
<LabAndImgShow value={value} show={labAndImgShow} onClose={closeLabAndImgShow} /> <LabAndImgShow value={value} show={labAndImgShow} onClose={closeLabAndImgShow} />
</> </>

View File

@ -1,39 +1,40 @@
import { formatImgUrl } from '@/common/format'
import { View } from '@tarojs/components' import { View } from '@tarojs/components'
import Taro from '@tarojs/taro'
import { useEffect, useMemo, useState } from 'react' import { useEffect, useMemo, useState } from 'react'
import styles from './index.module.scss' import styles from './index.module.scss'
import Taro from '@tarojs/taro' import { formatImgUrl } from '@/common/format'
export type colorParams = { export interface colorParams {
value?: { value?: {
texture_url?: string //纹理图路径 texture_url?: string // 纹理图路径
lab?: { l: number; a: number; b: number } //lab lab?: { l: number; a: number; b: number } // lab
rgb?: { r: number; g: number; b: number } //rgb rgb?: { r: number; g: number; b: number } // rgb
title?: string //标题 title?: string // 标题
} }
show?: false | true show?: false | true
onClose?: () => void onClose?: () => void
showNumber?: number //图片显示张数0不限制 showNumber?: number // 图片显示张数0不限制
} }
export default ({ value, show = false, onClose, showNumber = 1 }: colorParams) => { export default ({ value, show = false, onClose, showNumber = 1 }: colorParams) => {
useEffect(() => { useEffect(() => {
if (show && rgbStyle) setLabShow(() => true) if (show && rgbStyle) { setLabShow(() => true) }
if (show && value?.texture_url) onShowImage() if (show && value?.texture_url) { onShowImage() }
if (!show) setLabShow(() => false) if (!show) { setLabShow(() => false) }
}, [show]) }, [show])
//显示颜色 // 显示颜色
const [labShow, setLabShow] = useState(false) const [labShow, setLabShow] = useState(false)
//lab是否都是0 // lab是否都是0
const rgbStyle = useMemo(() => { const rgbStyle = useMemo(() => {
if (value?.lab && (value.lab.l || value.lab.a || value.lab.b)) { if (value?.lab && (value.lab.l || value.lab.a || value.lab.b)) {
return { backgroundColor: `rgb(${value.rgb?.r} ${value.rgb?.g} ${value.rgb?.b})` } return { backgroundColor: `rgb(${value.rgb?.r} ${value.rgb?.g} ${value.rgb?.b})` }
} else { }
else {
return null return null
} }
}, [value]) }, [value])
//显示图片 // 显示图片
const onShowImage = () => { const onShowImage = () => {
onClose?.() onClose?.()
let res: string[] = [] let res: string[] = []
@ -42,7 +43,7 @@ export default ({ value, show = false, onClose, showNumber = 1 }: colorParams) =
return formatImgUrl(item) return formatImgUrl(item)
}) })
} }
let n_res = showNumber == 0 ? res : res?.splice(0, showNumber) const n_res = showNumber == 0 ? res : res?.splice(0, showNumber)
Taro.previewImage({ Taro.previewImage({
current: n_res[0], current: n_res[0],
urls: n_res, urls: n_res,
@ -52,7 +53,7 @@ export default ({ value, show = false, onClose, showNumber = 1 }: colorParams) =
return ( return (
<> <>
{labShow && ( {labShow && (
<View className={styles.main} catch-move='true' onClick={() => onClose?.()}> <View className={styles.main} catch-move="true" onClick={() => onClose?.()}>
<View className={styles.con}> <View className={styles.con}>
<View className={styles.rgb} style={rgbStyle!}></View> <View className={styles.rgb} style={rgbStyle!}></View>
<View className={styles.name}>{value?.title}</View> <View className={styles.name}>{value?.title}</View>

View File

@ -1,5 +1,5 @@
import { View, Text } from '@tarojs/components' import { Text, View } from '@tarojs/components'
import { FC } from 'react' import type { FC } from 'react'
import Iconfont from '../iconfont/iconfont' import Iconfont from '../iconfont/iconfont'
import LoadingCard from '../loadingCard/index' import LoadingCard from '../loadingCard/index'
import styles from './index.module.scss' import styles from './index.module.scss'
@ -17,7 +17,7 @@ interface LoadMorePropsType extends LoadMoreEvent {
noMoreText?: string noMoreText?: string
} }
const LoadMore: FC<LoadMorePropsType> = props => { const LoadMore: FC<LoadMorePropsType> = (props) => {
const { status, moreText = '查看更多', loadingText = '加载中', noMoreText = '没有更多', onClick } = props const { status, moreText = '查看更多', loadingText = '加载中', noMoreText = '没有更多', onClick } = props
const handleShowMore = () => { const handleShowMore = () => {
@ -27,14 +27,16 @@ const LoadMore: FC<LoadMorePropsType> = props => {
let component: JSX.Element | null = null let component: JSX.Element | null = null
if (status === 'loading') { if (status === 'loading') {
component = <LoadingCard title={loadingText}></LoadingCard> component = <LoadingCard title={loadingText}></LoadingCard>
} else if (status === 'more') { }
else if (status === 'more') {
component = ( component = (
<View className='flex-row' onClick={handleShowMore}> <View className="flex-row" onClick={handleShowMore}>
<Text style={{ marginRight: '5px' }}>{moreText}</Text> <Text style={{ marginRight: '5px' }}>{moreText}</Text>
<Iconfont name='icon-zhankai' size={32}></Iconfont> <Iconfont name="icon-zhankai" size={32}></Iconfont>
</View> </View>
) )
} else { }
else {
component = <Text>{noMoreText}</Text> component = <Text>{noMoreText}</Text>
} }
return <View className={styles.loadMore}>{component}</View> return <View className={styles.loadMore}>{component}</View>

View File

@ -1,14 +1,14 @@
import { Button, Navigator, ScrollView, Text, View } from "@tarojs/components" import { Button, Navigator, ScrollView, Text, View } from '@tarojs/components'
import { memo } from "react" import { memo } from 'react'
import "./index.scss" import './index.scss'
interface Params{ interface Params{
text: String,//提示信息 text: String// 提示信息
} }
// 消息提示 // 消息提示
const Message = memo((props:Params)=>{ const Message = memo((props: Params) => {
return ( return (
<View className="message-custom-tips"> <View className="message-custom-tips">
<Text className="iconfont icon-zhuyi"></Text> {props.text} <Text className="iconfont icon-zhuyi"></Text> {props.text}
@ -16,4 +16,4 @@ const Message = memo((props:Params)=>{
) )
}) })
export default Message; export default Message

View File

@ -1,42 +1,43 @@
import { ScrollView, View, Image } from '@tarojs/components' import { Image, ScrollView, View } from '@tarojs/components'
import { memo, useCallback, useEffect, useMemo, useState, useRef } from 'react' import Taro from '@tarojs/taro'
import styles from './index.module.scss' import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
import classnames from 'classnames' import classnames from 'classnames'
import styles from './index.module.scss'
// import BottomBtns from '@/components/BottomBtns' // import BottomBtns from '@/components/BottomBtns'
import { formatPriceDiv } from '@/common/format' import { formatPriceDiv } from '@/common/format'
import Taro from '@tarojs/taro'
import Popup from '@/components/popup' import Popup from '@/components/popup'
import useCheckAuthorize from '@/use/useCheckAuthorize' import useCheckAuthorize from '@/use/useCheckAuthorize'
import { alert } from '@/common/common' import { alert } from '@/common/common'
import { GetReturnPayCode } from "@/api/order" import { GetReturnPayCode } from '@/api/order'
import { formatWeightDiv, formatDateTime } from '@/common/format' import { formatDateTime, formatWeightDiv } from '@/common/format'
interface Props { interface Props {
obj: any, obj: any
// picUrl?: string, // picUrl?: string,
showPopup: boolean, showPopup: boolean
popupClose: () => void popupClose: () => void
} }
export default memo((props: Props) => { export default memo((props: Props) => {
const { fetchData: payFetch } = GetReturnPayCode() const { fetchData: payFetch } = GetReturnPayCode()
const [PicUrl, setPicUrl] = useState<string>('') const [PicUrl, setPicUrl] = useState<string>('')
useEffect(() => { useEffect(() => {
//判断进来的是否是空对象,减少性能问题 // 判断进来的是否是空对象,减少性能问题
var length = Object.keys(props.obj); const length = Object.keys(props.obj)
if (length.length > 0) getPic() if (length.length > 0) { getPic() }
}, [props.obj]) }, [props.obj])
const getPic = async () => { const getPic = async() => {
Taro.showLoading({ Taro.showLoading({
title: '请稍等...', title: '请稍等...',
mask: true mask: true,
}) })
const list: any = []; const list: any = []
let arr: any[] = [] let arr: any[] = []
if (props.obj.type == 1) { if (props.obj.type == 1) {
arr = props.obj.quality_check_pass_product arr = props.obj.quality_check_pass_product
} else { }
else {
arr = props.obj.product_list arr = props.obj.product_list
} }
arr.forEach((item) => { arr.forEach((item) => {
@ -55,12 +56,12 @@ export default memo((props: Props) => {
total_price: (it.estimate_amount / 100).toString(), total_price: (it.estimate_amount / 100).toString(),
length: (it.length / 100).toString(), length: (it.length / 100).toString(),
weight_error: formatWeightDiv(it.settle_weight_error).toString(), weight_error: formatWeightDiv(it.settle_weight_error).toString(),
}); })
}); })
}); })
const query = { const query = {
list: list, list,
title: "售后确认单", title: '售后确认单',
// show_qrcode: true, // show_qrcode: true,
// show_barcode: true, // show_barcode: true,
// show_wait_pay_amount: true, // show_wait_pay_amount: true,
@ -107,7 +108,7 @@ export default memo((props: Props) => {
order_total_weight_error: ( order_total_weight_error: (
props.obj.total_weight_error / 1000 props.obj.total_weight_error / 1000
).toString(), ).toString(),
}; }
const res = await payFetch(query) const res = await payFetch(query)
if (res.data) { if (res.data) {
setPicUrl(res.data.base64) setPicUrl(res.data.base64)
@ -120,11 +121,11 @@ export default memo((props: Props) => {
base64: '', base64: '',
}) })
//预览图片 // 预览图片
const showImage = () => { const showImage = () => {
const time = new Date().valueOf() const time = new Date().valueOf()
const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(PicUrl) || [] const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(PicUrl) || []
let filePath = Taro.env.USER_DATA_PATH + '/img' + time + '.' + format const filePath = `${Taro.env.USER_DATA_PATH}/img${time}.${format}`
fileData.current.filePath = filePath fileData.current.filePath = filePath
fileData.current.base64 = bodyData fileData.current.base64 = bodyData
const save = Taro.getFileSystemManager() const save = Taro.getFileSystemManager()
@ -139,18 +140,18 @@ export default memo((props: Props) => {
}) })
} }
//检查是否开启保存图片权限 // 检查是否开启保存图片权限
const { check } = useCheckAuthorize({ scope: 'scope.writePhotosAlbum', msg: '您没授权,无法保存图片' }) const { check } = useCheckAuthorize({ scope: 'scope.writePhotosAlbum', msg: '您没授权,无法保存图片' })
const saveImageCheck = async () => { const saveImageCheck = async() => {
const res = await check() const res = await check()
res && saveImage() res && saveImage()
} }
//保存图片 // 保存图片
const saveImage = () => { const saveImage = () => {
const time = new Date().valueOf() const time = new Date().valueOf()
const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(PicUrl) || [] const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(PicUrl) || []
let filePath = Taro.env.USER_DATA_PATH + '/img' + time + '.' + format const filePath = `${Taro.env.USER_DATA_PATH}/img${time}.${format}`
fileData.current.filePath = filePath fileData.current.filePath = filePath
fileData.current.base64 = bodyData fileData.current.base64 = bodyData
const save = Taro.getFileSystemManager() const save = Taro.getFileSystemManager()
@ -162,21 +163,21 @@ export default memo((props: Props) => {
alert.loading('正在保存图片') alert.loading('正在保存图片')
Taro.saveImageToPhotosAlbum({ Taro.saveImageToPhotosAlbum({
filePath: fileData.current.filePath, filePath: fileData.current.filePath,
success: function () { success() {
alert.success('图片保存成功') alert.success('图片保存成功')
}, },
fail: function (err) { fail(err) {
console.log('err::', err) console.log('err::', err)
}, },
}) })
} }
return ( return (
<Popup show={props.showPopup} title={'退款码单'} onClose={() => props.popupClose?.()}> <Popup show={props.showPopup} title="退款码单" onClose={() => props.popupClose?.()}>
<View className={styles.popupBox}> <View className={styles.popupBox}>
<ScrollView enhanced scrollY className={styles.scroStyle}> <ScrollView enhanced scrollY className={styles.scroStyle}>
<View className={styles.pic}> <View className={styles.pic}>
<Image lazyLoad mode='widthFix' style={{ width: '100%', height: '100%' }} src={PicUrl} onClick={() => showImage()}></Image> <Image lazyLoad mode="widthFix" style={{ width: '100%', height: '100%' }} src={PicUrl} onClick={() => showImage()}></Image>
</View> </View>
</ScrollView> </ScrollView>
<View className={styles.sure} onClick={() => saveImageCheck()}></View> <View className={styles.sure} onClick={() => saveImageCheck()}></View>

View File

@ -1,23 +1,24 @@
import { ScrollView, View } from '@tarojs/components' import { ScrollView, View } from '@tarojs/components'
import classnames from 'classnames' import classnames from 'classnames'
import { FC, useEffect, useState } from 'react' import type { FC } from 'react'
import { useEffect, useState } from 'react'
import styles from './index.module.scss' import styles from './index.module.scss'
type Segment = { interface Segment {
id: number id: number
name: string name: string
} }
type PropsType = { interface PropsType {
list: Segment[] list: Segment[]
defaultId?: number defaultId?: number
onSelect?: (data: {id: number, name:string}) => void onSelect?: (data: { id: number; name: string }) => void
} }
const segmentedControl: FC<PropsType> = (props) => { const segmentedControl: FC<PropsType> = (props) => {
const [selectInfo, setSelectInfo] = useState({ const [selectInfo, setSelectInfo] = useState({
selected: -1, //当前选中的id selected: -1, // 当前选中的id
tabId: '', //需要滚动到的id tabId: '', // 需要滚动到的id
}) })
const { list, defaultId = -1, onSelect } = props const { list, defaultId = -1, onSelect } = props
@ -34,22 +35,22 @@ const segmentedControl: FC<PropsType> = (props) => {
}) })
if (index !== -1) { if (index !== -1) {
const num = index > 0 ? index - 1 : 0 const num = index > 0 ? index - 1 : 0
setSelectInfo((e) => ({ ...e, tabId: list[num].id.toString() })) setSelectInfo(e => ({ ...e, tabId: list[num].id.toString() }))
} }
} }
setSelectInfo((e) => ({ ...e, selected: isValidNumber(defaultId) ? defaultId : -1 })) setSelectInfo(e => ({ ...e, selected: isValidNumber(defaultId) ? defaultId : -1 }))
console.log('selectInfo', selectInfo) console.log('selectInfo', selectInfo)
}, [defaultId]) }, [defaultId])
const clickEvent = ({ item, index }: { item: any; index: number }) => { const clickEvent = ({ item, index }: { item: any; index: number }) => {
const num = index > 0 ? index - 1 : 0 const num = index > 0 ? index - 1 : 0
setSelectInfo((e) => ({ ...e, tabId: list[num].id.toString(), selected: item.id })) setSelectInfo(e => ({ ...e, tabId: list[num].id.toString(), selected: item.id }))
onSelect?.(item) onSelect?.(item)
} }
return ( return (
<View className={styles.status_list}> <View className={styles.status_list}>
<ScrollView scrollX scrollIntoView={`tabs_${selectInfo.tabId}`} scrollWithAnimation={true}> <ScrollView scrollX scrollIntoView={`tabs_${selectInfo.tabId}`} scrollWithAnimation>
<View className={styles.list_scroll}> <View className={styles.list_scroll}>
{list.map((item, index) => { {list.map((item, index) => {
return ( return (
@ -57,7 +58,8 @@ const segmentedControl: FC<PropsType> = (props) => {
key={item.id} key={item.id}
id={`tabs_${item.id}`} id={`tabs_${item.id}`}
onClick={() => clickEvent({ item, index })} onClick={() => clickEvent({ item, index })}
className={classnames(styles.status_item, selectInfo.selected === item.id ? styles.selected : '')}> className={classnames(styles.status_item, selectInfo.selected === item.id ? styles.selected : '')}
>
{item.name} {item.name}
</View> </View>
) )

View File

@ -1,9 +1,9 @@
import React, { FC, MutableRefObject } from "react" import type { FC } from 'react'
import SelectSaleType from "../SelectSaleType" import React, { MutableRefObject } from 'react'
import SelectTimePicker from "../SelectTimePicker" import SelectSaleType from '../SelectSaleType'
import SelectTimePicker from '../SelectTimePicker'
import SelectMarketingDepartment from '../SelectMarketingDepartment' import SelectMarketingDepartment from '../SelectMarketingDepartment'
interface PropsType { interface PropsType {
children?: React.ReactNode children?: React.ReactNode
} }
@ -11,23 +11,23 @@ interface PropsType {
const GroupItem = [ const GroupItem = [
SelectMarketingDepartment.name, SelectMarketingDepartment.name,
SelectSaleType.name, SelectSaleType.name,
SelectTimePicker.name SelectTimePicker.name,
] ]
const SelectGroup: FC<PropsType> = (props: PropsType) => { const SelectGroup: FC<PropsType> = (props: PropsType) => {
const {children} = props const { children } = props
function handleChange(children,childEle) { function handleChange(children, childEle) {
return function (value: any){ return function(value: any) {
childEle.props.onChange(value) childEle.props.onChange(value)
children.forEach((child)=>{ children.forEach((child) => {
child.ref?.current.closePopup() child.ref?.current.closePopup()
}) })
} }
} }
function handleCloseOverlay(children) { function handleCloseOverlay(children) {
return function (){ return function() {
children.forEach((child)=>{ children.forEach((child) => {
child.ref?.current.closePopup() child.ref?.current.closePopup()
}) })
} }
@ -36,7 +36,7 @@ const SelectGroup: FC<PropsType> = (props: PropsType) => {
const renderChildren = () => { const renderChildren = () => {
return React.Children.map(children, (child) => { return React.Children.map(children, (child) => {
const childEle = child as React.FunctionComponentElement<any> const childEle = child as React.FunctionComponentElement<any>
return React.cloneElement(childEle, {onChange: handleChange(children,childEle), onCloseOverlay: handleCloseOverlay(children)}) return React.cloneElement(childEle, { onChange: handleChange(children, childEle), onCloseOverlay: handleCloseOverlay(children) })
}) })
} }
return <>{renderChildren()}</> return <>{renderChildren()}</>

View File

@ -1,9 +1,9 @@
import { View } from '@tarojs/components'
import { FC, forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react' import { FC, forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
import DropDownItem from '../dropDown-item' import DropDownItem from '../dropDown-item'
import FilterButton from '../filterButton' import FilterButton from '../filterButton'
import { EnumMarketingDepartmentApi } from '@/api/index'
import { View } from '@tarojs/components'
import styles from './index.module.scss' import styles from './index.module.scss'
import { EnumMarketingDepartmentApi } from '@/api/index'
type ChangedValue = string | number type ChangedValue = string | number
@ -12,21 +12,20 @@ interface SelectSaleTypeProps {
onCloseOverlay?: () => void onCloseOverlay?: () => void
} }
type EnumList = { interface EnumList {
id: number id: number
code: string code: string
name: string name: string
} }
// 营销部门 // 营销部门
const SelectSaleType = memo(forwardRef((props: SelectSaleTypeProps, ref) => { const SelectSaleType = memo(forwardRef((props: SelectSaleTypeProps, ref) => {
const selectName = '营销部门' const selectName = '营销部门'
const { onChange,onCloseOverlay } = props const { onChange, onCloseOverlay } = props
console.log(props) console.log(props)
const { fetchData } = EnumMarketingDepartmentApi() const { fetchData } = EnumMarketingDepartmentApi()
const getData = async () => { const getData = async() => {
const res = await fetchData() const res = await fetchData()
setEnumList([{ id: -1, code: '', name: '全部' }, ...res.data.list]) setEnumList([{ id: -1, code: '', name: '全部' }, ...res.data.list])
} }
@ -61,14 +60,14 @@ const SelectSaleType = memo(forwardRef((props: SelectSaleTypeProps, ref) => {
if (currentValue === -1) { if (currentValue === -1) {
return selectName return selectName
} }
return !!enumList.length ? enumList.filter(option => option.id === currentValue)?.[0]?.name : selectName return enumList.length ? enumList.filter(option => option.id === currentValue)?.[0]?.name : selectName
}, [enumList, currentValue]) }, [enumList, currentValue])
return ( return (
<DropDownItem title={displayTitle} value={currentValue} activeColor='#337fff' ref={dropDownRef} onCloseOverlay={onCloseOverlay}> <DropDownItem title={displayTitle} value={currentValue} activeColor="#337fff" ref={dropDownRef} onCloseOverlay={onCloseOverlay}>
<View className={styles.grid}> <View className={styles.grid}>
{!!enumList.length && {!!enumList.length
enumList.map((item: EnumList) => { && enumList.map((item: EnumList) => {
return ( return (
<FilterButton isActive={item.id === currentValue} onClick={() => handleClick(item.id)}> <FilterButton isActive={item.id === currentValue} onClick={() => handleClick(item.id)}>
{item.name} {item.name}

View File

@ -1,10 +1,11 @@
import { FC, memo, useEffect, useMemo, useState } from 'react' import { View } from '@tarojs/components'
import type { FC } from 'react'
import { memo, useEffect, useMemo, useState } from 'react'
import classnames from 'classnames'
import DropDownItem from '../dropDown-item' import DropDownItem from '../dropDown-item'
import FilterButton from '../filterButton' import FilterButton from '../filterButton'
import { SaleOrderDataFormdataFormStatus } from '@/api/index'
import { View } from '@tarojs/components'
import styles from './index.module.scss' import styles from './index.module.scss'
import classnames from 'classnames' import { SaleOrderDataFormdataFormStatus } from '@/api/index'
import { ShoppingProvider } from '@/pages/shopping/components/shoppingCart' import { ShoppingProvider } from '@/pages/shopping/components/shoppingCart'
type ChangedValue = string | number type ChangedValue = string | number
@ -15,21 +16,20 @@ interface SelectSaleTypeProps {
dropDownClassName?: string dropDownClassName?: string
} }
type EnumList = { interface EnumList {
id: number id: number
code: string code: string
name: string name: string
} }
// 销售排行指标 // 销售排行指标
const SelectSaleRankingIndicators: FC<SelectSaleTypeProps> = memo((props) => { const SelectSaleRankingIndicators: FC<SelectSaleTypeProps> = memo((props) => {
const selectName = '排行指标' const selectName = '排行指标'
const { onChange, dropDownStyle, dropDownClassName } = props const { onChange, dropDownStyle, dropDownClassName } = props
console.log(props) console.log(props)
const { fetchData } = SaleOrderDataFormdataFormStatus() const { fetchData } = SaleOrderDataFormdataFormStatus()
const getData = async () => { const getData = async() => {
const res = await fetchData() const res = await fetchData()
setEnumList([{ id: -1, code: '', name: '全部' }, ...res.data.list]) setEnumList([{ id: -1, code: '', name: '全部' }, ...res.data.list])
} }
@ -51,14 +51,14 @@ const SelectSaleRankingIndicators: FC<SelectSaleTypeProps> = memo((props) => {
if (currentValue === -1) { if (currentValue === -1) {
return selectName return selectName
} }
return !!enumList.length ? enumList.filter(option => option.id === currentValue)?.[0]?.name : selectName return enumList.length ? enumList.filter(option => option.id === currentValue)?.[0]?.name : selectName
}, [enumList, currentValue]) }, [enumList, currentValue])
return ( return (
<DropDownItem title={displayTitle} customClassName={dropDownClassName} customStyle={dropDownStyle} value={currentValue} activeColor='#337fff' showOverlay={false}> <DropDownItem title={displayTitle} customClassName={dropDownClassName} customStyle={dropDownStyle} value={currentValue} activeColor="#337fff" showOverlay={false}>
<View className={classnames(styles.grid)}> <View className={classnames(styles.grid)}>
{!!enumList.length && {!!enumList.length
enumList.map((item: EnumList) => { && enumList.map((item: EnumList) => {
return ( return (
<FilterButton isActive={item.id === currentValue} onClick={() => handleClick(item.id)}> <FilterButton isActive={item.id === currentValue} onClick={() => handleClick(item.id)}>
{item.name} {item.name}

View File

@ -1,9 +1,9 @@
import { View } from '@tarojs/components'
import { FC, forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react' import { FC, forwardRef, memo, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
import DropDownItem from '../dropDown-item' import DropDownItem from '../dropDown-item'
import FilterButton from '../filterButton' import FilterButton from '../filterButton'
import { EnumSalesTypeApi } from '@/api/index'
import { View } from '@tarojs/components'
import styles from './index.module.scss' import styles from './index.module.scss'
import { EnumSalesTypeApi } from '@/api/index'
type ChangedValue = string | number type ChangedValue = string | number
@ -13,7 +13,7 @@ interface SelectSaleTypeProps {
defaultValue?: ChangedValue defaultValue?: ChangedValue
} }
type EnumList = { interface EnumList {
id: number id: number
code: string code: string
name: string name: string
@ -21,11 +21,11 @@ type EnumList = {
// 销售类型 // 销售类型
const SelectSaleType = memo(forwardRef((props: SelectSaleTypeProps, ref) => { const SelectSaleType = memo(forwardRef((props: SelectSaleTypeProps, ref) => {
const selectName = '销售类型' const selectName = '销售类型'
const { onChange, defaultValue = 0,onCloseOverlay } = props const { onChange, defaultValue = 0, onCloseOverlay } = props
console.log(props) console.log(props)
const { fetchData } = EnumSalesTypeApi() const { fetchData } = EnumSalesTypeApi()
const getData = async () => { const getData = async() => {
const res = await fetchData() const res = await fetchData()
setEnumList([{ id: -1, code: '', name: '全部' }, ...res.data.list]) setEnumList([{ id: -1, code: '', name: '全部' }, ...res.data.list])
} }
@ -61,14 +61,14 @@ const SelectSaleType = memo(forwardRef((props: SelectSaleTypeProps, ref) => {
if (currentValue === -1) { if (currentValue === -1) {
return selectName return selectName
} }
return !!enumList.length ? enumList.filter(option => option.id === currentValue)?.[0]?.name : selectName return enumList.length ? enumList.filter(option => option.id === currentValue)?.[0]?.name : selectName
}, [enumList, currentValue]) }, [enumList, currentValue])
return ( return (
<DropDownItem title={displayTitle} value={currentValue} activeColor='#337fff' ref={dropDownRef} onCloseOverlay={onCloseOverlay}> <DropDownItem title={displayTitle} value={currentValue} activeColor="#337fff" ref={dropDownRef} onCloseOverlay={onCloseOverlay}>
<View className={styles.grid}> <View className={styles.grid}>
{!!enumList.length && {!!enumList.length
enumList.map((item: EnumList) => { && enumList.map((item: EnumList) => {
return ( return (
<FilterButton isActive={item.id === currentValue} onClick={() => handleClick(item.id)}> <FilterButton isActive={item.id === currentValue} onClick={() => handleClick(item.id)}>
{item.name} {item.name}

View File

@ -1,5 +1,4 @@
import { formatDateTime } from '@/common/format' import { Text, View } from '@tarojs/components'
import { View, Text } from '@tarojs/components'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { FC, forwardRef, memo, useImperativeHandle, useRef, useState } from 'react' import { FC, forwardRef, memo, useImperativeHandle, useRef, useState } from 'react'
import DropDownItem from '../dropDown-item' import DropDownItem from '../dropDown-item'
@ -7,23 +6,24 @@ import FilterButton from '../filterButton'
import IconFont from '../iconfont/iconfont' import IconFont from '../iconfont/iconfont'
import TimePickerPopup from '../timePickerPopup' import TimePickerPopup from '../timePickerPopup'
import styles from './index.module.scss' import styles from './index.module.scss'
import { formatDateTime } from '@/common/format'
export type ChangedValue = string[] export type ChangedValue = string[]
interface SelectSaleTypeProps { interface SelectSaleTypeProps {
defaultValue?: Key // 默认值 defaultValue?: Key // 默认值
timeOptions?: {[Property: string]: Value} // 支持自定义 时间配置 timeOptions?: Record<string, Value> // 支持自定义 时间配置
onChange?: (value: ChangedValue) => void onChange?: (value: ChangedValue) => void
onCloseOverlay?: () => void onCloseOverlay?: () => void
} }
const FilterTimeOptions = { const FilterTimeOptions = {
'0': { 0: {
name: '全部', name: '全部',
date_min: '', date_min: '',
date_max: '', date_max: '',
}, },
'1': { 1: {
name: '今天', name: '今天',
date_min: `${dayjs(new Date()) date_min: `${dayjs(new Date())
.add(0, 'day') .add(0, 'day')
@ -32,7 +32,7 @@ const FilterTimeOptions = {
.add(1, 'day') .add(1, 'day')
.format('YYYY-MM-DD')} 00:00:00`, .format('YYYY-MM-DD')} 00:00:00`,
}, },
'2': { 2: {
name: '昨日', name: '昨日',
date_min: `${dayjs(new Date()) date_min: `${dayjs(new Date())
.add(-1, 'day') .add(-1, 'day')
@ -41,7 +41,7 @@ const FilterTimeOptions = {
.add(0, 'day') .add(0, 'day')
.format('YYYY-MM-DD')} 00:00:00`, .format('YYYY-MM-DD')} 00:00:00`,
}, },
'3': { 3: {
name: '近7日', name: '近7日',
date_min: `${dayjs(new Date()) date_min: `${dayjs(new Date())
.add(-7, 'day') .add(-7, 'day')
@ -50,7 +50,7 @@ const FilterTimeOptions = {
.add(0, 'day') .add(0, 'day')
.format('YYYY-MM-DD')} 00:00:00`, .format('YYYY-MM-DD')} 00:00:00`,
}, },
'4': { 4: {
name: '近30日', name: '近30日',
date_min: `${dayjs(new Date()) date_min: `${dayjs(new Date())
.add(-30, 'day') .add(-30, 'day')
@ -59,7 +59,7 @@ const FilterTimeOptions = {
.add(0, 'day') .add(0, 'day')
.format('YYYY-MM-DD')} 00:00:00`, .format('YYYY-MM-DD')} 00:00:00`,
}, },
'5': { 5: {
name: '近90日', name: '近90日',
date_min: `${dayjs(new Date()) date_min: `${dayjs(new Date())
.add(-90, 'day') .add(-90, 'day')
@ -68,7 +68,7 @@ const FilterTimeOptions = {
.add(0, 'day') .add(0, 'day')
.format('YYYY-MM-DD')} 00:00:00`, .format('YYYY-MM-DD')} 00:00:00`,
}, },
'custom': { custom: {
name: '自定义时间', name: '自定义时间',
date_min: '', date_min: '',
date_max: '', date_max: '',
@ -79,10 +79,10 @@ type Key = keyof typeof FilterTimeOptions
type Value = typeof FilterTimeOptions[Key] type Value = typeof FilterTimeOptions[Key]
const SelectTimePicker = memo(forwardRef((props: SelectSaleTypeProps, ref) => { const SelectTimePicker = memo(forwardRef((props: SelectSaleTypeProps, ref) => {
const { onChange: change,onCloseOverlay, defaultValue = '0', timeOptions = FilterTimeOptions } = props const { onChange: change, onCloseOverlay, defaultValue = '0', timeOptions = FilterTimeOptions } = props
// rerender 的时候需要更新 ref 的值 // rerender 的时候需要更新 ref 的值
const Options = useRef({ ...timeOptions, 'custom': FilterTimeOptions['custom'] }) const Options = useRef({ ...timeOptions, custom: FilterTimeOptions.custom })
Options.current = { ...timeOptions, 'custom': FilterTimeOptions['custom'] } Options.current = { ...timeOptions, custom: FilterTimeOptions.custom }
const [currentValue, setCurrentValue] = useState(defaultValue) const [currentValue, setCurrentValue] = useState(defaultValue)
@ -97,7 +97,6 @@ const SelectTimePicker = memo(forwardRef((props: SelectSaleTypeProps, ref) => {
// 点击关闭时间筛选 // 点击关闭时间筛选
const handClose = () => { const handClose = () => {
setShowTime(false) setShowTime(false)
} }
const handleClick = (key: Key) => { const handleClick = (key: Key) => {
@ -107,7 +106,7 @@ const SelectTimePicker = memo(forwardRef((props: SelectSaleTypeProps, ref) => {
} }
// 选择自定义时间 // 选择自定义时间
const onSelectDate = event => { const onSelectDate = (event) => {
console.log(event?.value, 'event?.value?.start') console.log(event?.value, 'event?.value?.start')
setCurrentDate({ setCurrentDate({
start: event?.value?.start, start: event?.value?.start,
@ -143,9 +142,9 @@ const SelectTimePicker = memo(forwardRef((props: SelectSaleTypeProps, ref) => {
<> <>
<DropDownItem <DropDownItem
title={currentValue === '0' ? '查询日期' : Options.current[currentValue].name} title={currentValue === '0' ? '查询日期' : Options.current[currentValue].name}
direction='down' direction="down"
value={currentValue} value={currentValue}
activeColor='#337fff' activeColor="#337fff"
ref={dropDownRef} ref={dropDownRef}
onCloseOverlay={onCloseOverlay} onCloseOverlay={onCloseOverlay}
> >
@ -159,9 +158,9 @@ const SelectTimePicker = memo(forwardRef((props: SelectSaleTypeProps, ref) => {
</FilterButton> </FilterButton>
) )
})} })}
<FilterButton customClassName={styles.customFilterTime} isActive={'custom' === currentValue} onClick={handleCustomTime}> <FilterButton customClassName={styles.customFilterTime} isActive={currentValue === 'custom'} onClick={handleCustomTime}>
<Text>{customFilterButtonText.current}</Text> <Text>{customFilterButtonText.current}</Text>
<IconFont name='icon-chakanquanbukehu' color={'custom' === currentValue ? '#3983ff' : '#7f7f7f'}></IconFont> <IconFont name="icon-chakanquanbukehu" color={currentValue === 'custom' ? '#3983ff' : '#7f7f7f'}></IconFont>
</FilterButton> </FilterButton>
</View> </View>
</DropDownItem> </DropDownItem>

View File

@ -1,29 +1,29 @@
import Popup from '@/components/popup'
import { Input, ScrollView, Text, View } from '@tarojs/components' import { Input, ScrollView, Text, View } from '@tarojs/components'
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
import classnames from 'classnames' import classnames from 'classnames'
import styles from './index.module.scss' import styles from './index.module.scss'
import Popup from '@/components/popup'
import TextareaEnhance from '@/components/textareaEnhance' import TextareaEnhance from '@/components/textareaEnhance'
import { CreateFavoriteApi, FavoriteListApi } from '@/api/favorite' import { CreateFavoriteApi, FavoriteListApi } from '@/api/favorite'
import { alert, goLink } from '@/common/common' import { alert, goLink } from '@/common/common'
import { getFilterData } from '@/common/util' import { getFilterData } from '@/common/util'
//原因选择 // 原因选择
type ReasonInfoParam = { interface ReasonInfoParam {
show?: boolean //显示 show?: boolean // 显示
onClose?: () => void //关闭 onClose?: () => void // 关闭
onAdd?: (val: any) => void onAdd?: (val: any) => void
} }
export default memo(({ show = false, onClose, onAdd }: ReasonInfoParam) => { const AddCollection = ({ show = false, onClose, onAdd }: ReasonInfoParam) => {
//获取列表 // 获取列表
const [list, setList] = useState([]) const [list, setList] = useState([])
const { fetchData: fetchDataList } = FavoriteListApi() const { fetchData: fetchDataList } = FavoriteListApi()
const getFavoriteList = async () => { const getFavoriteList = async() => {
let res = await fetchDataList(getFilterData()) const res = await fetchDataList(getFilterData())
setList(() => res.data.list) setList(() => res.data.list)
} }
useEffect(() => { useEffect(() => {
if (show) getFavoriteList() if (show) { getFavoriteList() }
}, [show]) }, [show])
const onCreate = () => { const onCreate = () => {
@ -42,8 +42,8 @@ export default memo(({ show = false, onClose, onAdd }: ReasonInfoParam) => {
</View> </View>
</View> </View>
<ScrollView scrollY className={styles.scrollView}> <ScrollView scrollY className={styles.scrollView}>
{list?.map((item: any) => ( {list?.map((item: any, key) => (
<View onClick={() => onAdd?.(item)} className={styles.collection_item}> <View onClick={() => onAdd?.(item)} className={styles.collection_item} key={key}>
<View className={styles.name}> <View className={styles.name}>
{item.name} {item.name}
<Text>{item.product_color_list?.length || 0}</Text> <Text>{item.product_color_list?.length || 0}</Text>
@ -55,4 +55,5 @@ export default memo(({ show = false, onClose, onAdd }: ReasonInfoParam) => {
</View> </View>
</Popup> </Popup>
) )
}) }
export default memo(AddCollection)

View File

@ -1,120 +1,88 @@
import { ScrollView, Text, View } from "@tarojs/components"; import { ScrollView, Text, View } from '@tarojs/components'
import { memo, ReactHTMLElement, useEffect, useRef, useState } from "react"; import Taro from '@tarojs/taro'
import Drawer from "@/components/popup"; import { ReactHTMLElement, memo, useEffect, useRef, useState } from 'react'
import styles from "./index.module.scss" import classnames from 'classnames'
import classnames from "classnames"; import IconFont from '../iconfont/iconfont'
import Taro from "@tarojs/taro"; import styles from './index.module.scss'
import { GetAddressListApi } from "@/api/addressList"; import Drawer from '@/components/popup'
import { alert } from "@/common/common"; import { GetAddressListApi } from '@/api/addressList'
import IconFont from "../iconfont/iconfont"; import { alert } from '@/common/common'
type DefaultValueParm = { name: string, id: string | number, level?: number | string } interface DefaultValueParm { name: string; id: string | number; level?: number | string }
type Params = { interface Params {
addressOnSelect?: (val: DefaultValueParm[]) => void, addressOnSelect?: (val: DefaultValueParm[]) => void
addressOnChange?: (val: DefaultValueParm[]) => void, addressOnChange?: (val: DefaultValueParm[]) => void
addressOnClose?: () => void, addressOnClose?: () => void
show?: true | false, show?: true | false
defaultValue?: DefaultValueParm[] defaultValue?: DefaultValueParm[]
selectStatus?: false | true, //false不需要选择完整地址true需要选择完整地址 selectStatus?: false | true // false不需要选择完整地址true需要选择完整地址
} }
type AddresParam = { interface AddresParam {
ad_code?: string, ad_code?: string
id?: number, id?: number
level?: number, level?: number
level_name?: string, level_name?: string
name?: string, name?: string
parent_id?: number, parent_id?: number
} }
const Address = ({
export default memo(({
addressOnSelect, addressOnSelect,
addressOnChange, addressOnChange,
addressOnClose, addressOnClose,
show = false, show = false,
defaultValue = [], defaultValue = [],
selectStatus = true selectStatus = true,
}: Params) => { }: Params) => {
// //
const provinceList = useRef<AddresParam[]>([]) const provinceList = useRef<AddresParam[]>([])
// //
const cityList = useRef<AddresParam[]>([]) const cityList = useRef<AddresParam[]>([])
// //
const areaList = useRef<AddresParam[]>([]) const areaList = useRef<AddresParam[]>([])
const [list, setList] = useState<AddresParam[]>([]) const [list, setList] = useState<AddresParam[]>([])
const [selectIndex, setSelectIndex] = useState(0) //0 省, 1 市2 区 const [selectIndex, setSelectIndex] = useState(0) // 0 省, 1 市2 区
const [selectId, setSelectId] = useState(1) //选中的id const [selectId, setSelectId] = useState(1) // 选中的id
const [selectArr, setSelectArr] = useState<DefaultValueParm[]>([]) //选中的省市区 const [selectArr, setSelectArr] = useState<DefaultValueParm[]>([]) // 选中的省市区
const [cityStatus, setCityStatus] = useState(false) //城市是否存在 const [cityStatus, setCityStatus] = useState(false) // 城市是否存在
const [areaStatus, setAreaStatus] = useState(false) //区镇是否存在 const [areaStatus, setAreaStatus] = useState(false) // 区镇是否存在
const [confirmBtnStatus, setConfirmBtnStatus] = useState(false) //确认按钮是否可用 const [confirmBtnStatus, setConfirmBtnStatus] = useState(false) // 确认按钮是否可用
const [bottomStyle, setBottomStyle] = useState({ width: '100rpx', left: '0rpx' }) //底部滚动条样式 const [bottomStyle, setBottomStyle] = useState({ width: '100rpx', left: '0rpx' }) // 底部滚动条样式
useEffect(() => { useEffect(() => {
if (selectArr.length == 0) { if (selectArr.length == 0) {
setSelectArr(defaultValue) setSelectArr(defaultValue)
if (defaultValue.length > 1) setCityStatus(true) if (defaultValue.length > 1) { setCityStatus(true) }
if (defaultValue.length > 2) setAreaStatus(true) if (defaultValue.length > 2) { setAreaStatus(true) }
if (defaultValue.length > 0) setConfirmBtnStatus(true) if (defaultValue.length > 0) { setConfirmBtnStatus(true) }
} }
}, [defaultValue]) }, [defaultValue])
// 获取地址
//获取地址
const { fetchData } = GetAddressListApi() const { fetchData } = GetAddressListApi()
useEffect(() => {
getProvince()
}, [])
//选中内容 // 获取省市区宽度
const selectItem = (item) => { const getDomDes = (id) => {
setSelectId(item.id) setTimeout(() => {
if (selectIndex == 0) { const query = Taro.createSelectorQuery()
setSelectArr([{ name: item.name, id: item.id, level: item.level }]) query.select(id).boundingClientRect((rect) => {
getCity(item.id) const left = rect.left
setAreaStatus(false) const clientWidth = rect.width
setCityStatus(false) console.log(clientWidth)
} else if (selectIndex == 1) { setBottomStyle({
setSelectArr([selectArr[0], { name: item.name, id: item.id, level: item.level }]) width: `${clientWidth}px`,
area(item.id) left: `${left}px`,
} else { })
setSelectArr([selectArr[0], selectArr[1], { name: item.name, id: item.id, level: item.level }]) }).exec()
getDomDes('#address_tab_2') }, 100)
} }
} // 获取省
const getProvince = async() => {
//地址数据 const res = await fetchData({ parent_id: 1 })
useEffect(() => {
if (selectArr && selectArr.length > 0)
addressOnChange?.(selectArr)
}, [selectArr])
//选中标题
const onSelectIndex = (index) => {
setSelectIndex(index)
const selectid = selectArr[index] ? selectArr[index].id : 0
setSelectId(selectid as number)
if (index == 0) {
getProvince()
} else if (index == 1) {
const id = selectArr[0]?.id
getCity(id)
} else {
const id = selectArr[1]?.id
area(id)
}
}
//获取省
const getProvince = async () => {
let res = await fetchData({ parent_id: 1 })
provinceList.current = res.data.list || [] provinceList.current = res.data.list || []
if (provinceList.current.length > 0) { if (provinceList.current.length > 0) {
setSelectIndex(0) setSelectIndex(0)
@ -123,25 +91,18 @@ export default memo(({
} }
} }
//获取市 useEffect(() => {
const getCity = async (id) => { getProvince()
let res = await fetchData({ parent_id: id }) }, [])
cityList.current = res.data.list || []
if (cityList.current.length > 0) {
setSelectIndex(1)
setList(() => cityList.current)
setCityStatus(true)
getDomDes('#address_tab_1')
setConfirmBtnStatus(false)
} else {
setConfirmBtnStatus(true)
setCityStatus(false)
}
}
//获取区 // 地址数据
const area = async (id) => { useEffect(() => {
let res = await fetchData({ parent_id: id }) if (selectArr && selectArr.length > 0) { addressOnChange?.(selectArr) }
}, [selectArr])
// 获取区
const area = async(id) => {
const res = await fetchData({ parent_id: id })
areaList.current = res.data.list || [] areaList.current = res.data.list || []
if (areaList.current.length > 0) { if (areaList.current.length > 0) {
setSelectIndex(2) setSelectIndex(2)
@ -149,38 +110,77 @@ export default memo(({
setAreaStatus(true) setAreaStatus(true)
getDomDes('#address_tab_2') getDomDes('#address_tab_2')
setConfirmBtnStatus(false) setConfirmBtnStatus(false)
} else { }
else {
setConfirmBtnStatus(true) setConfirmBtnStatus(true)
setAreaStatus(false) setAreaStatus(false)
} }
} }
//确定按钮 // 获取市
const getCity = async(id) => {
const res = await fetchData({ parent_id: id })
cityList.current = res.data.list || []
if (cityList.current.length > 0) {
setSelectIndex(1)
setList(() => cityList.current)
setCityStatus(true)
getDomDes('#address_tab_1')
setConfirmBtnStatus(false)
}
else {
setConfirmBtnStatus(true)
setCityStatus(false)
}
}
// 选中内容
const selectItem = (item) => {
setSelectId(item.id)
if (selectIndex == 0) {
setSelectArr([{ name: item.name, id: item.id, level: item.level }])
getCity(item.id)
setAreaStatus(false)
setCityStatus(false)
}
else if (selectIndex == 1) {
setSelectArr([selectArr[0], { name: item.name, id: item.id, level: item.level }])
area(item.id)
}
else {
setSelectArr([selectArr[0], selectArr[1], { name: item.name, id: item.id, level: item.level }])
getDomDes('#address_tab_2')
}
}
// 选中标题
const onSelectIndex = (index) => {
setSelectIndex(index)
const selectid = selectArr[index] ? selectArr[index].id : 0
setSelectId(selectid as number)
if (index == 0) {
getProvince()
}
else if (index == 1) {
const id = selectArr[0]?.id
getCity(id)
}
else {
const id = selectArr[1]?.id
area(id)
}
}
// 确定按钮
const submitSelect = () => { const submitSelect = () => {
addressOnClose?.() addressOnClose?.()
addressOnSelect?.(selectArr) addressOnSelect?.(selectArr)
} }
//获取省市区宽度 // 点击标题栏
const getDomDes = (id) => {
setTimeout(() => {
let query = Taro.createSelectorQuery();
query.select(id).boundingClientRect(rect => {
let left = rect.left;
let clientWidth = rect.width;
console.log(clientWidth)
setBottomStyle({
width: clientWidth + 'px',
left: left + 'px'
})
}).exec();
}, 100)
}
//点击标题栏
const selectTab = (index) => { const selectTab = (index) => {
onSelectIndex(index) onSelectIndex(index)
getDomDes('#address_tab_' + index) getDomDes(`#address_tab_${index}`)
} }
return ( return (
@ -201,16 +201,14 @@ export default memo(({
<View className={styles.address_list}> <View className={styles.address_list}>
<ScrollView scrollY className={styles.address_scroll}> <ScrollView scrollY className={styles.address_scroll}>
<View className={styles.address_scroll_list}> <View className={styles.address_scroll_list}>
{list.map(item => { {list.map((item, key) => {
return ( return (
<View onClick={() => selectItem(item)} className={classnames(styles.address_list_item, { [styles.addresst_select]: (selectId == item.id) })}> <View key={key} onClick={() => selectItem(item)} className={classnames(styles.address_list_item, { [styles.addresst_select]: (selectId == item.id) })}>
<View className={styles.address_list_item_name}>{item.name}</View> <View className={styles.address_list_item_name}>{item.name}</View>
{(selectArr[selectIndex]?.id == item.id) && {(selectArr[selectIndex]?.id == item.id) && <IconFont name="icon-lujing" color="#327fff" size={30}></IconFont>
<IconFont name={'icon-lujing'} color={'#327fff'} size={30}></IconFont>
} }
{ {
(selectArr[selectIndex]?.id !== item.id) && (selectArr[selectIndex]?.id !== item.id) && <IconFont name="icon-chakanquanbukehu" color="#d8d8d8" size={30}></IconFont>
<IconFont name={'icon-chakanquanbukehu'} color={'#d8d8d8'} size={30}></IconFont>
} }
</View> </View>
) )
@ -222,4 +220,5 @@ export default memo(({
</Drawer> </Drawer>
</> </>
) )
}) }
export default memo(Address)

View File

@ -1,24 +1,24 @@
import { CancelOrderApi, ReceiveOrderApi } from "@/api/order" import { ScrollView, Text, View } from '@tarojs/components'
import { alert } from "@/common/common" import Taro from '@tarojs/taro'
import { ORDER_STATUS, SALE_MODE } from "@/common/enum" import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { ScrollView, Text, View } from "@tarojs/components"
import Taro from "@tarojs/taro"
import { useCallback, useRef, memo, useState, useEffect, useMemo } from "react"
import styles from './index.module.scss' import styles from './index.module.scss'
import { ORDER_STATUS, SALE_MODE } from '@/common/enum'
import { alert } from '@/common/common'
import { CancelOrderApi, ReceiveOrderApi } from '@/api/order'
type Param = { interface Param {
orderInfo: { orderInfo: {
status: number, //订单状态 status: number // 订单状态
orderId: number, //订单id orderId: number // 订单id
actual_amount: number, //实付金额 actual_amount: number // 实付金额
wait_pay_amount: number, //待付金额 wait_pay_amount: number // 待付金额
sale_mode: number //订单类型 sale_mode: number // 订单类型
}|null, }|null
onClick?: (val: number) => void //点击后触发的事件,返回订单状态 onClick?: (val: number) => void // 点击后触发的事件,返回订单状态
} }
export default memo(({orderInfo, onClick}:Param) => { export default memo(({ orderInfo, onClick }: Param) => {
//订单状态枚举 // 订单状态枚举
const { const {
SaleOrderStatusBooking, SaleOrderStatusBooking,
SaleOrderStatusArranging, SaleOrderStatusArranging,
@ -29,17 +29,17 @@ export default memo(({orderInfo, onClick}:Param) => {
SaleOrderStatusWaitingPayment, SaleOrderStatusWaitingPayment,
SaleOrderStatusWaitingReceipt, SaleOrderStatusWaitingReceipt,
SaleOrderStatusAlreadyReceipt, SaleOrderStatusAlreadyReceipt,
SaleorderstatusWaitingPrePayment SaleorderstatusWaitingPrePayment,
} = ORDER_STATUS } = ORDER_STATUS
//订单类型 // 订单类型
const { const {
SaLeModeBulk, SaLeModeBulk,
SaleModeLengthCut, SaleModeLengthCut,
SaLeModeWeightCut, SaLeModeWeightCut,
} = SALE_MODE } = SALE_MODE
//订单按钮按订单状态归类, value是该订单状态可能该按钮会出现 // 订单按钮按订单状态归类, value是该订单状态可能该按钮会出现
const orderBtnsList = useRef([ const orderBtnsList = useRef([
{ {
id: 1, id: 1,
@ -47,144 +47,147 @@ export default memo(({orderInfo, onClick}:Param) => {
SaleOrderStatusArranging.value, SaleOrderStatusArranging.value,
SaleOrderStatusArranged.value, SaleOrderStatusArranged.value,
SaleOrderStatusWaitingPayment.value, SaleOrderStatusWaitingPayment.value,
SaleOrderStatusWaitingDelivery.value], //取消订单按钮对应: 待接单,配布中,已配布, 待付款, 待发货 SaleOrderStatusWaitingDelivery.value], // 取消订单按钮对应: 待接单,配布中,已配布, 待付款, 待发货
label: '取消订单' label: '取消订单',
}, },
{ {
id: 2, id: 2,
value: [SaleorderstatusWaitingPrePayment.value, SaleOrderStatusWaitingPayment.value, SaleOrderStatusWaitingDelivery.value, SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value], //去付款按钮对应:待付款, 待发货, 待收货, 已收货, 已完成 value: [SaleorderstatusWaitingPrePayment.value, SaleOrderStatusWaitingPayment.value, SaleOrderStatusWaitingDelivery.value, SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value], // 去付款按钮对应:待付款, 待发货, 待收货, 已收货, 已完成
label: '去付款' label: '去付款',
}, },
{ {
id: 3, id: 3,
value: [SaleOrderStatusWaitingDelivery.value], //申请退款按钮对应: 待发货 value: [SaleOrderStatusWaitingDelivery.value], // 申请退款按钮对应: 待发货
label: '申请退款' label: '申请退款',
}, },
{ {
id: 4, id: 4,
value: [SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value, SaleOrderStatusRefund.value], //取消订单按钮对应: 待收货, 已收货, 已完成, 已退款 value: [SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value, SaleOrderStatusRefund.value], // 取消订单按钮对应: 待收货, 已收货, 已完成, 已退款
label: '查看物流' label: '查看物流',
}, },
{ {
id: 5, id: 5,
value: [SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusRefund.value], //申请退货按钮对应: 待收货, 已收货, 已退款 value: [SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusRefund.value], // 申请退货按钮对应: 待收货, 已收货, 已退款
label: '申请退货' label: '申请退货',
}, },
{ {
id: 6, id: 6,
value: [SaleOrderStatusWaitingReceipt.value], //确认收货按钮对应: 待收货 value: [SaleOrderStatusWaitingReceipt.value], // 确认收货按钮对应: 待收货
label: '确认收货' label: '确认收货',
}, },
{ {
id: 7, id: 7,
value: [SaleOrderStatusWaitingReceipt.value,SaleOrderStatusAlreadyReceipt.value,SaleOrderStatusComplete.value,SaleOrderStatusRefund.value], //再次购买按钮对应: 待收货,已收货,已完成, 已退款 value: [SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value, SaleOrderStatusRefund.value], // 再次购买按钮对应: 待收货,已收货,已完成, 已退款
label: '再次购买' label: '再次购买',
}, },
{ {
id: 8, id: 8,
value: [SaleOrderStatusBooking.value], //按钮对应: 待接单 value: [SaleOrderStatusBooking.value], // 按钮对应: 待接单
label: '退款' label: '退款',
}, },
]) ])
// 判断是否显示该按钮
//判断是否显示该按钮
const orderBtnsShow = (item) => { const orderBtnsShow = (item) => {
if(orderInfo) { if (orderInfo) {
if(item.id == 1) { if (item.id == 1) {
//取消订单按钮 // 取消订单按钮
return( orderInfo.actual_amount == 0 && item.value.includes(orderInfo.status)) //在待发货之前没有付过款 return (orderInfo.actual_amount == 0 && item.value.includes(orderInfo.status)) // 在待发货之前没有付过款
} else if (item.id == 2) { }
//去付款按钮 else if (item.id == 2) {
return( orderInfo.wait_pay_amount != 0 && item.value.includes(orderInfo.status)) //只要没有付完款就显示 // 去付款按钮
} else if(item.id == 3 ) { return (orderInfo.wait_pay_amount != 0 && item.value.includes(orderInfo.status)) // 只要没有付完款就显示
//申请退款, 只有大货才有 }
return (orderInfo.sale_mode == SaLeModeBulk.value && orderInfo.actual_amount != 0 && item.value.includes(orderInfo.status)) //大货在待发货付过款 else if (item.id == 3) {
} else if( item.id == 8) { // 申请退款, 只有大货才有
//退款按钮(直接退款不用申请), 只有散剪和剪板有 return (orderInfo.sale_mode == SaLeModeBulk.value && orderInfo.actual_amount != 0 && item.value.includes(orderInfo.status)) // 大货在待发货付过款
return (orderInfo.sale_mode != SaLeModeBulk.value && orderInfo.actual_amount != 0 && item.value.includes(orderInfo.status)) //散剪和剪板在待接单时付过款 }
else if (item.id == 8) {
// 退款按钮(直接退款不用申请), 只有散剪和剪板有
return (orderInfo.sale_mode != SaLeModeBulk.value && orderInfo.actual_amount != 0 && item.value.includes(orderInfo.status)) // 散剪和剪板在待接单时付过款
} }
else { else {
//其他按钮 // 其他按钮
return item.value.includes(orderInfo.status) return item.value.includes(orderInfo.status)
} }
} }
} }
//显示的按钮数组 // 显示的按钮数组
const orderBtnsShowList: {id: number, value: any, label: string}[] = useMemo(() => { const orderBtnsShowList: { id: number; value: any; label: string }[] = useMemo(() => {
return orderBtnsList.current.filter(item => { return orderBtnsList.current.filter((item) => {
return orderBtnsShow(item) return orderBtnsShow(item)
}) })
}, [orderInfo]) }, [orderInfo])
// 点击按钮操作
//点击按钮操作
const submitBtns = (val, index) => { const submitBtns = (val, index) => {
(val == 1)&&cancelOrder(); //取消订单按钮 (val == 1) && cancelOrder(); // 取消订单按钮
(val == 2)&&onClick?.(2); //去付款按钮 (val == 2) && onClick?.(2); // 去付款按钮
(val == 6)&&receiveOrder(); //确认收货 (val == 6) && receiveOrder() // 确认收货
} }
//取消订单 // 取消订单
const {fetchData: cancelFetchData} = CancelOrderApi() const { fetchData: cancelFetchData } = CancelOrderApi()
const cancelOrder = () => { const cancelOrder = () => {
Taro.showModal({ Taro.showModal({
title: '要取消该订单吗?', title: '要取消该订单吗?',
success: async function (res) { async success(res) {
if (res.confirm) { if (res.confirm) {
let res = await cancelFetchData({id: orderInfo?.orderId}) const res = await cancelFetchData({ id: orderInfo?.orderId })
if(res.success) { if (res.success) {
alert.success('取消成功') alert.success('取消成功')
onClick?.(1) onClick?.(1)
} else { }
else {
alert.none(res.msg) alert.none(res.msg)
} }
} else if (res.cancel) { }
else if (res.cancel) {
console.log('用户点击取消') console.log('用户点击取消')
} }
} },
}) })
} }
//确认订单 // 确认订单
const {fetchData: receiveOrderFetchData} = ReceiveOrderApi() const { fetchData: receiveOrderFetchData } = ReceiveOrderApi()
const receiveOrder = async () => { const receiveOrder = async() => {
console.log('123456') console.log('123456')
Taro.showModal({ Taro.showModal({
title: '确定收货?', title: '确定收货?',
success: async function (res) { async success(res) {
if (res.confirm) { if (res.confirm) {
let res = await receiveOrderFetchData({sale_order_id: orderInfo?.orderId}) const res = await receiveOrderFetchData({ sale_order_id: orderInfo?.orderId })
if(res.success){ if (res.success) {
onClick?.(6) onClick?.(6)
alert.success('收货成功') alert.success('收货成功')
} else { }
else {
alert.error('收货失败') alert.error('收货失败')
} }
} else if (res.cancel) { }
else if (res.cancel) {
console.log('用户点击取消') console.log('用户点击取消')
} }
} },
}) })
} }
//显示更多按钮 // 显示更多按钮
const [showMore, setShowMore] = useState(false) const [showMore, setShowMore] = useState(false)
const styleTop = useMemo(() => { const styleTop = useMemo(() => {
return {top:`-${(orderBtnsShowList.length - 3)*70 + 10}rpx`, left: `-${10}rpx`} return { top: `-${(orderBtnsShowList.length - 3) * 70 + 10}rpx`, left: `-${10}rpx` }
}, [orderBtnsShowList]) }, [orderBtnsShowList])
return ( return (
<View className={styles.btns_list}> <View className={styles.btns_list}>
{(orderBtnsShowList.length > 3)&&<View className={styles.more}> {(orderBtnsShowList.length > 3) && <View className={styles.more}>
<Text onClick={() => setShowMore(true)}></Text> <Text onClick={() => setShowMore(true)}></Text>
{showMore&&<View className={styles.more_con}> {showMore && <View className={styles.more_con}>
<View className={styles.more_list} style={styleTop}> <View className={styles.more_list} style={styleTop}>
{orderBtnsShowList.map((item, index) => { {orderBtnsShowList.map((item, index) => {
return ((index >= 3) &&<View className={styles.more_item} key={item.id} onClick={() => submitBtns(item.id, index)}>{item.label}</View>) return ((index >= 3) && <View className={styles.more_item} key={item.id} onClick={() => submitBtns(item.id, index)}>{item.label}</View>)
})} })}
</View> </View>
<View className={styles.more_bg} catchMove onClick={() => setShowMore(false)}></View> <View className={styles.more_bg} catchMove onClick={() => setShowMore(false)}></View>
@ -193,7 +196,7 @@ export default memo(({orderInfo, onClick}:Param) => {
<View className={styles.list_scroll}> <View className={styles.list_scroll}>
{orderBtnsShowList.map((item, index) => {orderBtnsShowList.map((item, index) =>
(index < 3)&&<View key={item.id} className={styles.btns_item} onClick={() => submitBtns(item.id, index)}>{item.label}</View> (index < 3) && <View key={item.id} className={styles.btns_item} onClick={() => submitBtns(item.id, index)}>{item.label}</View>,
)} )}
</View> </View>

View File

@ -1,28 +1,28 @@
import { alert } from "@/common/common" import { Text, View } from '@tarojs/components'
import { AFTER_ORDER_STATUS, ORDER_STATUS, REFUND_STATUS_ORDER, SALE_MODE } from "@/common/enum" import Taro from '@tarojs/taro'
import {Text, View } from "@tarojs/components" import { memo, useMemo, useRef, useState } from 'react'
import Taro from "@tarojs/taro" import classnames from 'classnames'
import {useRef, memo, useState, useMemo } from "react"
import classnames from "classnames";
import styles from './index.module.scss' import styles from './index.module.scss'
import { ReturnApplyOrderCancelApi } from "@/api/salesAfterOrder" import { AFTER_ORDER_STATUS, ORDER_STATUS, REFUND_STATUS_ORDER, SALE_MODE } from '@/common/enum'
import { throttle } from "@/common/util" import { alert } from '@/common/common'
import { ReturnApplyOrderCancelApi } from '@/api/salesAfterOrder'
import { throttle } from '@/common/util'
type Param = { interface Param {
orderInfo: { orderInfo: {
stage: number, //售后状态 stage: number // 售后状态
sale_mode: number, //订单类型 sale_mode: number // 订单类型
type: number, //1退货2退款 type: number // 1退货2退款
return_apply_order_id: number //售后申请单 return_apply_order_id: number // 售后申请单
is_quality_check: true|false //质检结果 is_quality_check: true|false // 质检结果
}, }
onClick?: (val: number) => void, //点击后触发的事件,返回订单状态 onClick?: (val: number) => void // 点击后触发的事件,返回订单状态
fixedBottom?: true|false, //是否固定在底部 fixedBottom?: true|false // 是否固定在底部
} }
export default memo(({orderInfo, onClick, fixedBottom = true}:Param) => { export default memo(({ orderInfo, onClick, fixedBottom = true }: Param) => {
//售后订单状态 // 售后订单状态
const { const {
ReturnStageApplying, ReturnStageApplying,
ReturnStageWaitCheck, ReturnStageWaitCheck,
@ -34,17 +34,17 @@ export default memo(({orderInfo, onClick, fixedBottom = true}:Param) => {
const { const {
ReturnApplyOrderTypeAdvanceReceiptRefund, // 预收退款 ReturnApplyOrderTypeAdvanceReceiptRefund, // 预收退款
ReturnApplyOrderTypeReturnForRefund, // 退货退款 ReturnApplyOrderTypeReturnForRefund, // 退货退款
ReturnApplyOrderTypeSalesRefund // 销售退款 ReturnApplyOrderTypeSalesRefund, // 销售退款
} = REFUND_STATUS_ORDER } = REFUND_STATUS_ORDER
//注册按钮 // 注册按钮
type orderBtnsListParams = {id: number, label: string, validatarFunc: (val: typeof orderInfo) => any} interface orderBtnsListParams { id: number; label: string; validatarFunc: (val: typeof orderInfo) => any }
const orderBtnsList = useRef<orderBtnsListParams[]>([ const orderBtnsList = useRef<orderBtnsListParams[]>([
{ {
id: 8, id: 8,
label: '申请记录', label: '申请记录',
validatarFunc: (orderInfo) => { validatarFunc: (orderInfo) => {
if(orderInfo.sale_mode !== 1) return [ReturnStageQualityCheckPendingRefund.value, ReturnStageServiceOrderPendingRefund.value, ReturnStageReturned.value].includes(orderInfo.stage) if (orderInfo.sale_mode !== 1) { return [ReturnStageQualityCheckPendingRefund.value, ReturnStageServiceOrderPendingRefund.value, ReturnStageReturned.value].includes(orderInfo.stage) }
return false return false
}, },
}, },
@ -52,92 +52,94 @@ export default memo(({orderInfo, onClick, fixedBottom = true}:Param) => {
id: 1, id: 1,
label: '取消退货', label: '取消退货',
validatarFunc: (orderInfo) => { validatarFunc: (orderInfo) => {
if(orderInfo?.sale_mode != 1 && orderInfo.type == ReturnApplyOrderTypeReturnForRefund.value) return [ReturnStageApplying.value, ReturnStageWaitCheck.value].includes(orderInfo.stage) if (orderInfo?.sale_mode != 1 && orderInfo.type == ReturnApplyOrderTypeReturnForRefund.value) { return [ReturnStageApplying.value, ReturnStageWaitCheck.value].includes(orderInfo.stage) }
return false return false
} },
}, },
{ {
id: 4, id: 4,
label: '质检结果', label: '质检结果',
validatarFunc: (orderInfo) => { validatarFunc: (orderInfo) => {
return orderInfo?.is_quality_check return orderInfo?.is_quality_check
} },
}, },
{ {
id: 5, id: 5,
label: '上传物流', label: '上传物流',
validatarFunc: (orderInfo) => { validatarFunc: (orderInfo) => {
return orderInfo?.stage == ReturnStageWaitCheck.value return orderInfo?.stage == ReturnStageWaitCheck.value
} },
}, },
{ {
id: 6, id: 6,
label: '取消退款', label: '取消退款',
validatarFunc: (orderInfo) => { validatarFunc: (orderInfo) => {
if (orderInfo?.sale_mode != 1 && orderInfo.type != ReturnApplyOrderTypeReturnForRefund.value) return [ReturnStageApplying.value, ReturnStageServiceOrderPendingRefund.value]?.includes(orderInfo.stage) if (orderInfo?.sale_mode != 1 && orderInfo.type != ReturnApplyOrderTypeReturnForRefund.value) { return [ReturnStageApplying.value, ReturnStageServiceOrderPendingRefund.value]?.includes(orderInfo.stage) }
if (orderInfo?.sale_mode == 1) return [ReturnStageApplying.value].includes(orderInfo.stage) if (orderInfo?.sale_mode == 1) { return [ReturnStageApplying.value].includes(orderInfo.stage) }
return false return false
} },
}, },
]) ])
//显示的按钮数组 // 显示的按钮数组
const orderBtnsShowList: any[] = useMemo(() => { const orderBtnsShowList: any[] = useMemo(() => {
return orderBtnsList.current.filter(item => { return orderBtnsList.current.filter((item) => {
return item.validatarFunc(orderInfo) return item.validatarFunc(orderInfo)
}) })
}, [orderInfo]) }, [orderInfo])
// 点击按钮操作
//点击按钮操作
const submitBtns = throttle((val, index) => { const submitBtns = throttle((val, index) => {
if (val == 1) { if (val == 1) {
cancelOrder({title:'要取消退货吗?', val}) cancelOrder({ title: '要取消退货吗?', val })
} else if (val == 6) { }
cancelOrder({title:'要取消退款吗?', val}) else if (val == 6) {
} else { cancelOrder({ title: '要取消退款吗?', val })
}
else {
onClick?.(val) onClick?.(val)
} }
}, 600) }, 600)
//取消退货/退款 // 取消退货/退款
const {fetchData: returnApplyOrderCancelFetchData} = ReturnApplyOrderCancelApi() const { fetchData: returnApplyOrderCancelFetchData } = ReturnApplyOrderCancelApi()
const cancelOrder = ({title = '', val}) => { const cancelOrder = ({ title = '', val }) => {
Taro.showModal({ Taro.showModal({
title, title,
success: async function (res) { async success(res) {
if (res.confirm) { if (res.confirm) {
let res = await returnApplyOrderCancelFetchData({id: orderInfo?.return_apply_order_id}) const res = await returnApplyOrderCancelFetchData({ id: orderInfo?.return_apply_order_id })
if(res.success) { if (res.success) {
alert.success('取消成功') alert.success('取消成功')
onClick?.(val) onClick?.(val)
} else { }
else {
alert.none(res.msg) alert.none(res.msg)
} }
} else if (res.cancel) { }
else if (res.cancel) {
console.log('用户点击取消') console.log('用户点击取消')
} }
} },
}) })
} }
//显示更多按钮 // 显示更多按钮
const [showMore, setShowMore] = useState(false) const [showMore, setShowMore] = useState(false)
const styleTop = useMemo(() => { const styleTop = useMemo(() => {
return {top:`-${(orderBtnsShowList.length - 3)*70 + 10}rpx`, left: `-${10}rpx`} return { top: `-${(orderBtnsShowList.length - 3) * 70 + 10}rpx`, left: `-${10}rpx` }
}, [orderBtnsShowList]) }, [orderBtnsShowList])
return ( return (
<> <>
{(orderBtnsShowList.length > 0)&&<View className={classnames(fixedBottom&&styles.submit_order)}> {(orderBtnsShowList.length > 0) && <View className={classnames(fixedBottom && styles.submit_order)}>
<View className={styles.btns_list}> <View className={styles.btns_list}>
{(orderBtnsShowList.length > 3)&&<View className={styles.more}> {(orderBtnsShowList.length > 3) && <View className={styles.more}>
<Text onClick={() => setShowMore(!showMore)}>{!showMore?'更多':'关闭'}</Text> <Text onClick={() => setShowMore(!showMore)}>{!showMore ? '更多' : '关闭'}</Text>
{showMore&&<View className={styles.more_con}> {showMore && <View className={styles.more_con}>
<View className={styles.more_list} style={styleTop}> <View className={styles.more_list} style={styleTop}>
{orderBtnsShowList.map((item, index) => { {orderBtnsShowList.map((item, index) => {
return ((index >= 3) &&<View className={styles.more_item} key={item.id} onClick={() => submitBtns(item.id, index)}>{item.label}</View>) return ((index >= 3) && <View className={styles.more_item} key={item.id} onClick={() => submitBtns(item.id, index)}>{item.label}</View>)
})} })}
</View> </View>
{/* <View className={styles.more_bg} catchMove onClick={() => setShowMore(false)}></View> */} {/* <View className={styles.more_bg} catchMove onClick={() => setShowMore(false)}></View> */}
@ -146,7 +148,7 @@ export default memo(({orderInfo, onClick, fixedBottom = true}:Param) => {
<View className={styles.list_scroll}> <View className={styles.list_scroll}>
{orderBtnsShowList.map((item, index) => {orderBtnsShowList.map((item, index) =>
(index < 3)&&<View key={item.id} className={classnames(styles.btns_item)} onClick={() => submitBtns(item.id, index)}>{item.label}</View> (index < 3) && <View key={item.id} className={classnames(styles.btns_item)} onClick={() => submitBtns(item.id, index)}>{item.label}</View>,
)} )}
</View> </View>
</View> </View>

View File

@ -1,18 +1,18 @@
import { Text, View } from '@tarojs/components' import { Text, View } from '@tarojs/components'
import { memo, useCallback } from 'react' import { memo, useCallback } from 'react'
import styles from './index.module.scss'
import classnames from 'classnames' import classnames from 'classnames'
import styles from './index.module.scss'
import { numberWithCommas } from '@/common/format' import { numberWithCommas } from '@/common/format'
type Param = { interface Param {
number: number //数字 number: number // 数字
status: 0 | 1 | 2 //0 小型1中型2大 status: 0 | 1 | 2 // 0 小型1中型2大
} }
export default memo(({ number = 0, status = 1 }: Param) => { export default memo(({ number = 0, status = 1 }: Param) => {
const priceDom = useCallback(() => { const priceDom = useCallback(() => {
let res = number.toFixed(2).split('.') const res = number.toFixed(2).split('.')
let int_num = parseInt(res[0]) + '' const int_num = `${parseInt(res[0])}`
let decimals_num = res[1] const decimals_num = res[1]
return ( return (
<> <>
<Text className={styles.price_text}>¥</Text> <Text className={styles.price_text}>¥</Text>

View File

@ -1,19 +1,19 @@
import { Image, Swiper, SwiperItem, View } from '@tarojs/components' import { Image, Swiper, SwiperItem, View } from '@tarojs/components'
import { useEffect, useState } from 'react'
import styles from './index.module.scss'
import { goLink } from '@/common/common' import { goLink } from '@/common/common'
import { GetBannerList } from '@/api/banner' import { GetBannerList } from '@/api/banner'
import styles from './index.module.scss'
import { useEffect, useState } from 'react'
import { formatImgUrl } from '@/common/format' import { formatImgUrl } from '@/common/format'
type item = { title: string; img: string; url: string; id: number } interface item { title: string; img: string; url: string; id: number }
type params = { interface params {
list?: item[] list?: item[]
swiperOnClick?: (val: item) => void swiperOnClick?: (val: item) => void
style?: Object style?: Object
} }
export default (props: params) => { export default (props: params) => {
let { swiperOnClick, style = {} } = props const { swiperOnClick, style = {} } = props
const [list, setList] = useState<any[]>([]) const [list, setList] = useState<any[]>([])
const { fetchData, state } = GetBannerList() const { fetchData, state } = GetBannerList()
@ -22,27 +22,28 @@ export default (props: params) => {
getData() getData()
}, []) }, [])
const getData = async () => { const getData = async() => {
const res = await fetchData() const res = await fetchData()
setList(res.data?.list) setList(res.data?.list)
} }
const skipTo = (item) => { const skipTo = (item) => {
if (item.jump_type == 2 || item.jump_type == 0) { if (item.jump_type == 2 || item.jump_type == 0) {
goLink(item.link + '&title=' + item.title) goLink(`${item.link}&title=${item.title}`)
} else { }
else {
goLink(item.link) goLink(item.link)
} }
} }
return ( return (
<View className={styles.swiper_con} style={style}> <View className={styles.swiper_con} style={style}>
<Swiper className={styles.xswiper} indicatorColor='#ccc' indicatorActiveColor='#fff' circular indicatorDots autoplay> <Swiper className={styles.xswiper} indicatorColor="#ccc" indicatorActiveColor="#fff" circular indicatorDots autoplay>
{list?.map((item) => { {list?.map((item) => {
return ( return (
<SwiperItem key={item.id}> <SwiperItem key={item.id}>
<View className={styles.image_item} onClick={() => skipTo(item)}> <View className={styles.image_item} onClick={() => skipTo(item)}>
<Image mode='aspectFill' src={formatImgUrl(item.prev_view_url, '!w800')}></Image> <Image mode="aspectFill" src={formatImgUrl(item.prev_view_url, '!w800')}></Image>
</View> </View>
</SwiperItem> </SwiperItem>
) )

View File

@ -1,16 +1,16 @@
import { Image, Swiper, SwiperItem, Text, View } from '@tarojs/components' import { Image, Swiper, SwiperItem, Text, View } from '@tarojs/components'
import Taro from '@tarojs/taro'
import styles from './index.module.scss' import styles from './index.module.scss'
import { formatImgUrl } from '@/common/format' import { formatImgUrl } from '@/common/format'
import Taro from '@tarojs/taro'
import { goLink } from '@/common/common' import { goLink } from '@/common/common'
type params = { interface params {
show?: true | false show?: true | false
onClose?: () => void onClose?: () => void
} }
export default ({ show, onClose }: params) => { export default ({ show, onClose }: params) => {
const onCustomer = async () => { const onCustomer = async() => {
let res = await Taro.showModal({ const res = await Taro.showModal({
title: '是否拨打服务热线', title: '是否拨打服务热线',
confirmText: '拨打', confirmText: '拨打',
content: '(0757) 8270 6695', content: '(0757) 8270 6695',
@ -33,7 +33,7 @@ export default ({ show, onClose }: params) => {
<View className={styles.bindSalesman_main}> <View className={styles.bindSalesman_main}>
<View className={styles.bindSalesman_pop}> <View className={styles.bindSalesman_pop}>
<View className={styles.bindSalesman_header}> <View className={styles.bindSalesman_header}>
<Image src={formatImgUrl('/mall/invite_code_top.png', '!w400')} mode='aspectFill' /> <Image src={formatImgUrl('/mall/invite_code_top.png', '!w400')} mode="aspectFill" />
</View> </View>
<View className={styles.bindSalesman_message}> <View className={styles.bindSalesman_message}>
<Text></Text> <Text></Text>

View File

@ -1,17 +1,17 @@
import { View } from "@tarojs/components"; import { View } from '@tarojs/components'
import { memo, useEffect, useMemo, useState } from "react"; import Taro, { useDidShow } from '@tarojs/taro'
import Taro, { useDidShow } from "@tarojs/taro"; import { memo, useEffect, useMemo, useState } from 'react'
import {useBluetooth} from "@/use/contextBlueTooth" import classnames from 'classnames'
import SearchInput from "@/components/searchInput"; import styles from './css/linkBlueTooth.module.scss'
import Popup from "@/components/bluetooth/Popup" import { useBluetooth } from '@/use/contextBlueTooth'
import classnames from "classnames"; import SearchInput from '@/components/searchInput'
import styles from "./css/linkBlueTooth.module.scss" import Popup from '@/components/bluetooth/Popup'
import useCheckAuthorize from "@/use/useCheckAuthorize"; import useCheckAuthorize from '@/use/useCheckAuthorize'
export default memo(() => { export default memo(() => {
const {state, init, startScan, connect, disconnect} = useBluetooth() const { state, init, startScan, connect, disconnect } = useBluetooth()
const {check} = useCheckAuthorize({scope:'scope.bluetooth', msg:'请开启小程序蓝牙权限'}) const { check } = useCheckAuthorize({ scope: 'scope.bluetooth', msg: '请开启小程序蓝牙权限' })
useEffect(() => { useEffect(() => {
init() init()
@ -19,46 +19,47 @@ export default memo(() => {
const [linkStatus, setLinkStatus] = useState(1) const [linkStatus, setLinkStatus] = useState(1)
useEffect(() => { useEffect(() => {
if(!state.available) { if (!state.available) {
setLinkStatus(1) setLinkStatus(1)
} else if(state.available&&state.connected?.name) { }
else if (state.available && state.connected?.name) {
setLinkStatus(3) setLinkStatus(3)
} else { }
else {
setLinkStatus(2) setLinkStatus(2)
} }
}, [state.available, state.connected]) }, [state.available, state.connected])
const linkName = useMemo(() => { const linkName = useMemo(() => {
return state.connected?.localName||'' return state.connected?.localName || ''
}, [state.connected]) }, [state.connected])
//链接设备 // 链接设备
const onLinkListen = (item) => { const onLinkListen = (item) => {
if(!state.connected&&!state.connecting) if (!state.connected && !state.connecting) { connect(item) }
connect(item)
} }
const [popupShow, setPopupShow] = useState(false) const [popupShow, setPopupShow] = useState(false)
//显示设备列表 // 显示设备列表
const onFindDevice = () => { const onFindDevice = () => {
check().then(res => { check().then((res) => {
if(linkStatus == 1) { if (linkStatus == 1) {
Taro.showToast({ Taro.showToast({
title:'请打开手机蓝牙', title: '请打开手机蓝牙',
icon:'none' icon: 'none',
}) })
} else { }
else {
setPopupShow(true) setPopupShow(true)
onFindEven() onFindEven()
} }
}) })
} }
const onFindEven = () => { const onFindEven = () => {
if(!state.discovering&&!state.connected&&!state.connecting) if (!state.discovering && !state.connected && !state.connecting) { startScan() }
startScan()
} }
//断开链接 // 断开链接
const onDisconnect = () => { const onDisconnect = () => {
disconnect() disconnect()
setPopupShow(false) setPopupShow(false)
@ -67,13 +68,13 @@ export default memo(() => {
return ( return (
<> <>
<View className={styles.main}> <View className={styles.main}>
<SearchInput title="蓝牙设备" showIcon={true}> <SearchInput title="蓝牙设备" showIcon>
<View className={styles.bluetooth_link} onClick={onFindDevice}> <View className={styles.bluetooth_link} onClick={onFindDevice}>
<View className={classnames(styles.link_status, linkStatus == 3 &&styles.link_statused, linkStatus == 2&&styles.link_statused_no)}></View> <View className={classnames(styles.link_status, linkStatus == 3 && styles.link_statused, linkStatus == 2 && styles.link_statused_no)}></View>
{ {
linkStatus == 1&&<View className={classnames(styles.link_name, styles.link_name_no)}></View>|| linkStatus == 1 && <View className={classnames(styles.link_name, styles.link_name_no)}></View>
linkStatus == 2&&<View className={classnames(styles.link_name,styles.link_name_no_link) }></View>|| || linkStatus == 2 && <View className={classnames(styles.link_name, styles.link_name_no_link)}></View>
linkStatus == 3&&<View className={classnames(styles.link_name)}>{linkName}</View> || linkStatus == 3 && <View className={classnames(styles.link_name)}>{linkName}</View>
} }
</View> </View>
</SearchInput> </SearchInput>
@ -88,6 +89,5 @@ export default memo(() => {
</View> </View>
</> </>
); )
}) })

View File

@ -1,19 +1,19 @@
import { ScrollView, View } from "@tarojs/components" import { ScrollView, View } from '@tarojs/components'
import { memo, useEffect, useState } from "react" import { memo, useEffect, useState } from 'react'
import Loading from "@/components/loading" import style from './css/popup.module.scss'
import style from "./css/popup.module.scss" import Loading from '@/components/loading'
interface params { interface params {
state: any, state: any
show: Boolean, show: Boolean
onClose: (Boolean) => void, onClose: (Boolean) => void
onLink: (any) => void, onLink: (any) => void
children?: React.ReactNode children?: React.ReactNode
onOff: () => void, onOff: () => void
onFind: () => void, onFind: () => void
} }
export default memo(({state, show=false, onClose, onLink, onOff, onFind}:params) => { export default memo(({ state, show = false, onClose, onLink, onOff, onFind }: params) => {
const [popupShow, setPopupShow] = useState(show) const [popupShow, setPopupShow] = useState(show)
useEffect(() => { useEffect(() => {
setPopupShow(show) setPopupShow(show)
@ -25,33 +25,33 @@ export default memo(({state, show=false, onClose, onLink, onOff, onFind}:params)
return ( return (
<> <>
{ {
popupShow&&<View className={style.popup}> popupShow && <View className={style.popup}>
<View className={style.content}> <View className={style.content}>
<View className={style.title}></View> <View className={style.title}></View>
<View className={style.list}> <View className={style.list}>
<ScrollView scrollY className={style.scroll}> <ScrollView scrollY className={style.scroll}>
{ {
(state.devices&&state.devices.length > 0)&&state?.devices.map(item => { (state.devices && state.devices.length > 0) && state?.devices.map((item) => {
return ( return (
<View className={style.item} onClick={() => onLink(item)}> <View className={style.item} onClick={() => onLink(item)}>
<View>{item.name}</View> <View>{item.name}</View>
{ {
(!state.connecting&&!state.connected)&&<View ></View>|| (!state.connecting && !state.connected) && <View ></View>
(state.connecting&&item.deviceId == state.connecting.deviceId)&&<View className={style.link_ing}>...</View>|| || (state.connecting && item.deviceId == state.connecting.deviceId) && <View className={style.link_ing}>...</View>
(state.connected&&item.deviceId == state.connected.deviceId)&&<View className={style.link_success}></View> || (state.connected && item.deviceId == state.connected.deviceId) && <View className={style.link_success}></View>
} }
</View> </View>
) )
})|| })
<View className={style.noDevice}> || <View className={style.noDevice}>
{ {
(!state.discovering)&& <> (!state.discovering) && <>
<View>,</View> <View>,</View>
<View className={style.n_item}>1.</View> <View className={style.n_item}>1.</View>
<View className={style.n_item}>2.</View> <View className={style.n_item}>2.</View>
<View className={style.n_item}>3.</View> <View className={style.n_item}>3.</View>
</>|| </>
<View></View> || <View></View>
} }
</View> </View>
@ -60,9 +60,9 @@ export default memo(({state, show=false, onClose, onLink, onOff, onFind}:params)
</ScrollView> </ScrollView>
</View> </View>
{ {
state.connected&&<View className={`${style.footer} ${style.footer_off}`} onClick={onOff}></View>|| state.connected && <View className={`${style.footer} ${style.footer_off}`} onClick={onOff}></View>
(!state.connected&&state.discovering)&&<View className={`${style.footer} ${style.finding}`}><Loading width={30} color='orange'/></View>|| || (!state.connected && state.discovering) && <View className={`${style.footer} ${style.finding}`}><Loading width={30} color="orange" /></View>
<View className={style.footer} onClick={onFind}></View> || <View className={style.footer} onClick={onFind}></View>
} }
</View> </View>
<View className={style.mask} onClick={onCloseListener}></View> <View className={style.mask} onClick={onCloseListener}></View>

View File

@ -1,22 +1,22 @@
import { Swiper, SwiperItem, View } from '@tarojs/components'
import classnames from 'classnames' import classnames from 'classnames'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import React from 'react' import React from 'react'
import { Swiper, SwiperItem, View } from '@tarojs/components' import type {
import {
BaseEventOrig, BaseEventOrig,
ITouch, ITouch,
ITouchEvent ITouchEvent,
} from '@tarojs/components/types/common' } from '@tarojs/components/types/common'
import { import type {
AtCalendarBodyListGroup, AtCalendarBodyListGroup,
AtCalendarBodyProps, AtCalendarBodyProps,
AtCalendarBodyState, AtCalendarBodyState,
Calendar Calendar,
} from '../../../types/calendar' } from '../../../types/calendar'
import { delayQuerySelector } from '@/common/util'
import generateCalendarGroup from '../common/helper' import generateCalendarGroup from '../common/helper'
import AtCalendarDateList from '../ui/date-list/index' import AtCalendarDateList from '../ui/date-list/index'
import AtCalendarDayList from '../ui/day-list/index' import AtCalendarDayList from '../ui/day-list/index'
import { delayQuerySelector } from '@/common/util'
const ANIMTE_DURATION = 300 const ANIMTE_DURATION = 300
@ -24,15 +24,15 @@ const defaultProps: Partial<AtCalendarBodyProps> = {
marks: [], marks: [],
selectedDate: { selectedDate: {
end: Date.now(), end: Date.now(),
start: Date.now() start: Date.now(),
}, },
format: 'YYYY-MM-DD', format: 'YYYY-MM-DD',
generateDate: Date.now() generateDate: Date.now(),
} }
export default class AtCalendarBody extends React.Component< export default class AtCalendarBody extends React.Component<
AtCalendarBodyProps, AtCalendarBodyProps,
Readonly<AtCalendarBodyState> Readonly<AtCalendarBodyState>
> { > {
static defaultProps: Partial<AtCalendarBodyProps> = defaultProps static defaultProps: Partial<AtCalendarBodyProps> = defaultProps
@ -46,7 +46,7 @@ export default class AtCalendarBody extends React.Component<
maxDate, maxDate,
generateDate, generateDate,
selectedDate, selectedDate,
selectedDates selectedDates,
} = props } = props
this.generateFunc = generateCalendarGroup({ this.generateFunc = generateCalendarGroup({
@ -55,25 +55,25 @@ export default class AtCalendarBody extends React.Component<
minDate, minDate,
maxDate, maxDate,
marks, marks,
selectedDates selectedDates,
}) })
const listGroup = this.getGroups(generateDate, selectedDate) const listGroup = this.getGroups(generateDate, selectedDate)
this.state = { this.state = {
listGroup, listGroup,
offsetSize: 0, offsetSize: 0,
isAnimate: false isAnimate: false,
} }
} }
public componentDidMount(): void { public componentDidMount(): void {
delayQuerySelector('.at-calendar-slider__main').then(res => { delayQuerySelector('.at-calendar-slider__main').then((res) => {
this.maxWidth = res[0].width this.maxWidth = res[0].width
}) })
} }
public UNSAFE_componentWillReceiveProps( public UNSAFE_componentWillReceiveProps(
nextProps: AtCalendarBodyProps nextProps: AtCalendarBodyProps,
): void { ): void {
const { const {
validDates, validDates,
@ -83,7 +83,7 @@ export default class AtCalendarBody extends React.Component<
maxDate, maxDate,
generateDate, generateDate,
selectedDate, selectedDate,
selectedDates selectedDates,
} = nextProps } = nextProps
this.generateFunc = generateCalendarGroup({ this.generateFunc = generateCalendarGroup({
@ -92,13 +92,13 @@ export default class AtCalendarBody extends React.Component<
minDate, minDate,
maxDate, maxDate,
marks, marks,
selectedDates selectedDates,
}) })
const listGroup = this.getGroups(generateDate, selectedDate) const listGroup = this.getGroups(generateDate, selectedDate)
this.setState({ this.setState({
offsetSize: 0, offsetSize: 0,
listGroup listGroup,
}) })
} }
@ -118,30 +118,30 @@ export default class AtCalendarBody extends React.Component<
private getGroups = ( private getGroups = (
generateDate: number, generateDate: number,
selectedDate: Calendar.SelectedDate selectedDate: Calendar.SelectedDate,
): AtCalendarBodyListGroup => { ): AtCalendarBodyListGroup => {
const dayjsDate = dayjs(generateDate) const dayjsDate = dayjs(generateDate)
const arr: AtCalendarBodyListGroup = [] const arr: AtCalendarBodyListGroup = []
const preList: Calendar.ListInfo<Calendar.Item> = this.generateFunc( const preList: Calendar.ListInfo<Calendar.Item> = this.generateFunc(
dayjsDate.subtract(1, 'month').valueOf(), dayjsDate.subtract(1, 'month').valueOf(),
selectedDate selectedDate,
) )
const nowList: Calendar.ListInfo<Calendar.Item> = this.generateFunc( const nowList: Calendar.ListInfo<Calendar.Item> = this.generateFunc(
generateDate, generateDate,
selectedDate, selectedDate,
true true,
) )
const nextList: Calendar.ListInfo<Calendar.Item> = this.generateFunc( const nextList: Calendar.ListInfo<Calendar.Item> = this.generateFunc(
dayjsDate.add(1, 'month').valueOf(), dayjsDate.add(1, 'month').valueOf(),
selectedDate selectedDate,
) )
const preListIndex = const preListIndex
this.currentSwiperIndex === 0 ? 2 : this.currentSwiperIndex - 1 = this.currentSwiperIndex === 0 ? 2 : this.currentSwiperIndex - 1
const nextListIndex = const nextListIndex
this.currentSwiperIndex === 2 ? 0 : this.currentSwiperIndex + 1 = this.currentSwiperIndex === 2 ? 0 : this.currentSwiperIndex + 1
arr[preListIndex] = preList arr[preListIndex] = preList
arr[nextListIndex] = nextList arr[nextListIndex] = nextList
@ -162,36 +162,36 @@ export default class AtCalendarBody extends React.Component<
if (!this.props.isSwiper) { if (!this.props.isSwiper) {
return return
} }
if (!this.isTouching) return if (!this.isTouching) { return }
const { clientX } = e.touches[0] const { clientX } = e.touches[0]
const offsetSize = clientX - this.startX const offsetSize = clientX - this.startX
this.setState({ this.setState({
offsetSize offsetSize,
}) })
} }
private animateMoveSlide = (offset: number, callback?: Function): void => { private animateMoveSlide = (offset: number, callback?: Function): void => {
this.setState( this.setState(
{ {
isAnimate: true isAnimate: true,
}, },
() => { () => {
this.setState({ this.setState({
offsetSize: offset offsetSize: offset,
}) })
setTimeout(() => { setTimeout(() => {
this.setState( this.setState(
{ {
isAnimate: false isAnimate: false,
}, },
() => { () => {
callback && callback() callback && callback()
} },
) )
}, ANIMTE_DURATION) }, ANIMTE_DURATION)
} },
) )
} }
@ -221,7 +221,7 @@ export default class AtCalendarBody extends React.Component<
e: BaseEventOrig<{ e: BaseEventOrig<{
current: number current: number
source: string source: string
}> }>,
): void => { ): void => {
const { current, source } = e.detail const { current, source } = e.detail
@ -234,21 +234,21 @@ export default class AtCalendarBody extends React.Component<
private handleAnimateFinish = (): void => { private handleAnimateFinish = (): void => {
if (this.changeCount > 0) { if (this.changeCount > 0) {
this.props.onSwipeMonth( this.props.onSwipeMonth(
this.isPreMonth ? -this.changeCount : this.changeCount this.isPreMonth ? -this.changeCount : this.changeCount,
) )
this.changeCount = 0 this.changeCount = 0
} }
} }
private handleSwipeTouchStart = ( private handleSwipeTouchStart = (
e: ITouchEvent & { changedTouches: Array<ITouch> } e: ITouchEvent & { changedTouches: Array<ITouch> },
): void => { ): void => {
const { clientY, clientX } = e.changedTouches[0] const { clientY, clientX } = e.changedTouches[0]
this.swipeStartPoint = this.props.isVertical ? clientY : clientX this.swipeStartPoint = this.props.isVertical ? clientY : clientX
} }
private handleSwipeTouchEnd = ( private handleSwipeTouchEnd = (
e: ITouchEvent & { changedTouches: Array<ITouch> } e: ITouchEvent & { changedTouches: Array<ITouch> },
): void => { ): void => {
const { clientY, clientX } = e.changedTouches[0] const { clientY, clientX } = e.changedTouches[0]
this.isPreMonth = this.props.isVertical this.isPreMonth = this.props.isVertical
@ -266,12 +266,12 @@ export default class AtCalendarBody extends React.Component<
className={classnames( className={classnames(
'main', 'main',
'at-calendar-slider__main', 'at-calendar-slider__main',
`at-calendar-slider__main--${process.env.TARO_ENV}` `at-calendar-slider__main--${process.env.TARO_ENV}`,
)} )}
> >
<AtCalendarDayList /> <AtCalendarDayList />
<View className='main__body body'> <View className="main__body body">
<View className='body__slider body__slider--now'> <View className="body__slider body__slider--now">
<AtCalendarDateList <AtCalendarDateList
list={listGroup[1].list} list={listGroup[1].list}
onClick={this.props.onDayClick} onClick={this.props.onDayClick}
@ -290,7 +290,7 @@ export default class AtCalendarBody extends React.Component<
className={classnames( className={classnames(
'main', 'main',
'at-calendar-slider__main', 'at-calendar-slider__main',
`at-calendar-slider__main--${process.env.TARO_ENV}` `at-calendar-slider__main--${process.env.TARO_ENV}`,
)} )}
onTouchEnd={this.handleTouchEnd} onTouchEnd={this.handleTouchEnd}
onTouchMove={this.handleTouchMove} onTouchMove={this.handleTouchMove}
@ -300,7 +300,7 @@ export default class AtCalendarBody extends React.Component<
<View <View
className={classnames('main__body body', { className={classnames('main__body body', {
'main__body--slider': isSwiper, 'main__body--slider': isSwiper,
'main__body--animate': isAnimate 'main__body--animate': isAnimate,
})} })}
style={{ style={{
transform: isSwiper transform: isSwiper
@ -308,20 +308,20 @@ export default class AtCalendarBody extends React.Component<
: '', : '',
WebkitTransform: isSwiper WebkitTransform: isSwiper
? `translateX(-100%) translate3d(${offsetSize}px,0,0)` ? `translateX(-100%) translate3d(${offsetSize}px,0,0)`
: '' : '',
}} }}
> >
<View className='body__slider body__slider--pre'> <View className="body__slider body__slider--pre">
<AtCalendarDateList list={listGroup[0].list} /> <AtCalendarDateList list={listGroup[0].list} />
</View> </View>
<View className='body__slider body__slider--now'> <View className="body__slider body__slider--now">
<AtCalendarDateList <AtCalendarDateList
list={listGroup[1].list} list={listGroup[1].list}
onClick={this.props.onDayClick} onClick={this.props.onDayClick}
onLongClick={this.props.onLongClick} onLongClick={this.props.onLongClick}
/> />
</View> </View>
<View className='body__slider body__slider--next'> <View className="body__slider body__slider--next">
<AtCalendarDateList list={listGroup[2].list} /> <AtCalendarDateList list={listGroup[2].list} />
</View> </View>
</View> </View>
@ -334,7 +334,7 @@ export default class AtCalendarBody extends React.Component<
className={classnames( className={classnames(
'main', 'main',
'at-calendar-slider__main', 'at-calendar-slider__main',
`at-calendar-slider__main--${process.env.TARO_ENV}` `at-calendar-slider__main--${process.env.TARO_ENV}`,
)} )}
> >
<AtCalendarDayList /> <AtCalendarDayList />

View File

@ -1,6 +1,7 @@
import dayjs, { Dayjs } from 'dayjs' import type { Dayjs } from 'dayjs'
import dayjs from 'dayjs'
import _flow from 'lodash/flow' import _flow from 'lodash/flow'
import { Calendar } from '../../../types/calendar' import type { Calendar } from '../../../types/calendar'
import * as constant from './constant' import * as constant from './constant'
import plugins from './plugins' import plugins from './plugins'
@ -10,35 +11,35 @@ function getFullItem(
item: Partial<Calendar.Item>, item: Partial<Calendar.Item>,
options: Calendar.GroupOptions, options: Calendar.GroupOptions,
selectedDate: Calendar.SelectedDate, selectedDate: Calendar.SelectedDate,
isShowStatus?: boolean isShowStatus?: boolean,
): any { ): any {
if (options.marks.find(x => x.value === item.value)) { if (options.marks.find(x => x.value === item.value)) {
(item.marks as Array<Calendar.Mark>) = [{ (item.marks as Array<Calendar.Mark>) = [{
value: item.value as string value: item.value as string,
}] }]
} }
if (!isShowStatus) return item if (!isShowStatus) { return item }
const bindedPlugins = plugins.map(fn => const bindedPlugins = plugins.map(fn =>
fn.bind(null, { fn.bind(null, {
options, options,
selectedDate selectedDate,
}) }),
) )
return _flow(bindedPlugins)(item) return _flow(bindedPlugins)(item)
} }
export default function generateCalendarGroup( export default function generateCalendarGroup(
options: Calendar.GroupOptions options: Calendar.GroupOptions,
): ( ): (
generateDate: number, generateDate: number,
selectedDate: Calendar.SelectedDate, selectedDate: Calendar.SelectedDate,
isShowStatus?: boolean isShowStatus?: boolean
) => Calendar.ListInfo<Calendar.Item> { ) => Calendar.ListInfo<Calendar.Item> {
return function ( return function(
generateDate: number, generateDate: number,
selectedDate: Calendar.SelectedDate, selectedDate: Calendar.SelectedDate,
isShowStatus?: boolean isShowStatus?: boolean,
): Calendar.ListInfo<Calendar.Item> { ): Calendar.ListInfo<Calendar.Item> {
const date = dayjs(generateDate) const date = dayjs(generateDate)
@ -64,7 +65,7 @@ export default function generateCalendarGroup(
_value: thisDate, _value: thisDate,
text: thisDate.date(), text: thisDate.date(),
type: constant.TYPE_PRE_MONTH, type: constant.TYPE_PRE_MONTH,
value: thisDate.format(format) value: thisDate.format(format),
} }
item = getFullItem(item, options, selectedDate, isShowStatus) item = getFullItem(item, options, selectedDate, isShowStatus)
@ -81,7 +82,7 @@ export default function generateCalendarGroup(
_value: thisDate, _value: thisDate,
text: thisDate.date(), text: thisDate.date(),
type: constant.TYPE_NOW_MONTH, type: constant.TYPE_NOW_MONTH,
value: thisDate.format(format) value: thisDate.format(format),
} }
item = getFullItem(item, options, selectedDate, isShowStatus) item = getFullItem(item, options, selectedDate, isShowStatus)
@ -98,7 +99,7 @@ export default function generateCalendarGroup(
_value: thisDate, _value: thisDate,
text: thisDate.date(), text: thisDate.date(),
type: constant.TYPE_NEXT_MONTH, type: constant.TYPE_NEXT_MONTH,
value: thisDate.format(format) value: thisDate.format(format),
} }
item = getFullItem(item, options, selectedDate, isShowStatus) item = getFullItem(item, options, selectedDate, isShowStatus)
@ -108,7 +109,7 @@ export default function generateCalendarGroup(
return { return {
list, list,
value: generateDate value: generateDate,
} }
} }
} }

View File

@ -1,6 +1,6 @@
import dayjs from 'dayjs' import dayjs from 'dayjs'
import _isEmpty from 'lodash/isEmpty' import _isEmpty from 'lodash/isEmpty'
import { Calendar } from '../../../types/calendar' import type { Calendar } from '../../../types/calendar'
interface PluginArg { interface PluginArg {
options: Calendar.GroupOptions options: Calendar.GroupOptions
@ -10,7 +10,7 @@ interface PluginArg {
export function handleActive( export function handleActive(
args: PluginArg, args: PluginArg,
item: Calendar.Item item: Calendar.Item,
): Calendar.Item { ): Calendar.Item {
const { selectedDate } = args const { selectedDate } = args
const { _value } = item const { _value } = item
@ -20,10 +20,10 @@ export function handleActive(
const dayjsEnd = dayjs(end) const dayjsEnd = dayjs(end)
const dayjsStart = start ? dayjs(start) : dayjsEnd const dayjsStart = start ? dayjs(start) : dayjsEnd
item.isSelected = item.isSelected
_value.isSame(dayjsEnd) || = _value.isSame(dayjsEnd)
_value.isSame(dayjsStart) || || _value.isSame(dayjsStart)
(_value.isAfter(dayjsStart) && _value.isBefore(dayjsEnd)) || (_value.isAfter(dayjsStart) && _value.isBefore(dayjsEnd))
item.isSelectedHead = _value.isSame(dayjsStart) item.isSelectedHead = _value.isSame(dayjsStart)
item.isSelectedTail = _value.isSame(dayjsEnd) item.isSelectedTail = _value.isSame(dayjsEnd)
@ -35,14 +35,14 @@ export function handleActive(
export function handleMarks( export function handleMarks(
args: PluginArg, args: PluginArg,
item: Calendar.Item item: Calendar.Item,
): Calendar.Item { ): Calendar.Item {
const { options } = args const { options } = args
const { _value } = item const { _value } = item
const { marks } = options const { marks } = options
const markList = marks.filter(mark => const markList = marks.filter(mark =>
dayjs(mark.value).startOf('day').isSame(_value) dayjs(mark.value).startOf('day').isSame(_value),
) )
item.marks = markList.slice(0, 1) item.marks = markList.slice(0, 1)
@ -84,7 +84,7 @@ export function handleMarks(
export function handleDisabled( export function handleDisabled(
args: PluginArg, args: PluginArg,
item: Calendar.Item item: Calendar.Item,
): Calendar.Item { ): Calendar.Item {
const { options } = args const { options } = args
const { _value } = item const { _value } = item
@ -93,16 +93,16 @@ export function handleDisabled(
const dayjsMinDate = dayjs(minDate) const dayjsMinDate = dayjs(minDate)
const dayjsMaxDate = dayjs(maxDate) const dayjsMaxDate = dayjs(maxDate)
item.isDisabled = item.isDisabled
!!(minDate && _value.isBefore(dayjsMinDate)) || = !!(minDate && _value.isBefore(dayjsMinDate))
!!(maxDate && _value.isAfter(dayjsMaxDate)) || !!(maxDate && _value.isAfter(dayjsMaxDate))
return item return item
} }
export function handleValid( export function handleValid(
args: PluginArg, args: PluginArg,
item: Calendar.Item item: Calendar.Item,
): Calendar.Item { ): Calendar.Item {
const { options } = args const { options } = args
const { _value } = item const { _value } = item
@ -110,7 +110,7 @@ export function handleValid(
if (!_isEmpty(validDates)) { if (!_isEmpty(validDates)) {
const isInclude = validDates.some(date => const isInclude = validDates.some(date =>
dayjs(date.value).startOf('day').isSame(_value) dayjs(date.value).startOf('day').isSame(_value),
) )
item.isDisabled = !isInclude item.isDisabled = !isInclude

View File

@ -1,15 +1,16 @@
import classnames from 'classnames'
import dayjs, { Dayjs } from 'dayjs'
import React from 'react'
import { Picker, Text, View } from '@tarojs/components' import { Picker, Text, View } from '@tarojs/components'
import { import classnames from 'classnames'
import type { Dayjs } from 'dayjs'
import dayjs from 'dayjs'
import React from 'react'
import type {
AtCalendarControllerProps, AtCalendarControllerProps,
AtCalendarControllerState AtCalendarControllerState,
} from '../../../types/calendar' } from '../../../types/calendar'
export default class AtCalendarController extends React.Component< export default class AtCalendarController extends React.Component<
AtCalendarControllerProps, AtCalendarControllerProps,
AtCalendarControllerState AtCalendarControllerState
> { > {
public render(): JSX.Element { public render(): JSX.Element {
const { const {
@ -17,18 +18,18 @@ export default class AtCalendarController extends React.Component<
minDate, minDate,
maxDate, maxDate,
monthFormat, monthFormat,
hideArrow hideArrow,
} = this.props } = this.props
const dayjsDate: Dayjs = dayjs(generateDate) const dayjsDate: Dayjs = dayjs(generateDate)
const dayjsMinDate: Dayjs | boolean = !!minDate && dayjs(minDate) const dayjsMinDate: Dayjs | boolean = !!minDate && dayjs(minDate)
const dayjsMaxDate: Dayjs | boolean = !!maxDate && dayjs(maxDate) const dayjsMaxDate: Dayjs | boolean = !!maxDate && dayjs(maxDate)
const isMinMonth: boolean = const isMinMonth: boolean
dayjsMinDate && dayjsMinDate.startOf('month').isSame(dayjsDate) = dayjsMinDate && dayjsMinDate.startOf('month').isSame(dayjsDate)
const isMaxMonth: boolean = const isMaxMonth: boolean
dayjsMaxDate && dayjsMaxDate.startOf('month').isSame(dayjsDate) = dayjsMaxDate && dayjsMaxDate.startOf('month').isSame(dayjsDate)
const minDateValue: string = dayjsMinDate const minDateValue: string = dayjsMinDate
? dayjsMinDate.format('YYYY-MM') ? dayjsMinDate.format('YYYY-MM')
@ -38,34 +39,38 @@ export default class AtCalendarController extends React.Component<
: '' : ''
return ( return (
<View className='at-calendar__controller controller'> <View className="at-calendar__controller controller">
{hideArrow ? null : ( {hideArrow
? null
: (
<View <View
className={classnames('controller__arrow controller__arrow--left', { className={classnames('controller__arrow controller__arrow--left', {
'controller__arrow--disabled': isMinMonth 'controller__arrow--disabled': isMinMonth,
})} })}
onClick={this.props.onPreMonth.bind(this, isMinMonth)} onClick={this.props.onPreMonth.bind(this, isMinMonth)}
/> />
)} )}
<Picker <Picker
mode='date' mode="date"
fields='month' fields="month"
end={maxDateValue} end={maxDateValue}
start={minDateValue} start={minDateValue}
onChange={this.props.onSelectDate} onChange={this.props.onSelectDate}
value={dayjsDate.format('YYYY-MM')} value={dayjsDate.format('YYYY-MM')}
> >
<Text className='controller__info'> <Text className="controller__info">
{dayjsDate.format(monthFormat)} {dayjsDate.format(monthFormat)}
</Text> </Text>
</Picker> </Picker>
{hideArrow ? null : ( {hideArrow
? null
: (
<View <View
className={classnames( className={classnames(
'controller__arrow controller__arrow--right', 'controller__arrow controller__arrow--right',
{ {
'controller__arrow--disabled': isMaxMonth 'controller__arrow--disabled': isMaxMonth,
} },
)} )}
onClick={this.props.onNextMonth.bind(this, isMaxMonth)} onClick={this.props.onNextMonth.bind(this, isMaxMonth)}
/> />

View File

@ -1,18 +1,20 @@
import classnames from 'classnames'
import dayjs, { Dayjs } from 'dayjs'
import React from 'react'
import { View } from '@tarojs/components' import { View } from '@tarojs/components'
import { BaseEventOrig } from '@tarojs/components/types/common' import classnames from 'classnames'
import { import type { Dayjs } from 'dayjs'
import dayjs from 'dayjs'
import React from 'react'
import type { BaseEventOrig } from '@tarojs/components/types/common'
import type {
AtCalendarDefaultProps, AtCalendarDefaultProps,
AtCalendarProps, AtCalendarProps,
AtCalendarPropsWithDefaults, AtCalendarPropsWithDefaults,
AtCalendarState, AtCalendarState,
Calendar Calendar,
} from '../../types/calendar' } from '../../types/calendar'
import AtCalendarBody from './body/index' import AtCalendarBody from './body/index'
import AtCalendarController from './controller/index' import AtCalendarController from './controller/index'
import './index.scss' import './index.scss'
const defaultProps: AtCalendarDefaultProps = { const defaultProps: AtCalendarDefaultProps = {
validDates: [], validDates: [],
marks: [], marks: [],
@ -23,12 +25,12 @@ const defaultProps: AtCalendarDefaultProps = {
isMultiSelect: false, isMultiSelect: false,
format: 'YYYY-MM-DD', format: 'YYYY-MM-DD',
currentDate: Date.now(), currentDate: Date.now(),
monthFormat: 'YYYY年MM月' monthFormat: 'YYYY年MM月',
} }
export default class AtCalendar extends React.Component< export default class AtCalendar extends React.Component<
AtCalendarProps, AtCalendarProps,
Readonly<AtCalendarState> Readonly<AtCalendarState>
> { > {
static defaultProps: AtCalendarDefaultProps = defaultProps static defaultProps: AtCalendarDefaultProps = defaultProps
@ -42,7 +44,7 @@ export default class AtCalendar extends React.Component<
public UNSAFE_componentWillReceiveProps(nextProps: AtCalendarProps): void { public UNSAFE_componentWillReceiveProps(nextProps: AtCalendarProps): void {
const { currentDate, isMultiSelect } = nextProps const { currentDate, isMultiSelect } = nextProps
if (!currentDate || currentDate === this.props.currentDate) return if (!currentDate || currentDate === this.props.currentDate) { return }
if (isMultiSelect && this.props.isMultiSelect) { if (isMultiSelect && this.props.isMultiSelect) {
const { start, end } = currentDate as Calendar.SelectedDate const { start, end } = currentDate as Calendar.SelectedDate
@ -56,7 +58,7 @@ export default class AtCalendar extends React.Component<
const stateValue: AtCalendarState = this.getInitializeState( const stateValue: AtCalendarState = this.getInitializeState(
currentDate, currentDate,
isMultiSelect isMultiSelect,
) )
this.setState(stateValue) this.setState(stateValue)
@ -66,7 +68,7 @@ export default class AtCalendar extends React.Component<
const { generateDate } = this.state const { generateDate } = this.state
const stateValue: Partial<AtCalendarState> = { const stateValue: Partial<AtCalendarState> = {
selectedDate: this.getSelectedDate(value.valueOf()) selectedDate: this.getSelectedDate(value.valueOf()),
} }
const dayjsGenerateDate: Dayjs = value.startOf('month') const dayjsGenerateDate: Dayjs = value.startOf('month')
@ -81,19 +83,20 @@ export default class AtCalendar extends React.Component<
} }
private getMultiSelectedState = ( private getMultiSelectedState = (
value: Dayjs value: Dayjs,
): Pick<AtCalendarState, 'selectedDate'> => { ): Pick<AtCalendarState, 'selectedDate'> => {
const { selectedDate } = this.state const { selectedDate } = this.state
const { end, start } = selectedDate const { end, start } = selectedDate
const valueUnix: number = value.valueOf() const valueUnix: number = value.valueOf()
const state: Pick<AtCalendarState, 'selectedDate'> = { const state: Pick<AtCalendarState, 'selectedDate'> = {
selectedDate selectedDate,
} }
if (end) { if (end) {
state.selectedDate = this.getSelectedDate(valueUnix, 0) state.selectedDate = this.getSelectedDate(valueUnix, 0)
} else { }
else {
state.selectedDate.end = Math.max(valueUnix, +start) state.selectedDate.end = Math.max(valueUnix, +start)
state.selectedDate.start = Math.min(valueUnix, +start) state.selectedDate.start = Math.min(valueUnix, +start)
} }
@ -103,11 +106,11 @@ export default class AtCalendar extends React.Component<
private getSelectedDate = ( private getSelectedDate = (
start: number, start: number,
end?: number end?: number,
): Calendar.SelectedDate => { ): Calendar.SelectedDate => {
const stateValue: Calendar.SelectedDate = { const stateValue: Calendar.SelectedDate = {
start, start,
end: start end: start,
} }
if (typeof end !== 'undefined') { if (typeof end !== 'undefined') {
@ -119,7 +122,7 @@ export default class AtCalendar extends React.Component<
private getInitializeState( private getInitializeState(
currentDate: Calendar.DateArg | Calendar.SelectedDate, currentDate: Calendar.DateArg | Calendar.SelectedDate,
isMultiSelect?: boolean isMultiSelect?: boolean,
): AtCalendarState { ): AtCalendarState {
let end: number let end: number
let start: number let start: number
@ -132,8 +135,8 @@ export default class AtCalendar extends React.Component<
return { return {
generateDate: generateDateValue, generateDate: generateDateValue,
selectedDate: { selectedDate: {
start: '' start: '',
} },
} }
} }
@ -146,7 +149,8 @@ export default class AtCalendar extends React.Component<
generateDateValue = dayjsStart.startOf('month').valueOf() generateDateValue = dayjsStart.startOf('month').valueOf()
end = cEnd ? dayjs(cEnd).startOf('day').valueOf() : start end = cEnd ? dayjs(cEnd).startOf('day').valueOf() : start
} else { }
else {
const dayjsStart = dayjs(currentDate as Calendar.DateArg) const dayjsStart = dayjs(currentDate as Calendar.DateArg)
start = dayjsStart.startOf('day').valueOf() start = dayjsStart.startOf('day').valueOf()
@ -157,14 +161,14 @@ export default class AtCalendar extends React.Component<
return { return {
generateDate: generateDateValue, generateDate: generateDateValue,
selectedDate: this.getSelectedDate(start, end) selectedDate: this.getSelectedDate(start, end),
} }
} }
private triggerChangeDate = (value: Dayjs): void => { private triggerChangeDate = (value: Dayjs): void => {
const { format } = this.props const { format } = this.props
if (typeof this.props.onMonthChange !== 'function') return if (typeof this.props.onMonthChange !== 'function') { return }
this.props.onMonthChange(value.format(format)) this.props.onMonthChange(value.format(format))
} }
@ -175,7 +179,7 @@ export default class AtCalendar extends React.Component<
const _generateDate: Dayjs = dayjs(generateDate).add(vectorCount, 'month') const _generateDate: Dayjs = dayjs(generateDate).add(vectorCount, 'month')
this.setState({ this.setState({
generateDate: _generateDate.valueOf() generateDate: _generateDate.valueOf(),
}) })
if (vectorCount && typeof this.props.onMonthChange === 'function') { if (vectorCount && typeof this.props.onMonthChange === 'function') {
@ -214,11 +218,11 @@ export default class AtCalendar extends React.Component<
const _generateDate: Dayjs = dayjs(value) const _generateDate: Dayjs = dayjs(value)
const _generateDateValue: number = _generateDate.valueOf() const _generateDateValue: number = _generateDate.valueOf()
if (this.state.generateDate === _generateDateValue) return if (this.state.generateDate === _generateDateValue) { return }
this.triggerChangeDate(_generateDate) this.triggerChangeDate(_generateDate)
this.setState({ this.setState({
generateDate: _generateDateValue generateDate: _generateDateValue,
}) })
} }
@ -226,7 +230,7 @@ export default class AtCalendar extends React.Component<
const { isMultiSelect } = this.props const { isMultiSelect } = this.props
const { isDisabled, value } = item const { isDisabled, value } = item
if (isDisabled) return if (isDisabled) { return }
const dayjsDate: Dayjs = dayjs(value) const dayjsDate: Dayjs = dayjs(value)
@ -234,7 +238,8 @@ export default class AtCalendar extends React.Component<
if (isMultiSelect) { if (isMultiSelect) {
stateValue = this.getMultiSelectedState(dayjsDate) stateValue = this.getMultiSelectedState(dayjsDate)
} else { }
else {
stateValue = this.getSingleSelectdState(dayjsDate) stateValue = this.getSingleSelectdState(dayjsDate)
} }
@ -251,7 +256,7 @@ export default class AtCalendar extends React.Component<
const selectDate = this.state.selectedDate const selectDate = this.state.selectedDate
if (typeof this.props.onSelectDate === 'function') { if (typeof this.props.onSelectDate === 'function') {
const info: Calendar.SelectedDate = { const info: Calendar.SelectedDate = {
start: dayjs(selectDate.start).format(this.props.format) start: dayjs(selectDate.start).format(this.props.format),
} }
if (selectDate.end) { if (selectDate.end) {
@ -259,7 +264,7 @@ export default class AtCalendar extends React.Component<
} }
this.props.onSelectDate({ this.props.onSelectDate({
value: info value: info,
}) })
} }
} }
@ -283,7 +288,7 @@ export default class AtCalendar extends React.Component<
hideArrow, hideArrow,
isVertical, isVertical,
monthFormat, monthFormat,
selectedDates selectedDates,
} = this.props as AtCalendarPropsWithDefaults } = this.props as AtCalendarPropsWithDefaults
return ( return (

View File

@ -1,4 +1,4 @@
import dayjs from 'dayjs' import type dayjs from 'dayjs'
// import { BaseEvent } from '@tarojs/components/types/common' // import { BaseEvent } from '@tarojs/components/types/common'
// #region Calendar // #region Calendar
@ -8,7 +8,7 @@ declare namespace Calendar {
export type classNameType = export type classNameType =
| string | string
| Array<string> | Array<string>
| { [key: string]: boolean } | Record<string, boolean>
export interface Mark { export interface Mark {
value: DateArg value: DateArg
@ -62,7 +62,7 @@ declare namespace Calendar {
export type List<T> = Array<T> export type List<T> = Array<T>
export type ListInfo<T> = { export interface ListInfo<T> {
value: number value: number
list: List<T> list: List<T>
@ -159,7 +159,7 @@ export interface AtCalendarState {
} }
export type AtCalendarPropsWithDefaults = AtCalendarProps & export type AtCalendarPropsWithDefaults = AtCalendarProps &
AtCalendarDefaultProps AtCalendarDefaultProps
// #endregion // #endregion
// #region AtCalendarController // #region AtCalendarController

View File

@ -1,13 +1,13 @@
import { Text, View } from '@tarojs/components'
import classnames from 'classnames' import classnames from 'classnames'
import React from 'react' import React from 'react'
import { Text, View } from '@tarojs/components' import type { Calendar } from '../../types/calendar'
import { Calendar } from '../../types/calendar'
import * as constant from '../../common/constant' import * as constant from '../../common/constant'
const MAP: { [key: number]: string } = { const MAP: Record<number, string> = {
[constant.TYPE_PRE_MONTH]: 'pre', [constant.TYPE_PRE_MONTH]: 'pre',
[constant.TYPE_NOW_MONTH]: 'now', [constant.TYPE_NOW_MONTH]: 'now',
[constant.TYPE_NEXT_MONTH]: 'next' [constant.TYPE_NEXT_MONTH]: 'next',
} }
export interface Props { export interface Props {
@ -33,10 +33,10 @@ export default class AtCalendarList extends React.Component<Props> {
public render(): JSX.Element | null { public render(): JSX.Element | null {
const { list } = this.props const { list } = this.props
if (!list || list.length === 0) return null if (!list || list.length === 0) { return null }
return ( return (
<View className='at-calendar__list flex'> <View className="at-calendar__list flex">
{list.map((item: Calendar.Item) => ( {list.map((item: Calendar.Item) => (
<View <View
key={`list-item-${item.value}`} key={`list-item-${item.value}`}
@ -52,25 +52,27 @@ export default class AtCalendarList extends React.Component<Props> {
'flex__item--selected-head': item.isSelectedHead, 'flex__item--selected-head': item.isSelectedHead,
'flex__item--selected-tail': item.isSelectedTail, 'flex__item--selected-tail': item.isSelectedTail,
'flex__item--blur': 'flex__item--blur':
item.isDisabled || item.isDisabled
item.type === constant.TYPE_PRE_MONTH || || item.type === constant.TYPE_PRE_MONTH
item.type === constant.TYPE_NEXT_MONTH || item.type === constant.TYPE_NEXT_MONTH,
} },
)} )}
> >
<View className='flex__item-container'> <View className="flex__item-container">
<View className='container-text'>{item.text}</View> <View className="container-text">{item.text}</View>
</View> </View>
<View className='flex__item-extra extra'> <View className="flex__item-extra extra">
{item.marks && item.marks.length > 0 ? ( {item.marks && item.marks.length > 0
<View className='extra-marks'> ? (
<View className="extra-marks">
{item.marks.map((mark, key) => ( {item.marks.map((mark, key) => (
<Text key={key} className='mark'> <Text key={key} className="mark">
{mark.value as React.ReactNode} {mark.value as React.ReactNode}
</Text> </Text>
))} ))}
</View> </View>
) : null} )
: null}
</View> </View>
</View> </View>
))} ))}

View File

@ -1,18 +1,18 @@
import React from 'react'
import { View } from '@tarojs/components' import { View } from '@tarojs/components'
import React from 'react'
export default class AtCalendarHeader extends React.Component { export default class AtCalendarHeader extends React.Component {
public render(): JSX.Element { public render(): JSX.Element {
return ( return (
<View className='at-calendar__header header'> <View className="at-calendar__header header">
<View className='header__flex'> <View className="header__flex">
<View className='header__flex-item'></View> <View className="header__flex-item"></View>
<View className='header__flex-item'></View> <View className="header__flex-item"></View>
<View className='header__flex-item'></View> <View className="header__flex-item"></View>
<View className='header__flex-item'></View> <View className="header__flex-item"></View>
<View className='header__flex-item'></View> <View className="header__flex-item"></View>
<View className='header__flex-item'></View> <View className="header__flex-item"></View>
<View className='header__flex-item'></View> <View className="header__flex-item"></View>
</View> </View>
</View> </View>
) )

View File

@ -1,7 +1,9 @@
import { View, Text } from '@tarojs/components' import { Text, View } from '@tarojs/components'
import classNames from "classnames" import classNames from 'classnames'
import { FC, useCallback, useMemo, useRef } from "react" import type { FC } from 'react'
import IconFont, { IconNames } from "../iconfont/iconfont" import { useCallback, useMemo, useRef } from 'react'
import type { IconNames } from '../iconfont/iconfont'
import IconFont from '../iconfont/iconfont'
import styles from './index.module.scss' import styles from './index.module.scss'
interface CellPropsType { interface CellPropsType {
@ -14,7 +16,7 @@ interface CellPropsType {
customDescClassName?: string customDescClassName?: string
iconName?: IconNames iconName?: IconNames
} }
const Cell:FC<CellPropsType> = (props) => { const Cell: FC<CellPropsType> = (props) => {
const { title, desc, isLink = false, customClassName, customStyle, onClick, iconName, customDescClassName } = props const { title, desc, isLink = false, customClassName, customStyle, onClick, iconName, customDescClassName } = props
const onClickRef = useRef(onClick) const onClickRef = useRef(onClick)
@ -33,7 +35,7 @@ const Cell:FC<CellPropsType> = (props) => {
</View> </View>
<View className={styles.desc}> <View className={styles.desc}>
<Text className={classNames(styles.descText, customDescClassName)}>{desc}</Text> <Text className={classNames(styles.descText, customDescClassName)}>{desc}</Text>
{isLink && <IconFont name='icon-chakanquanbukehu' size={46} color='inherit'></IconFont>} {isLink && <IconFont name="icon-chakanquanbukehu" size={46} color="inherit"></IconFont>}
</View> </View>
</View> </View>
) )

View File

@ -1,18 +1,18 @@
import { usePropsValue } from '@/use/useCommon'
import { View } from '@tarojs/components' import { View } from '@tarojs/components'
import classnames from 'classnames' import classnames from 'classnames'
import React, { forwardRef, SetStateAction, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react' import React, { SetStateAction, forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react'
import IconFont from '../iconfont/iconfont' import IconFont from '../iconfont/iconfont'
import styles from './index.module.scss' import styles from './index.module.scss'
import { usePropsValue } from '@/use/useCommon'
type CheckboxSize = 'normal' | 'small' type CheckboxSize = 'normal' | 'small'
type params = { interface params {
onSelect?: () => void //选择触发 onSelect?: () => void // 选择触发
onClose?: () => void //取消触发 onClose?: () => void // 取消触发
status?: boolean //是否选中 status?: boolean // 是否选中
hiddenCheckboxIcon?: boolean // 隐藏多选框 hiddenCheckboxIcon?: boolean // 隐藏多选框
disabled?: boolean //是否禁用 disabled?: boolean // 是否禁用
triggerLabel?: boolean // 点击label是否触发选中 triggerLabel?: boolean // 点击label是否触发选中
circle?: boolean circle?: boolean
round?: boolean round?: boolean
@ -40,7 +40,7 @@ export default forwardRef((props: params, ref) => {
} = props } = props
const [selected, setSelected] = usePropsValue({ const [selected, setSelected] = usePropsValue({
value: status, value: status,
defaultValue: false defaultValue: false,
}) })
// const selectedRef = useRef(status) // const selectedRef = useRef(status)
// if (status !== undefined){ // if (status !== undefined){
@ -57,18 +57,19 @@ export default forwardRef((props: params, ref) => {
// }, []) // }, [])
const onSelectEven = () => { const onSelectEven = () => {
if (disabled) return false if (disabled) { return false }
let res = !selected const res = !selected
if (res) { if (res) {
onSelect?.() onSelect?.()
} else { }
else {
onClose?.() onClose?.()
} }
console.log('res', res) console.log('res', res)
setSelected(res) setSelected(res)
} }
const handleClickChildren = event => { const handleClickChildren = (event) => {
if (!triggerLabel) { if (!triggerLabel) {
return event.stopPropagation() return event.stopPropagation()
} }
@ -103,7 +104,7 @@ export default forwardRef((props: params, ref) => {
{!hiddenCheckboxIcon && ( {!hiddenCheckboxIcon && (
<View className={classnames(styles.checkbox_main, getMainClassName())}> <View className={classnames(styles.checkbox_main, getMainClassName())}>
<View className={classnames(styles.checkbox_item, getClassName())}> <View className={classnames(styles.checkbox_item, getClassName())}>
{selected && <IconFont name='icon-a-jizhumima' size={22} color='#fff'></IconFont>} {selected && <IconFont name="icon-a-jizhumima" size={22} color="#fff"></IconFont>}
</View> </View>
</View> </View>
)} )}

View File

@ -1,18 +1,18 @@
import { View, Text } from "@tarojs/components" import { Text, View } from '@tarojs/components'
import { memo } from "react" import { memo } from 'react'
import IconFont from "../iconfont/iconfont" import IconFont from '../iconfont/iconfont'
import style from "./index.module.scss" import style from './index.module.scss'
type Params = { interface Params {
onClose?: () => void, onClose?: () => void
styleObj?: Object styleObj?: Object
} }
export default memo(({onClose, styleObj = {}}:Params) => { export default memo(({ onClose, styleObj = {} }: Params) => {
return ( return (
<View style={styleObj} className={style.icon_a_cuowuwrong_self} onClick={onClose}> <View style={styleObj} className={style.icon_a_cuowuwrong_self} onClick={onClose}>
<View className={style.icon_a_btn}> <View className={style.icon_a_btn}>
<IconFont name='icon-guanbi' size={30} color='#ccc'></IconFont> <IconFont name="icon-guanbi" size={30} color="#ccc"></IconFont>
</View> </View>
</View> </View>
) )

View File

@ -1,33 +1,33 @@
import { View } from "@tarojs/components" import { View } from '@tarojs/components'
import Big from 'big.js' import Big from 'big.js'
import styles from "./index.module.scss" import InputX from '../InputX'
import { usePropsValue } from "@/use/useCommon" import styles from './index.module.scss'
import InputX from "../InputX" import { usePropsValue } from '@/use/useCommon'
type params = { interface params {
minNum?: number, //最小值 minNum?: number // 最小值
maxNum?: number, //最大值 maxNum?: number // 最大值
step?: number, //步长 step?: number // 步长
defaultNum?: number, //默认值 defaultNum?: number // 默认值
digits?: number //多少位小数 digits?: number // 多少位小数
onChange?:(val:number) => void, onChange?: (val: number) => void
onBlue?:(val:number) => void, //失去焦点触发 onBlue?: (val: number) => void // 失去焦点触发
onClickBtn?:(val:number) => void, onClickBtn?: (val: number) => void
unit?: string, unit?: string
disable?: boolean, //是否禁用 disable?: boolean // 是否禁用
} }
export default ({minNum = 0, maxNum = 10000, step=1, digits = 0, defaultNum = 0, onChange: onValueChange, onBlue, onClickBtn, unit = '', disable = false}: params) => { export default ({ minNum = 0, maxNum = 10000, step = 1, digits = 0, defaultNum = 0, onChange: onValueChange, onBlue, onClickBtn, unit = '', disable = false }: params) => {
const [value, setValue] = usePropsValue<number>({ const [value, setValue] = usePropsValue<number>({
value: defaultNum, value: defaultNum,
defaultValue: defaultNum, defaultValue: defaultNum,
onChange: (nextValue) => { onChange: (nextValue) => {
onValueChange && onValueChange(nextValue) onValueChange && onValueChange(nextValue)
} },
}) })
// 加号 // 加号
const onPlus = (event) => { const onPlus = (event) => {
event.stopPropagation() event.stopPropagation()
if (disable) return false if (disable) { return false }
let num_res = Big(value).add(step).toNumber() let num_res = Big(value).add(step).toNumber()
num_res = num_res >= maxNum ? maxNum : num_res num_res = num_res >= maxNum ? maxNum : num_res
num_res = formatDigits(num_res) num_res = formatDigits(num_res)
@ -37,62 +37,62 @@ export default ({minNum = 0, maxNum = 10000, step=1, digits = 0, defaultNum = 0,
// 减号 // 减号
const minus = (event) => { const minus = (event) => {
event.stopPropagation() event.stopPropagation()
if(disable) return false if (disable) { return false }
let num_res = Big(value).minus(step).toNumber() let num_res = Big(value).minus(step).toNumber()
num_res = num_res < minNum ? minNum : num_res num_res = num_res < minNum ? minNum : num_res
setValue(num_res) setValue(num_res)
onClickBtn?.(parseFloat(num_res)) onClickBtn?.(parseFloat(num_res))
} }
//保留小数 // 保留小数
const formatDigits = (num) => { const formatDigits = (num) => {
num = num + '' num = `${num}`
if(num.includes('.')&&digits > 0) { if (num.includes('.') && digits > 0) {
console.log('num::',num.includes('.')) console.log('num::', num.includes('.'))
let res = num.split('.') const res = num.split('.')
let last_num = res[1].substr(0, digits) const last_num = res[1].substr(0, digits)
return res[0] + '.' + last_num return `${res[0]}.${last_num}`
} }
return parseFloat(num) return parseFloat(num)
} }
//检查数据 // 检查数据
const checkData = (val) => { const checkData = (val) => {
let num = parseFloat(val) const num = parseFloat(val)
if(num > maxNum) return maxNum if (num > maxNum) { return maxNum }
if(num < minNum) return minNum if (num < minNum) { return minNum }
return val return val
} }
const onInputEven = (e) => { const onInputEven = (e) => {
let res = e.detail.value const res = e.detail.value
if(res === '') { if (res === '') {
setValue(minNum) setValue(minNum)
return minNum return minNum
} }
else if(!isNaN(Number(res))) { else if (!isNaN(Number(res))) {
let count = formatDigits(res) let count = formatDigits(res)
count = checkData(count) count = checkData(count)
setValue(count as number) setValue(count as number)
return count return count
} else { }
let num = parseFloat(res) else {
const num = parseFloat(res)
if (!isNaN(num)) { if (!isNaN(num)) {
let count = formatDigits(num) let count = formatDigits(num)
count = checkData(count) count = checkData(count)
setValue(count as number) setValue(count as number)
return count return count
} else { }
else {
setValue(defaultNum) setValue(defaultNum)
return defaultNum return defaultNum
} }
} }
} }
const onBluerEven = () => { const onBluerEven = () => {
let num = parseFloat(String(value)) const num = parseFloat(String(value))
console.log('onInputEven res===>', num) console.log('onInputEven res===>', num)
if (!isNaN(num)) { if (!isNaN(num)) {
@ -101,7 +101,8 @@ export default ({minNum = 0, maxNum = 10000, step=1, digits = 0, defaultNum = 0,
setValue(count as number) setValue(count as number)
onBlue?.(count as number) onBlue?.(count as number)
return count return count
} else { }
else {
setValue(defaultNum) setValue(defaultNum)
onBlue?.(defaultNum) onBlue?.(defaultNum)
return defaultNum return defaultNum
@ -109,7 +110,6 @@ export default ({minNum = 0, maxNum = 10000, step=1, digits = 0, defaultNum = 0,
} }
const noop = (e) => { const noop = (e) => {
e.stopPropagation() e.stopPropagation()
} }
return ( return (
<View className={styles.main}> <View className={styles.main}>
@ -117,7 +117,7 @@ export default ({minNum = 0, maxNum = 10000, step=1, digits = 0, defaultNum = 0,
- -
</View> </View>
<View className={styles.input} onClick={noop}> <View className={styles.input} onClick={noop}>
<InputX value={String(value)} onInput={onInputEven} onBlur={onBluerEven} type='digit' disabled={disable}/> <InputX value={String(value)} onInput={onInputEven} onBlur={onBluerEven} type="digit" disabled={disable} />
<View className={styles.unit}>{unit}</View> <View className={styles.unit}>{unit}</View>
</View> </View>
<View className={styles.plus} onClick={onPlus}> <View className={styles.plus} onClick={onPlus}>

View File

@ -1,5 +1,5 @@
import { View } from "@tarojs/components"; import { View } from '@tarojs/components'
import { memo } from "react"; import { memo } from 'react'
import styles from './index.module.scss' import styles from './index.module.scss'
export default memo(() => { export default memo(() => {

View File

@ -2,19 +2,19 @@
* position: relative; * position: relative;
*/ */
import { View, Text } from '@tarojs/components' import { Text, View } from '@tarojs/components'
import { useEffect, useMemo, useRef, useState, forwardRef, useImperativeHandle } from 'react' import Taro from '@tarojs/taro'
import styles from './index.module.scss' import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
import classNames from 'classnames'
import Iconfont from '../iconfont/iconfont' import Iconfont from '../iconfont/iconfont'
import Popup from '../popup' import Popup from '../popup'
import Cell from '../cell' import Cell from '../cell'
import Taro from '@tarojs/taro' import styles from './index.module.scss'
import classNames from 'classnames'
import { usePropsValue } from '@/use/useCommon' import { usePropsValue } from '@/use/useCommon'
// 弹窗选择向上弹窗还是向下弹窗 // 弹窗选择向上弹窗还是向下弹窗
type Direction = 'up' | 'down' type Direction = 'up' | 'down'
// 配置 菜单可选项 // 配置 菜单可选项
export type DropDownOptions = { export interface DropDownOptions {
text: string text: string
value: number value: number
} }
@ -33,24 +33,24 @@ interface PropsType extends DropDownEvent {
activeColor?: string activeColor?: string
showOverlay?: boolean showOverlay?: boolean
customClassName?: string customClassName?: string
customStyle?: React.CSSProperties, customStyle?: React.CSSProperties
hasBottomBtn?: boolean //底部有按钮不允许点击蒙层关闭 hasBottomBtn?: boolean // 底部有按钮不允许点击蒙层关闭
} }
export default forwardRef((props: PropsType, ref) => { export default forwardRef((props: PropsType, ref) => {
const { children, direction = 'down', title = '', value, options = [], change, activeColor, showOverlay = true, hasBottomBtn = false,customClassName,customStyle,onCloseOverlay } = props const { children, direction = 'down', title = '', value, options = [], change, activeColor, showOverlay = true, hasBottomBtn = false, customClassName, customStyle, onCloseOverlay } = props
const [showPopup, setShowPopup] = useState(false) const [showPopup, setShowPopup] = useState(false)
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
show: showPopup, show: showPopup,
//暴露出方法给有需要的用 // 暴露出方法给有需要的用
closePopup() { closePopup() {
setShowPopup(false) setShowPopup(false)
}, },
showPopup() { showPopup() {
setShowPopup(true) setShowPopup(true)
} },
}), [showPopup]) }), [showPopup])
const handleClickOption = (value: DropDownOptions['value']) => { const handleClickOption = (value: DropDownOptions['value']) => {
@ -63,7 +63,7 @@ export default forwardRef((props: PropsType, ref) => {
const currentValue = value const currentValue = value
return options?.map(({ text, value }) => { return options?.map(({ text, value }) => {
currentValue === value && setText(text) currentValue === value && setText(text)
return <Cell title={text} desc='' isLink onClick={() => handleClickOption(value)}></Cell> return <Cell title={text} desc="" isLink onClick={() => handleClickOption(value)}></Cell>
}) })
}, [value]) }, [value])
@ -76,13 +76,13 @@ export default forwardRef((props: PropsType, ref) => {
} }
const handleClickTitle = () => { const handleClickTitle = () => {
console.log('handleClickTitle', showPopup); console.log('handleClickTitle', showPopup)
onCloseOverlay?.() onCloseOverlay?.()
setShowPopup(prev => !prev) setShowPopup(prev => !prev)
} }
const handleClosePopup = () => { const handleClosePopup = () => {
if (hasBottomBtn) return if (hasBottomBtn) { return }
setShowPopup(false) setShowPopup(false)
onCloseOverlay?.() onCloseOverlay?.()
} }
@ -100,13 +100,14 @@ export default forwardRef((props: PropsType, ref) => {
const query = Taro.createSelectorQuery() const query = Taro.createSelectorQuery()
query.select('#DropDownItem').boundingClientRect() query.select('#DropDownItem').boundingClientRect()
query.selectViewport().scrollOffset() query.selectViewport().scrollOffset()
query.exec(res => { query.exec((res) => {
console.log('res==>', res) console.log('res==>', res)
setScrollHeight(res[1].scrollHeight) setScrollHeight(res[1].scrollHeight)
if (direction === 'down') { if (direction === 'down') {
setOverlayOffsetTop(res[0].bottom + 'px') setOverlayOffsetTop(`${res[0].bottom}px`)
} else { }
setOverlayOffsetTop(res[0].top + 'px') else {
setOverlayOffsetTop(`${res[0].top}px`)
} }
}) })
}, []) }, [])
@ -115,16 +116,17 @@ export default forwardRef((props: PropsType, ref) => {
const getCustomStyle: React.CSSProperties = useMemo(() => { const getCustomStyle: React.CSSProperties = useMemo(() => {
if (direction === 'up') { if (direction === 'up') {
return { position: 'absolute', top: 0, height: overlayOffsetTop } return { position: 'absolute', top: 0, height: overlayOffsetTop }
} else { }
return { position: 'absolute', top: overlayOffsetTop, height: `calc(${scrollHeight + 'px'} - ${overlayOffsetTop})` } else {
return { position: 'absolute', top: overlayOffsetTop, height: `calc(${`${scrollHeight}px`} - ${overlayOffsetTop})` }
} }
}, [overlayOffsetTop]) }, [overlayOffsetTop])
return ( return (
<View className={styles.dropDownItem} id='DropDownItem'> <View className={styles.dropDownItem} id="DropDownItem">
<View className={classNames(customClassName, styles['dropDownItem--title'])} style={customStyle} onClick={handleClickTitle}> <View className={classNames(customClassName, styles['dropDownItem--title'])} style={customStyle} onClick={handleClickTitle}>
<Text className={styles['dropDownItem--title--text']} style={showPopup ? { color: activeColor } : {}}> <Text className={styles['dropDownItem--title--text']} style={showPopup ? { color: activeColor } : {}}>
{title ? title : text} {title || text}
</Text> </Text>
<Iconfont name={getIconName()} size={20} color={showPopup ? activeColor : '#7f7f7f'}></Iconfont> <Iconfont name={getIconName()} size={20} color={showPopup ? activeColor : '#7f7f7f'}></Iconfont>
</View> </View>
@ -136,8 +138,9 @@ export default forwardRef((props: PropsType, ref) => {
safeAreaInsetBottom={false} safeAreaInsetBottom={false}
customStyle={getCustomStyle} customStyle={getCustomStyle}
overlayStyle={getOverlayStyle()} overlayStyle={getOverlayStyle()}
position={direction === 'down' ? 'top' : 'bottom'}> position={direction === 'down' ? 'top' : 'bottom'}
{children ? children : <View className={styles.dropDownItemOptions}>{defaultOptions}</View>} >
{children || <View className={styles.dropDownItemOptions}>{defaultOptions}</View>}
</Popup> </Popup>
</View> </View>
) )

View File

@ -1,21 +1,21 @@
import { View, Image } from '@tarojs/components' import { Image, View } from '@tarojs/components'
import React, { useCallback, memo, useEffect, useMemo, useRef, useState } from 'react' import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
import styles from "../empty/index.module.scss" import styles from '../empty/index.module.scss'
interface PropsObj { interface PropsObj {
picUrl?: string, picUrl?: string
text?: string text?: string
} }
export default memo((pros: PropsObj) => { export default memo((pros: PropsObj) => {
const { const {
picUrl = '', picUrl = '',
text = '无搜索历史' text = '无搜索历史',
} = pros } = pros
return ( return (
<View className={styles.mainBox}> <View className={styles.mainBox}>
<Image className={styles.pic} mode='aspectFill' lazyLoad src={picUrl}></Image> <Image className={styles.pic} mode="aspectFill" lazyLoad src={picUrl}></Image>
<View className={styles.text}>{text}</View> <View className={styles.text}>{text}</View>
</View> </View>
) )

View File

@ -1,63 +1,64 @@
import { Text, View } from "@tarojs/components" import { Text, View } from '@tarojs/components'
import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useState } from "react" import Taro from '@tarojs/taro'
import {formatKbPrice} from '@/common/common' import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useState } from 'react'
import classnames from "classnames"; import classnames from 'classnames'
import AmountShow from '../amountShow'
import styles from './index.module.scss' import styles from './index.module.scss'
import Taro from "@tarojs/taro"; import { formatKbPrice } from '@/common/common'
import AmountShow from "../amountShow";
type Param = { interface Param {
style?: Object, style?: Object
number?: number|string, number?: number|string
title?: string, title?: string
titleStatus?: true|false, //true 标题加大加深 titleStatus?: true|false // true 标题加大加深
numberStatus?: 0|1|2, //数字尺寸 numberStatus?: 0|1|2 // 数字尺寸
messageTitle?: string, messageTitle?: string
messageWidth?: number, messageWidth?: number
messageShow?: true|false, messageShow?: true|false
numberFormat?: 'number'|'text' //数字还是字符串 numberFormat?: 'number'|'text' // 数字还是字符串
} }
export default memo(({number = 0, titleStatus = true, title = '', messageTitle = '', numberStatus = 1, messageWidth = 430, messageShow = false, numberFormat = 'number'}:Param) => { export default memo(({ number = 0, titleStatus = true, title = '', messageTitle = '', numberStatus = 1, messageWidth = 430, messageShow = false, numberFormat = 'number' }: Param) => {
const [show, setShow] = useState(messageShow) const [show, setShow] = useState(messageShow)
const onClose = () => { const onClose = () => {
setShow(false) setShow(false)
} }
const openShow = () => [ const openShow = () => [
setShow(true) setShow(true),
] ]
const [style, setStyle] = useState<{top: string}>() const [style, setStyle] = useState<{ top: string }>()
useEffect(() => { useEffect(() => {
if(show) { if (show) {
getDomDes('#message') getDomDes('#message')
} else { }
setStyle(() => ({top: '0'})) else {
setStyle(() => ({ top: '0' }))
} }
}, [show]) }, [show])
//设置弹出层高度 // 设置弹出层高度
const getDomDes = (id) => { const getDomDes = (id) => {
setTimeout(() => { setTimeout(() => {
let query = Taro.createSelectorQuery(); const query = Taro.createSelectorQuery()
query.select(id).boundingClientRect(rect=>{ query.select(id).boundingClientRect((rect) => {
let height = rect.height * 2 + 15; const height = rect.height * 2 + 15
setStyle((e) => ({...e, top: `-${height}rpx`, opacity: 1})) setStyle(e => ({ ...e, top: `-${height}rpx`, opacity: 1 }))
}).exec(); }).exec()
}, 0) }, 0)
} }
return ( return (
<> <>
<View className={styles.order_price}> <View className={styles.order_price}>
<View className={classnames(styles.order_price_text, titleStatus&&styles.emphasis)} onClick={() => openShow()}> <View className={classnames(styles.order_price_text, titleStatus && styles.emphasis)} onClick={() => openShow()}>
<Text>{title}</Text> <Text>{title}</Text>
<View className={styles.iconfont_msg}> <View className={styles.iconfont_msg}>
{show&&<View style={{...style, width: `${messageWidth}rpx`}} id='message' className={classnames(styles.message)}>{messageTitle}</View>} {show && <View style={{ ...style, width: `${messageWidth}rpx` }} id="message" className={classnames(styles.message)}>{messageTitle}</View>}
<Text className={classnames(styles.miconfont, 'iconfont icon-zhushi')}></Text> <Text className={classnames(styles.miconfont, 'iconfont icon-zhushi')}></Text>
</View> </View>
</View> </View>
{numberFormat == 'number' && <AmountShow status={numberStatus} number={(number as number / 100)}/>} {numberFormat == 'number' && <AmountShow status={numberStatus} number={(number as number / 100)} />}
{(numberFormat == 'text') && <View className={styles.refund_destination}>{number}</View>} {(numberFormat == 'text') && <View className={styles.refund_destination}>{number}</View>}
{show&&<View className={styles.close} catchMove onClick={onClose}></View>} {show && <View className={styles.close} catchMove onClick={onClose}></View>}
</View> </View>
</> </>
) )

View File

@ -1,18 +1,18 @@
import { GetProductKindListApi } from "@/api/material"; import { Input, ScrollView, Text, Textarea, View } from '@tarojs/components'
import Popup, {Params as PopuParams} from "@/components/popup" import { useDidShow } from '@tarojs/taro'
import { Input, ScrollView, Text, Textarea, View } from "@tarojs/components" import classnames from 'classnames'
import { useDidShow } from "@tarojs/taro"; import { memo, useEffect, useRef, useState } from 'react'
import classnames from "classnames";
import { memo, useEffect, useRef, useState } from "react";
import styles from './index.module.scss' import styles from './index.module.scss'
import Popup from '@/components/popup'
import type { Params as PopuParams } from '@/components/popup'
import { GetProductKindListApi } from '@/api/material'
type params = { type params = {
onFiltr?: (val:object) => void //确定搜索 onFiltr?: (val: object) => void // 确定搜索
onRest?: (val:Object) => void //重置 onRest?: (val: Object) => void // 重置
} & PopuParams } & PopuParams
export default memo(({onClose, onFiltr, show = false, onRest}:params) => { export default memo(({ onClose, onFiltr, show = false, onRest }: params) => {
// 搜索条件
//搜索条件
const [filterObj, setFilterObj] = useState({ const [filterObj, setFilterObj] = useState({
seriesName: '', seriesName: '',
seriesId: '', seriesId: '',
@ -21,32 +21,32 @@ export default memo(({onClose, onFiltr, show = false, onRest}:params) => {
element: '', element: '',
}) })
const selectFieldValue = useRef({width:'幅宽', weight:'克重', element:'成分', seriesName:'系列'}) const selectFieldValue = useRef({ width: '幅宽', weight: '克重', element: '成分', seriesName: '系列' })
//获取系列 // 获取系列
const {fetchData: kindFetchData} = GetProductKindListApi() const { fetchData: kindFetchData } = GetProductKindListApi()
const [kindList, setKindList] = useState<any[]>([]) const [kindList, setKindList] = useState<any[]>([])
const getCategoryList = async () => { const getCategoryList = async() => {
let {data} = await kindFetchData() const { data } = await kindFetchData()
setKindList(data.list) setKindList(data.list)
} }
useEffect(() => { useEffect(() => {
show&&getCategoryList() show && getCategoryList()
}, [show]) }, [show])
//切换系列 // 切换系列
const changeKind = (e) => { const changeKind = (e) => {
setFilterObj({...filterObj, seriesId:e.id, seriesName: e.name}) setFilterObj({ ...filterObj, seriesId: e.id, seriesName: e.name })
} }
const onCloseEven = () => { const onCloseEven = () => {
onClose?.() onClose?.()
} }
//重置数据 // 重置数据
const onRestEven = () => { const onRestEven = () => {
let res = { const res = {
seriesName: '', seriesName: '',
seriesId: '', seriesId: '',
width: '', width: '',
@ -58,20 +58,20 @@ export default memo(({onClose, onFiltr, show = false, onRest}:params) => {
onClose?.() onClose?.()
} }
//提交搜索 // 提交搜索
const onVerify = () => { const onVerify = () => {
onFiltr?.({data:filterObj, field: selectFieldValue.current}) onFiltr?.({ data: filterObj, field: selectFieldValue.current })
onClose?.() onClose?.()
} }
//获取幅宽或克重输入值或成分 // 获取幅宽或克重输入值或成分
const setFieldData = (e, field) => { const setFieldData = (e, field) => {
filterObj[field] = e.detail.value filterObj[field] = e.detail.value
setFilterObj({...filterObj}) setFilterObj({ ...filterObj })
} }
return ( return (
<Popup position="right" show={show} showTitle={false} onClose={() => onCloseEven()} showIconButton={true}> <Popup position="right" show={show} showTitle={false} onClose={() => onCloseEven()} showIconButton>
<View className={styles.popup_main}> <View className={styles.popup_main}>
<View className={styles.popup_title}></View> <View className={styles.popup_title}></View>
<ScrollView scrollY className={styles.scroll}> <ScrollView scrollY className={styles.scroll}>
@ -79,27 +79,27 @@ export default memo(({onClose, onFiltr, show = false, onRest}:params) => {
<View className={styles.popup_filter_item}> <View className={styles.popup_filter_item}>
<View className={styles.title}></View> <View className={styles.title}></View>
<View className={styles.btn_list}> <View className={styles.btn_list}>
{kindList.map(item => <View key={item.id} onClick={() => changeKind(item)} className={classnames(styles.btn_item, (filterObj.seriesId == item.id)&&styles.select_btn_item)}>{item.name}</View>)} {kindList.map(item => <View key={item.id} onClick={() => changeKind(item)} className={classnames(styles.btn_item, (filterObj.seriesId == item.id) && styles.select_btn_item)}>{item.name}</View>)}
</View> </View>
</View> </View>
<View className={styles.popup_filter_item}> <View className={styles.popup_filter_item}>
<View className={styles.title}></View> <View className={styles.title}></View>
<View className={styles.btn_list_input}> <View className={styles.btn_list_input}>
<View className={styles.btn_width}><Input value={filterObj.width} onBlur={(e) => setFieldData(e,'width')} placeholder="请输入幅宽" placeholderStyle="font-size: 26rpx"/></View> <View className={styles.btn_width}><Input value={filterObj.width} onBlur={e => setFieldData(e, 'width')} placeholder="请输入幅宽" placeholderStyle="font-size: 26rpx" /></View>
<View className={styles.unit}>cm</View> <View className={styles.unit}>cm</View>
</View> </View>
</View> </View>
<View className={styles.popup_filter_item}> <View className={styles.popup_filter_item}>
<View className={styles.title}></View> <View className={styles.title}></View>
<View className={styles.btn_list_input}> <View className={styles.btn_list_input}>
<View className={styles.btn_width}><Input value={filterObj.weight} onBlur={(e) => setFieldData(e,'weight')} placeholder="请输入克重" placeholderStyle="font-size: 26rpx"/></View> <View className={styles.btn_width}><Input value={filterObj.weight} onBlur={e => setFieldData(e, 'weight')} placeholder="请输入克重" placeholderStyle="font-size: 26rpx" /></View>
<View className={styles.unit}>kg</View> <View className={styles.unit}>kg</View>
</View> </View>
</View> </View>
<View className={styles.popup_filter_item}> <View className={styles.popup_filter_item}>
<View className={styles.title}></View> <View className={styles.title}></View>
<View className={styles.btn_list_element}> <View className={styles.btn_list_element}>
<Textarea placeholder="请输入" cursorSpacing={60} value={filterObj.element} onInput={(e) => setFieldData(e, 'element')}/> <Textarea placeholder="请输入" cursorSpacing={60} value={filterObj.element} onInput={e => setFieldData(e, 'element')} />
</View> </View>
</View> </View>
@ -109,7 +109,7 @@ export default memo(({onClose, onFiltr, show = false, onRest}:params) => {
<View className={styles.btns_con}> <View className={styles.btns_con}>
<View className={styles.btns_two}> <View className={styles.btns_two}>
<View className={styles.rest_btn} onClick={() => onRestEven()}></View> <View className={styles.rest_btn} onClick={() => onRestEven()}></View>
<View className={styles.verify_btn } onClick={() => onVerify()}></View> <View className={styles.verify_btn} onClick={() => onVerify()}></View>
</View> </View>
</View> </View>
</View> </View>

View File

@ -1,6 +1,6 @@
import classnames from "classnames" import classnames from 'classnames'
import { FC } from "react" import type { FC } from 'react'
import NormalButton from "../normalButton" import NormalButton from '../normalButton'
import styles from './index.module.scss' import styles from './index.module.scss'
interface ButtonPropsType { interface ButtonPropsType {
@ -10,7 +10,7 @@ interface ButtonPropsType {
customClassName?: string customClassName?: string
} }
const FilterButton: FC<ButtonPropsType> = props => { const FilterButton: FC<ButtonPropsType> = (props) => {
const { onClick, children, isActive = false, customClassName } = props const { onClick, children, isActive = false, customClassName } = props
const handleClick = () => { const handleClick = () => {
onClick?.() onClick?.()
@ -19,7 +19,8 @@ const FilterButton: FC<ButtonPropsType> = props => {
<NormalButton <NormalButton
customTextClassName={styles['filterButton--text']} customTextClassName={styles['filterButton--text']}
customClassName={classnames(styles.filterButton, isActive && styles['filterButton--active'], customClassName)} customClassName={classnames(styles.filterButton, isActive && styles['filterButton--active'], customClassName)}
onClick={handleClick}> onClick={handleClick}
>
{children} {children}
</NormalButton> </NormalButton>
) )

View File

@ -1,41 +1,41 @@
import { GetProductKindListApi } from "@/api/material"; import { Input, ScrollView, Text, Textarea, View } from '@tarojs/components'
import Popup, {Params as PopuParams} from "@/components/popup" import { useDidShow } from '@tarojs/taro'
import { Input, ScrollView, Text, Textarea, View } from "@tarojs/components" import classnames from 'classnames'
import { useDidShow } from "@tarojs/taro"; import { useEffect, useState } from 'react'
import classnames from "classnames";
import { useEffect, useState } from "react";
import styles from './index.module.scss' import styles from './index.module.scss'
import Popup from '@/components/popup'
import type { Params as PopuParams } from '@/components/popup'
import { GetProductKindListApi } from '@/api/material'
type params = { type params = {
onFiltr?: (val:object) => void onFiltr?: (val: object) => void
} & PopuParams } & PopuParams
export default ({onClose, onFiltr, show = false}:params) => { export default ({ onClose, onFiltr, show = false }: params) => {
// 搜索条件
//搜索条件
const [filterObj, setFilterObj] = useState({ const [filterObj, setFilterObj] = useState({
seriesId: '', seriesId: '',
minWidth: '', minWidth: '',
maxWidth: '', maxWidth: '',
minWeight: '', minWeight: '',
maxWeight: '', maxWeight: '',
element: '' element: '',
}) })
//获取系列 // 获取系列
const {fetchData: kindFetchData} = GetProductKindListApi() const { fetchData: kindFetchData } = GetProductKindListApi()
const [kindList, setKindList] = useState<any[]>([]) const [kindList, setKindList] = useState<any[]>([])
const getCategoryList = async () => { const getCategoryList = async() => {
let {data} = await kindFetchData() const { data } = await kindFetchData()
setKindList(data.list) setKindList(data.list)
} }
useEffect(() => { useEffect(() => {
show&&getCategoryList() show && getCategoryList()
}, [show]) }, [show])
//切换系列 // 切换系列
const changeKind = (e) => { const changeKind = (e) => {
setFilterObj({...filterObj, seriesId:e.id}) setFilterObj({ ...filterObj, seriesId: e.id })
} }
const onCloseEven = () => { const onCloseEven = () => {
@ -49,7 +49,7 @@ export default ({onClose, onFiltr, show = false}:params) => {
maxWidth: '', maxWidth: '',
minWeight: '', minWeight: '',
maxWeight: '', maxWeight: '',
element: '' element: '',
}) })
} }
useEffect(() => { useEffect(() => {
@ -63,22 +63,23 @@ export default ({onClose, onFiltr, show = false}:params) => {
const setNumber = (e, field) => { const setNumber = (e, field) => {
console.log(e) console.log(e)
let num = parseFloat(e.detail.value) const num = parseFloat(e.detail.value)
if(isNaN(num)) { if (isNaN(num)) {
filterObj[field] = null filterObj[field] = null
} else { }
else {
filterObj[field] = parseFloat(num.toFixed(2)) filterObj[field] = parseFloat(num.toFixed(2))
} }
setFilterObj({...filterObj}) setFilterObj({ ...filterObj })
} }
const setElement = (e) => { const setElement = (e) => {
let res = e.detail.value const res = e.detail.value
setFilterObj({...filterObj, element:res}) setFilterObj({ ...filterObj, element: res })
} }
return ( return (
<Popup position="right" show={show} showTitle={false} onClose={() => onCloseEven()} showIconButton={true}> <Popup position="right" show={show} showTitle={false} onClose={() => onCloseEven()} showIconButton>
<View className={styles.popup_main}> <View className={styles.popup_main}>
<View className={styles.popup_title}></View> <View className={styles.popup_title}></View>
<ScrollView scrollY className={styles.scroll}> <ScrollView scrollY className={styles.scroll}>
@ -86,29 +87,29 @@ export default ({onClose, onFiltr, show = false}:params) => {
<View className={styles.popup_filter_item}> <View className={styles.popup_filter_item}>
<View className={styles.title}></View> <View className={styles.title}></View>
<View className={styles.btn_list}> <View className={styles.btn_list}>
{kindList.map(item => <View key={item.id} onClick={() => changeKind(item)} className={classnames(styles.btn_item, (filterObj.seriesId == item.id)&&styles.select_btn_item)}>{item.name}</View>)} {kindList.map(item => <View key={item.id} onClick={() => changeKind(item)} className={classnames(styles.btn_item, (filterObj.seriesId == item.id) && styles.select_btn_item)}>{item.name}</View>)}
</View> </View>
</View> </View>
<View className={styles.popup_filter_item}> <View className={styles.popup_filter_item}>
<View className={styles.title}></View> <View className={styles.title}></View>
<View className={styles.btn_list_input}> <View className={styles.btn_list_input}>
<View className={styles.btn_width}><Input value={filterObj.minWidth} type="digit" onBlur={(e) => setNumber(e,'minWidth')} placeholder="请输入幅宽" placeholderStyle="font-size: 26rpx"/></View> <View className={styles.btn_width}><Input value={filterObj.minWidth} type="digit" onBlur={e => setNumber(e, 'minWidth')} placeholder="请输入幅宽" placeholderStyle="font-size: 26rpx" /></View>
<View className={styles.unit}>cm</View> <View className={styles.unit}>cm</View>
</View> </View>
</View> </View>
<View className={styles.popup_filter_item}> <View className={styles.popup_filter_item}>
<View className={styles.title}></View> <View className={styles.title}></View>
<View className={styles.btn_list_input}> <View className={styles.btn_list_input}>
<View className={styles.btn_width}><Input type="digit" value={filterObj.minWeight} onBlur={(e) => setNumber(e,'minWeight')} placeholder="自定义最低值" placeholderStyle="font-size: 26rpx"/></View> <View className={styles.btn_width}><Input type="digit" value={filterObj.minWeight} onBlur={e => setNumber(e, 'minWeight')} placeholder="自定义最低值" placeholderStyle="font-size: 26rpx" /></View>
<Text></Text> <Text></Text>
<View className={styles.btn_width}><Input type="digit" value={filterObj.maxWeight} onBlur={(e) => setNumber(e,'maxWeight')} placeholder="自定义最高值" placeholderStyle="font-size: 26rpx"/></View> <View className={styles.btn_width}><Input type="digit" value={filterObj.maxWeight} onBlur={e => setNumber(e, 'maxWeight')} placeholder="自定义最高值" placeholderStyle="font-size: 26rpx" /></View>
<View className={styles.unit}>g</View> <View className={styles.unit}>g</View>
</View> </View>
</View> </View>
<View className={styles.popup_filter_item}> <View className={styles.popup_filter_item}>
<View className={styles.title}></View> <View className={styles.title}></View>
<View className={styles.btn_list_element}> <View className={styles.btn_list_element}>
<Textarea placeholder="请输入" cursorSpacing={60} value={filterObj.element} onInput={(e) => setElement(e)}/> <Textarea placeholder="请输入" cursorSpacing={60} value={filterObj.element} onInput={e => setElement(e)} />
</View> </View>
</View> </View>
@ -118,7 +119,7 @@ export default ({onClose, onFiltr, show = false}:params) => {
<View className={styles.btns_con}> <View className={styles.btns_con}>
<View className={styles.btns_two}> <View className={styles.btns_two}>
<View className={styles.rest_btn} onClick={() => onRest()}></View> <View className={styles.rest_btn} onClick={() => onRest()}></View>
<View className={styles.verify_btn } onClick={() => onVerify()}></View> <View className={styles.verify_btn} onClick={() => onVerify()}></View>
</View> </View>
</View> </View>
</View> </View>

View File

@ -1,38 +1,37 @@
import { View, ScrollView, Image, Input } from '@tarojs/components' import { Image, Input, ScrollView, View } from '@tarojs/components'
import { useCallback, useEffect, useMemo, useRef, useState, memo } from 'react' import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
import styles from "./index.module.scss" import classnames from 'classnames'
import classnames from "classnames"; import styles from './index.module.scss'
interface props { interface props {
clickAdd: (any) => void, clickAdd: (any) => void
// onInputEven?: (a: any, c: any) => void, // onInputEven?: (a: any, c: any) => void,
clickReduce: (any) => void, clickReduce: (any) => void
handPlus: (any) => void, handPlus: (any) => void
modeFont?: number modeFont?: number
value: { value: {
showInput?: boolean, showInput?: boolean
nums?: string, nums?: string
bulk_price?: Number | 0, bulk_price?: Number | 0
length_cut_price?: Number, length_cut_price?: Number
weight_cut_price?: Number, weight_cut_price?: Number
code?: string, code?: string
rgb?: { r: number, g: number, b: number }, rgb?: { r: number; g: number; b: number }
name?: string, name?: string
roll?: number | string, roll?: number | string
buyNums?: number | string, buyNums?: number | string
id?: number, id?: number
weight_error?: number | string weight_error?: number | string
}, }
goodList?: any[], goodList?: any[]
onBlur?: (a: any, c: any) => void onBlur?: (a: any, c: any) => void
} }
export default memo((props: props) => { export default memo((props: props) => {
const [value, setValue] = useState<any>({ count: props.value.nums }) const [value, setValue] = useState<any>({ count: props.value.nums })
const onInputEven = (e) => { const onInputEven = (e) => {
let res = e.detail.value const res = e.detail.value
if (props.modeFont == 0) { if (props.modeFont == 0) {
if (Number(res) < 1) { if (Number(res) < 1) {
setValue({ count: '' }) setValue({ count: '' })
@ -53,18 +52,19 @@ export default memo((props: props) => {
const type = useMemo(() => { const type = useMemo(() => {
if (props.modeFont === 0) { if (props.modeFont === 0) {
return 'number' return 'number'
} else { }
else {
return 'digit' return 'digit'
} }
}, [props.modeFont]) }, [props.modeFont])
return ( return (
<View className={styles.goodsBox}> <View className={styles.goodsBox}>
{ {
props?.value?.rgb?.r == 0 && props?.value?.rgb?.g == 0 && props?.value?.rgb?.b == 0 && <Image className={styles.pic} mode={'aspectFill'} src={'https://test.cdn.zzfzyc.com/mall/no_img.png'}></Image> props?.value?.rgb?.r == 0 && props?.value?.rgb?.g == 0 && props?.value?.rgb?.b == 0 && <Image className={styles.pic} mode="aspectFill" src="https://test.cdn.zzfzyc.com/mall/no_img.png"></Image>
} }
{ {
(props?.value?.rgb?.r != 0 || props?.value?.rgb?.g != 0 || props?.value?.rgb?.b != 0) && (props?.value?.rgb?.r != 0 || props?.value?.rgb?.g != 0 || props?.value?.rgb?.b != 0)
<View className={styles.pic} style={{ backgroundColor: `rgb(${props?.value?.rgb?.r} ${props?.value?.rgb?.g} ${props?.value.rgb?.b})` }}></View> && <View className={styles.pic} style={{ backgroundColor: `rgb(${props?.value?.rgb?.r} ${props?.value?.rgb?.g} ${props?.value.rgb?.b})` }}></View>
} }
<View className={styles.rightGoodbox}> <View className={styles.rightGoodbox}>
<View className={styles.leftFontsbox}> <View className={styles.leftFontsbox}>
@ -83,7 +83,7 @@ export default memo((props: props) => {
</View> </View>
</View> </View>
<View className={styles.numsBox}> <View className={styles.numsBox}>
<Input alwaysEmbed cursorSpacing={100} adjustPosition type={type as any} value={value.count} onInput={onInputEven} onBlur={(e) => props.onBlur?.(e, props.value.id)}></Input> <Input alwaysEmbed cursorSpacing={100} adjustPosition type={type as any} value={value.count} onInput={onInputEven} onBlur={e => props.onBlur?.(e, props.value.id)}></Input>
{/* <Input type={type as any} value={value.count} onInput={($event) => onInputEven($event, props.value)}></Input> */} {/* <Input type={type as any} value={value.count} onInput={($event) => onInputEven($event, props.value)}></Input> */}
</View> </View>

View File

@ -1,9 +1,9 @@
import { View } from '@tarojs/components' import { View } from '@tarojs/components'
import { FC, ReactNode } from 'react' import type { FC, ReactNode } from 'react'
import IconFont, { IconNames } from '../iconfont/iconfont'
import styles from './index.module.scss'
import classname from 'classnames' import classname from 'classnames'
import type { IconNames } from '../iconfont/iconfont'
import IconFont from '../iconfont/iconfont'
import styles from './index.module.scss'
interface PropsType { interface PropsType {
iconName: IconNames iconName: IconNames

View File

@ -1,16 +1,18 @@
import React, { FC, useMemo } from "react" import { Text, View } from '@tarojs/components'
import { View, Text } from '@tarojs/components' import type { FC } from 'react'
import IconFont, { IconNames } from '../iconfont/iconfont' import React, { useMemo } from 'react'
import styles from './index.module.scss'
import classnames from 'classnames' import classnames from 'classnames'
import type { IconNames } from '../iconfont/iconfont'
import IconFont from '../iconfont/iconfont'
import styles from './index.module.scss'
type Direaction = 'left' | 'right' | 'bottom' | 'top' type Direaction = 'left' | 'right' | 'bottom' | 'top'
type PropsType = { interface PropsType {
iconName: IconNames iconName: IconNames
iconSize?: number iconSize?: number
svg?: boolean svg?: boolean
color?: string, color?: string
text?: string text?: string
direction?: Direaction direction?: Direaction
children?: React.ReactNode children?: React.ReactNode
@ -21,22 +23,23 @@ type PropsType = {
} }
const IconText: FC<PropsType> = (props) => { const IconText: FC<PropsType> = (props) => {
const { children, svg = false, iconName, iconSize = 40, text = '', color,textCustomStyle,direction='left' } = props const { children, svg = false, iconName, iconSize = 40, text = '', color, textCustomStyle, direction = 'left' } = props
const classNameObject = { const classNameObject = {
[styles['iconText--horizontal']]: ['left', 'right'].includes(direction), [styles['iconText--horizontal']]: ['left', 'right'].includes(direction),
[styles['iconText--vertical']]: ['bottom', 'top'].includes(direction) [styles['iconText--vertical']]: ['bottom', 'top'].includes(direction),
} }
const iconComponent = svg ? <IconFont name={iconName} size={iconSize} color={color}></IconFont> : <Text className={classnames('iconfont', iconName, styles.iconfont)}></Text> const iconComponent = svg ? <IconFont name={iconName} size={iconSize} color={color}></IconFont> : <Text className={classnames('iconfont', iconName, styles.iconfont)}></Text>
const textComponent = children ? children : <Text className={classnames(props.textClassName, styles['text'])} style={textCustomStyle}>{text}</Text> const textComponent = children || <Text className={classnames(props.textClassName, styles.text)} style={textCustomStyle}>{text}</Text>
const component = ()=>{ const component = () => {
if(direction === 'left' || direction === 'top'){ if (direction === 'left' || direction === 'top') {
return <> return <>
{iconComponent} {iconComponent}
{textComponent} {textComponent}
</> </>
}else if(direction === 'right' || direction === 'bottom'){ }
else if (direction === 'right' || direction === 'bottom') {
return <> return <>
{textComponent} {textComponent}
{iconComponent} {iconComponent}
@ -44,9 +47,8 @@ const IconText: FC<PropsType> = (props) => {
} }
} }
return ( return (
<View className={classnames(styles.iconText,classNameObject, props.customStyle, props.customClass)}> <View className={classnames(styles.iconText, classNameObject, props.customStyle, props.customClass)}>
{component()} {component()}
</View> </View>
) )

View File

@ -1,45 +1,46 @@
import React, { useState, useEffect, FC } from "react"; import { Block, View } from '@tarojs/components'
import { Block, View } from "@tarojs/components"; import type { FC } from 'react'
import "./iconfont.scss"; import React, { useEffect, useState } from 'react'
import Taro from "@tarojs/taro"; import './iconfont.scss'
import classnames from "classnames"; import Taro from '@tarojs/taro'
import classnames from 'classnames'
const SystemWidth = Taro.getSystemInfoSync().windowWidth const SystemWidth = Taro.getSystemInfoSync().windowWidth
const quot = '"' const quot = '"'
function hex2rgb(hex) { function hex2rgb(hex) {
var rgb = []; const rgb = []
hex = hex.substr(1); hex = hex.substr(1)
if (hex.length === 3) { if (hex.length === 3) {
hex = hex.replace(/(.)/g, "$1$1"); hex = hex.replace(/(.)/g, '$1$1')
} }
hex.replace(/../g, function(color: string) { hex.replace(/../g, (color: string) => {
rgb.push(parseInt(color, 0x10)); rgb.push(parseInt(color, 0x10))
return color; return color
}); })
return "rgb(" + rgb.join(",") + ")"; return `rgb(${rgb.join(',')})`
} }
export type IconNames = 'icon-shangchuanwenli' | 'icon-gouwuche' | 'icon-zixun' | 'icon-dianhua' | 'icon-peibu' | 'icon-zhankai1' | 'icon-shouqi1' | 'icon-shouhou1' | 'icon-cangku1' | 'icon-saoma' | 'icon-dizhi1' | 'icon-huodaofukuan' | 'icon-yufukuan1' | 'icon-yue' | 'icon-zidingyi' | 'icon-jinetiaozheng' | 'icon-tuikuan1' | 'icon-zhankai' | 'icon-shouqi' | 'icon-lujing' | 'icon-jizhumima' | 'icon-a-jizhumima' | 'icon-weixindenglu' | 'icon-kehuxinxi' | 'icon-yewuyuanqizi' | 'icon-chakanquanbukehu' | 'icon-biyan' | 'icon-bianji' | 'icon-daikuan' | 'icon-cangku' | 'icon-guanlidingdan' | 'icon-mima' | 'icon-guanbi' | 'icon-jianshao' | 'icon-dingwei' | 'icon-saomiao' | 'icon-peihuo' | 'icon-shaixuan' | 'icon-paiming' | 'icon-shanchusousuoxinxi' | 'icon-shijian' | 'icon-sousuo' | 'icon-shouhou' | 'icon-sousuofanhui' | 'icon-sousuoshanchu' | 'icon-tuikuan' | 'icon-tishi' | 'icon-xianxiahuizong' | 'icon-xinzeng' | 'icon-yonghuming' | 'icon-yanjing' | 'icon-yufukuan' | 'icon-wodekefu' | 'icon-dizhi' | 'icon-shouhouzhongxin' | 'icon-wodeshoucang' | 'icon-shoukuanliebiao' | 'icon-madanguanli' | 'icon-qusechazhao' | 'icon-pandiansaoma' | 'icon-yaoqingma' | 'icon-duizhang' | 'icon-tihuoliebiao' | 'icon-yangpinduibi' | 'icon-yansequyang' | 'icon-fahuoliebiao' | 'icon-yuncangkucun' | 'icon-xiaoshou' | 'icon-qianzhicangkucun' | 'icon-lingquseka' | 'icon-gouwu1' | 'icon-dingdan1' | 'icon-gerenzhongxin1' | 'icon-shouye1' | 'icon-gerenzhongxin' | 'icon-dingdan' | 'icon-shouye' | 'icon-gouwu'; export type IconNames = 'icon-shangchuanwenli' | 'icon-gouwuche' | 'icon-zixun' | 'icon-dianhua' | 'icon-peibu' | 'icon-zhankai1' | 'icon-shouqi1' | 'icon-shouhou1' | 'icon-cangku1' | 'icon-saoma' | 'icon-dizhi1' | 'icon-huodaofukuan' | 'icon-yufukuan1' | 'icon-yue' | 'icon-zidingyi' | 'icon-jinetiaozheng' | 'icon-tuikuan1' | 'icon-zhankai' | 'icon-shouqi' | 'icon-lujing' | 'icon-jizhumima' | 'icon-a-jizhumima' | 'icon-weixindenglu' | 'icon-kehuxinxi' | 'icon-yewuyuanqizi' | 'icon-chakanquanbukehu' | 'icon-biyan' | 'icon-bianji' | 'icon-daikuan' | 'icon-cangku' | 'icon-guanlidingdan' | 'icon-mima' | 'icon-guanbi' | 'icon-jianshao' | 'icon-dingwei' | 'icon-saomiao' | 'icon-peihuo' | 'icon-shaixuan' | 'icon-paiming' | 'icon-shanchusousuoxinxi' | 'icon-shijian' | 'icon-sousuo' | 'icon-shouhou' | 'icon-sousuofanhui' | 'icon-sousuoshanchu' | 'icon-tuikuan' | 'icon-tishi' | 'icon-xianxiahuizong' | 'icon-xinzeng' | 'icon-yonghuming' | 'icon-yanjing' | 'icon-yufukuan' | 'icon-wodekefu' | 'icon-dizhi' | 'icon-shouhouzhongxin' | 'icon-wodeshoucang' | 'icon-shoukuanliebiao' | 'icon-madanguanli' | 'icon-qusechazhao' | 'icon-pandiansaoma' | 'icon-yaoqingma' | 'icon-duizhang' | 'icon-tihuoliebiao' | 'icon-yangpinduibi' | 'icon-yansequyang' | 'icon-fahuoliebiao' | 'icon-yuncangkucun' | 'icon-xiaoshou' | 'icon-qianzhicangkucun' | 'icon-lingquseka' | 'icon-gouwu1' | 'icon-dingdan1' | 'icon-gerenzhongxin1' | 'icon-shouye1' | 'icon-gerenzhongxin' | 'icon-dingdan' | 'icon-shouye' | 'icon-gouwu'
type PropsType = { interface PropsType {
name: IconNames; name: IconNames
size?: number; size?: number
color?: string | string[]; color?: string | string[]
customStyle?: React.CSSProperties; customStyle?: React.CSSProperties
customClassName?: string; customClassName?: string
}; }
const IconFont:FC<PropsType> = ({ const IconFont: FC<PropsType> = ({
name, name,
size = 36, size = 36,
color, color,
customStyle = {}, customStyle = {},
customClassName = "" customClassName = '',
}) => { }) => {
const [colors, setColors] = useState<PropsType['color']>() const [colors, setColors] = useState<PropsType['color']>()
const [isStr, setIsStr] = useState(true) const [isStr, setIsStr] = useState(true)
@ -49,11 +50,12 @@ const IconFont:FC<PropsType> = ({
setIsStr(typeof color === 'string') setIsStr(typeof color === 'string')
if (typeof color === 'string') { if (typeof color === 'string') {
setColors(color.indexOf('#') === 0 ? hex2rgb(color) : color) setColors(color.indexOf('#') === 0 ? hex2rgb(color) : color)
} else { }
else {
setColors( setColors(
color?.map(function (item) { color?.map((item) => {
return item.indexOf('#') === 0 ? hex2rgb(item) : item return item.indexOf('#') === 0 ? hex2rgb(item) : item
}) }),
) )
} }
return () => {} return () => {}
@ -84,238 +86,238 @@ const IconFont:FC<PropsType> = ({
)} */} )} */}
{/* icon-shangchuanwenli */} {/* icon-shangchuanwenli */}
{ name === 'icon-shangchuanwenli' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M883.2 176A28.8 28.8 0 0 1 912 204.8v261.2736a18.6368 18.6368 0 0 1-32 12.992l-27.9296-28.7232a14.4 14.4 0 0 1-4.0704-10.0352V240h-672v352l182.2336-174.6816a28.8 28.8 0 0 1 40.3712 0.512l139.9296 141.056a28.8 28.8 0 0 1 0 40.576l-6.1056 6.144a28.8256 28.8256 0 0 1-40.8832 0l-112.8832-113.7792L176 688v96h307.1872a28.8 28.8 0 0 1 28.8 28.8v6.4a28.8 28.8 0 0 1-28.8 28.8H140.8A28.8 28.8 0 0 1 112 819.2V204.8A28.8 28.8 0 0 1 140.8 176h742.4z m-118.8608 340.3136l117.1712 116.992a28.8 28.8 0 0 1 0 40.7552l-6.2848 6.272a28.8 28.8 0 0 1-40.704 0L777.6 623.488V819.2a28.8 28.8 0 0 1-28.8 28.8h-9.6A28.8 28.8 0 0 1 710.4 819.2V623.488L653.44 680.32a28.8 28.8 0 0 1-40.704 0l-6.2976-6.2848a28.8 28.8 0 0 1 0.0128-40.7552l117.1712-116.9792a28.8 28.8 0 0 1 40.704 0zM720 304c35.2 0 64 28.8 64 64s-28.8 64-64 64-64-28.8-64-64 28.8-64 64-64z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(160,160,160)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shangchuanwenli' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M883.2 176A28.8 28.8 0 0 1 912 204.8v261.2736a18.6368 18.6368 0 0 1-32 12.992l-27.9296-28.7232a14.4 14.4 0 0 1-4.0704-10.0352V240h-672v352l182.2336-174.6816a28.8 28.8 0 0 1 40.3712 0.512l139.9296 141.056a28.8 28.8 0 0 1 0 40.576l-6.1056 6.144a28.8256 28.8256 0 0 1-40.8832 0l-112.8832-113.7792L176 688v96h307.1872a28.8 28.8 0 0 1 28.8 28.8v6.4a28.8 28.8 0 0 1-28.8 28.8H140.8A28.8 28.8 0 0 1 112 819.2V204.8A28.8 28.8 0 0 1 140.8 176h742.4z m-118.8608 340.3136l117.1712 116.992a28.8 28.8 0 0 1 0 40.7552l-6.2848 6.272a28.8 28.8 0 0 1-40.704 0L777.6 623.488V819.2a28.8 28.8 0 0 1-28.8 28.8h-9.6A28.8 28.8 0 0 1 710.4 819.2V623.488L653.44 680.32a28.8 28.8 0 0 1-40.704 0l-6.2976-6.2848a28.8 28.8 0 0 1 0.0128-40.7552l117.1712-116.9792a28.8 28.8 0 0 1 40.704 0zM720 304c35.2 0 64 28.8 64 64s-28.8 64-64 64-64-28.8-64-64 28.8-64 64-64z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(160,160,160)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-gouwuche */} {/* icon-gouwuche */}
{ name === 'icon-gouwuche' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 12.510609a185.032348 185.032348 0 0 1 185.032348 185.076869v38.912h-58.457044v-38.956521c0-65.847652-50.309565-119.986087-114.554434-125.996522l-7.479653-0.489739L512 70.967652a126.619826 126.619826 0 0 0-126.619826 126.575305v38.956521H326.878609v-38.956521a185.032348 185.032348 0 0 1 175.860869-184.765218z m295.980522 224.033391c19.945739 0 36.685913 15.09287 38.733913 34.949565l69.89913 681.761392a38.956522 38.956522 0 0 1-38.733913 42.918956H146.120348a38.956522 38.956522 0 0 1-38.733913-42.918956l69.89913-681.761392a38.956522 38.956522 0 0 1 38.733913-34.949565h591.961044z m-17.630609 58.412522H233.605565l-65.892174 642.804869h688.573218l-65.892174-642.804869z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-gouwuche' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 12.510609a185.032348 185.032348 0 0 1 185.032348 185.076869v38.912h-58.457044v-38.956521c0-65.847652-50.309565-119.986087-114.554434-125.996522l-7.479653-0.489739L512 70.967652a126.619826 126.619826 0 0 0-126.619826 126.575305v38.956521H326.878609v-38.956521a185.032348 185.032348 0 0 1 175.860869-184.765218z m295.980522 224.033391c19.945739 0 36.685913 15.09287 38.733913 34.949565l69.89913 681.761392a38.956522 38.956522 0 0 1-38.733913 42.918956H146.120348a38.956522 38.956522 0 0 1-38.733913-42.918956l69.89913-681.761392a38.956522 38.956522 0 0 1 38.733913-34.949565h591.961044z m-17.630609 58.412522H233.605565l-65.892174 642.804869h688.573218l-65.892174-642.804869z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-zixun */} {/* icon-zixun */}
{ name === 'icon-zixun' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 7.261091a412.485818 412.485818 0 0 1 407.598545 349.463273l-5.585454-0.186182a107.054545 107.054545 0 0 1 107.054545 107.054545v210.850909a107.054545 107.054545 0 0 1-107.054545 107.054546h-40.401455a107.054545 107.054545 0 0 1-107.054545-107.054546V463.592727c0-53.713455 39.563636-98.210909 91.229091-105.890909a351.278545 351.278545 0 0 0-691.665455 0.093091A107.008 107.008 0 0 1 257.489455 463.592727v210.850909a107.101091 107.101091 0 0 1-84.48 104.680728 160.581818 160.581818 0 0 0 148.48 99.328h88.901818a106.123636 106.123636 0 0 1 207.592727 25.879272l0.139636 4.840728a106.077091 106.077091 0 0 1-207.732363 30.347636h-88.901818a221.882182 221.882182 0 0 1-212.526546-158.021818h1.070546a107.054545 107.054545 0 0 1-107.054546-107.054546V463.592727a107.054545 107.054545 0 0 1 101.469091-106.961454A412.532364 412.532364 0 0 1 512 7.261091z m0 856.622545a44.962909 44.962909 0 0 0-44.869818 41.751273l-0.093091 3.584a44.962909 44.962909 0 0 0 89.832727 3.211636l0.093091-3.584A44.962909 44.962909 0 0 0 512 863.883636z m412.346182-445.067636v1.489455h-61.067637v-1.489455a45.986909 45.986909 0 0 0-35.653818 44.823273v210.850909c0 25.367273 20.619636 45.940364 45.986909 45.940363h40.401455a45.986909 45.986909 0 0 0 45.986909-45.986909V463.592727a45.986909 45.986909 0 0 0-35.653818-44.776727zM64 463.592727v210.850909c0 21.829818 15.266909 40.122182 35.700364 44.823273l-0.046546-1.536h61.067637l0.046545 1.489455a45.986909 45.986909 0 0 0 35.607273-44.823273V463.592727a45.986909 45.986909 0 0 0-35.653818-44.776727v1.489455H99.653818v-1.489455a45.986909 45.986909 0 0 0-35.653818 44.823273z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-zixun' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 7.261091a412.485818 412.485818 0 0 1 407.598545 349.463273l-5.585454-0.186182a107.054545 107.054545 0 0 1 107.054545 107.054545v210.850909a107.054545 107.054545 0 0 1-107.054545 107.054546h-40.401455a107.054545 107.054545 0 0 1-107.054545-107.054546V463.592727c0-53.713455 39.563636-98.210909 91.229091-105.890909a351.278545 351.278545 0 0 0-691.665455 0.093091A107.008 107.008 0 0 1 257.489455 463.592727v210.850909a107.101091 107.101091 0 0 1-84.48 104.680728 160.581818 160.581818 0 0 0 148.48 99.328h88.901818a106.123636 106.123636 0 0 1 207.592727 25.879272l0.139636 4.840728a106.077091 106.077091 0 0 1-207.732363 30.347636h-88.901818a221.882182 221.882182 0 0 1-212.526546-158.021818h1.070546a107.054545 107.054545 0 0 1-107.054546-107.054546V463.592727a107.054545 107.054545 0 0 1 101.469091-106.961454A412.532364 412.532364 0 0 1 512 7.261091z m0 856.622545a44.962909 44.962909 0 0 0-44.869818 41.751273l-0.093091 3.584a44.962909 44.962909 0 0 0 89.832727 3.211636l0.093091-3.584A44.962909 44.962909 0 0 0 512 863.883636z m412.346182-445.067636v1.489455h-61.067637v-1.489455a45.986909 45.986909 0 0 0-35.653818 44.823273v210.850909c0 25.367273 20.619636 45.940364 45.986909 45.940363h40.401455a45.986909 45.986909 0 0 0 45.986909-45.986909V463.592727a45.986909 45.986909 0 0 0-35.653818-44.776727zM64 463.592727v210.850909c0 21.829818 15.266909 40.122182 35.700364 44.823273l-0.046546-1.536h61.067637l0.046545 1.489455a45.986909 45.986909 0 0 0 35.607273-44.823273V463.592727a45.986909 45.986909 0 0 0-35.653818-44.776727v1.489455H99.653818v-1.489455a45.986909 45.986909 0 0 0-35.653818 44.823273z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-dianhua */} {/* icon-dianhua */}
{ name === 'icon-dianhua' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M938.461867 771.925333a59.255467 59.255467 0 0 1 0 83.694934l-41.847467 41.847466c-30.9248 30.9248-71.611733 49.7664-120.9344 55.978667a293.410133 293.410133 0 0 1-36.864 2.286933c-35.84 0-74.581333-6.075733-115.541333-18.090666-111.274667-32.699733-228.2496-106.461867-329.352534-207.5648-101.102933-101.137067-174.865067-218.112-207.530666-329.352534-16.2816-55.3984-21.640533-106.7008-15.872-152.405333 6.2464-49.288533 25.088-89.975467 55.978666-120.900267l41.8816-41.847466a59.255467 59.255467 0 0 1 83.694934 0l184.149333 184.149333a59.255467 59.255467 0 0 1 0 83.694933l-41.847467 41.847467c-23.688533 23.6544-0.1024 100.352 66.9696 167.389867 67.072 67.072 143.701333 90.658133 167.389867 66.9696l41.8816-41.847467a59.255467 59.255467 0 0 1 83.694933 0l184.149334 184.149333z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-dianhua' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M938.461867 771.925333a59.255467 59.255467 0 0 1 0 83.694934l-41.847467 41.847466c-30.9248 30.9248-71.611733 49.7664-120.9344 55.978667a293.410133 293.410133 0 0 1-36.864 2.286933c-35.84 0-74.581333-6.075733-115.541333-18.090666-111.274667-32.699733-228.2496-106.461867-329.352534-207.5648-101.102933-101.137067-174.865067-218.112-207.530666-329.352534-16.2816-55.3984-21.640533-106.7008-15.872-152.405333 6.2464-49.288533 25.088-89.975467 55.978666-120.900267l41.8816-41.847466a59.255467 59.255467 0 0 1 83.694934 0l184.149333 184.149333a59.255467 59.255467 0 0 1 0 83.694933l-41.847467 41.847467c-23.688533 23.6544-0.1024 100.352 66.9696 167.389867 67.072 67.072 143.701333 90.658133 167.389867 66.9696l41.8816-41.847467a59.255467 59.255467 0 0 1 83.694933 0l184.149334 184.149333z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-peibu */} {/* icon-peibu */}
{ name === 'icon-peibu' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M336 96c77.504 0 142.144 55.12 156.864 128.288L492.8 224H832a80 80 0 0 1 80 80v544a80 80 0 0 1-80 80H384a80.16 80.16 0 0 1-19.84-2.48l1.072-0.192c-8.048 1.488-16.32 2.384-24.752 2.608L336 928h-64c-88.368 0-160-71.632-160-160V256c0-88.368 71.632-160 160-160h64z m160 191.984V768c0 35.952-11.84 69.12-31.872 95.84L464 864h368a16 16 0 0 0 15.888-14.128L848 848V304a16 16 0 0 0-14.128-15.888L832 288l-336-0.016zM336 672h-64a96 96 0 0 0-3.6 191.936L272 864h64a96 96 0 0 0 3.6-191.936L336 672z m0-512h-64a96 96 0 0 0-95.936 92.4L176 256v384a159.296 159.296 0 0 1 96-32h64c36.032 0 69.28 11.904 96 32V256a96 96 0 0 0-92.4-95.936L336 160z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-peibu' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M336 96c77.504 0 142.144 55.12 156.864 128.288L492.8 224H832a80 80 0 0 1 80 80v544a80 80 0 0 1-80 80H384a80.16 80.16 0 0 1-19.84-2.48l1.072-0.192c-8.048 1.488-16.32 2.384-24.752 2.608L336 928h-64c-88.368 0-160-71.632-160-160V256c0-88.368 71.632-160 160-160h64z m160 191.984V768c0 35.952-11.84 69.12-31.872 95.84L464 864h368a16 16 0 0 0 15.888-14.128L848 848V304a16 16 0 0 0-14.128-15.888L832 288l-336-0.016zM336 672h-64a96 96 0 0 0-3.6 191.936L272 864h64a96 96 0 0 0 3.6-191.936L336 672z m0-512h-64a96 96 0 0 0-95.936 92.4L176 256v384a159.296 159.296 0 0 1 96-32h64c36.032 0 69.28 11.904 96 32V256a96 96 0 0 0-92.4-95.936L336 160z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-zhankai1 */} {/* icon-zhankai1 */}
{ name === 'icon-zhankai1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1489 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M744.727273 954.181818L1442.909091 46.545455H46.545455z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(51,51,51)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-zhankai1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1489 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M744.727273 954.181818L1442.909091 46.545455H46.545455z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(51,51,51)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shouqi1 */} {/* icon-shouqi1 */}
{ name === 'icon-shouqi1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1489 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M744.727273 69.818182l698.181818 907.636363H46.545455z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(51,51,51)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shouqi1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1489 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M744.727273 69.818182l698.181818 907.636363H46.545455z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(51,51,51)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shouhou1 */} {/* icon-shouhou1 */}
{ name === 'icon-shouhou1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M563.584 256C694.144 256 800 361.84 800 492.416v23.168C800 646.144 694.16 752 563.584 752H256l72.64-65.92A235.728 235.728 0 0 1 256 515.6v-23.168C256 361.856 361.84 256 492.416 256h71.168z m-109.76 198.4a49.52 49.52 0 0 0-49.456 49.6c0 27.392 22.144 49.6 49.44 49.6a49.52 49.52 0 0 0 49.472-49.6c0-27.392-22.144-49.6-49.456-49.6z m148.352 0a49.52 49.52 0 0 0-49.44 49.6c0 27.392 22.128 49.6 49.44 49.6a49.52 49.52 0 0 0 49.456-49.6c0-27.392-22.144-49.6-49.44-49.6z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' opacity='.95' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shouhou1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M563.584 256C694.144 256 800 361.84 800 492.416v23.168C800 646.144 694.16 752 563.584 752H256l72.64-65.92A235.728 235.728 0 0 1 256 515.6v-23.168C256 361.856 361.84 256 492.416 256h71.168z m-109.76 198.4a49.52 49.52 0 0 0-49.456 49.6c0 27.392 22.144 49.6 49.44 49.6a49.52 49.52 0 0 0 49.472-49.6c0-27.392-22.144-49.6-49.456-49.6z m148.352 0a49.52 49.52 0 0 0-49.44 49.6c0 27.392 22.128 49.6 49.44 49.6a49.52 49.52 0 0 0 49.456-49.6c0-27.392-22.144-49.6-49.44-49.6z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' opacity='.95' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-cangku1 */} {/* icon-cangku1 */}
{ name === 'icon-cangku1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M565.6 251.968l2.96 2.64 2.432 2.352 231.664 233.248c11.632 11.712 11.68 27.536 3.952 43.904a20 20 0 0 1-16 11.344l-2.08 0.112H754.4V738.56a43.424 43.424 0 0 1-38.56 43.152l-2.72 0.224-2.096 0.048H313.2a43.408 43.408 0 0 1-43.312-40.784l-0.08-2.64-0.016-193.024h-34.032a20 20 0 0 1-16.208-8.256l-1.152-1.792-0.752-1.456c-7.024-14.992-8.176-28.96 0.24-41.056l1.824-2.4 1.792-1.936 230.368-231.952a83.824 83.824 0 0 1 113.712-4.736zM576.976 592h-129.984a25.008 25.008 0 0 0 0 50h130a25.008 25.008 0 0 0 0-50z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-cangku1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M565.6 251.968l2.96 2.64 2.432 2.352 231.664 233.248c11.632 11.712 11.68 27.536 3.952 43.904a20 20 0 0 1-16 11.344l-2.08 0.112H754.4V738.56a43.424 43.424 0 0 1-38.56 43.152l-2.72 0.224-2.096 0.048H313.2a43.408 43.408 0 0 1-43.312-40.784l-0.08-2.64-0.016-193.024h-34.032a20 20 0 0 1-16.208-8.256l-1.152-1.792-0.752-1.456c-7.024-14.992-8.176-28.96 0.24-41.056l1.824-2.4 1.792-1.936 230.368-231.952a83.824 83.824 0 0 1 113.712-4.736zM576.976 592h-129.984a25.008 25.008 0 0 0 0 50h130a25.008 25.008 0 0 0 0-50z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-saoma */} {/* icon-saoma */}
{ name === 'icon-saoma' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(89,102,247)'}' /%3E%3Cpath d='M302 592v130h129.984l0.016 40h-150c-11.04 0-20-8.96-20-20V592h40z m460 0v150c0 11.04-8.96 20-20 20H592v-40h130V592h40z m0-100v40h-500v-40h500z m-20-230c11.04 0 20 8.96 20 20V432h-40v-130H592v-40h150z m-310 0v40h-130V432h-40v-150c0-11.04 8.96-20 20-20H432z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-saoma' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(89,102,247)'}' /%3E%3Cpath d='M302 592v130h129.984l0.016 40h-150c-11.04 0-20-8.96-20-20V592h40z m460 0v150c0 11.04-8.96 20-20 20H592v-40h130V592h40z m0-100v40h-500v-40h500z m-20-230c11.04 0 20 8.96 20 20V432h-40v-130H592v-40h150z m-310 0v40h-130V432h-40v-150c0-11.04 8.96-20 20-20H432z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-dizhi1 */} {/* icon-dizhi1 */}
{ name === 'icon-dizhi1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M512 222c127.04 0 230 102.976 230 230 0 51.2-25.28 110.896-75.328 180.928l-3.536 4.896-3.648 4.976-6.512 8.704-6.816 8.912-7.04 8.96-7.28 9.056-7.52 9.152-7.728 9.216-4.016 4.736-10.176 11.744-2.128 2.432-8.512 9.584-8.736 9.696-9.008 9.792-9.232 9.92-9.488 10.016-9.28 9.648-19.232 21.12a20 20 0 0 1-28.4 1.168l-1.168-1.184-18.88-20.72-9.728-10.144-9.488-10.016-9.248-9.92-8.992-9.808-8.72-9.648-4.32-4.864-8.4-9.536-10.08-11.712-9.808-11.68-7.52-9.168-7.296-9.056-6.992-8.928-3.44-4.448-3.392-4.464-6.48-8.656c-54.768-74.24-82.432-137.12-82.432-190.704 0-127.04 102.976-230 230-230z m0 140a90 90 0 1 0 0 180 90 90 0 0 0 0-180z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-dizhi1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M512 222c127.04 0 230 102.976 230 230 0 51.2-25.28 110.896-75.328 180.928l-3.536 4.896-3.648 4.976-6.512 8.704-6.816 8.912-7.04 8.96-7.28 9.056-7.52 9.152-7.728 9.216-4.016 4.736-10.176 11.744-2.128 2.432-8.512 9.584-8.736 9.696-9.008 9.792-9.232 9.92-9.488 10.016-9.28 9.648-19.232 21.12a20 20 0 0 1-28.4 1.168l-1.168-1.184-18.88-20.72-9.728-10.144-9.488-10.016-9.248-9.92-8.992-9.808-8.72-9.648-4.32-4.864-8.4-9.536-10.08-11.712-9.808-11.68-7.52-9.168-7.296-9.056-6.992-8.928-3.44-4.448-3.392-4.464-6.48-8.656c-54.768-74.24-82.432-137.12-82.432-190.704 0-127.04 102.976-230 230-230z m0 140a90 90 0 1 0 0 180 90 90 0 0 0 0-180z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-huodaofukuan */} {/* icon-huodaofukuan */}
{ name === 'icon-huodaofukuan' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M224 400m32 0l512 0q32 0 32 32l0 304q0 32-32 32l-512 0q-32 0-32-32l0-304q0-32 32-32Z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3Cpath d='M320.48 240h383.04a32 32 0 0 1 26.048 13.408l52.368 73.28A16 16 0 0 1 768.912 352H255.088a16 16 0 0 1-13.024-25.296l52.368-73.296A32 32 0 0 1 320.464 240z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(255,255,255)'}' /%3E%3Cpath d='M461.728 485.008l1.36 1.248L512 535.168l48.912-48.912a21.328 21.328 0 0 1 31.424 28.8l-1.248 1.36L563.488 544h23.184a21.328 21.328 0 0 1 0 42.672l-53.344-0.016v32h53.344a21.328 21.328 0 1 1 0 42.672h-53.344v21.344a21.328 21.328 0 1 1-42.656 0l-0.016-21.344h-53.328a21.328 21.328 0 1 1 0-42.656l53.328-0.016v-32h-53.328a21.328 21.328 0 0 1 0-42.656h23.168l-27.584-27.584a21.328 21.328 0 0 1 28.816-31.408z' fill='${(isStr ? colors : colors?.[3]) || 'rgb(74,127,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-huodaofukuan' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M224 400m32 0l512 0q32 0 32 32l0 304q0 32-32 32l-512 0q-32 0-32-32l0-304q0-32 32-32Z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3Cpath d='M320.48 240h383.04a32 32 0 0 1 26.048 13.408l52.368 73.28A16 16 0 0 1 768.912 352H255.088a16 16 0 0 1-13.024-25.296l52.368-73.296A32 32 0 0 1 320.464 240z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(255,255,255)'}' /%3E%3Cpath d='M461.728 485.008l1.36 1.248L512 535.168l48.912-48.912a21.328 21.328 0 0 1 31.424 28.8l-1.248 1.36L563.488 544h23.184a21.328 21.328 0 0 1 0 42.672l-53.344-0.016v32h53.344a21.328 21.328 0 1 1 0 42.672h-53.344v21.344a21.328 21.328 0 1 1-42.656 0l-0.016-21.344h-53.328a21.328 21.328 0 1 1 0-42.656l53.328-0.016v-32h-53.328a21.328 21.328 0 0 1 0-42.656h23.168l-27.584-27.584a21.328 21.328 0 0 1 28.816-31.408z' fill='${(isStr ? colors : colors?.[3]) || 'rgb(74,127,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-yufukuan1 */} {/* icon-yufukuan1 */}
{ name === 'icon-yufukuan1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M762 422c11.04 0 20 8.96 20 20v300c0 11.04-8.96 20-20 20h-500c-11.04 0-20-8.96-20-20v-300c0-11.04 8.96-20 20-20h500zM512 622H352a10 10 0 0 0-10 10v20c0 5.52 4.48 10 10 10h160c5.52 0 10-4.48 10-10V632a10 10 0 0 0-10-10z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3Cpath d='M404.96 223.872l322.384 119.36a20 20 0 0 1-6.944 38.768H325.392a20 20 0 0 1-17.632-29.44l63.04-117.792c5.808-10.848 21.12-15.728 34.16-10.896z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(255,255,255)'}' opacity='.7' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-yufukuan1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M762 422c11.04 0 20 8.96 20 20v300c0 11.04-8.96 20-20 20h-500c-11.04 0-20-8.96-20-20v-300c0-11.04 8.96-20 20-20h500zM512 622H352a10 10 0 0 0-10 10v20c0 5.52 4.48 10 10 10h160c5.52 0 10-4.48 10-10V632a10 10 0 0 0-10-10z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3Cpath d='M404.96 223.872l322.384 119.36a20 20 0 0 1-6.944 38.768H325.392a20 20 0 0 1-17.632-29.44l63.04-117.792c5.808-10.848 21.12-15.728 34.16-10.896z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(255,255,255)'}' opacity='.7' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-yue */} {/* icon-yue */}
{ name === 'icon-yue' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(252,168,70)'}' /%3E%3Cpath d='M772 402c5.52 0 10 4.48 10 10V752c0 5.52-4.48 10-10 10H252A10 10 0 0 1 242 752V412c0-5.52 4.48-10 10-10h520z m-185.856 85.856a20 20 0 0 0-28.288 0L512 533.728l-45.856-45.872-1.28-1.168a20 20 0 0 0-27.008 29.44l25.872 25.872h-21.728a20 20 0 0 0 0 40h50v30h-50a20 20 0 0 0 0 40h50V672a20 20 0 0 0 40 0v-20h50a20 20 0 0 0 0-40H532v-30h50a20 20 0 0 0 0-40h-21.744l25.888-25.856 1.168-1.28a20 20 0 0 0-1.168-27.008z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3Cpath d='M262 292m10 0l480 0q10 0 10 10l0 40q0 10-10 10l-480 0q-10 0-10-10l0-40q0-10 10-10Z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-yue' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(252,168,70)'}' /%3E%3Cpath d='M772 402c5.52 0 10 4.48 10 10V752c0 5.52-4.48 10-10 10H252A10 10 0 0 1 242 752V412c0-5.52 4.48-10 10-10h520z m-185.856 85.856a20 20 0 0 0-28.288 0L512 533.728l-45.856-45.872-1.28-1.168a20 20 0 0 0-27.008 29.44l25.872 25.872h-21.728a20 20 0 0 0 0 40h50v30h-50a20 20 0 0 0 0 40h50V672a20 20 0 0 0 40 0v-20h50a20 20 0 0 0 0-40H532v-30h50a20 20 0 0 0 0-40h-21.744l25.888-25.856 1.168-1.28a20 20 0 0 0-1.168-27.008z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3Cpath d='M262 292m10 0l480 0q10 0 10 10l0 40q0 10-10 10l-480 0q-10 0-10-10l0-40q0-10 10-10Z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-zidingyi */} {/* icon-zidingyi */}
{ name === 'icon-zidingyi' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M497.12 695.84l-115.824 60.88a32 32 0 0 1-46.432-33.744l22.128-128.96a32 32 0 0 0-9.216-28.32l-93.68-91.328a32 32 0 0 1 17.728-54.576l129.488-18.816a32 32 0 0 0 24.08-17.504l57.92-117.328a32 32 0 0 1 57.376 0l57.92 117.328a32 32 0 0 0 24.08 17.504l129.488 18.816a32 32 0 0 1 17.728 54.576l-93.68 91.328a32 32 0 0 0-9.216 28.32l22.128 128.96a32 32 0 0 1-46.432 33.744l-115.808-60.896a32 32 0 0 0-29.792 0z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-zidingyi' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M497.12 695.84l-115.824 60.88a32 32 0 0 1-46.432-33.744l22.128-128.96a32 32 0 0 0-9.216-28.32l-93.68-91.328a32 32 0 0 1 17.728-54.576l129.488-18.816a32 32 0 0 0 24.08-17.504l57.92-117.328a32 32 0 0 1 57.376 0l57.92 117.328a32 32 0 0 0 24.08 17.504l129.488 18.816a32 32 0 0 1 17.728 54.576l-93.68 91.328a32 32 0 0 0-9.216 28.32l22.128 128.96a32 32 0 0 1-46.432 33.744l-115.808-60.896a32 32 0 0 0-29.792 0z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-jinetiaozheng */} {/* icon-jinetiaozheng */}
{ name === 'icon-jinetiaozheng' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M768 304a32 32 0 0 1 32 32v352a32 32 0 0 1-32 32H256a32 32 0 0 1-32-32V336a32 32 0 0 1 32-32h512z m-309.856 119.856a20 20 0 0 0-28.288 0L384 469.728l-45.856-45.872-1.28-1.168a20 20 0 0 0-27.008 29.44l25.872 25.872h-21.728a20 20 0 0 0 0 40h50v30h-50a20 20 0 0 0 0 40h50V608a20 20 0 0 0 40 0v-20h50a20 20 0 0 0 0-40H404v-30h50a20 20 0 0 0 0-40h-21.744l25.888-25.856 1.168-1.28a20 20 0 0 0-1.168-27.008zM560 448h160a16 16 0 0 1 16 16v16a16 16 0 0 1-16 16H560a16 16 0 0 1-16-16v-16a16 16 0 0 1 16-16z m0 112h160a16 16 0 0 1 16 16v16a16 16 0 0 1-16 16H560a16 16 0 0 1-16-16v-16a16 16 0 0 1 16-16z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-jinetiaozheng' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M768 304a32 32 0 0 1 32 32v352a32 32 0 0 1-32 32H256a32 32 0 0 1-32-32V336a32 32 0 0 1 32-32h512z m-309.856 119.856a20 20 0 0 0-28.288 0L384 469.728l-45.856-45.872-1.28-1.168a20 20 0 0 0-27.008 29.44l25.872 25.872h-21.728a20 20 0 0 0 0 40h50v30h-50a20 20 0 0 0 0 40h50V608a20 20 0 0 0 40 0v-20h50a20 20 0 0 0 0-40H404v-30h50a20 20 0 0 0 0-40h-21.744l25.888-25.856 1.168-1.28a20 20 0 0 0-1.168-27.008zM560 448h160a16 16 0 0 1 16 16v16a16 16 0 0 1-16 16H560a16 16 0 0 1-16-16v-16a16 16 0 0 1 16-16z m0 112h160a16 16 0 0 1 16 16v16a16 16 0 0 1-16 16H560a16 16 0 0 1-16-16v-16a16 16 0 0 1 16-16z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-tuikuan1 */} {/* icon-tuikuan1 */}
{ name === 'icon-tuikuan1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M752 416a32 32 0 0 1 32 32v288a32 32 0 0 1-32 32H272a32 32 0 0 1-32-32V448a32 32 0 0 1 32-32h480z m-165.856 87.856a20 20 0 0 0-28.288 0L512 549.728l-45.856-45.872-1.28-1.168a20 20 0 0 0-27.008 29.44l25.872 25.872h-21.728a20 20 0 0 0 0 40h50v30h-50a20 20 0 0 0 0 40h50V688a20 20 0 1 0 40 0v-20h50a20 20 0 1 0 0-40H532v-30h50a20 20 0 1 0 0-40h-21.744l25.888-25.856 1.168-1.28a20 20 0 0 0-1.168-27.008z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3Cpath d='M354.128 253.168a24 24 0 0 1 31.6 36.048l-1.856 1.616-26.816 21.168H720a24 24 0 0 1 23.888 21.696L744 336a24 24 0 0 1-21.696 23.888L720 360H288c-22.032 0-32.08-26.896-16.528-41.424l1.648-1.408 81.008-64z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-tuikuan1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(74,127,255)'}' /%3E%3Cpath d='M752 416a32 32 0 0 1 32 32v288a32 32 0 0 1-32 32H272a32 32 0 0 1-32-32V448a32 32 0 0 1 32-32h480z m-165.856 87.856a20 20 0 0 0-28.288 0L512 549.728l-45.856-45.872-1.28-1.168a20 20 0 0 0-27.008 29.44l25.872 25.872h-21.728a20 20 0 0 0 0 40h50v30h-50a20 20 0 0 0 0 40h50V688a20 20 0 1 0 40 0v-20h50a20 20 0 1 0 0-40H532v-30h50a20 20 0 1 0 0-40h-21.744l25.888-25.856 1.168-1.28a20 20 0 0 0-1.168-27.008z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3Cpath d='M354.128 253.168a24 24 0 0 1 31.6 36.048l-1.856 1.616-26.816 21.168H720a24 24 0 0 1 23.888 21.696L744 336a24 24 0 0 1-21.696 23.888L720 360H288c-22.032 0-32.08-26.896-16.528-41.424l1.648-1.408 81.008-64z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-zhankai */} {/* icon-zhankai */}
{ name === 'icon-zhankai' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M492.586667 668.138667c9.962667 9.941333 25.642667 10.666667 36.416 2.133333l2.389333-2.133333 232.746667-232.746667a27.434667 27.434667 0 0 0-36.394667-40.917333l-2.389333 2.133333-213.397334 213.333333-213.312-213.333333a27.434667 27.434667 0 0 0-36.394666-2.133333l-2.389334 2.133333a27.434667 27.434667 0 0 0-2.133333 36.394667l2.133333 2.389333 232.746667 232.746667z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' opacity='.8' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-zhankai' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M492.586667 668.138667c9.962667 9.941333 25.642667 10.666667 36.416 2.133333l2.389333-2.133333 232.746667-232.746667a27.434667 27.434667 0 0 0-36.394667-40.917333l-2.389333 2.133333-213.397334 213.333333-213.312-213.333333a27.434667 27.434667 0 0 0-36.394666-2.133333l-2.389334 2.133333a27.434667 27.434667 0 0 0-2.133333 36.394667l2.133333 2.389333 232.746667 232.746667z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' opacity='.8' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shouqi */} {/* icon-shouqi */}
{ name === 'icon-shouqi' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M492.586667 355.861333a27.434667 27.434667 0 0 1 36.416-2.133333l2.389333 2.133333 232.746667 232.746667a27.434667 27.434667 0 0 1-36.394667 40.917333l-2.389333-2.133333-213.397334-213.333333-213.312 213.333333c-9.941333 9.941333-25.621333 10.666667-36.394666 2.133333l-2.389334-2.133333a27.434667 27.434667 0 0 1-2.133333-36.394667l2.133333-2.389333 232.746667-232.746667z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' opacity='.8' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shouqi' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M492.586667 355.861333a27.434667 27.434667 0 0 1 36.416-2.133333l2.389333 2.133333 232.746667 232.746667a27.434667 27.434667 0 0 1-36.394667 40.917333l-2.389333-2.133333-213.397334-213.333333-213.312 213.333333c-9.941333 9.941333-25.621333 10.666667-36.394666 2.133333l-2.389334-2.133333a27.434667 27.434667 0 0 1-2.133333-36.394667l2.133333-2.389333 232.746667-232.746667z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' opacity='.8' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-lujing */} {/* icon-lujing */}
{ name === 'icon-lujing' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1450 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M495.06688 1024a44.672 44.672 0 0 1-31.786667-13.653333L12.080213 549.461333a48.298667 48.298667 0 0 1 0.938667-64.938666 44.373333 44.373333 0 0 1 62.72-2.133334l419.328 428.373334L1375.877547 11.093333a44.330667 44.330667 0 0 1 61.696 2.944c16.682667 17.493333 17.493333 45.354667 1.962666 63.914667l-912.64 931.669333c-8.362667 8.96-19.797333 14.122667-31.829333 14.378667z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(64,92,135)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-lujing' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1450 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M495.06688 1024a44.672 44.672 0 0 1-31.786667-13.653333L12.080213 549.461333a48.298667 48.298667 0 0 1 0.938667-64.938666 44.373333 44.373333 0 0 1 62.72-2.133334l419.328 428.373334L1375.877547 11.093333a44.330667 44.330667 0 0 1 61.696 2.944c16.682667 17.493333 17.493333 45.354667 1.962666 63.914667l-912.64 931.669333c-8.362667 8.96-19.797333 14.122667-31.829333 14.378667z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(64,92,135)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-jizhumima */} {/* icon-jizhumima */}
{ name === 'icon-jizhumima' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M36.571429 36.571429m146.285714 0l658.285714 0q146.285714 0 146.285714 146.285714l0 658.285714q0 146.285714-146.285714 146.285714l-658.285714 0q-146.285714 0-146.285714-146.285714l0-658.285714q0-146.285714 146.285714-146.285714Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(51,127,255)'}' /%3E%3Cpath d='M722.358857 262.144a54.857143 54.857143 0 0 1 93.988572 56.32l-2.706286 4.534857-292.571429 438.857143a54.857143 54.857143 0 0 1-80.457143 11.995429l-3.986285-3.657143-219.428572-219.428572a54.857143 54.857143 0 0 1 73.435429-81.334857l4.169143 3.766857 172.068571 172.105143 255.488-383.158857z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-jizhumima' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M36.571429 36.571429m146.285714 0l658.285714 0q146.285714 0 146.285714 146.285714l0 658.285714q0 146.285714-146.285714 146.285714l-658.285714 0q-146.285714 0-146.285714-146.285714l0-658.285714q0-146.285714 146.285714-146.285714Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(51,127,255)'}' /%3E%3Cpath d='M722.358857 262.144a54.857143 54.857143 0 0 1 93.988572 56.32l-2.706286 4.534857-292.571429 438.857143a54.857143 54.857143 0 0 1-80.457143 11.995429l-3.986285-3.657143-219.428572-219.428572a54.857143 54.857143 0 0 1 73.435429-81.334857l4.169143 3.766857 172.068571 172.105143 255.488-383.158857z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-a-jizhumima */} {/* icon-a-jizhumima */}
{ name === 'icon-a-jizhumima' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1152 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M944.128 74.752a96 96 0 0 1 164.48 98.56l-4.736 7.936-512 768a96 96 0 0 1-140.8 20.992l-6.976-6.4-384-384a96 96 0 0 1 128.512-142.336l7.296 6.592 301.12 301.184 447.104-670.528z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-a-jizhumima' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1152 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M944.128 74.752a96 96 0 0 1 164.48 98.56l-4.736 7.936-512 768a96 96 0 0 1-140.8 20.992l-6.976-6.4-384-384a96 96 0 0 1 128.512-142.336l7.296 6.592 301.12 301.184 447.104-670.528z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-weixindenglu */} {/* icon-weixindenglu */}
{ name === 'icon-weixindenglu' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(11,189,99)'}' opacity='.9' /%3E%3Cpath d='M622.677333 425.102222c7.210667 0 14.279111 0.540444 21.404445 1.336889C624.910222 336.782222 529.521778 270.222222 420.593778 270.222222 298.851556 270.222222 199.111111 353.536 199.111111 459.377778c0 61.084444 33.166222 111.246222 88.618667 150.215111l-22.129778 66.887111 77.44-38.968889c27.690667 5.461333 49.905778 11.121778 77.553778 11.121778 6.968889 0 13.852444-0.312889 20.650666-0.824889a167.409778 167.409778 0 0 1-6.840888-46.648889c0.042667-97.194667 83.114667-176.071111 188.273777-176.071111z m-119.04-60.302222c16.739556 0 27.733333 11.036444 27.733334 27.776 0 16.654222-11.008 27.804444-27.733334 27.804444-16.554667 0-33.208889-11.150222-33.208889-27.804444 0-16.782222 16.625778-27.776 33.208889-27.776z m-155.008 55.580444c-16.611556 0-33.351111-11.150222-33.351111-27.804444 0-16.739556 16.739556-27.776 33.351111-27.776 16.625778 0 27.662222 11.008 27.662223 27.776 0 16.654222-11.036444 27.804444-27.662223 27.804444zM824.888889 598.471111c0-88.917333-88.618667-161.393778-188.16-161.393778-105.415111 0-188.359111 72.504889-188.359111 161.393778 0 89.173333 82.986667 161.408 188.359111 161.408 22.044444 0 44.316444-5.546667 66.446222-11.121778L763.904 782.222222l-16.64-55.608889C791.708444 693.048889 824.888889 648.618667 824.888889 598.471111z m-249.258667-27.847111c-10.993778 0-22.129778-10.993778-22.129778-22.229333 0-11.079111 11.136-22.229333 22.129778-22.229334 16.824889 0 27.733333 11.150222 27.733334 22.229334 0 11.235556-10.908444 22.229333-27.733334 22.229333z m121.841778 0c-10.922667 0-22.030222-10.993778-22.030222-22.229333 0-11.079111 11.064889-22.229333 22.016-22.229334 16.668444 0 27.733333 11.150222 27.733333 22.229334 0 11.235556-11.064889 22.229333-27.733333 22.229333z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-weixindenglu' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 512m-512 0a512 512 0 1 0 1024 0 512 512 0 1 0-1024 0Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(11,189,99)'}' opacity='.9' /%3E%3Cpath d='M622.677333 425.102222c7.210667 0 14.279111 0.540444 21.404445 1.336889C624.910222 336.782222 529.521778 270.222222 420.593778 270.222222 298.851556 270.222222 199.111111 353.536 199.111111 459.377778c0 61.084444 33.166222 111.246222 88.618667 150.215111l-22.129778 66.887111 77.44-38.968889c27.690667 5.461333 49.905778 11.121778 77.553778 11.121778 6.968889 0 13.852444-0.312889 20.650666-0.824889a167.409778 167.409778 0 0 1-6.840888-46.648889c0.042667-97.194667 83.114667-176.071111 188.273777-176.071111z m-119.04-60.302222c16.739556 0 27.733333 11.036444 27.733334 27.776 0 16.654222-11.008 27.804444-27.733334 27.804444-16.554667 0-33.208889-11.150222-33.208889-27.804444 0-16.782222 16.625778-27.776 33.208889-27.776z m-155.008 55.580444c-16.611556 0-33.351111-11.150222-33.351111-27.804444 0-16.739556 16.739556-27.776 33.351111-27.776 16.625778 0 27.662222 11.008 27.662223 27.776 0 16.654222-11.036444 27.804444-27.662223 27.804444zM824.888889 598.471111c0-88.917333-88.618667-161.393778-188.16-161.393778-105.415111 0-188.359111 72.504889-188.359111 161.393778 0 89.173333 82.986667 161.408 188.359111 161.408 22.044444 0 44.316444-5.546667 66.446222-11.121778L763.904 782.222222l-16.64-55.608889C791.708444 693.048889 824.888889 648.618667 824.888889 598.471111z m-249.258667-27.847111c-10.993778 0-22.129778-10.993778-22.129778-22.229333 0-11.079111 11.136-22.229333 22.129778-22.229334 16.824889 0 27.733333 11.150222 27.733334 22.229334 0 11.235556-10.908444 22.229333-27.733334 22.229333z m121.841778 0c-10.922667 0-22.030222-10.993778-22.030222-22.229333 0-11.079111 11.064889-22.229333 22.016-22.229334 16.668444 0 27.733333 11.150222 27.733333 22.229334 0 11.235556-11.064889 22.229333-27.733333 22.229333z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(255,255,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-kehuxinxi */} {/* icon-kehuxinxi */}
{ name === 'icon-kehuxinxi' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M611.008 136c105.744 0 191.472 86.496 191.472 193.2 0 84.128-53.296 155.696-127.68 182.208C828.192 539.68 944 667.856 944 821.76a70.24 70.24 0 0 1-70.24 70.256l-78.624 0.016a81.664 81.664 0 0 0 4.864-27.84c0-166.08-107.52-306.464-255.248-352.336l0.192-0.016-0.48-0.08a350.88 350.88 0 0 0-34.592-8.8l2.48 0.512-2.24-0.608c89.92-29.44 154.88-114.064 154.88-213.856 0-59.04-22.72-112.752-59.92-152.896 1.952-0.064 3.936-0.096 5.92-0.096z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.5' /%3E%3Cpath d='M440 64c124.272 0 225.008 100.736 225.008 225.008 0 99.872-65.088 184.544-155.136 213.92C675.248 536.224 800 685.28 800 864.192a81.824 81.824 0 0 1-81.824 81.824H161.824a81.824 81.824 0 0 1-81.76-78.352L80 864.16c0-178.88 124.752-327.984 290.128-361.248-90.048-29.376-155.12-114.048-155.12-213.92C215.008 164.736 315.728 64 440 64z m-0.096 442.416l-48.16 233.952c-1.072 5.184 0.208 10.592 3.488 14.752l30.528 38.8a18 18 0 0 0 28.288 0l30.544-38.8c3.264-4.16 4.544-9.568 3.472-14.752l-48.16-233.952z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-kehuxinxi' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M611.008 136c105.744 0 191.472 86.496 191.472 193.2 0 84.128-53.296 155.696-127.68 182.208C828.192 539.68 944 667.856 944 821.76a70.24 70.24 0 0 1-70.24 70.256l-78.624 0.016a81.664 81.664 0 0 0 4.864-27.84c0-166.08-107.52-306.464-255.248-352.336l0.192-0.016-0.48-0.08a350.88 350.88 0 0 0-34.592-8.8l2.48 0.512-2.24-0.608c89.92-29.44 154.88-114.064 154.88-213.856 0-59.04-22.72-112.752-59.92-152.896 1.952-0.064 3.936-0.096 5.92-0.096z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.5' /%3E%3Cpath d='M440 64c124.272 0 225.008 100.736 225.008 225.008 0 99.872-65.088 184.544-155.136 213.92C675.248 536.224 800 685.28 800 864.192a81.824 81.824 0 0 1-81.824 81.824H161.824a81.824 81.824 0 0 1-81.76-78.352L80 864.16c0-178.88 124.752-327.984 290.128-361.248-90.048-29.376-155.12-114.048-155.12-213.92C215.008 164.736 315.728 64 440 64z m-0.096 442.416l-48.16 233.952c-1.072 5.184 0.208 10.592 3.488 14.752l30.528 38.8a18 18 0 0 0 28.288 0l30.544-38.8c3.264-4.16 4.544-9.568 3.472-14.752l-48.16-233.952z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-yewuyuanqizi */} {/* icon-yewuyuanqizi */}
{ name === 'icon-yewuyuanqizi' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M597.333333 256h213.333334v384h-298.666667l-42.666667-85.333333H298.666667v298.666666H213.333333V170.666667h341.333334l42.666666 85.333333z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(246,249,252)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-yewuyuanqizi' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M597.333333 256h213.333334v384h-298.666667l-42.666667-85.333333H298.666667v298.666666H213.333333V170.666667h341.333334l42.666666 85.333333z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(246,249,252)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-chakanquanbukehu */} {/* icon-chakanquanbukehu */}
{ name === 'icon-chakanquanbukehu' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M668.16 492.608c9.92 9.92 10.624 25.6 2.112 36.384l-2.144 2.4-232.736 232.736a27.424 27.424 0 0 1-40.928-36.384l2.144-2.4 213.344-213.376-213.344-213.312a27.424 27.424 0 0 1-2.144-36.384l2.144-2.4a27.424 27.424 0 0 1 36.384-2.144l2.4 2.144 232.736 232.736z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-chakanquanbukehu' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M668.16 492.608c9.92 9.92 10.624 25.6 2.112 36.384l-2.144 2.4-232.736 232.736a27.424 27.424 0 0 1-40.928-36.384l2.144-2.4 213.344-213.376-213.344-213.312a27.424 27.424 0 0 1-2.144-36.384l2.144-2.4a27.424 27.424 0 0 1 36.384-2.144l2.4 2.144 232.736 232.736z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-biyan */} {/* icon-biyan */}
{ name === 'icon-biyan' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M504 384.24l166.4-166.4a96 96 0 0 1 143.504 127.04c41.616 38.096 83.136 84.176 124.528 138.24l0.048-0.048a48 48 0 0 1 0.272 57.968C800.848 724.352 658.912 816 512.944 816c-46.832 0-93.792-9.44-140.896-28.288l90.224-90.208c15.856 4.24 32.528 6.496 49.728 6.496 106.032 0 192-85.968 192-192 0-17.2-2.256-33.872-6.496-49.728l-57.76 57.728-0.32 4.08a128.032 128.032 0 0 1-119.424 115.68l-166.4 166.4a96 96 0 0 1-146.4-123.136l-0.288 0.4c-44.8-38.56-89.744-85.552-134.8-140.976a48 48 0 0 1 0.272-60.8C223.296 299.232 370.144 208 512.944 208c46.304 0 92.48 9.6 138.496 28.784l-89.712 89.712A192.256 192.256 0 0 0 512 320c-106.032 0-192 85.968-192 192 0 17.2 2.256 33.872 6.496 49.728l57.76-57.728a128.016 128.016 0 0 1 119.744-119.76z m213.68-123.008l-2.032 1.872-452.544 452.544a32 32 0 0 0 43.2 47.12l2.048-1.872 452.544-452.544a32 32 0 0 0-43.2-47.12z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-biyan' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M504 384.24l166.4-166.4a96 96 0 0 1 143.504 127.04c41.616 38.096 83.136 84.176 124.528 138.24l0.048-0.048a48 48 0 0 1 0.272 57.968C800.848 724.352 658.912 816 512.944 816c-46.832 0-93.792-9.44-140.896-28.288l90.224-90.208c15.856 4.24 32.528 6.496 49.728 6.496 106.032 0 192-85.968 192-192 0-17.2-2.256-33.872-6.496-49.728l-57.76 57.728-0.32 4.08a128.032 128.032 0 0 1-119.424 115.68l-166.4 166.4a96 96 0 0 1-146.4-123.136l-0.288 0.4c-44.8-38.56-89.744-85.552-134.8-140.976a48 48 0 0 1 0.272-60.8C223.296 299.232 370.144 208 512.944 208c46.304 0 92.48 9.6 138.496 28.784l-89.712 89.712A192.256 192.256 0 0 0 512 320c-106.032 0-192 85.968-192 192 0 17.2 2.256 33.872 6.496 49.728l57.76-57.728a128.016 128.016 0 0 1 119.744-119.76z m213.68-123.008l-2.032 1.872-452.544 452.544a32 32 0 0 0 43.2 47.12l2.048-1.872 452.544-452.544a32 32 0 0 0-43.2-47.12z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-bianji */} {/* icon-bianji */}
{ name === 'icon-bianji' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M480 112a32 32 0 1 1 0 64H176v672h672V576a32 32 0 1 1 64 0v304a32 32 0 0 1-32 32H144a32 32 0 0 1-32-32V144a32 32 0 0 1 32-32h336z m454.624-22.624a32 32 0 0 1 1.872 43.216l-1.872 2.032-400 400a32 32 0 0 1-47.12-43.216l1.872-2.032 400-400a32 32 0 0 1 45.248 0z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-bianji' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M480 112a32 32 0 1 1 0 64H176v672h672V576a32 32 0 1 1 64 0v304a32 32 0 0 1-32 32H144a32 32 0 0 1-32-32V144a32 32 0 0 1 32-32h336z m454.624-22.624a32 32 0 0 1 1.872 43.216l-1.872 2.032-400 400a32 32 0 0 1-47.12-43.216l1.872-2.032 400-400a32 32 0 0 1 45.248 0z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-daikuan */} {/* icon-daikuan */}
{ name === 'icon-daikuan' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M704 112a80 80 0 0 1 79.92 76.528L784 192v352c0 5.488-0.56 10.848-1.6 16.016L848 560a80 80 0 0 1 79.92 76.528L928 640v192a80 80 0 0 1-76.528 79.92L848 912H176a80 80 0 0 1-79.92-76.528L96 832V640a80 80 0 0 1 76.528-79.92L176 560l65.6 0.016a80.096 80.096 0 0 1-1.504-11.92L240 544V192a80 80 0 0 1 76.528-79.92L320 112h384z m144 512H176a16 16 0 0 0-15.888 14.128L160 640v192a16 16 0 0 0 14.128 15.888L176 848h672a16 16 0 0 0 15.888-14.128L864 832V640a16 16 0 0 0-16-16z m-144-448H320a16 16 0 0 0-15.888 14.128L304 192v352a16 16 0 0 0 14.128 15.888L320 560h384a16 16 0 0 0 15.888-14.128L720 544V192a16 16 0 0 0-16-16z m-80 224a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H400a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h224z m0-128a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H400a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h224z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-daikuan' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M704 112a80 80 0 0 1 79.92 76.528L784 192v352c0 5.488-0.56 10.848-1.6 16.016L848 560a80 80 0 0 1 79.92 76.528L928 640v192a80 80 0 0 1-76.528 79.92L848 912H176a80 80 0 0 1-79.92-76.528L96 832V640a80 80 0 0 1 76.528-79.92L176 560l65.6 0.016a80.096 80.096 0 0 1-1.504-11.92L240 544V192a80 80 0 0 1 76.528-79.92L320 112h384z m144 512H176a16 16 0 0 0-15.888 14.128L160 640v192a16 16 0 0 0 14.128 15.888L176 848h672a16 16 0 0 0 15.888-14.128L864 832V640a16 16 0 0 0-16-16z m-144-448H320a16 16 0 0 0-15.888 14.128L304 192v352a16 16 0 0 0 14.128 15.888L320 560h384a16 16 0 0 0 15.888-14.128L720 544V192a16 16 0 0 0-16-16z m-80 224a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H400a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h224z m0-128a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H400a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h224z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-cangku */} {/* icon-cangku */}
{ name === 'icon-cangku' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M415.776 103.52c51.104-51.456 133.632-52.768 186.72-3.36l3.888 3.776L977.04 477.12c18.624 18.752 18.72 44.048 6.336 70.24a32 32 0 0 1-28.928 18.32H899.84l0.016 308.816a69.472 69.472 0 0 1-66.08 69.408l-3.36 0.08h-636.48a69.456 69.456 0 0 1-69.44-69.488l-0.032-308.816H70a32 32 0 0 1-27.76-16.08l-1.216-2.352c-11.968-25.584-13.28-49.296 3.312-69.504l2.864-3.12z m140.384 41.072c-27.92-23.456-69.136-21.984-94.976 4.032L110.464 501.696h46a32 32 0 0 1 31.92 29.616l0.08 2.4v340.8c0 3.04 2.464 5.488 5.456 5.488h636.512c2.992 0 5.44-2.448 5.44-5.488v-340.8a32 32 0 0 1 31.984-32l43.392-0.016L561.44 149.472l-2.736-2.64zM616 640a40 40 0 1 1 0 80h-208a40 40 0 1 1 0-80h208z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-cangku' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M415.776 103.52c51.104-51.456 133.632-52.768 186.72-3.36l3.888 3.776L977.04 477.12c18.624 18.752 18.72 44.048 6.336 70.24a32 32 0 0 1-28.928 18.32H899.84l0.016 308.816a69.472 69.472 0 0 1-66.08 69.408l-3.36 0.08h-636.48a69.456 69.456 0 0 1-69.44-69.488l-0.032-308.816H70a32 32 0 0 1-27.76-16.08l-1.216-2.352c-11.968-25.584-13.28-49.296 3.312-69.504l2.864-3.12z m140.384 41.072c-27.92-23.456-69.136-21.984-94.976 4.032L110.464 501.696h46a32 32 0 0 1 31.92 29.616l0.08 2.4v340.8c0 3.04 2.464 5.488 5.456 5.488h636.512c2.992 0 5.44-2.448 5.44-5.488v-340.8a32 32 0 0 1 31.984-32l43.392-0.016L561.44 149.472l-2.736-2.64zM616 640a40 40 0 1 1 0 80h-208a40 40 0 1 1 0-80h208z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-guanlidingdan */} {/* icon-guanlidingdan */}
{ name === 'icon-guanlidingdan' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M800 96a80 80 0 0 1 80 80v672a80 80 0 0 1-80 80H224a80 80 0 0 1-80-80V176a80 80 0 0 1 80-80z m0 64H224a16 16 0 0 0-16 16v672a16 16 0 0 0 16 16h576a16 16 0 0 0 16-16V176a16 16 0 0 0-16-16z m-112 480a32 32 0 1 1 0 64H336a32 32 0 1 1 0-64h352z m0-160a32 32 0 1 1 0 64H336a32 32 0 1 1 0-64h352z m0-160a32 32 0 1 1 0 64H336a32 32 0 1 1 0-64h352z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-guanlidingdan' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M800 96a80 80 0 0 1 80 80v672a80 80 0 0 1-80 80H224a80 80 0 0 1-80-80V176a80 80 0 0 1 80-80z m0 64H224a16 16 0 0 0-16 16v672a16 16 0 0 0 16 16h576a16 16 0 0 0 16-16V176a16 16 0 0 0-16-16z m-112 480a32 32 0 1 1 0 64H336a32 32 0 1 1 0-64h352z m0-160a32 32 0 1 1 0 64H336a32 32 0 1 1 0-64h352z m0-160a32 32 0 1 1 0 64H336a32 32 0 1 1 0-64h352z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-mima */} {/* icon-mima */}
{ name === 'icon-mima' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 112c114.88 0 208 93.12 208 208l0.016 128.16A203.92 203.92 0 0 1 816 621.168V752a144 144 0 0 1-144 144H352a144 144 0 0 1-144-144v-130.832c0-71.744 37.472-136.512 96-173.024V320c0-114.88 93.12-208 208-208z m0 64a144 144 0 0 0-144 144v101.952l1.984-0.48a597.28 597.28 0 0 1 286.016 0.48V320a144 144 0 0 0-144-144z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-mima' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 112c114.88 0 208 93.12 208 208l0.016 128.16A203.92 203.92 0 0 1 816 621.168V752a144 144 0 0 1-144 144H352a144 144 0 0 1-144-144v-130.832c0-71.744 37.472-136.512 96-173.024V320c0-114.88 93.12-208 208-208z m0 64a144 144 0 0 0-144 144v101.952l1.984-0.48a597.28 597.28 0 0 1 286.016 0.48V320a144 144 0 0 0-144-144z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-guanbi */} {/* icon-guanbi */}
{ name === 'icon-guanbi' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M760.896 263.104a32 32 0 0 1 1.632 43.504l-1.632 1.76L557.248 512l203.648 203.648a32 32 0 0 1-43.504 46.88l-1.76-1.632L512 557.248 308.352 760.896a32 32 0 0 1-46.88-43.504l1.632-1.76L466.72 512 263.104 308.352a32 32 0 0 1 43.504-46.88l1.76 1.632L512 466.72l203.648-203.632a32 32 0 0 1 45.248 0z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-guanbi' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M760.896 263.104a32 32 0 0 1 1.632 43.504l-1.632 1.76L557.248 512l203.648 203.648a32 32 0 0 1-43.504 46.88l-1.76-1.632L512 557.248 308.352 760.896a32 32 0 0 1-46.88-43.504l1.632-1.76L466.72 512 263.104 308.352a32 32 0 0 1 43.504-46.88l1.76 1.632L512 466.72l203.648-203.632a32 32 0 0 1 45.248 0z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-jianshao */} {/* icon-jianshao */}
{ name === 'icon-jianshao' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M256 480m32 0l448 0q32 0 32 32l0 0q0 32-32 32l-448 0q-32 0-32-32l0 0q0-32 32-32Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-jianshao' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M256 480m32 0l448 0q32 0 32 32l0 0q0 32-32 32l-448 0q-32 0-32-32l0 0q0-32 32-32Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-dingwei */} {/* icon-dingwei */}
{ name === 'icon-dingwei' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 48c203.248 0 368 164.752 368 368 0 81.92-40.448 177.44-120.528 289.488l-5.664 7.84-5.824 7.952-10.4 13.936-10.928 14.24-11.264 14.336-11.648 14.496-12.032 14.656-12.368 14.736-6.432 7.568-16.272 18.8-3.408 3.888-13.6 15.328-14 15.52-14.4 15.68-14.784 15.856-15.184 16.032-14.832 15.44-30.784 33.76a32 32 0 0 1-45.424 1.904l-1.872-1.904-30.208-33.152-15.584-16.208-15.168-16.048-14.8-15.872-14.4-15.68-13.92-15.44-6.944-7.776-13.408-15.264-16.16-18.752-15.68-18.672-12.048-14.672-11.648-14.512-11.2-14.256-5.488-7.12-5.44-7.152-10.368-13.856C188.272 602.32 144 501.712 144 416 144 212.752 308.752 48 512 48z m0 64c-167.888 0-304 136.112-304 304 0 67.792 37.376 154.288 113.872 259.6l5.408 7.36 10.064 13.472 5.152 6.768 5.184 6.72 10.816 13.792 11.216 13.952 11.632 14.16 15.168 18.064 3.024 3.536 12.64 14.64 13.104 14.912 6.608 7.408 13.632 15.12 14.064 15.312 14.448 15.52 14.848 15.68 16 16.656 7.12 7.824 7.696-8.432 15.264-15.872 14.848-15.68 14.448-15.52 14.032-15.296 13.648-15.104 19.696-22.304 12.704-14.72 6.096-7.152 12.016-14.336 11.616-14.144 11.216-13.952 10.864-13.824 5.248-6.816 5.088-6.672 10.048-13.44 5.568-7.616C778.672 570.192 816 483.744 816 416c0-167.888-136.112-304-304-304z m0 112c97.2 0 176 78.8 176 176s-78.8 176-176 176-176-78.8-176-176 78.8-176 176-176z m0 64a112 112 0 1 0 0 224 112 112 0 0 0 0-224z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-dingwei' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 48c203.248 0 368 164.752 368 368 0 81.92-40.448 177.44-120.528 289.488l-5.664 7.84-5.824 7.952-10.4 13.936-10.928 14.24-11.264 14.336-11.648 14.496-12.032 14.656-12.368 14.736-6.432 7.568-16.272 18.8-3.408 3.888-13.6 15.328-14 15.52-14.4 15.68-14.784 15.856-15.184 16.032-14.832 15.44-30.784 33.76a32 32 0 0 1-45.424 1.904l-1.872-1.904-30.208-33.152-15.584-16.208-15.168-16.048-14.8-15.872-14.4-15.68-13.92-15.44-6.944-7.776-13.408-15.264-16.16-18.752-15.68-18.672-12.048-14.672-11.648-14.512-11.2-14.256-5.488-7.12-5.44-7.152-10.368-13.856C188.272 602.32 144 501.712 144 416 144 212.752 308.752 48 512 48z m0 64c-167.888 0-304 136.112-304 304 0 67.792 37.376 154.288 113.872 259.6l5.408 7.36 10.064 13.472 5.152 6.768 5.184 6.72 10.816 13.792 11.216 13.952 11.632 14.16 15.168 18.064 3.024 3.536 12.64 14.64 13.104 14.912 6.608 7.408 13.632 15.12 14.064 15.312 14.448 15.52 14.848 15.68 16 16.656 7.12 7.824 7.696-8.432 15.264-15.872 14.848-15.68 14.448-15.52 14.032-15.296 13.648-15.104 19.696-22.304 12.704-14.72 6.096-7.152 12.016-14.336 11.616-14.144 11.216-13.952 10.864-13.824 5.248-6.816 5.088-6.672 10.048-13.44 5.568-7.616C778.672 570.192 816 483.744 816 416c0-167.888-136.112-304-304-304z m0 112c97.2 0 176 78.8 176 176s-78.8 176-176 176-176-78.8-176-176 78.8-176 176-176z m0 64a112 112 0 1 0 0 224 112 112 0 0 0 0-224z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-saomiao */} {/* icon-saomiao */}
{ name === 'icon-saomiao' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M176 640v208h208v64H144a32 32 0 0 1-32-32V640h64z m736 0v240a32 32 0 0 1-32 32H640v-64h208V640h64z m0-160v64H112v-64h800zM880 112a32 32 0 0 1 32 32v240h-64V176H640V112h240zM384 112v64H176v208H112V144a32 32 0 0 1 32-32h240z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-saomiao' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M176 640v208h208v64H144a32 32 0 0 1-32-32V640h64z m736 0v240a32 32 0 0 1-32 32H640v-64h208V640h64z m0-160v64H112v-64h800zM880 112a32 32 0 0 1 32 32v240h-64V176H640V112h240zM384 112v64H176v208H112V144a32 32 0 0 1 32-32h240z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-peihuo */} {/* icon-peihuo */}
{ name === 'icon-peihuo' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M848 96a80 80 0 0 1 80 80v672a80 80 0 0 1-80 80H176a80 80 0 0 1-80-80V176a80 80 0 0 1 80-80z m0 64H176a16 16 0 0 0-16 16v672a16 16 0 0 0 16 16h672a16 16 0 0 0 16-16V176a16 16 0 0 0-16-16z m-383.68 159.68a32 32 0 0 1 1.632 43.488l-1.616 1.76L349.232 480H720a32 32 0 0 1 2.4 63.92L720 544H349.264l115.072 115.072a32 32 0 0 1 1.616 43.52l-1.616 1.744a32 32 0 0 1-43.52 1.616l-1.744-1.616-169.696-169.712a32 32 0 0 1-1.632-43.504l1.632-1.76L419.072 319.68a32 32 0 0 1 45.264 0z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-peihuo' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M848 96a80 80 0 0 1 80 80v672a80 80 0 0 1-80 80H176a80 80 0 0 1-80-80V176a80 80 0 0 1 80-80z m0 64H176a16 16 0 0 0-16 16v672a16 16 0 0 0 16 16h672a16 16 0 0 0 16-16V176a16 16 0 0 0-16-16z m-383.68 159.68a32 32 0 0 1 1.632 43.488l-1.616 1.76L349.232 480H720a32 32 0 0 1 2.4 63.92L720 544H349.264l115.072 115.072a32 32 0 0 1 1.616 43.52l-1.616 1.744a32 32 0 0 1-43.52 1.616l-1.744-1.616-169.696-169.712a32 32 0 0 1-1.632-43.504l1.632-1.76L419.072 319.68a32 32 0 0 1 45.264 0z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shaixuan */} {/* icon-shaixuan */}
{ name === 'icon-shaixuan' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M631.072 144a48 48 0 0 1 32.56 83.264L496 382v496.704a48 48 0 0 1-45.184 47.92L448 926.72a48 48 0 0 1-29.984-10.512l-128-102.4A48 48 0 0 1 272 776.304V382.016L104.368 227.264a48 48 0 0 1-4.704-65.52l1.984-2.304A48 48 0 0 1 136.928 144z m-40.928 64H177.84l142.72 131.728a48 48 0 0 1 15.328 31.936l0.112 3.344v393.616l96 76.8V375.008a48 48 0 0 1 13.072-32.928l2.368-2.352L590.144 208zM896 752a32 32 0 0 1 2.4 63.92L896 816H640a32 32 0 0 1-2.4-63.92L640 752h256z m0-192a32 32 0 0 1 2.4 63.92L896 624H640a32 32 0 0 1-2.4-63.92L640 560h256z m0-192a32 32 0 0 1 2.4 63.92L896 432H640a32 32 0 0 1-2.4-63.92L640 368h256z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shaixuan' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M631.072 144a48 48 0 0 1 32.56 83.264L496 382v496.704a48 48 0 0 1-45.184 47.92L448 926.72a48 48 0 0 1-29.984-10.512l-128-102.4A48 48 0 0 1 272 776.304V382.016L104.368 227.264a48 48 0 0 1-4.704-65.52l1.984-2.304A48 48 0 0 1 136.928 144z m-40.928 64H177.84l142.72 131.728a48 48 0 0 1 15.328 31.936l0.112 3.344v393.616l96 76.8V375.008a48 48 0 0 1 13.072-32.928l2.368-2.352L590.144 208zM896 752a32 32 0 0 1 2.4 63.92L896 816H640a32 32 0 0 1-2.4-63.92L640 752h256z m0-192a32 32 0 0 1 2.4 63.92L896 624H640a32 32 0 0 1-2.4-63.92L640 560h256z m0-192a32 32 0 0 1 2.4 63.92L896 432H640a32 32 0 0 1-2.4-63.92L640 368h256z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-paiming */} {/* icon-paiming */}
{ name === 'icon-paiming' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M736 112a80 80 0 0 1 79.92 76.528L816 192v32.88a144.016 144.016 0 0 1-6.672 286.816C782.208 638.848 675.6 736.56 544 750.336L544 896h208a32 32 0 1 1 0 64H272a32 32 0 1 1 0-64l208-0.016v-145.648c-132.272-13.84-239.312-112.496-265.728-240.64C147.008 497.584 96 438.768 96 368a144.048 144.048 0 0 1 112-140.432V192a80 80 0 0 1 76.528-79.92L288 112h448z m0 64H288a16 16 0 0 0-15.888 14.128L272 192v256c0 132.544 107.456 240 240 240 130.88 0 237.28-104.752 239.952-234.976l0.016-2.832v-18.208L752 432v-128H752v-71.808H752V192a16 16 0 0 0-14.128-15.888L736 176z m-245.52 85.376c8.8-17.84 34.24-17.84 43.04 0l36.736 74.432 82.144 11.936c18.992 2.768 26.976 25.36 14.752 39.424l-1.44 1.52-59.456 57.92 14.032 81.84c3.248 18.896-15.776 33.472-32.912 26.192l-1.904-0.896L512 515.104l-73.472 38.64c-16.976 8.928-36.72-4.656-35.088-23.216l0.272-2.08 14.016-81.84-59.44-57.92c-13.728-13.392-6.912-36.368 11.248-40.544l2.064-0.4 82.128-11.936zM512 326.24l-20.8 42.128a24 24 0 0 1-18.08 13.12l-46.496 6.768 33.648 32.8a24 24 0 0 1 7.2 18.656l-0.288 2.592-7.952 46.304 41.6-21.856a24 24 0 0 1 19.952-1.088l2.384 1.088 41.584 21.856-7.936-46.304a24 24 0 0 1 5.136-19.312l1.76-1.92 33.648-32.816-46.496-6.752a24 24 0 0 1-16.928-11.072l-1.136-2.064L512 326.24z m304.016-36.64v156.8a80.032 80.032 0 0 0 0-156.8zM160 368a80.016 80.016 0 0 0 48 73.344v-146.688A80.016 80.016 0 0 0 160 368z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-paiming' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M736 112a80 80 0 0 1 79.92 76.528L816 192v32.88a144.016 144.016 0 0 1-6.672 286.816C782.208 638.848 675.6 736.56 544 750.336L544 896h208a32 32 0 1 1 0 64H272a32 32 0 1 1 0-64l208-0.016v-145.648c-132.272-13.84-239.312-112.496-265.728-240.64C147.008 497.584 96 438.768 96 368a144.048 144.048 0 0 1 112-140.432V192a80 80 0 0 1 76.528-79.92L288 112h448z m0 64H288a16 16 0 0 0-15.888 14.128L272 192v256c0 132.544 107.456 240 240 240 130.88 0 237.28-104.752 239.952-234.976l0.016-2.832v-18.208L752 432v-128H752v-71.808H752V192a16 16 0 0 0-14.128-15.888L736 176z m-245.52 85.376c8.8-17.84 34.24-17.84 43.04 0l36.736 74.432 82.144 11.936c18.992 2.768 26.976 25.36 14.752 39.424l-1.44 1.52-59.456 57.92 14.032 81.84c3.248 18.896-15.776 33.472-32.912 26.192l-1.904-0.896L512 515.104l-73.472 38.64c-16.976 8.928-36.72-4.656-35.088-23.216l0.272-2.08 14.016-81.84-59.44-57.92c-13.728-13.392-6.912-36.368 11.248-40.544l2.064-0.4 82.128-11.936zM512 326.24l-20.8 42.128a24 24 0 0 1-18.08 13.12l-46.496 6.768 33.648 32.8a24 24 0 0 1 7.2 18.656l-0.288 2.592-7.952 46.304 41.6-21.856a24 24 0 0 1 19.952-1.088l2.384 1.088 41.584 21.856-7.936-46.304a24 24 0 0 1 5.136-19.312l1.76-1.92 33.648-32.816-46.496-6.752a24 24 0 0 1-16.928-11.072l-1.136-2.064L512 326.24z m304.016-36.64v156.8a80.032 80.032 0 0 0 0-156.8zM160 368a80.016 80.016 0 0 0 48 73.344v-146.688A80.016 80.016 0 0 0 160 368z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shanchusousuoxinxi */} {/* icon-shanchusousuoxinxi */}
{ name === 'icon-shanchusousuoxinxi' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 96c229.76 0 416 186.24 416 416S741.76 928 512 928 96 741.76 96 512 282.24 96 512 96z m-113.136 257.6A32 32 0 1 0 353.6 398.88L466.752 512l-113.136 113.136a32 32 0 0 0-1.872 43.216l1.872 2.032a32 32 0 0 0 45.248 0L512 557.248l113.136 113.136a32 32 0 0 0 43.216 1.872l2.032-1.872a32 32 0 0 0 0-45.248L557.248 512l113.136-113.136a32 32 0 0 0 1.872-43.216L670.4 353.6a32 32 0 0 0-45.248 0L512 466.752z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shanchusousuoxinxi' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 96c229.76 0 416 186.24 416 416S741.76 928 512 928 96 741.76 96 512 282.24 96 512 96z m-113.136 257.6A32 32 0 1 0 353.6 398.88L466.752 512l-113.136 113.136a32 32 0 0 0-1.872 43.216l1.872 2.032a32 32 0 0 0 45.248 0L512 557.248l113.136 113.136a32 32 0 0 0 43.216 1.872l2.032-1.872a32 32 0 0 0 0-45.248L557.248 512l113.136-113.136a32 32 0 0 0 1.872-43.216L670.4 353.6a32 32 0 0 0-45.248 0L512 466.752z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shijian */} {/* icon-shijian */}
{ name === 'icon-shijian' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M384 192v48h256v-48h160v48h112a32 32 0 0 1 32 32v592a32 32 0 0 1-32 32H112a32 32 0 0 1-32-32V272a32 32 0 0 1 32-32h112v-48h160z m496 304H144v336h736V496z m0-192H144v128h736v-128z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shijian' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M384 192v48h256v-48h160v48h112a32 32 0 0 1 32 32v592a32 32 0 0 1-32 32H112a32 32 0 0 1-32-32V272a32 32 0 0 1 32-32h112v-48h160z m496 304H144v336h736V496z m0-192H144v128h736v-128z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-sousuo */} {/* icon-sousuo */}
{ name === 'icon-sousuo' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M718.4 243.216c123.584 123.6 130.768 319.52 21.52 451.52l1.104 1.024 135.76 135.776a32 32 0 0 1-45.248 45.248l-135.776-135.76-1.024-1.104c-132 109.248-327.92 102.08-451.52-21.536C112 587.2 112 374.432 243.216 243.216s343.952-131.216 475.168 0z m-45.264 45.248c-106.224-106.208-278.448-106.208-384.672 0-106.208 106.24-106.208 278.448 0 384.672 97.968 97.968 253.408 106.208 360.768 21.28l4.704-3.792 20.064-16.624 16.624-20.064c87.664-105.92 82.096-261.472-13.216-361.12l-4.272-4.352z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-sousuo' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M718.4 243.216c123.584 123.6 130.768 319.52 21.52 451.52l1.104 1.024 135.76 135.776a32 32 0 0 1-45.248 45.248l-135.776-135.76-1.024-1.104c-132 109.248-327.92 102.08-451.52-21.536C112 587.2 112 374.432 243.216 243.216s343.952-131.216 475.168 0z m-45.264 45.248c-106.224-106.208-278.448-106.208-384.672 0-106.208 106.24-106.208 278.448 0 384.672 97.968 97.968 253.408 106.208 360.768 21.28l4.704-3.792 20.064-16.624 16.624-20.064c87.664-105.92 82.096-261.472-13.216-361.12l-4.272-4.352z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shouhou */} {/* icon-shouhou */}
{ name === 'icon-shouhou' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M112 480a32.256 32.256 0 0 1 9.248 1.36l0.432 0.128a31.712 31.712 0 0 1 14.992 10.128A32 32 0 0 1 144 512c0 203.248 164.752 368 368 368 142.528 0 270.336-81.76 331.392-207.792a32 32 0 1 1 57.6 27.904A431.968 431.968 0 0 1 512 944c-155.584 0-291.952-82.24-368-205.616V784a32 32 0 0 1-63.92 2.4L80 784V512a32 32 0 0 1 32-32z m308.592-152.496l2.032 1.872L512 418.72l89.376-89.36 2.032-1.872a32 32 0 0 1 45.088 45.088l-1.872 2.032L589.248 432H656a32 32 0 1 1 0 64h-112v80h112a32 32 0 1 1 0 64h-112v96a32 32 0 1 1-64 0v-96h-112a32 32 0 1 1 0-64h112v-80h-112a32 32 0 1 1 0-64h66.736l-57.36-57.376a32 32 0 0 1 43.216-47.12z m481.728 215.008l-0.224-0.08a31.76 31.76 0 0 1-16.16-11.872 31.952 31.952 0 0 1-5.856-16.16L880 512C880 308.752 715.248 144 512 144a368.032 368.032 0 0 0-335.424 216.384 32 32 0 1 1-58.304-26.4A432.016 432.016 0 0 1 512 80c155.584 0 291.952 82.24 368.016 205.632L880 240a32 32 0 0 1 63.92-2.4L944 240v272a32 32 0 0 1-29.6 31.92L912 544a32.256 32.256 0 0 1-9.248-1.36l-0.432-0.128z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shouhou' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M112 480a32.256 32.256 0 0 1 9.248 1.36l0.432 0.128a31.712 31.712 0 0 1 14.992 10.128A32 32 0 0 1 144 512c0 203.248 164.752 368 368 368 142.528 0 270.336-81.76 331.392-207.792a32 32 0 1 1 57.6 27.904A431.968 431.968 0 0 1 512 944c-155.584 0-291.952-82.24-368-205.616V784a32 32 0 0 1-63.92 2.4L80 784V512a32 32 0 0 1 32-32z m308.592-152.496l2.032 1.872L512 418.72l89.376-89.36 2.032-1.872a32 32 0 0 1 45.088 45.088l-1.872 2.032L589.248 432H656a32 32 0 1 1 0 64h-112v80h112a32 32 0 1 1 0 64h-112v96a32 32 0 1 1-64 0v-96h-112a32 32 0 1 1 0-64h112v-80h-112a32 32 0 1 1 0-64h66.736l-57.36-57.376a32 32 0 0 1 43.216-47.12z m481.728 215.008l-0.224-0.08a31.76 31.76 0 0 1-16.16-11.872 31.952 31.952 0 0 1-5.856-16.16L880 512C880 308.752 715.248 144 512 144a368.032 368.032 0 0 0-335.424 216.384 32 32 0 1 1-58.304-26.4A432.016 432.016 0 0 1 512 80c155.584 0 291.952 82.24 368.016 205.632L880 240a32 32 0 0 1 63.92-2.4L944 240v272a32 32 0 0 1-29.6 31.92L912 544a32.256 32.256 0 0 1-9.248-1.36l-0.432-0.128z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-sousuofanhui */} {/* icon-sousuofanhui */}
{ name === 'icon-sousuofanhui' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M454.16 217.84a32 32 0 0 1 1.616 43.52l-1.616 1.744-216.912 216.88L848 480a32 32 0 0 1 2.4 63.92L848 544H237.248l216.912 216.896a32 32 0 0 1 1.616 43.52l-1.616 1.744a32 32 0 0 1-43.52 1.616l-1.744-1.616-271.52-271.52a32 32 0 0 1-1.632-43.52l1.632-1.76 271.52-271.52a32 32 0 0 1 45.264 0z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-sousuofanhui' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M454.16 217.84a32 32 0 0 1 1.616 43.52l-1.616 1.744-216.912 216.88L848 480a32 32 0 0 1 2.4 63.92L848 544H237.248l216.912 216.896a32 32 0 0 1 1.616 43.52l-1.616 1.744a32 32 0 0 1-43.52 1.616l-1.744-1.616-271.52-271.52a32 32 0 0 1-1.632-43.52l1.632-1.76 271.52-271.52a32 32 0 0 1 45.264 0z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-sousuoshanchu */} {/* icon-sousuoshanchu */}
{ name === 'icon-sousuoshanchu' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 96c91.808 0 167.2 70.304 175.28 160H848a32 32 0 1 1 0 64h-32v544a64 64 0 0 1-64 64H272a64 64 0 0 1-64-64V320h-32a32 32 0 1 1 0-64h160.72C344.8 166.304 420.192 96 512 96z m240 224H272v544h480V320z m-336 128a32 32 0 0 1 32 32v224a32 32 0 1 1-64 0V480a32 32 0 0 1 32-32z m192 0a32 32 0 0 1 32 32v224a32 32 0 1 1-64 0V480a32 32 0 0 1 32-32z m-96-288a112.032 112.032 0 0 0-110.88 96h221.76A112.032 112.032 0 0 0 512 160z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-sousuoshanchu' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 96c91.808 0 167.2 70.304 175.28 160H848a32 32 0 1 1 0 64h-32v544a64 64 0 0 1-64 64H272a64 64 0 0 1-64-64V320h-32a32 32 0 1 1 0-64h160.72C344.8 166.304 420.192 96 512 96z m240 224H272v544h480V320z m-336 128a32 32 0 0 1 32 32v224a32 32 0 1 1-64 0V480a32 32 0 0 1 32-32z m192 0a32 32 0 0 1 32 32v224a32 32 0 1 1-64 0V480a32 32 0 0 1 32-32z m-96-288a112.032 112.032 0 0 0-110.88 96h221.76A112.032 112.032 0 0 0 512 160z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-tuikuan */} {/* icon-tuikuan */}
{ name === 'icon-tuikuan' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M848 112a64 64 0 0 1 63.92 60.8L912 176v96c0 157.28-126.08 285.12-282.72 287.952L624 560h-75.632l103.744 103.76a32 32 0 0 1 1.632 43.52l-1.632 1.744a32 32 0 0 1-43.504 1.616l-1.76-1.616-158.384-158.4a32 32 0 0 1-1.616-43.504l1.616-1.76 158.4-158.384a32 32 0 0 1 46.88 43.52l-1.632 1.744L548.336 496H624c123.712 0 224-100.288 224-224v-96H176v672h672V640a32 32 0 0 1 63.92-2.4L912 640v208a64 64 0 0 1-60.8 63.92L848 912H176a64 64 0 0 1-63.92-60.8L112 848V176a64 64 0 0 1 60.8-63.92L176 112h672z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-tuikuan' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M848 112a64 64 0 0 1 63.92 60.8L912 176v96c0 157.28-126.08 285.12-282.72 287.952L624 560h-75.632l103.744 103.76a32 32 0 0 1 1.632 43.52l-1.632 1.744a32 32 0 0 1-43.504 1.616l-1.76-1.616-158.384-158.4a32 32 0 0 1-1.616-43.504l1.616-1.76 158.4-158.384a32 32 0 0 1 46.88 43.52l-1.632 1.744L548.336 496H624c123.712 0 224-100.288 224-224v-96H176v672h672V640a32 32 0 0 1 63.92-2.4L912 640v208a64 64 0 0 1-60.8 63.92L848 912H176a64 64 0 0 1-63.92-60.8L112 848V176a64 64 0 0 1 60.8-63.92L176 112h672z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-tishi */} {/* icon-tishi */}
{ name === 'icon-tishi' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 64c247.424 0 448 200.576 448 448S759.424 960 512 960 64 759.424 64 512 264.576 64 512 64z m0 64C299.92 128 128 299.92 128 512s171.92 384 384 384 384-171.92 384-384S724.08 128 512 128z m29.248 556.896V752h-64.32v-67.104h64.32zM515.712 272c42.464 0 76.448 12.096 101.984 36.288C643.232 332.48 656 363.392 656 401.04c0 22.784-4.688 41.28-14.064 55.472-9.376 14.192-28.272 35.056-56.72 62.592-20.688 20-34.112 36.928-40.24 50.8-6.144 13.872-9.216 34.352-9.216 61.44h-57.536c0-30.736 3.664-55.52 10.992-74.352 7.328-18.816 23.376-40.368 48.16-64.672l25.856-25.488a106.832 106.832 0 0 0 18.752-22.896c8.608-13.984 12.928-28.48 12.928-43.552 0-21.072-6.304-39.36-18.912-54.832-12.608-15.488-33.44-23.232-62.56-23.232-35.968 0-60.864 13.328-74.656 40-7.76 14.848-12.16 36.24-13.248 64.192H368c0-46.448 13.152-83.808 39.44-112.096C433.728 286.144 469.824 272 515.712 272z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-tishi' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 64c247.424 0 448 200.576 448 448S759.424 960 512 960 64 759.424 64 512 264.576 64 512 64z m0 64C299.92 128 128 299.92 128 512s171.92 384 384 384 384-171.92 384-384S724.08 128 512 128z m29.248 556.896V752h-64.32v-67.104h64.32zM515.712 272c42.464 0 76.448 12.096 101.984 36.288C643.232 332.48 656 363.392 656 401.04c0 22.784-4.688 41.28-14.064 55.472-9.376 14.192-28.272 35.056-56.72 62.592-20.688 20-34.112 36.928-40.24 50.8-6.144 13.872-9.216 34.352-9.216 61.44h-57.536c0-30.736 3.664-55.52 10.992-74.352 7.328-18.816 23.376-40.368 48.16-64.672l25.856-25.488a106.832 106.832 0 0 0 18.752-22.896c8.608-13.984 12.928-28.48 12.928-43.552 0-21.072-6.304-39.36-18.912-54.832-12.608-15.488-33.44-23.232-62.56-23.232-35.968 0-60.864 13.328-74.656 40-7.76 14.848-12.16 36.24-13.248 64.192H368c0-46.448 13.152-83.808 39.44-112.096C433.728 286.144 469.824 272 515.712 272z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-xianxiahuizong */} {/* icon-xianxiahuizong */}
{ name === 'icon-xianxiahuizong' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M912 336a32 32 0 0 1 32 32v512a32 32 0 0 1-32 32H112a32 32 0 0 1-32-32V368a32 32 0 0 1 32-32h800z m-32 64H144v448h736V400z m-443.408 71.504l2.032 1.872L512 546.72l73.376-73.36a32 32 0 0 1 47.12 43.216l-1.872 2.032L589.248 560H624a32 32 0 1 1 0 64h-80v48h80a32 32 0 1 1 0 64h-80v32a32 32 0 1 1-64 0v-32h-80a32 32 0 1 1 0-64h80v-48h-80a32 32 0 1 1 0-64h34.736l-41.36-41.376a32 32 0 0 1 43.216-47.12zM128 192h768a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H128a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-xianxiahuizong' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M912 336a32 32 0 0 1 32 32v512a32 32 0 0 1-32 32H112a32 32 0 0 1-32-32V368a32 32 0 0 1 32-32h800z m-32 64H144v448h736V400z m-443.408 71.504l2.032 1.872L512 546.72l73.376-73.36a32 32 0 0 1 47.12 43.216l-1.872 2.032L589.248 560H624a32 32 0 1 1 0 64h-80v48h80a32 32 0 1 1 0 64h-80v32a32 32 0 1 1-64 0v-32h-80a32 32 0 1 1 0-64h80v-48h-80a32 32 0 1 1 0-64h34.736l-41.36-41.376a32 32 0 0 1 43.216-47.12zM128 192h768a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H128a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-xinzeng */} {/* icon-xinzeng */}
{ name === 'icon-xinzeng' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 256a32 32 0 0 1 32 32l-0.016 192H736a32 32 0 1 1 0 64H543.984L544 736a32 32 0 1 1-64 0l-0.016-192H288a32 32 0 1 1 0-64h191.984L480 288a32 32 0 0 1 32-32z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-xinzeng' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 256a32 32 0 0 1 32 32l-0.016 192H736a32 32 0 1 1 0 64H543.984L544 736a32 32 0 1 1-64 0l-0.016-192H288a32 32 0 1 1 0-64h191.984L480 288a32 32 0 0 1 32-32z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-yonghuming */} {/* icon-yonghuming */}
{ name === 'icon-yonghuming' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 64c-114.88 0-208 93.12-208 208s93.12 208 208 208 208-93.12 208-208S626.88 64 512 64zM351.168 912h321.664a176 176 0 0 0 159.888-102.448L859.2 752a137.76 137.76 0 0 0-99.424-192.896L722.4 552a1126.528 1126.528 0 0 0-420.8 0l-37.376 7.104A137.76 137.76 0 0 0 164.8 752l26.48 57.552A176 176 0 0 0 351.168 912z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-yonghuming' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 64c-114.88 0-208 93.12-208 208s93.12 208 208 208 208-93.12 208-208S626.88 64 512 64zM351.168 912h321.664a176 176 0 0 0 159.888-102.448L859.2 752a137.76 137.76 0 0 0-99.424-192.896L722.4 552a1126.528 1126.528 0 0 0-420.8 0l-37.376 7.104A137.76 137.76 0 0 0 164.8 752l26.48 57.552A176 176 0 0 0 351.168 912z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-yanjing */} {/* icon-yanjing */}
{ name === 'icon-yanjing' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512.944 208c143.184 0 285.008 91.696 425.488 275.104l0.048-0.032a48 48 0 0 1 0.272 57.968C800.848 724.352 658.912 816 512.944 816c-145.6 0-292.544-91.2-440.832-273.552a48 48 0 0 1 0.272-60.8C223.296 299.232 370.144 208 512.944 208zM512 320c-106.032 0-192 85.968-192 192s85.968 192 192 192 192-85.968 192-192-85.968-192-192-192z m0 64a128 128 0 1 1 0 256 128 128 0 0 1 0-256z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-yanjing' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512.944 208c143.184 0 285.008 91.696 425.488 275.104l0.048-0.032a48 48 0 0 1 0.272 57.968C800.848 724.352 658.912 816 512.944 816c-145.6 0-292.544-91.2-440.832-273.552a48 48 0 0 1 0.272-60.8C223.296 299.232 370.144 208 512.944 208zM512 320c-106.032 0-192 85.968-192 192s85.968 192 192 192 192-85.968 192-192-85.968-192-192-192z m0 64a128 128 0 1 1 0 256 128 128 0 0 1 0-256z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-yufukuan */} {/* icon-yufukuan */}
{ name === 'icon-yufukuan' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M327.136 109.216l581.216 258.768L912 368a32 32 0 0 1 32 32v480a32 32 0 0 1-32 32H112a32 32 0 0 1-32-32V400a32 32 0 0 1 32-32h61.776l108.352-243.36c7.28-16.336 27.424-23.248 45.008-15.424zM880 432H144v416h736V432zM512 688a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H256a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h256zM332.592 182.56L250.032 368h499.04l-416.48-185.44z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-yufukuan' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M327.136 109.216l581.216 258.768L912 368a32 32 0 0 1 32 32v480a32 32 0 0 1-32 32H112a32 32 0 0 1-32-32V400a32 32 0 0 1 32-32h61.776l108.352-243.36c7.28-16.336 27.424-23.248 45.008-15.424zM880 432H144v416h736V432zM512 688a16 16 0 0 1 16 16v32a16 16 0 0 1-16 16H256a16 16 0 0 1-16-16v-32a16 16 0 0 1 16-16h256zM332.592 182.56L250.032 368h499.04l-416.48-185.44z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(0,0,0)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-wodekefu */} {/* icon-wodekefu */}
{ name === 'icon-wodekefu' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M832 516.752a193.2 193.2 0 0 1 79.92 150.864l0.08 5.84v13.088c0 53.152-21.44 101.312-56.144 136.272l-3.904 3.84L912 880H657.44a192.72 192.72 0 0 1-127.536-48c165.2-1.024 299.152-133.808 302.048-298.56l0.064-16.688z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3Cpath d='M521.2 144C701.68 144 848 290.32 848 470.8v34.4C848 685.68 701.68 832 521.2 832H96l100.256-91.264A325.856 325.856 0 0 1 96 505.2v-34.4C96 290.32 242.32 144 422.8 144h98.4z m-151.744 275.2c-37.76 0-68.368 30.8-68.368 68.8s30.608 68.8 68.368 68.8c37.76 0 68.368-30.8 68.368-68.8s-30.608-68.8-68.368-68.8z m205.088 0c-37.76 0-68.368 30.8-68.368 68.8s30.608 68.8 68.368 68.8c37.76 0 68.368-30.8 68.368-68.8s-30.608-68.8-68.368-68.8z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-wodekefu' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M832 516.752a193.2 193.2 0 0 1 79.92 150.864l0.08 5.84v13.088c0 53.152-21.44 101.312-56.144 136.272l-3.904 3.84L912 880H657.44a192.72 192.72 0 0 1-127.536-48c165.2-1.024 299.152-133.808 302.048-298.56l0.064-16.688z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3Cpath d='M521.2 144C701.68 144 848 290.32 848 470.8v34.4C848 685.68 701.68 832 521.2 832H96l100.256-91.264A325.856 325.856 0 0 1 96 505.2v-34.4C96 290.32 242.32 144 422.8 144h98.4z m-151.744 275.2c-37.76 0-68.368 30.8-68.368 68.8s30.608 68.8 68.368 68.8c37.76 0 68.368-30.8 68.368-68.8s-30.608-68.8-68.368-68.8z m205.088 0c-37.76 0-68.368 30.8-68.368 68.8s30.608 68.8 68.368 68.8c37.76 0 68.368-30.8 68.368-68.8s-30.608-68.8-68.368-68.8z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-dizhi */} {/* icon-dizhi */}
{ name === 'icon-dizhi' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 64c194.4 0 352 154.24 352 344.48 0 63.424-29.328 143.76-88 241.008l-0.768 1.28-5.264 5.792C705.696 725.92 613.92 769.28 512 769.28c-104.72 0-198.752-45.808-263.232-118.528C189.6 552.976 160 472.192 160 408.48 160 218.24 317.6 64 512 64z m0 241.28c-61.392 0-111.152 49.856-111.152 111.36S450.608 528 512 528s111.152-49.856 111.152-111.36-49.76-111.36-111.152-111.36z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M775.232 650.752C740.4 708.336 695.312 771.84 640 841.232l-17.824 22.112-18.496 22.512c-3.136 3.776-6.304 7.584-9.504 11.392l-19.52 23.104-20.192 23.488c-6.848 7.904-13.808 15.856-20.88 23.888L512 992a4097.536 4097.536 0 0 1-42.448-48.16l-20.192-23.488-19.52-23.104c-3.2-3.808-6.368-7.616-9.504-11.392l-18.496-22.512L384 841.232c-55.328-69.408-100.416-132.896-135.248-190.48 64.48 72.72 158.512 118.528 263.232 118.528 101.92 0 193.696-43.376 257.968-112.72l5.28-5.808z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-dizhi' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 64c194.4 0 352 154.24 352 344.48 0 63.424-29.328 143.76-88 241.008l-0.768 1.28-5.264 5.792C705.696 725.92 613.92 769.28 512 769.28c-104.72 0-198.752-45.808-263.232-118.528C189.6 552.976 160 472.192 160 408.48 160 218.24 317.6 64 512 64z m0 241.28c-61.392 0-111.152 49.856-111.152 111.36S450.608 528 512 528s111.152-49.856 111.152-111.36-49.76-111.36-111.152-111.36z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M775.232 650.752C740.4 708.336 695.312 771.84 640 841.232l-17.824 22.112-18.496 22.512c-3.136 3.776-6.304 7.584-9.504 11.392l-19.52 23.104-20.192 23.488c-6.848 7.904-13.808 15.856-20.88 23.888L512 992a4097.536 4097.536 0 0 1-42.448-48.16l-20.192-23.488-19.52-23.104c-3.2-3.808-6.368-7.616-9.504-11.392l-18.496-22.512L384 841.232c-55.328-69.408-100.416-132.896-135.248-190.48 64.48 72.72 158.512 118.528 263.232 118.528 101.92 0 193.696-43.376 257.968-112.72l5.28-5.808z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shouhouzhongxin */} {/* icon-shouhouzhongxin */}
{ name === 'icon-shouhouzhongxin' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M848 384a32 32 0 0 1 32 32v448a32 32 0 0 1-32 32H176a32 32 0 0 1-32-32V416a32 32 0 0 1 32-32h672z m-376.448 112H384l11.264 13.312 68.608 132.608h-71.168l-6.656 48.64h77.312l-13.312 95.232h77.824l13.312-95.232h77.824l6.656-48.64h-71.168L670.72 496h-83.504l-71.12 98.816L471.552 496z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M335.536 148.56a32 32 0 0 1 35.12 53.44l-2.192 1.44L307.488 240H832a32 32 0 0 1 31.92 29.6L864 272a32 32 0 0 1-29.6 31.92L832 304H192c-31.616 0-43.68-40.576-18.528-58.112l2.064-1.328 160-96z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shouhouzhongxin' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M848 384a32 32 0 0 1 32 32v448a32 32 0 0 1-32 32H176a32 32 0 0 1-32-32V416a32 32 0 0 1 32-32h672z m-376.448 112H384l11.264 13.312 68.608 132.608h-71.168l-6.656 48.64h77.312l-13.312 95.232h77.824l13.312-95.232h77.824l6.656-48.64h-71.168L670.72 496h-83.504l-71.12 98.816L471.552 496z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M335.536 148.56a32 32 0 0 1 35.12 53.44l-2.192 1.44L307.488 240H832a32 32 0 0 1 31.92 29.6L864 272a32 32 0 0 1-29.6 31.92L832 304H192c-31.616 0-43.68-40.576-18.528-58.112l2.064-1.328 160-96z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-wodeshoucang */} {/* icon-wodeshoucang */}
{ name === 'icon-wodeshoucang' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 128c6.48 0 13.072 1.424 19.264 4.448 8.592 4.16 15.552 11.024 19.792 19.488l98.88 197.44c3.808 7.6 11.152 12.864 19.68 14.08l221.088 31.68c23.808 3.392 40.304 25.168 36.832 48.64a42.704 42.704 0 0 1-12.688 24.544l-160 153.696c-6.16 5.92-8.96 14.432-7.52 22.8l37.776 217.008c4.064 23.36-11.84 45.536-35.552 49.552-9.44 1.6-19.152 0.08-27.632-4.32l-197.76-102.448a26.432 26.432 0 0 0-12.16-2.96z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3Cpath d='M512 128v673.648c-4.176 0-8.352 0.976-12.16 2.96L302.08 907.04c-21.28 11.04-47.616 2.976-58.816-18.016a42.368 42.368 0 0 1-4.368-27.216L276.64 644.8a25.52 25.52 0 0 0-7.52-22.8L109.152 468.32a42.48 42.48 0 0 1-0.8-60.688 43.776 43.776 0 0 1 24.928-12.512l221.12-31.664a26.112 26.112 0 0 0 19.664-14.08l98.88-197.44A43.616 43.616 0 0 1 511.984 128z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-wodeshoucang' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 128c6.48 0 13.072 1.424 19.264 4.448 8.592 4.16 15.552 11.024 19.792 19.488l98.88 197.44c3.808 7.6 11.152 12.864 19.68 14.08l221.088 31.68c23.808 3.392 40.304 25.168 36.832 48.64a42.704 42.704 0 0 1-12.688 24.544l-160 153.696c-6.16 5.92-8.96 14.432-7.52 22.8l37.776 217.008c4.064 23.36-11.84 45.536-35.552 49.552-9.44 1.6-19.152 0.08-27.632-4.32l-197.76-102.448a26.432 26.432 0 0 0-12.16-2.96z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3Cpath d='M512 128v673.648c-4.176 0-8.352 0.976-12.16 2.96L302.08 907.04c-21.28 11.04-47.616 2.976-58.816-18.016a42.368 42.368 0 0 1-4.368-27.216L276.64 644.8a25.52 25.52 0 0 0-7.52-22.8L109.152 468.32a42.48 42.48 0 0 1-0.8-60.688 43.776 43.776 0 0 1 24.928-12.512l221.12-31.664a26.112 26.112 0 0 0 19.664-14.08l98.88-197.44A43.616 43.616 0 0 1 511.984 128z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shoukuanliebiao */} {/* icon-shoukuanliebiao */}
{ name === 'icon-shoukuanliebiao' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M832 128a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32H288a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h544z m-128 592H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z m0-128H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM542.176 208H464l10.064 11.76 61.248 117.152h-63.536l-5.952 42.96h69.04L522.976 464h69.488l11.872-84.128h69.488l5.952-42.96h-63.552L720 208h-74.56l-63.504 87.296L542.176 208z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M288 128a32 32 0 0 0-32 32v704a32 32 0 0 0 32 32h-80a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shoukuanliebiao' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M832 128a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32H288a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h544z m-128 592H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z m0-128H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM542.176 208H464l10.064 11.76 61.248 117.152h-63.536l-5.952 42.96h69.04L522.976 464h69.488l11.872-84.128h69.488l5.952-42.96h-63.552L720 208h-74.56l-63.504 87.296L542.176 208z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M288 128a32 32 0 0 0-32 32v704a32 32 0 0 0 32 32h-80a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-madanguanli */} {/* icon-madanguanli */}
{ name === 'icon-madanguanli' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M128 128m32 0l288 0q32 0 32 32l0 288q0 32-32 32l-288 0q-32 0-32-32l0-288q0-32 32-32Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M544 128m32 0l288 0q32 0 32 32l0 288q0 32-32 32l-288 0q-32 0-32-32l0-288q0-32 32-32Z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M128 544m32 0l288 0q32 0 32 32l0 288q0 32-32 32l-288 0q-32 0-32-32l0-288q0-32 32-32Z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M544 544m32 0l80 0q32 0 32 32l0 288q0 32-32 32l-80 0q-32 0-32-32l0-288q0-32 32-32Z' fill='${(isStr ? colors : colors?.[3]) || 'rgb(69,129,255)'}' opacity='.6' /%3E%3Cpath d='M752 544m32 0l80 0q32 0 32 32l0 288q0 32-32 32l-80 0q-32 0-32-32l0-288q0-32 32-32Z' fill='${(isStr ? colors : colors?.[4]) || 'rgb(69,129,255)'}' opacity='.6' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-madanguanli' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M128 128m32 0l288 0q32 0 32 32l0 288q0 32-32 32l-288 0q-32 0-32-32l0-288q0-32 32-32Z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M544 128m32 0l288 0q32 0 32 32l0 288q0 32-32 32l-288 0q-32 0-32-32l0-288q0-32 32-32Z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M128 544m32 0l288 0q32 0 32 32l0 288q0 32-32 32l-288 0q-32 0-32-32l0-288q0-32 32-32Z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M544 544m32 0l80 0q32 0 32 32l0 288q0 32-32 32l-80 0q-32 0-32-32l0-288q0-32 32-32Z' fill='${(isStr ? colors : colors?.[3]) || 'rgb(69,129,255)'}' opacity='.6' /%3E%3Cpath d='M752 544m32 0l80 0q32 0 32 32l0 288q0 32-32 32l-80 0q-32 0-32-32l0-288q0-32 32-32Z' fill='${(isStr ? colors : colors?.[4]) || 'rgb(69,129,255)'}' opacity='.6' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-qusechazhao */} {/* icon-qusechazhao */}
{ name === 'icon-qusechazhao' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M868.528 816.8c59.36 0 107.472-46.48 107.472-103.824 0-38.224-35.824-102.496-107.472-192.816-71.648 90.32-107.472 154.592-107.472 192.816 0 57.344 48.112 103.84 107.472 103.84z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3Cpath d='M344 105.44l75.76 53.04c3.392 2.368 6.384 5.12 8.928 8.144 3.728 1.376 7.344 3.248 10.752 5.632l341.968 239.456a47.008 47.008 0 0 1 11.552 65.472L498.224 898.112a47.008 47.008 0 0 1-65.472 11.536L90.768 670.192a47.008 47.008 0 0 1-11.536-65.472l268.064-382.848-56.928-39.84A46.752 46.752 0 1 1 344 105.44z m112.528 192.928a40.336 40.336 0 0 0-56.128 9.904L221.424 563.76a40.288 40.288 0 0 0 44.448 61.76l382.24-113.232a40.288 40.288 0 0 0 11.68-71.648z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-qusechazhao' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M868.528 816.8c59.36 0 107.472-46.48 107.472-103.824 0-38.224-35.824-102.496-107.472-192.816-71.648 90.32-107.472 154.592-107.472 192.816 0 57.344 48.112 103.84 107.472 103.84z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3Cpath d='M344 105.44l75.76 53.04c3.392 2.368 6.384 5.12 8.928 8.144 3.728 1.376 7.344 3.248 10.752 5.632l341.968 239.456a47.008 47.008 0 0 1 11.552 65.472L498.224 898.112a47.008 47.008 0 0 1-65.472 11.536L90.768 670.192a47.008 47.008 0 0 1-11.536-65.472l268.064-382.848-56.928-39.84A46.752 46.752 0 1 1 344 105.44z m112.528 192.928a40.336 40.336 0 0 0-56.128 9.904L221.424 563.76a40.288 40.288 0 0 0 44.448 61.76l382.24-113.232a40.288 40.288 0 0 0 11.68-71.648z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-pandiansaoma */} {/* icon-pandiansaoma */}
{ name === 'icon-pandiansaoma' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M224 128h304v768H224a96 96 0 0 1-96-96V224a96 96 0 0 1 96-96z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3Cpath d='M128 480h768v64H128zM896 656v208a32 32 0 0 1-32 32H656l-0.016-64H832V656h64z m-704 0v176h175.984L368 896H160a32 32 0 0 1-32-32V656h64zM864 128a32 32 0 0 1 32 32v208h-64V192H655.984L656 128h208zM128 160a32 32 0 0 1 32-32h208l-0.016 64H192v176H128V160z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-pandiansaoma' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M224 128h304v768H224a96 96 0 0 1-96-96V224a96 96 0 0 1 96-96z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3Cpath d='M128 480h768v64H128zM896 656v208a32 32 0 0 1-32 32H656l-0.016-64H832V656h64z m-704 0v176h175.984L368 896H160a32 32 0 0 1-32-32V656h64zM864 128a32 32 0 0 1 32 32v208h-64V192H655.984L656 128h208zM128 160a32 32 0 0 1 32-32h208l-0.016 64H192v176H128V160z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-yaoqingma */} {/* icon-yaoqingma */}
{ name === 'icon-yaoqingma' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M768 128a32 32 0 0 1 32 32v299.984L512 544l-288-84.016V160a32 32 0 0 1 32-32h512z m-112 240H368a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z m0-128H368a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.5' /%3E%3Cpath d='M168.96 443.952L512 544l343.04-100.048a32 32 0 0 1 40.96 30.72V864a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V474.672a32 32 0 0 1 40.96-30.72z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(64,122,244)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-yaoqingma' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M768 128a32 32 0 0 1 32 32v299.984L512 544l-288-84.016V160a32 32 0 0 1 32-32h512z m-112 240H368a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z m0-128H368a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h288a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.5' /%3E%3Cpath d='M168.96 443.952L512 544l343.04-100.048a32 32 0 0 1 40.96 30.72V864a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V474.672a32 32 0 0 1 40.96-30.72z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(64,122,244)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-duizhang */} {/* icon-duizhang */}
{ name === 'icon-duizhang' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M864 96a32 32 0 0 1 32 32v608a32 32 0 0 1-32 32h-128V288a32 32 0 0 0-29.6-31.92L704 256H288V128a32 32 0 0 1 32-32h544z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.5' /%3E%3Cpath d='M704 256a32 32 0 0 1 32 32v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32h544zM375.552 464H288l11.264 13.312 68.608 132.608h-71.168l-6.656 48.64h77.312l-13.312 95.232h77.824l13.312-95.232h77.824l6.656-48.64h-71.168L574.72 464h-83.504l-71.12 98.816L375.552 464z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-duizhang' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M864 96a32 32 0 0 1 32 32v608a32 32 0 0 1-32 32h-128V288a32 32 0 0 0-29.6-31.92L704 256H288V128a32 32 0 0 1 32-32h544z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.5' /%3E%3Cpath d='M704 256a32 32 0 0 1 32 32v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32h544zM375.552 464H288l11.264 13.312 68.608 132.608h-71.168l-6.656 48.64h77.312l-13.312 95.232h77.824l13.312-95.232h77.824l6.656-48.64h-71.168L574.72 464h-83.504l-71.12 98.816L375.552 464z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-tihuoliebiao */} {/* icon-tihuoliebiao */}
{ name === 'icon-tihuoliebiao' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M880 496v317.088A34.912 34.912 0 0 1 845.088 848H274.912A34.912 34.912 0 0 1 240 813.088V496h640zM240 242.912c0-19.28 15.632-34.912 34.912-34.912h570.176c19.28 0 34.912 15.632 34.912 34.912V432H240V242.912z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M224 144a16 16 0 0 1 16 16v668.112c7.84 5.28 14.624 12.032 19.888 19.888H880a32 32 0 0 1 32 32v16a32 32 0 0 1-32 32H259.872A72 72 0 1 1 160 828.144V224L112 224a16 16 0 0 1-16-16v-48a16 16 0 0 1 16-16h112z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-tihuoliebiao' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M880 496v317.088A34.912 34.912 0 0 1 845.088 848H274.912A34.912 34.912 0 0 1 240 813.088V496h640zM240 242.912c0-19.28 15.632-34.912 34.912-34.912h570.176c19.28 0 34.912 15.632 34.912 34.912V432H240V242.912z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M224 144a16 16 0 0 1 16 16v668.112c7.84 5.28 14.624 12.032 19.888 19.888H880a32 32 0 0 1 32 32v16a32 32 0 0 1-32 32H259.872A72 72 0 1 1 160 828.144V224L112 224a16 16 0 0 1-16-16v-48a16 16 0 0 1 16-16h112z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-yangpinduibi */} {/* icon-yangpinduibi */}
{ name === 'icon-yangpinduibi' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M528 80a32 32 0 0 1 32 32v800a32 32 0 0 1-32 32h-32a32 32 0 0 1-32-32v-64H160a32 32 0 0 1-32-32V208a32 32 0 0 1 32-32h304V112a32 32 0 0 1 32-32h32z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M560 176h304a32 32 0 0 1 32 32v608a32 32 0 0 1-32 32H560V176z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-yangpinduibi' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M528 80a32 32 0 0 1 32 32v800a32 32 0 0 1-32 32h-32a32 32 0 0 1-32-32v-64H160a32 32 0 0 1-32-32V208a32 32 0 0 1 32-32h304V112a32 32 0 0 1 32-32h32z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M560 176h304a32 32 0 0 1 32 32v608a32 32 0 0 1-32 32H560V176z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-yansequyang */} {/* icon-yansequyang */}
{ name === 'icon-yansequyang' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M760.896 104.704a32 32 0 0 1 45.264 0l113.12 113.136a32 32 0 0 1 0 45.264L828.8 353.6l22.624 22.624a32 32 0 0 1 0 45.248l-45.248 45.264a32 32 0 0 1-45.264 0L557.248 263.104a32 32 0 0 1 0-45.264l45.264-45.248a32 32 0 0 1 45.248 0L670.4 195.2l90.512-90.512z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M579.888 285.728l158.4 158.4-396 395.968a48 48 0 0 1-67.872 0l-22.624 22.624a64 64 0 1 1-90.512-90.512l22.624-22.624a48 48 0 0 1 0-67.872l395.984-396z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.5' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-yansequyang' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M760.896 104.704a32 32 0 0 1 45.264 0l113.12 113.136a32 32 0 0 1 0 45.264L828.8 353.6l22.624 22.624a32 32 0 0 1 0 45.248l-45.248 45.264a32 32 0 0 1-45.264 0L557.248 263.104a32 32 0 0 1 0-45.264l45.264-45.248a32 32 0 0 1 45.248 0L670.4 195.2l90.512-90.512z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M579.888 285.728l158.4 158.4-396 395.968a48 48 0 0 1-67.872 0l-22.624 22.624a64 64 0 1 1-90.512-90.512l22.624-22.624a48 48 0 0 1 0-67.872l395.984-396z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.5' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-fahuoliebiao */} {/* icon-fahuoliebiao */}
{ name === 'icon-fahuoliebiao' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M864 416a32 32 0 0 1 32 32v416a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V448a32 32 0 0 1 32-32h704z m-80 320H528a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h256a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z m0-128H608a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M748.8 192a32 32 0 0 1 28.24 16.944L896 432v16a32 32 0 0 0-32-32H160a32 32 0 0 0-32 32v-16l118.96-223.056A32 32 0 0 1 275.2 192h473.6z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-fahuoliebiao' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M864 416a32 32 0 0 1 32 32v416a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V448a32 32 0 0 1 32-32h704z m-80 320H528a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h256a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z m0-128H608a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h176a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M748.8 192a32 32 0 0 1 28.24 16.944L896 432v16a32 32 0 0 0-32-32H160a32 32 0 0 0-32 32v-16l118.96-223.056A32 32 0 0 1 275.2 192h473.6z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-yuncangkucun */} {/* icon-yuncangkucun */}
{ name === 'icon-yuncangkucun' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M848 432v445.088A34.912 34.912 0 0 1 813.088 912H210.912A34.912 34.912 0 0 1 176 877.088V432h672zM608 704H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z m0-128H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3Cpath d='M536 64c108.8 0 197.328 86.88 199.936 195.072l0.016 1.024 3.936-2.624a112 112 0 1 1 63.952 206.464L800 464H392.8c-31.52 29.76-74.032 48-120.8 48-97.2 0-176-78.8-176-176s78.8-176 176-176c29.712 0 57.712 7.36 82.272 20.368C385.92 111.68 455.392 64 536 64z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-yuncangkucun' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M848 432v445.088A34.912 34.912 0 0 1 813.088 912H210.912A34.912 34.912 0 0 1 176 877.088V432h672zM608 704H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z m0-128H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3Cpath d='M536 64c108.8 0 197.328 86.88 199.936 195.072l0.016 1.024 3.936-2.624a112 112 0 1 1 63.952 206.464L800 464H392.8c-31.52 29.76-74.032 48-120.8 48-97.2 0-176-78.8-176-176s78.8-176 176-176c29.712 0 57.712 7.36 82.272 20.368C385.92 111.68 455.392 64 536 64z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-xiaoshou */} {/* icon-xiaoshou */}
{ name === 'icon-xiaoshou' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M511.92 496c159.808 0 298.16 97.36 365.056 239.152 13.76 29.184 25.264 72.912 34.496 131.2A53.312 53.312 0 0 1 858.784 928H518.768l63.552-80.736-70.4-342-70.4 342L505.024 928H165.152a53.312 53.312 0 0 1-52.592-61.808c9.664-60.08 21.712-105.056 36.16-134.912C216.288 591.6 353.568 496 511.92 496z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.5' /%3E%3Cpath d='M520 296m-216 0a216 216 0 1 0 432 0 216 216 0 1 0-432 0Z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(64,141,250)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-xiaoshou' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M511.92 496c159.808 0 298.16 97.36 365.056 239.152 13.76 29.184 25.264 72.912 34.496 131.2A53.312 53.312 0 0 1 858.784 928H518.768l63.552-80.736-70.4-342-70.4 342L505.024 928H165.152a53.312 53.312 0 0 1-52.592-61.808c9.664-60.08 21.712-105.056 36.16-134.912C216.288 591.6 353.568 496 511.92 496z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.5' /%3E%3Cpath d='M520 296m-216 0a216 216 0 1 0 432 0 216 216 0 1 0-432 0Z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(64,141,250)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-qianzhicangkucun */} {/* icon-qianzhicangkucun */}
{ name === 'icon-qianzhicangkucun' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M904.032 338.016a22.016 22.016 0 0 0-1.456-4.432l-67.616-154C823.28 147.776 790.944 128 750.272 128h-474.56c-39.856 0-70.832 19.392-82.064 50.064l-72.672 157.12a31.776 31.776 0 0 0-1.04 3.696A134.816 134.816 0 0 0 112 384.224c0.064 53.76 32.304 102.848 84.08 128.048 21.312 10.448 46.432 15.728 74.64 15.728h0.096c47.328-0.096 91.168-19.136 121.056-51.696 29.728 32.272 73.232 51.2 120.48 51.456 46.88-0.32 90.224-19.312 119.84-51.584 29.872 32.56 73.776 51.52 121.344 51.52 28.8-0.144 54.336-5.664 75.84-16.48 51.008-25.472 82.656-74.368 82.624-127.552a132.032 132.032 0 0 0-7.728-44.576 8.768 8.768 0 0 0-0.24-1.072z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M848 432v445.088A34.912 34.912 0 0 1 813.088 912H210.912A34.912 34.912 0 0 1 176 877.088V432h672zM608 752H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z m0-128H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-qianzhicangkucun' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M904.032 338.016a22.016 22.016 0 0 0-1.456-4.432l-67.616-154C823.28 147.776 790.944 128 750.272 128h-474.56c-39.856 0-70.832 19.392-82.064 50.064l-72.672 157.12a31.776 31.776 0 0 0-1.04 3.696A134.816 134.816 0 0 0 112 384.224c0.064 53.76 32.304 102.848 84.08 128.048 21.312 10.448 46.432 15.728 74.64 15.728h0.096c47.328-0.096 91.168-19.136 121.056-51.696 29.728 32.272 73.232 51.2 120.48 51.456 46.88-0.32 90.224-19.312 119.84-51.584 29.872 32.56 73.776 51.52 121.344 51.52 28.8-0.144 54.336-5.664 75.84-16.48 51.008-25.472 82.656-74.368 82.624-127.552a132.032 132.032 0 0 0-7.728-44.576 8.768 8.768 0 0 0-0.24-1.072z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3Cpath d='M848 432v445.088A34.912 34.912 0 0 1 813.088 912H210.912A34.912 34.912 0 0 1 176 877.088V432h672zM608 752H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z m0-128H416a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h192a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.4' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-lingquseka */} {/* icon-lingquseka */}
{ name === 'icon-lingquseka' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M352 160a32 32 0 0 1 32 32v672a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V192a32 32 0 0 1 32-32h192z m-96 560a48 48 0 1 0 0 96 48 48 0 0 0 0-96z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.6' /%3E%3Cpath d='M648.432 230.624l135.76 135.76a32 32 0 0 1 0 45.264L331.648 864.192a32 32 0 0 1-45.264 0l-54.992-54.976a48 48 0 1 0-16.608-16.608l-64.16-64.176a32 32 0 0 1 0-45.264l452.544-452.544a32 32 0 0 1 45.264 0z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.8' /%3E%3Cpath d='M864 640a32 32 0 0 1 32 32v192a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V672a32 32 0 0 1 32-32h704z m-608 80a48 48 0 1 0 0 96 48 48 0 0 0 0-96z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-lingquseka' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M352 160a32 32 0 0 1 32 32v672a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V192a32 32 0 0 1 32-32h192z m-96 560a48 48 0 1 0 0 96 48 48 0 0 0 0-96z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' opacity='.6' /%3E%3Cpath d='M648.432 230.624l135.76 135.76a32 32 0 0 1 0 45.264L331.648 864.192a32 32 0 0 1-45.264 0l-54.992-54.976a48 48 0 1 0-16.608-16.608l-64.16-64.176a32 32 0 0 1 0-45.264l452.544-452.544a32 32 0 0 1 45.264 0z' fill='${(isStr ? colors : colors?.[1]) || 'rgb(69,129,255)'}' opacity='.8' /%3E%3Cpath d='M864 640a32 32 0 0 1 32 32v192a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V672a32 32 0 0 1 32-32h704z m-608 80a48 48 0 1 0 0 96 48 48 0 0 0 0-96z' fill='${(isStr ? colors : colors?.[2]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-gouwu1 */} {/* icon-gouwu1 */}
{ name === 'icon-gouwu1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 128a144 144 0 0 1 144 144v32h84.032a32 32 0 0 1 31.712 27.712l71.36 528A32 32 0 0 1 811.392 896H212.608a32 32 0 0 1-31.712-36.288l71.36-528A32 32 0 0 1 283.968 304h84.016L368 272a144 144 0 0 1 144-144z m214.048 224H297.936l-67.024 496h562.16l-67.024-496zM512 176a96 96 0 0 0-95.936 92.4L416 272v32h192v-32a96 96 0 0 0-92.4-95.936L512 176z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-gouwu1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 128a144 144 0 0 1 144 144v32h84.032a32 32 0 0 1 31.712 27.712l71.36 528A32 32 0 0 1 811.392 896H212.608a32 32 0 0 1-31.712-36.288l71.36-528A32 32 0 0 1 283.968 304h84.016L368 272a144 144 0 0 1 144-144z m214.048 224H297.936l-67.024 496h562.16l-67.024-496zM512 176a96 96 0 0 0-95.936 92.4L416 272v32h192v-32a96 96 0 0 0-92.4-95.936L512 176z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-dingdan1 */} {/* icon-dingdan1 */}
{ name === 'icon-dingdan1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M816 128a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32H208a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h608z m-16 48H224v672h576V176z m-120 448a24 24 0 0 1 0 48h-336a24 24 0 0 1 0-48h336z m0-144a24 24 0 0 1 0 48h-336a24 24 0 0 1 0-48h336z m0-144a24 24 0 0 1 0 48h-336a24 24 0 0 1 0-48h336z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-dingdan1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M816 128a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32H208a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h608z m-16 48H224v672h576V176z m-120 448a24 24 0 0 1 0 48h-336a24 24 0 0 1 0-48h336z m0-144a24 24 0 0 1 0 48h-336a24 24 0 0 1 0-48h336z m0-144a24 24 0 0 1 0 48h-336a24 24 0 0 1 0-48h336z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-gerenzhongxin1 */} {/* icon-gerenzhongxin1 */}
{ name === 'icon-gerenzhongxin1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M624 544c150.224 0 272 121.776 272 272v80H128v-80c0-150.224 121.776-272 272-272h224z m0 48H400c-122.048 0-221.28 97.6-223.952 218.992L176 816v32h672v-32c0-122.048-97.6-221.28-218.992-223.952L624 592zM512 128a144 144 0 0 1 144 144v80a144 144 0 0 1-139.76 143.936L512 496a144 144 0 0 1-144-144v-80a144 144 0 0 1 139.76-143.936L512 128z m0 48a96 96 0 0 0-95.936 92.4L416 272v80a96 96 0 0 0 191.936 3.6L608 352v-80a96 96 0 0 0-96-96z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-gerenzhongxin1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M624 544c150.224 0 272 121.776 272 272v80H128v-80c0-150.224 121.776-272 272-272h224z m0 48H400c-122.048 0-221.28 97.6-223.952 218.992L176 816v32h672v-32c0-122.048-97.6-221.28-218.992-223.952L624 592zM512 128a144 144 0 0 1 144 144v80a144 144 0 0 1-139.76 143.936L512 496a144 144 0 0 1-144-144v-80a144 144 0 0 1 139.76-143.936L512 128z m0 48a96 96 0 0 0-95.936 92.4L416 272v80a96 96 0 0 0 191.936 3.6L608 352v-80a96 96 0 0 0-96-96z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shouye1 */} {/* icon-shouye1 */}
{ name === 'icon-shouye1' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M543.84 690.24a31.728 31.728 0 0 0-29.472-31.552L512 658.592a31.76 31.76 0 0 0-31.744 29.296l-0.08 2.368V896h-47.76v-0.016L241.44 896a31.744 31.744 0 0 1-31.84-31.648V539.648l-39.84 39.872c-9.28 9.28-24.352 9.216-33.664-0.096a23.84 23.84 0 0 1-1.632-31.984l1.536-1.68 73.6-73.632v-3.456h3.456l236.288-236.272c33.168-33.168 86.592-33.824 120.912-2.096l2.544 2.432 235.936 235.936h5.648v5.648l73.52 73.536c9.328 9.328 9.376 24.4 0.096 33.664a23.792 23.792 0 0 1-31.968 1.456l-1.696-1.552-39.952-39.952v322.88c0 17.472-14.24 31.648-31.824 31.648l-190.992-0.016V896H543.84V690.24z m-58.832-425.856l-1.888 1.776-225.776 225.744v356.608h175.072v-158.256c0-43.712 35.632-79.136 79.584-79.136 43.952 0 79.584 35.424 79.584 79.136l-0.016 158.256h175.088l-0.016-354.784-227.408-227.408a39.696 39.696 0 0 0-54.224-1.936z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shouye1' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M543.84 690.24a31.728 31.728 0 0 0-29.472-31.552L512 658.592a31.76 31.76 0 0 0-31.744 29.296l-0.08 2.368V896h-47.76v-0.016L241.44 896a31.744 31.744 0 0 1-31.84-31.648V539.648l-39.84 39.872c-9.28 9.28-24.352 9.216-33.664-0.096a23.84 23.84 0 0 1-1.632-31.984l1.536-1.68 73.6-73.632v-3.456h3.456l236.288-236.272c33.168-33.168 86.592-33.824 120.912-2.096l2.544 2.432 235.936 235.936h5.648v5.648l73.52 73.536c9.328 9.328 9.376 24.4 0.096 33.664a23.792 23.792 0 0 1-31.968 1.456l-1.696-1.552-39.952-39.952v322.88c0 17.472-14.24 31.648-31.824 31.648l-190.992-0.016V896H543.84V690.24z m-58.832-425.856l-1.888 1.776-225.776 225.744v356.608h175.072v-158.256c0-43.712 35.632-79.136 79.584-79.136 43.952 0 79.584 35.424 79.584 79.136l-0.016 158.256h175.088l-0.016-354.784-227.408-227.408a39.696 39.696 0 0 0-54.224-1.936z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(68,68,68)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-gerenzhongxin */} {/* icon-gerenzhongxin */}
{ name === 'icon-gerenzhongxin' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 128a144 144 0 0 1 144 144v80a144 144 0 0 1-288 0v-80a144 144 0 0 1 144-144z m112 416c150.224 0 272 121.776 272 272v80H128v-80c0-150.224 121.776-272 272-272h224z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-gerenzhongxin' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 128a144 144 0 0 1 144 144v80a144 144 0 0 1-288 0v-80a144 144 0 0 1 144-144z m112 416c150.224 0 272 121.776 272 272v80H128v-80c0-150.224 121.776-272 272-272h224z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-dingdan */} {/* icon-dingdan */}
{ name === 'icon-dingdan' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M816 128a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32H208a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h608z m-136 496h-336a24 24 0 0 0 0 48h336a24 24 0 0 0 0-48z m0-144h-336a24 24 0 0 0 0 48h336a24 24 0 0 0 0-48z m0-144h-336a24 24 0 0 0 0 48h336a24 24 0 0 0 0-48z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-dingdan' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M816 128a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32H208a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h608z m-136 496h-336a24 24 0 0 0 0 48h336a24 24 0 0 0 0-48z m0-144h-336a24 24 0 0 0 0 48h336a24 24 0 0 0 0-48z m0-144h-336a24 24 0 0 0 0 48h336a24 24 0 0 0 0-48z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-shouye */} {/* icon-shouye */}
{ name === 'icon-shouye' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M570.256 230.304l2.544 2.432 235.936 235.936h5.648v5.648l73.52 73.536c9.328 9.328 9.376 24.4 0.096 33.664a23.792 23.792 0 0 1-31.968 1.456l-1.696-1.552-39.952-39.952v322.88c0 17.472-14.24 31.648-31.824 31.648l-190.992-0.016V896H576V688a64 64 0 1 0-128 0v208h-15.584v-0.016L241.44 896a31.744 31.744 0 0 1-31.84-31.648V539.648l-39.84 39.872c-9.28 9.28-24.352 9.216-33.664-0.096a23.84 23.84 0 0 1-1.632-31.984l1.536-1.68 73.6-73.632v-3.456h3.456l236.288-236.272c33.168-33.168 86.592-33.824 120.912-2.096z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-shouye' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M570.256 230.304l2.544 2.432 235.936 235.936h5.648v5.648l73.52 73.536c9.328 9.328 9.376 24.4 0.096 33.664a23.792 23.792 0 0 1-31.968 1.456l-1.696-1.552-39.952-39.952v322.88c0 17.472-14.24 31.648-31.824 31.648l-190.992-0.016V896H576V688a64 64 0 1 0-128 0v208h-15.584v-0.016L241.44 896a31.744 31.744 0 0 1-31.84-31.648V539.648l-39.84 39.872c-9.28 9.28-24.352 9.216-33.664-0.096a23.84 23.84 0 0 1-1.632-31.984l1.536-1.68 73.6-73.632v-3.456h3.456l236.288-236.272c33.168-33.168 86.592-33.824 120.912-2.096z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
{/* icon-gouwu */} {/* icon-gouwu */}
{ name === 'icon-gouwu' && (<View style={{backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 128a144 144 0 0 1 144 144v32h84.032a32 32 0 0 1 31.712 27.712l71.36 528A32 32 0 0 1 811.392 896H212.608a32 32 0 0 1-31.712-36.288l71.36-528A32 32 0 0 1 283.968 304h84.016L368 272a144 144 0 0 1 144-144z m0 48a96 96 0 0 0-95.936 92.4L416 272v32h192v-32a96 96 0 0 0-92.4-95.936L512 176z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle}} className={classnames("icon", customClassName)} />) } { name === 'icon-gouwu' && (<View style={{ backgroundImage: `url(${quot}data:image/svg+xml, %3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='${svgSize}px' height='${svgSize}px'%3E%3Cpath d='M512 128a144 144 0 0 1 144 144v32h84.032a32 32 0 0 1 31.712 27.712l71.36 528A32 32 0 0 1 811.392 896H212.608a32 32 0 0 1-31.712-36.288l71.36-528A32 32 0 0 1 283.968 304h84.016L368 272a144 144 0 0 1 144-144z m0 48a96 96 0 0 0-95.936 92.4L416 272v32h192v-32a96 96 0 0 0-92.4-95.936L512 176z' fill='${(isStr ? colors : colors?.[0]) || 'rgb(69,129,255)'}' /%3E%3C/svg%3E${quot})`, width: `${svgSize}px`, height: `${svgSize}px`, ...customStyle }} className={classnames('icon', customClassName)} />) }
</Block> </Block>
) )

View File

@ -1,20 +1,21 @@
import { ScrollView, View } from '@tarojs/components' import { ScrollView, View } from '@tarojs/components'
import React, { memo, ReactNode, useMemo, useState } from 'react' import type { ReactNode } from 'react'
import React, { memo, useMemo, useState } from 'react'
import LoadingCard from '../loadingCard'
import style from './index.module.scss' import style from './index.module.scss'
import DotLoading from '@/components/dotLoading' import DotLoading from '@/components/dotLoading'
import LoadingCard from '../loadingCard'
import Empty from '@/components/empty' import Empty from '@/components/empty'
import { EMPTY_IMAGE, SEARCH_EMPTY_IMAGE } from '@/common/constant' import { EMPTY_IMAGE, SEARCH_EMPTY_IMAGE } from '@/common/constant'
export type StatusParam = 0 | 1 | 2 | 3 export type StatusParam = 0 | 1 | 2 | 3
type Params = { interface Params {
styleObj?: React.CSSProperties styleObj?: React.CSSProperties
selfonScrollToLower?: () => void selfonScrollToLower?: () => void
enableLoadMoreStatus?: boolean enableLoadMoreStatus?: boolean
safeAreaInsetBottom?: boolean safeAreaInsetBottom?: boolean
moreStatus?: boolean moreStatus?: boolean
statusMore?: StatusParam //0:数据从无到有加载数据1没有任何数据 2下拉加载3下拉没有数据 statusMore?: StatusParam // 0:数据从无到有加载数据1没有任何数据 2下拉加载3下拉没有数据
children?: ReactNode children?: ReactNode
lowerThresholdNum?: number lowerThresholdNum?: number
selfOnScrollToUpper?: () => void selfOnScrollToUpper?: () => void
@ -49,7 +50,7 @@ export default memo(
moreStatus = true, moreStatus = true,
statusMore = 0, statusMore = 0,
enableBackToTop = true, enableBackToTop = true,
emptySlot emptySlot,
}: Params) => { }: Params) => {
const scrollToLower = () => { const scrollToLower = () => {
selfonScrollToLower?.() selfonScrollToLower?.()
@ -57,7 +58,7 @@ export default memo(
const scrollToUpper = () => { const scrollToUpper = () => {
selfOnScrollToUpper?.() selfOnScrollToUpper?.()
} }
const scroll = e => { const scroll = (e) => {
selfOnScroll?.(e) selfOnScroll?.(e)
} }
const refresherPulling = () => { const refresherPulling = () => {
@ -73,7 +74,7 @@ export default memo(
selfOnRefresherAbort?.() selfOnRefresherAbort?.()
} }
//返回顶部 // 返回顶部
const scrollTop = useMemo(() => { const scrollTop = useMemo(() => {
if (statusMore == 0) { if (statusMore == 0) {
return 0.1 return 0.1
@ -84,36 +85,40 @@ export default memo(
if (enableLoadMoreStatus) { if (enableLoadMoreStatus) {
if (!moreStatus) { if (!moreStatus) {
return ( return (
<View style={{ paddingBottom: paddingBottom + 'rpx' }} className={style.scrollViewCon}> <View style={{ paddingBottom: `${paddingBottom}rpx` }} className={style.scrollViewCon}>
{children} {children}
</View> </View>
) )
} else { }
else {
return ( return (
<> <>
{(statusMore == 2 || statusMore == 3) && ( {(statusMore == 2 || statusMore == 3) && (
<View style={{ paddingBottom: paddingBottom + 'rpx' }} className={style.scrollViewCon}> <View style={{ paddingBottom: `${paddingBottom}rpx` }} className={style.scrollViewCon}>
{children} {children}
<View className={style.infinite_scroll}> <View className={style.infinite_scroll}>
{statusMore == 2 ? ( {statusMore == 2
? (
<View className={style.loading_more}> <View className={style.loading_more}>
<DotLoading /> <DotLoading />
</View> </View>
) : ( )
: (
<View className={style.noMore}></View> <View className={style.noMore}></View>
)} )}
</View> </View>
</View> </View>
)} )}
{statusMore == 0 && <LoadingCard />} {statusMore == 0 && <LoadingCard />}
{statusMore == 1 && (emptySlot ? emptySlot : <Empty picUrl={SEARCH_EMPTY_IMAGE} text='暂无数据'/>)} {statusMore == 1 && (emptySlot || <Empty picUrl={SEARCH_EMPTY_IMAGE} text="暂无数据" />)}
</> </>
) )
} }
} else { }
else {
return ( return (
<View style={{ paddingBottom: paddingBottom + 'rpx' }} className={style.scrollViewCon}> <View style={{ paddingBottom: `${paddingBottom}rpx` }} className={style.scrollViewCon}>
{children} {children}
</View> </View>
) )
@ -123,7 +128,7 @@ export default memo(
return ( return (
<> <>
<ScrollView <ScrollView
id='infiniteScroll' id="infiniteScroll"
style={styleObj} style={styleObj}
className={style.scroll_main} className={style.scroll_main}
scrollY scrollY
@ -137,11 +142,12 @@ export default memo(
onRefresherRefresh={() => refresherRefresh()} onRefresherRefresh={() => refresherRefresh()}
onRefresherRestore={() => refresherRestore()} onRefresherRestore={() => refresherRestore()}
onRefresherAbort={() => refresherAbort()} onRefresherAbort={() => refresherAbort()}
refresherBackground='#F8F8F8' refresherBackground="#F8F8F8"
enableBackToTop={enableBackToTop} enableBackToTop={enableBackToTop}
scrollTop={scrollTop}> scrollTop={scrollTop}
>
{component()} {component()}
{safeAreaInsetBottom && <View className='common_safe_area_y'></View>} {safeAreaInsetBottom && <View className="common_safe_area_y"></View>}
</ScrollView> </ScrollView>
</> </>
) )

View File

@ -1,5 +1,5 @@
import { Button, Radio, View } from '@tarojs/components' import { Button, Radio, View } from '@tarojs/components'
import { FC, ReactNode } from 'react' import type { FC, ReactNode } from 'react'
import classnames from 'classnames' import classnames from 'classnames'
import styles from './index.module.scss' import styles from './index.module.scss'
@ -25,7 +25,7 @@ const LayoutBlock: FC<PropsType> = (props) => {
return classObject return classObject
} }
const handleClick = (event)=>{ const handleClick = (event) => {
console.log('event==>', event) console.log('event==>', event)
onClick && onClick() onClick && onClick()
} }
@ -34,7 +34,8 @@ const LayoutBlock: FC<PropsType> = (props) => {
<View <View
className={classnames(styles.layoutBlock, getClassName(), customClassName)} className={classnames(styles.layoutBlock, getClassName(), customClassName)}
style={customStyle} style={customStyle}
onClick={handleClick}> onClick={handleClick}
>
{children} {children}
</View> </View>
) )

View File

@ -1,15 +1,13 @@
import { View } from "@tarojs/components" import { View } from '@tarojs/components'
import { memo, useMemo } from "react" import { memo, useMemo } from 'react'
import style from './index.module.scss' import style from './index.module.scss'
export default memo(({width=60, color='#6190e8'}:{width?:number, color?:string}) => {
export default memo(({ width = 60, color = '#6190e8' }: { width?: number; color?: string }) => {
const styleObj = useMemo(() => { const styleObj = useMemo(() => {
let obj = {} let obj = {}
if(width > 0) if (width > 0) { obj = { width: `${width}rpx`, height: `${width}rpx` } }
obj = {width: width + 'rpx', height:width + 'rpx'} if (color) { obj = { ...obj, borderColor: `${color} transparent transparent` } }
if(color)
obj = {...obj, borderColor: color+' transparent transparent'}
return obj return obj
}, [width, color]) }, [width, color])
console.log('loading:::') console.log('loading:::')
return ( return (
@ -21,5 +19,4 @@ export default memo(({width=60, color='#6190e8'}:{width?:number, color?:string})
<View style={styleObj} className={style.loading__ring}></View> <View style={styleObj} className={style.loading__ring}></View>
</View> </View>
) )
}) })

Some files were not shown because too many files have changed in this diff Show More