feat(custom): 地图apiKey更换,订单核销详情新增支付方式
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-05-29 15:45:16 +08:00
parent 92d7bf1933
commit 896acaef9e
70 changed files with 408 additions and 376 deletions

View File

@@ -1,8 +1,8 @@
module.exports = { module.exports = {
types: [ types: [
{value: 'feat', name: 'feat: 新增功能'}, { value: 'feat', name: 'feat: 新增功能' },
{value: 'fix', name: 'fix: 修复bug'}, { value: 'fix', name: 'fix: 修复bug' },
{value: 'docs', name: 'docs: 文档变更'}, { value: 'docs', name: 'docs: 文档变更' },
{ {
value: 'style', value: 'style',
name: 'style: 代码格式(不影响功能,例如空格、分号等格式修正)', name: 'style: 代码格式(不影响功能,例如空格、分号等格式修正)',
@@ -11,21 +11,21 @@ module.exports = {
value: 'refactor', value: 'refactor',
name: 'refactor: 代码重构(不包括 bug 修复、功能新增)', name: 'refactor: 代码重构(不包括 bug 修复、功能新增)',
}, },
{value: 'perf', name: 'perf: 性能优化'}, { value: 'perf', name: 'perf: 性能优化' },
{value: 'test', name: 'test: 添加、修改测试用例'}, { value: 'test', name: 'test: 添加、修改测试用例' },
{ {
value: 'build', value: 'build',
name: 'build: 构建流程、外部依赖变更(如升级 npm 包、修改 脚手架 配置等)', name: 'build: 构建流程、外部依赖变更(如升级 npm 包、修改 脚手架 配置等)',
}, },
{value: 'ci', name: 'ci: 修改 CI 配置、脚本'}, { value: 'ci', name: 'ci: 修改 CI 配置、脚本' },
{ {
value: 'chore', value: 'chore',
name: 'chore: 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)', name: 'chore: 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)',
}, },
{value: 'revert', name: 'revert: 回滚 commit'}, { value: 'revert', name: 'revert: 回滚 commit' },
{value: 'wip', name: 'wip: 开发中'}, { value: 'wip', name: 'wip: 开发中' },
{value: 'mod', name: 'mod: 不确定分类的修改'}, { value: 'mod', name: 'mod: 不确定分类的修改' },
{value: 'release', name: 'release: 发布'}, { value: 'release', name: 'release: 发布' },
], ],
scopes: [ scopes: [
['custom', '自定义'], ['custom', '自定义'],

View File

@@ -1,7 +1,8 @@
{ {
"arrowParens": "avoid", "arrowParens": "avoid",
"bracketSameLine": true, "bracketSameLine": true,
"bracketSpacing": false, "bracketSpacing": true,
"singleQuote": true, "singleQuote": true,
"trailingComma": "all" "trailingComma": "all",
"endOfLine": "lf"
} }

View File

@@ -1,10 +1,10 @@
import Components from 'unplugin-vue-components/webpack'; import Components from 'unplugin-vue-components/webpack';
import NutUIResolver from '@nutui/nutui-taro/dist/resolver'; import NutUIResolver from '@nutui/nutui-taro/dist/resolver';
import {UnifiedWebpackPluginV5} from 'weapp-tailwindcss/webpack'; import { UnifiedWebpackPluginV5 } from 'weapp-tailwindcss/webpack';
import {join} from 'node:path'; import { join } from 'node:path';
import {argv} from 'yargs'; import { argv } from 'yargs';
const {robot = 1, desc} = argv; const { robot = 1, desc } = argv;
const CIPluginOptFn = async () => { const CIPluginOptFn = async () => {
/** /**
@@ -25,7 +25,7 @@ const CIPluginOptFn = async () => {
const config = { const config = {
projectName: 'taroApp', projectName: 'taroApp',
date: '2023-8-13', date: '2023-8-13',
designWidth(input: {file: string}) { designWidth(input: { file: string }) {
if (input?.file?.replace(/\\+/g, '/').indexOf('@nutui') > -1) { if (input?.file?.replace(/\\+/g, '/').indexOf('@nutui') > -1) {
return 375; return 375;
} }
@@ -48,10 +48,10 @@ const config = {
framework: 'vue3', framework: 'vue3',
compiler: { compiler: {
type: 'webpack5', type: 'webpack5',
prebundle: {enable: false}, prebundle: { enable: false },
}, },
cache: { cache: {
enable: false, // Webpack 持久化缓存配置建议开启。默认配置请参考https://docs.taro.zone/docs/config-detail#cache enable: true, // Webpack 持久化缓存配置建议开启。默认配置请参考https://docs.taro.zone/docs/config-detail#cache
}, },
sass: { sass: {
data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`, data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`,
@@ -75,7 +75,7 @@ const config = {
}); });
chain.plugin('unplugin-vue-components').use( chain.plugin('unplugin-vue-components').use(
Components({ Components({
resolvers: [NutUIResolver({taro: true})], resolvers: [NutUIResolver({ taro: true })],
}), }),
); );
}, },
@@ -110,7 +110,7 @@ const config = {
webpackChain(chain) { webpackChain(chain) {
chain.plugin('unplugin-vue-components').use( chain.plugin('unplugin-vue-components').use(
Components({ Components({
resolvers: [NutUIResolver({taro: true})], resolvers: [NutUIResolver({ taro: true })],
}), }),
); );
}, },

View File

@@ -36,9 +36,8 @@
"lint:fix": "eslint --fix --ext .ts,.vue .", "lint:fix": "eslint --fix --ext .ts,.vue .",
"lint:staged": "lint-staged", "lint:staged": "lint-staged",
"prepare": "husky install", "prepare": "husky install",
"preview": "vite preview",
"cz": "cz", "cz": "cz",
"lf": "npx prettier --write --end-of-line lf .", "lf": "npx prettier --write",
"postinstall": "weapp-tw patch", "postinstall": "weapp-tw patch",
"build:weapp:prod:upload": "taro build --type weapp --upload --robot=1 --desc='正式环境'", "build:weapp:prod:upload": "taro build --type weapp --upload --robot=1 --desc='正式环境'",
"build:weapp:test:upload": "taro build --type weapp --upload --robot=2 --desc='测试环境' --mode test" "build:weapp:test:upload": "taro build --type weapp --upload --robot=2 --desc='测试环境' --mode test"
@@ -112,6 +111,7 @@
"miniprogram-ci": "^2.0.10", "miniprogram-ci": "^2.0.10",
"postcss": "8.4.29", "postcss": "8.4.29",
"postcss-rem-to-responsive-pixel": "^6.0.2", "postcss-rem-to-responsive-pixel": "^6.0.2",
"prettier": "^3.5.3",
"style-loader": "1.3.0", "style-loader": "1.3.0",
"stylelint": "9.3.0", "stylelint": "9.3.0",
"tailwindcss": "^3.4.17", "tailwindcss": "^3.4.17",
@@ -122,6 +122,5 @@
"weapp-tailwindcss": "^3.7.0", "weapp-tailwindcss": "^3.7.0",
"webpack": "^5.97.1", "webpack": "^5.97.1",
"yargs": "^17.7.2" "yargs": "^17.7.2"
}, }
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
} }

11
pnpm-workspace.yaml Normal file
View File

@@ -0,0 +1,11 @@
onlyBuiltDependencies:
- '@parcel/watcher'
- '@swc/core'
- '@tarojs/binding'
- core-js
- core-js-pure
- esbuild
- protobufjs
- swiper
- vue-demi
- weapp-tailwindcss

View File

@@ -1,4 +1,4 @@
import {createApp} from 'vue'; import { createApp } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import './app.scss'; import './app.scss';

View File

@@ -16,7 +16,7 @@
<script setup lang="ts"> <script setup lang="ts">
// import { computed, ref } from "vue"; // import { computed, ref } from "vue";
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {login} from '@/api/user'; import { login } from '@/api/user';
defineProps({ defineProps({
visible: { visible: {
@@ -40,9 +40,9 @@ const onOk = () => {
desc: '完善用户资料', desc: '完善用户资料',
success: async user => { success: async user => {
Taro.login({ Taro.login({
success: async ({code}) => { success: async ({ code }) => {
try { try {
const {data}: any = await login({ const { data }: any = await login({
code: code, code: code,
nickName: user.userInfo.nickName, nickName: user.userInfo.nickName,
avatarUrl: user.userInfo.avatarUrl, avatarUrl: user.userInfo.avatarUrl,

View File

@@ -1,5 +1,5 @@
<template> <template>
<view class="head-wrapper" :style="{top: BarHeight + 'px'}"> <view class="head-wrapper" :style="{ top: BarHeight + 'px' }">
<view class="head-menu"> <view class="head-menu">
<Left class="iconfont" @click="returns" /> <Left class="iconfont" @click="returns" />
<view class="line"></view> <view class="line"></view>
@@ -11,8 +11,8 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {computed} from 'vue'; import { computed } from 'vue';
import {Home, Left} from '@nutui/icons-vue-taro'; import { Home, Left } from '@nutui/icons-vue-taro';
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight as number; const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight as number;
const BarHeight = computed(() => statusBarHeight - 7); const BarHeight = computed(() => statusBarHeight - 7);

View File

@@ -1,10 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {addCart, getCart, clearCart} from '@/api/cart'; import { addCart, getCart, clearCart } from '@/api/cart';
import {Plus, Minus} from '@nutui/icons-vue-taro'; import { Plus, Minus } from '@nutui/icons-vue-taro';
import {createActiveOrder} from '@/api/goods'; import { createActiveOrder } from '@/api/goods';
import {createAfterOrder, getUserPoint} from '@/api/admin'; import { createAfterOrder, getUserPoint } from '@/api/admin';
import Pay from '@/components/Pay.vue'; import Pay from '@/components/Pay.vue';
interface CardList { interface CardList {
@@ -221,7 +221,7 @@ defineExpose({
</view> </view>
<!-- 购物车弹窗 --> <!-- 购物车弹窗 -->
<nut-popup <nut-popup
:style="{padding: '15px'}" :style="{ padding: '15px' }"
round round
position="bottom" position="bottom"
z-index="1" z-index="1"

View File

@@ -82,13 +82,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {calculateDistance, parseQueryString} from '@/utils'; import { calculateDistance, parseQueryString } from '@/utils';
import {bindParent, getBanner} from '@/api/user'; import { bindParent, getBanner } from '@/api/user';
import {getMerList} from '@/api/goods'; import { getMerList } from '@/api/goods';
const classId = defineModel({default: 0}); const classId = defineModel({ default: 0 });
const list1 = ref<Array<MerData>>([]); const list1 = ref<Array<MerData>>([]);
const list2 = ref<Array<MerData>>([]); const list2 = ref<Array<MerData>>([]);
@@ -166,7 +166,7 @@ const get_mer_list = async () => {
const bannerList = ref<any[]>([]); const bannerList = ref<any[]>([]);
const get_banner_list = async () => { const get_banner_list = async () => {
const {data}: any = await getBanner(); const { data }: any = await getBanner();
bannerList.value = data.data; bannerList.value = data.data;
}; };
@@ -175,7 +175,7 @@ const toPage = async (url: string) => {
// url转对象 // url转对象
const obj = parseQueryString(url); const obj = parseQueryString(url);
if (obj.type === '1') { if (obj.type === '1') {
const {data: res} = await getMerList({}); const { data: res } = await getMerList({});
const mer = res.data.filter(item => item.bid === obj.bid)[0]; const mer = res.data.filter(item => item.bid === obj.bid)[0];
Taro.setStorageSync('mer_info', mer); Taro.setStorageSync('mer_info', mer);
} }

View File

@@ -5,13 +5,13 @@
round round
safe-area-inset-bottom safe-area-inset-bottom
:close-on-click-overlay="false" :close-on-click-overlay="false"
:style="{height: 'auto'}" :style="{ height: 'auto' }"
:visible="isShowPay" :visible="isShowPay"
@click-close-icon="closePay"> @click-close-icon="closePay">
<view class="div"> <view class="div">
<view style="text-align: center">支付方式</view> <view style="text-align: center">支付方式</view>
<nut-cell-group <nut-cell-group
:style="{margin: interval ? '40rpx 0 150rpx 0' : '40rpx 0'}"> :style="{ margin: interval ? '40rpx 0 150rpx 0' : '40rpx 0' }">
<nut-cell <nut-cell
title="微信支付" title="微信支付"
desc="使用微信快捷支付" desc="使用微信快捷支付"
@@ -45,11 +45,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, watch} from 'vue'; import { ref, watch } from 'vue';
import {IconFont} from '@nutui/icons-vue-taro'; import { IconFont } from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {payOrder} from '@/api/order'; import { payOrder } from '@/api/order';
import {getPersonalInfo} from '@/api/user'; import { getPersonalInfo } from '@/api/user';
const prop = defineProps({ const prop = defineProps({
interval: { interval: {
@@ -75,7 +75,7 @@ const prop = defineProps({
const emit = defineEmits(['closePay', 'successPay']); const emit = defineEmits(['closePay', 'successPay']);
const info = ref<{integral?: any}>({}); const info = ref<{ integral?: any }>({});
watch( watch(
() => prop.isShowPay, () => prop.isShowPay,
@@ -106,7 +106,7 @@ const goPay = async (type: number) => {
try { try {
console.log(prop.jfInfo); console.log(prop.jfInfo);
// 1微信支付 2积分支付 3专属积分兑换 // 1微信支付 2积分支付 3专属积分兑换
const {data} = await payOrder({ const { data } = await payOrder({
oid: prop.jfInfo.oid, oid: prop.jfInfo.oid,
OrderType: prop.OrderType, OrderType: prop.OrderType,
PayType: type, PayType: type,

View File

@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
const isShow = ref(false); const isShow = ref(false);

View File

@@ -108,11 +108,11 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {reactive} from 'vue'; import { reactive } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {BASE_URL} from '@/utils/request'; import { BASE_URL } from '@/utils/request';
const {content} = defineProps<{ const { content } = defineProps<{
content: string; content: string;
}>(); }>();
@@ -143,7 +143,7 @@ function onEditorReady() {
} }
// 失去焦点时,获取富文本的内容 // 失去焦点时,获取富文本的内容
function getCtx(e: {detail: {html: any}}) { function getCtx(e: { detail: { html: any } }) {
data.richText = e.detail.html; data.richText = e.detail.html;
emits('input', e.detail.html); emits('input', e.detail.html);
} }
@@ -159,15 +159,15 @@ function redo() {
} }
//修改样式 //修改样式
function format(e: {target: {dataset: {name: any; value: any}}}) { function format(e: { target: { dataset: { name: any; value: any } } }) {
// console.log("format", e.target.dataset); // console.log("format", e.target.dataset);
let {name, value} = e.target.dataset; let { name, value } = e.target.dataset;
if (!name) return; if (!name) return;
data.editorCtx.format(name, value); data.editorCtx.format(name, value);
} }
//通过 Context 方法改变编辑器内样式时触发,返回选区已设置的样式 //通过 Context 方法改变编辑器内样式时触发,返回选区已设置的样式
function onStatusChange(e: {detail: any}) { function onStatusChange(e: { detail: any }) {
data.formats = e.detail; data.formats = e.detail;
} }
@@ -187,7 +187,7 @@ function insertImage() {
Taro.uploadFile({ Taro.uploadFile({
url: `${BASE_URL}/upload`, url: `${BASE_URL}/upload`,
name: 'file', name: 'file',
header: {token: Taro.getStorageSync('token')}, header: { token: Taro.getStorageSync('token') },
filePath: res.tempFilePaths[0], filePath: res.tempFilePaths[0],
success: res => { success: res => {
console.log(res); console.log(res);

View File

@@ -30,9 +30,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {getStoreList} from '@/api/home'; import { getStoreList } from '@/api/home';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {ref} from 'vue'; import { ref } from 'vue';
const name = defineModel({ const name = defineModel({
default: '', default: '',
}); });

View File

@@ -11,8 +11,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {BASE_URL} from '@/utils/request'; import { BASE_URL } from '@/utils/request';
import {computed, ref} from 'vue'; import { computed, ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
const props = defineProps({ const props = defineProps({

View File

@@ -1,10 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import {computed, ref} from 'vue'; import { computed, ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import headImg from '../static/def_avatar.png'; import headImg from '../static/def_avatar.png';
import logoImg from '../static/logo.jpg'; import logoImg from '../static/logo.jpg';
import {BASE_URL} from '@/utils/request'; import { BASE_URL } from '@/utils/request';
import {getPhone, login} from '@/api/user'; import { getPhone, login } from '@/api/user';
const props = defineProps({ const props = defineProps({
isShow: { isShow: {
@@ -36,7 +36,7 @@ const closeAttr = () => {
}; };
const onChooseAvatar = e => { const onChooseAvatar = e => {
const {avatarUrl} = e.detail; const { avatarUrl } = e.detail;
Taro.uploadFile({ Taro.uploadFile({
url: `${BASE_URL}/upload`, url: `${BASE_URL}/upload`,
filePath: avatarUrl, filePath: avatarUrl,
@@ -57,7 +57,7 @@ const getPhoneNumber = async (e: any) => {
title: '授权手机号中', title: '授权手机号中',
mask: true, mask: true,
}); });
const {code} = e.detail; const { code } = e.detail;
const res = await getPhone({ const res = await getPhone({
code: code, code: code,
}); });
@@ -112,7 +112,7 @@ const formSubmit = async (e: any) => {
position="bottom" position="bottom"
safe-area-inset-bottom safe-area-inset-bottom
closeable closeable
:style="{padding: '20px 10px'}" :style="{ padding: '20px 10px' }"
v-model:visible="show" v-model:visible="show"
@close="closeAttr" @close="closeAttr"
:close-on-click-overlay="false"> :close-on-click-overlay="false">

View File

@@ -62,11 +62,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {Ref, ref} from 'vue'; import { Ref, ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import Cart from '../../../../components/Cart.vue'; import Cart from '../../../../components/Cart.vue';
import {Cart2} from '@nutui/icons-vue-taro'; import { Cart2 } from '@nutui/icons-vue-taro';
import {getGoodList, getMerCategory} from '../../../../api/goods'; import { getGoodList, getMerCategory } from '../../../../api/goods';
interface goodList { interface goodList {
ID: number; ID: number;

View File

@@ -51,10 +51,10 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import BackComponent from '../../../../components/Back.vue'; import BackComponent from '../../../../components/Back.vue';
import {checkPhone} from '../../../../api/admin'; import { checkPhone } from '../../../../api/admin';
const formVal = ref({ const formVal = ref({
seat: '', seat: '',
@@ -64,7 +64,7 @@ const formVal = ref({
const visible = ref(false); const visible = ref(false);
const formSubmit = async ({detail}: any) => { const formSubmit = async ({ detail }: any) => {
if (!detail.value.seat) if (!detail.value.seat)
return Taro.showToast({ return Taro.showToast({
title: '请填写台号', title: '请填写台号',
@@ -80,7 +80,7 @@ const formSubmit = async ({detail}: any) => {
icon: 'none', icon: 'none',
}); });
try { try {
await checkPhone({phone: detail.value.phone}); await checkPhone({ phone: detail.value.phone });
const user_info = await Taro.getStorageSync('userInfo'); const user_info = await Taro.getStorageSync('userInfo');
Taro.navigateTo({ Taro.navigateTo({
url: `/pages/admin/add_order/add_menu/index?type=1&bid=${user_info.data.bid}&seat=${formVal.value.seat}&phone=${formVal.value.phone}&notes=${formVal.value.notes}`, url: `/pages/admin/add_order/add_menu/index?type=1&bid=${user_info.data.bid}&seat=${formVal.value.seat}&phone=${formVal.value.phone}&notes=${formVal.value.notes}`,

View File

@@ -3,7 +3,8 @@
justify-content: center; justify-content: center;
box-sizing: border-box; box-sizing: border-box;
height: 100vh; height: 100vh;
background-image: url('./static/WechatIMG10.jpg'); // background-image: url('./static/WechatIMG10.jpg');
background-image: url('https://m.360buyimg.com/i/jfs/t1/288333/5/8622/43050/682e2e18Ff3a6e2af/bbc66c081c18a467.png');
background-size: 100% 35%; background-size: 100% 35%;
background-repeat: no-repeat; background-repeat: no-repeat;

View File

@@ -78,8 +78,12 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {onMounted, ref} from 'vue'; import { onMounted, ref } from 'vue';
import {cancelAfterOrder, confirmAfterOrder, editAfterOrder} from '@/api/admin'; import {
cancelAfterOrder,
confirmAfterOrder,
editAfterOrder,
} from '@/api/admin';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
const props = defineProps({ const props = defineProps({

View File

@@ -66,10 +66,10 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import Footer from './components/Footer.vue'; import Footer from './components/Footer.vue';
import {getAfterOrderList} from '@/api/admin'; import { getAfterOrderList } from '@/api/admin';
const tabsIndex = ref(0); const tabsIndex = ref(0);
@@ -108,7 +108,7 @@ const get_list = async () => {
title: '加载中', title: '加载中',
}); });
const user_info = await Taro.getStorageSync('userInfo'); const user_info = await Taro.getStorageSync('userInfo');
const {data: res} = await getAfterOrderList({ const { data: res } = await getAfterOrderList({
bid: user_info.data.bid, bid: user_info.data.bid,
status: tabsIndex.value, status: tabsIndex.value,
}); });

View File

@@ -57,9 +57,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getAfterOrder, createPayQr} from '@/api/admin'; import { getAfterOrder, createPayQr } from '@/api/admin';
const data = ref<any>({}); const data = ref<any>({});
@@ -71,11 +71,11 @@ Taro.useLoad((e: any) => {
get_data(e); get_data(e);
}); });
const get_data = async ({bid, oid}) => { const get_data = async ({ bid, oid }) => {
Taro.showLoading({ Taro.showLoading({
title: '加载中', title: '加载中',
}); });
const res = await getAfterOrder({bid, oid}); const res = await getAfterOrder({ bid, oid });
data.value = res.data.data; data.value = res.data.data;
Taro.hideLoading(); Taro.hideLoading();
}; };

View File

@@ -79,10 +79,10 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import Footer from '../components/Footer.vue'; import Footer from '../components/Footer.vue';
import {getAfterOrder} from '@/api/admin'; import { getAfterOrder } from '@/api/admin';
// import BackComponent from "../../../../../components/Back.vue"; // import BackComponent from "../../../../../components/Back.vue";
const data = ref<any>({}); const data = ref<any>({});

View File

@@ -11,9 +11,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {onUnmounted, ref} from 'vue'; import { onUnmounted, ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getAfterOrder} from '@/api/admin'; import { getAfterOrder } from '@/api/admin';
const time_id = ref(); const time_id = ref();
@@ -25,7 +25,7 @@ Taro.useLoad(e => {
info.value = e; info.value = e;
dataUrl.value = Taro.getStorageSync('pay_code'); dataUrl.value = Taro.getStorageSync('pay_code');
time_id.value = setInterval(async () => { time_id.value = setInterval(async () => {
const {data} = await getAfterOrder({ const { data } = await getAfterOrder({
bid: info.value.bid, bid: info.value.bid,
oid: info.value.oid, oid: info.value.oid,
}); });

View File

@@ -48,10 +48,10 @@
info.status === 0 info.status === 0
? '待付款' ? '待付款'
: info.status === 1 : info.status === 1
? '待使用' ? '待使用'
: info.status === 2 : info.status === 2
? '已使用' ? '已使用'
: '已失效' : '已失效'
"> ">
</nut-cell> </nut-cell>
<nut-cell title="下单用户:" :desc="info.User?.nickName"></nut-cell> <nut-cell title="下单用户:" :desc="info.User?.nickName"></nut-cell>
@@ -75,7 +75,7 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {ref} from 'vue'; import { ref } from 'vue';
const info = ref<any>({}); const info = ref<any>({});

View File

@@ -116,10 +116,10 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {h, ref} from 'vue'; import { h, ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {TriangleDown} from '@nutui/icons-vue-taro'; import { TriangleDown } from '@nutui/icons-vue-taro';
import {orderStatistics} from '../../../api/admin'; import { orderStatistics } from '../../../api/admin';
Taro.useLoad(() => { Taro.useLoad(() => {
getData(); getData();

View File

@@ -33,19 +33,19 @@
item.status === 0 item.status === 0
? '#FF850A' ? '#FF850A'
: item.status === 1 : item.status === 1
? '#F83D3D' ? '#F83D3D'
: item.status === 2 : item.status === 2
? '#333333' ? '#333333'
: '#9C9C9C', : '#9C9C9C',
}" }"
>{{ >{{
item.status === 0 item.status === 0
? '待付款' ? '待付款'
: item.status === 1 : item.status === 1
? '待使用' ? '待使用'
: item.status === 2 : item.status === 2
? '已使用' ? '已使用'
: '已失效' : '已失效'
}} }}
</view> </view>
</view> </view>
@@ -86,9 +86,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getActiveOrderList} from '../../../../api/admin'; import { getActiveOrderList } from '../../../../api/admin';
const opt = ref([ const opt = ref([
{ {

View File

@@ -116,9 +116,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, computed, h} from 'vue'; import { ref, computed, h } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {growthRate} from '../../../api/admin'; import { growthRate } from '../../../api/admin';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import uCharts from '../../../utils/js_sdk/u-charts.min.js'; import uCharts from '../../../utils/js_sdk/u-charts.min.js';

View File

@@ -25,19 +25,19 @@
item.status === 0 item.status === 0
? '#FF850A' ? '#FF850A'
: item.status === 1 : item.status === 1
? '#F83D3D' ? '#F83D3D'
: item.status === 2 : item.status === 2
? '#333333' ? '#333333'
: '#9C9C9C', : '#9C9C9C',
}" }"
>{{ >{{
item.status === 0 item.status === 0
? '待付款' ? '待付款'
: item.status === 1 : item.status === 1
? '待使用' ? '待使用'
: item.status === 2 : item.status === 2
? '已使用' ? '已使用'
: '已失效' : '已失效'
}} }}
</view> </view>
</view> </view>
@@ -82,8 +82,8 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getActiveOrderList} from '@/api/admin'; import { getActiveOrderList } from '@/api/admin';
import {ref} from 'vue'; import { ref } from 'vue';
// url参数转对象 // url参数转对象
// const urlParse = (url: string) => { // const urlParse = (url: string) => {
@@ -128,7 +128,7 @@ const list = ref<any[]>([]);
const getListOne = async () => { const getListOne = async () => {
try { try {
const {data} = Taro.getStorageSync('userInfo'); const { data } = Taro.getStorageSync('userInfo');
const res = await getActiveOrderList({ const res = await getActiveOrderList({
PageNum: 1, PageNum: 1,
PageSize: 1, PageSize: 1,

View File

@@ -59,8 +59,8 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getActiveVerifyList, activeOrderVerify} from '@/api/admin'; import { getActiveVerifyList, activeOrderVerify } from '@/api/admin';
import {ref} from 'vue'; import { ref } from 'vue';
const opt = ref<any>({}); const opt = ref<any>({});
@@ -129,6 +129,8 @@ const getPayType = (type: number) => {
return '平台积分支付'; return '平台积分支付';
case 3: case 3:
return '智多鑫积分支付'; return '智多鑫积分支付';
case 3:
return '渔乐潮玩支付';
default: default:
return '未知'; return '未知';
} }

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getWithdrawList, addWithdraw} from '@/api/admin'; import { getWithdrawList, addWithdraw } from '@/api/admin';
const user_info = ref<any>({}); const user_info = ref<any>({});
@@ -57,7 +57,7 @@ const getData = async () => {
const add = async () => { const add = async () => {
try { try {
formRef.value?.validate().then(async ({valid}) => { formRef.value?.validate().then(async ({ valid }) => {
if (valid) { if (valid) {
const res = await addWithdraw({ const res = await addWithdraw({
Bid: user_info.value.data.bid, Bid: user_info.value.data.bid,
@@ -195,15 +195,15 @@ Taro.useReachBottom(() => {
item.status === 1 item.status === 1
? 'success' ? 'success'
: item.status === 1 : item.status === 1
? 'danger' ? 'danger'
: 'warning' : 'warning'
" "
>{{ >{{
item.status === 1 item.status === 1
? '已打款' ? '已打款'
: item.status === 2 : item.status === 2
? '已拒绝' ? '已拒绝'
: '待审核' : '待审核'
}}</view }}</view
> >
</view> </view>

View File

@@ -19,9 +19,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getAllMerCategory} from '@/api/goods'; import { getAllMerCategory } from '@/api/goods';
const list = ref< const list = ref<
{ {

View File

@@ -80,10 +80,10 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {nextTick, ref} from 'vue'; import { nextTick, ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {addCart, getAllCart} from '@/api/cart'; import { addCart, getAllCart } from '@/api/cart';
import {createActiveOrder} from '@/api/goods'; import { createActiveOrder } from '@/api/goods';
import Pay from '@/components/Pay.vue'; import Pay from '@/components/Pay.vue';
interface CardList { interface CardList {
@@ -206,7 +206,7 @@ const sub = async () => {
}); });
return; return;
} }
const {data: res} = await createActiveOrder({ const { data: res } = await createActiveOrder({
Bid: arr.map((item: any) => item.StoreBid), Bid: arr.map((item: any) => item.StoreBid),
}); });
if (res.oid) { if (res.oid) {

View File

@@ -44,8 +44,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {ref} from 'vue'; import { ref } from 'vue';
import {getCategoryList, getCategoryGoods} from '@/api/goods'; import { getCategoryList, getCategoryGoods } from '@/api/goods';
const val = ref(0); const val = ref(0);

View File

@@ -46,11 +46,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getHdOrJfGoods, createActiveOrder} from '@/api/goods'; import { getHdOrJfGoods, createActiveOrder } from '@/api/goods';
import {getUserPoint} from '@/api/admin'; import { getUserPoint } from '@/api/admin';
import {addCart} from '@/api/cart'; import { addCart } from '@/api/cart';
import Back from '@/components/Back.vue'; import Back from '@/components/Back.vue';
const par = ref<any>({}); const par = ref<any>({});

View File

@@ -13,7 +13,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import './index.scss'; import './index.scss';

View File

@@ -6,16 +6,16 @@
class="card_item" class="card_item"
v-for="item in list" v-for="item in list"
:key="item.ID" :key="item.ID"
:style="{backgroundImage: `url(${item.cover})`}" :style="{ backgroundImage: `url(${item.cover})` }"
@click="toPage(item)"></view> @click="toPage(item)"></view>
</view> </view>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getPersonalInfo} from '@/api/user'; import { getPersonalInfo } from '@/api/user';
const list = ref<any[]>([]); const list = ref<any[]>([]);
@@ -58,7 +58,7 @@ const getList = async () => {
Taro.request({ Taro.request({
url: `${process.env.TARO_APP_HOME}`, url: `${process.env.TARO_APP_HOME}`,
method: 'POST', method: 'POST',
success: ({data: res}) => { success: ({ data: res }) => {
list.value = list.value =
res.data.data.sort((a: any, b: any) => b.sort - a.sort) || []; res.data.data.sort((a: any, b: any) => b.sort - a.sort) || [];
}, },

View File

@@ -3,9 +3,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import {getStorageSync, useDidShow} from '@tarojs/taro'; import { getStorageSync, useDidShow } from '@tarojs/taro';
import {WebView} from '@tarojs/components'; import { WebView } from '@tarojs/components';
const url = ref(''); const url = ref('');

View File

@@ -1,6 +1,6 @@
<template> <template>
<view class="app"> <view class="app">
<view class="head-wrapper" :style="{top: BarHeight + 'px'}"> <view class="head-wrapper" :style="{ top: BarHeight + 'px' }">
<view class="head-menu"> <view class="head-menu">
<Left class="iconfont" @click="returns" /> <Left class="iconfont" @click="returns" />
<Home class="iconfont" @click="goHome" /> <Home class="iconfont" @click="goHome" />
@@ -62,13 +62,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {Ref, ref} from 'vue'; import { Ref, ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {Home, Left} from '@nutui/icons-vue-taro'; import { Home, Left } from '@nutui/icons-vue-taro';
import {getActiveGoodsDetail, getMerDetail} from '@/api/goods'; import { getActiveGoodsDetail, getMerDetail } from '@/api/goods';
import Cart from '@/components/Cart.vue'; import Cart from '@/components/Cart.vue';
import {Cart2} from '@nutui/icons-vue-taro'; import { Cart2 } from '@nutui/icons-vue-taro';
import {nextTick} from 'vue'; import { nextTick } from 'vue';
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight; const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight;
const BarHeight = ref((statusBarHeight as number) + 7); const BarHeight = ref((statusBarHeight as number) + 7);
@@ -105,7 +105,7 @@ Taro.useLoad(async options => {
}); });
const getMerInfo = async () => { const getMerInfo = async () => {
const res = await getMerDetail({bid: bid.value}); const res = await getMerDetail({ bid: bid.value });
mer_info.value = res.data.data; mer_info.value = res.data.data;
}; };
@@ -117,7 +117,7 @@ Taro.useShareAppMessage(() => ({
const get_good_detail = async (gid: string) => { const get_good_detail = async (gid: string) => {
try { try {
const res = await getActiveGoodsDetail({gid: gid}); const res = await getActiveGoodsDetail({ gid: gid });
goodInfo.value = { goodInfo.value = {
...res.data.data, ...res.data.data,
// details: res.data.data.details., // details: res.data.data.details.,

View File

@@ -48,10 +48,10 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {Find} from '@nutui/icons-vue-taro'; import { Find } from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {calculateDistance} from '@/utils'; import { calculateDistance } from '@/utils';
import {ref} from 'vue'; import { ref } from 'vue';
const distance = ref(''); const distance = ref('');

View File

@@ -24,7 +24,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {Check, CloseLittle} from '@nutui/icons-vue-taro'; import { Check, CloseLittle } from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
const toHome = () => { const toHome = () => {

View File

@@ -66,8 +66,8 @@
item.number > 0 item.number > 0
? `可用积分:${item.number}` ? `可用积分:${item.number}`
: item.name.includes('微信') : item.name.includes('微信')
? '微信全额支付' ? '微信全额支付'
: '' : ''
" "
@click="cellClick(item.ID)"> @click="cellClick(item.ID)">
<template #icon> <template #icon>
@@ -95,10 +95,10 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {IconFont} from '@nutui/icons-vue-taro'; import { IconFont } from '@nutui/icons-vue-taro';
import {onUnmounted, ref} from 'vue'; import { onUnmounted, ref } from 'vue';
import {getActiveOrderDetail, getPayList} from '@/api/goods'; import { getActiveOrderDetail, getPayList } from '@/api/goods';
import {payOrder} from '@/api/order'; import { payOrder } from '@/api/order';
import * as dayjs from 'dayjs'; import * as dayjs from 'dayjs';
const payVal = ref(); const payVal = ref();
@@ -114,7 +114,7 @@ const isLoading = ref(false);
const opt = ref<any>({}); const opt = ref<any>({});
Taro.useLoad(e => { Taro.useLoad(e => {
const {oid, bid, OrderType} = e; const { oid, bid, OrderType } = e;
opt.value = e; opt.value = e;
get_pay_list(); get_pay_list();
getData(oid, bid, OrderType); getData(oid, bid, OrderType);
@@ -176,7 +176,7 @@ const pay = async () => {
if (isLoading.value) return; if (isLoading.value) return;
isLoading.value = true; isLoading.value = true;
if (!payVal.value) if (!payVal.value)
return Taro.showToast({title: '请选择支付方式', icon: 'none'}); return Taro.showToast({ title: '请选择支付方式', icon: 'none' });
await confirmPay(); await confirmPay();
} catch (error) { } catch (error) {
Taro.showToast({ Taro.showToast({

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import {ref} from 'vue'; import { ref } from 'vue';
import { import {
useLoad, useLoad,
useReachBottom, useReachBottom,
@@ -8,8 +8,8 @@ import {
setStorageSync, setStorageSync,
} from '@tarojs/taro'; } from '@tarojs/taro';
import Pay from '@/components/Pay.vue'; import Pay from '@/components/Pay.vue';
import {getActiveOrderList, deleteActiveOrder} from '@/api/goods'; import { getActiveOrderList, deleteActiveOrder } from '@/api/goods';
import {getOrderStatistics} from '@/api/order'; import { getOrderStatistics } from '@/api/order';
const tabValue = ref(0); const tabValue = ref(0);
@@ -189,7 +189,9 @@ const delOrder = async (oid: string) => {
@click="tabChange(item.value)"> @click="tabChange(item.value)">
<view class="text">{{ item.title }}</view> <view class="text">{{ item.title }}</view>
<view>{{ item.num }}</view> <view>{{ item.num }}</view>
<view class="line" :class="{lineColor: item.value === tabValue}"></view> <view
class="line"
:class="{ lineColor: item.value === tabValue }"></view>
</view> </view>
</view> </view>
<view v-if="orderList.length > 0"> <view v-if="orderList.length > 0">
@@ -201,10 +203,10 @@ const delOrder = async (oid: string) => {
item.status === 0 item.status === 0
? '待付款' ? '待付款'
: item.status === 1 : item.status === 1
? '待使用' ? '待使用'
: item.status === 2 : item.status === 2
? '已使用' ? '已使用'
: '已失效' : '已失效'
}} }}
</view> </view>
</view> </view>

View File

@@ -67,14 +67,14 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import { import {
// getActiveGoods, // getActiveGoods,
getMerList, getMerList,
} from '../../../api/goods'; } from '../../../api/goods';
import {IconFont} from '@nutui/icons-vue-taro'; import { IconFont } from '@nutui/icons-vue-taro';
import {calculateDistance} from '@/utils'; import { calculateDistance } from '@/utils';
// const list = ref<any>([]); // const list = ref<any>([]);

View File

@@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<view :style="{marginTop: BarHeight + 'px'}"></view> <view :style="{ marginTop: BarHeight + 'px' }"></view>
<view class="local"> <view class="local">
<view class="iconfont icon-dizhi" style="font-size: 20px"></view> <view class="iconfont icon-dizhi" style="font-size: 20px"></view>
<text class="text-[28px]">{{ address }}</text> <text class="text-[28px]">{{ address }}</text>
@@ -54,8 +54,8 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {ref} from 'vue'; import { ref } from 'vue';
import {getHomeList} from '@/api/home'; import { getHomeList } from '@/api/home';
import MerList from '@/components/MerList.vue'; import MerList from '@/components/MerList.vue';
import Popup from '@/components/Popup.vue'; import Popup from '@/components/Popup.vue';
@@ -127,8 +127,18 @@ const getUserLocal = async () => {
url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=S3GBZ-WR26O-IXNW2-SXBOD-LZXV6-WAFNO&get_poi=1`, url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=S3GBZ-WR26O-IXNW2-SXBOD-LZXV6-WAFNO&get_poi=1`,
method: 'GET', method: 'GET',
success: res => { success: res => {
const data = res.data.result.address_component; switch (res.data.status) {
address.value = `${data.district}${data.street_number}`; case 121:
Taro.showToast({
title: res.data.message,
icon: 'none',
});
break;
default:
const data = res.data.result.address_component;
address.value = `${data.district}${data.street_number}`;
break;
}
}, },
}); });
}, },

View File

@@ -41,9 +41,9 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {ref} from 'vue'; import { ref } from 'vue';
import {getPhone, login} from '@/api/user'; import { getPhone, login } from '@/api/user';
import {getQrCode, bindQrCode} from '@/api/code'; import { getQrCode, bindQrCode } from '@/api/code';
import './index.scss'; import './index.scss';
const status = ref(0); const status = ref(0);
@@ -104,7 +104,7 @@ const getPhoneNumber = async (e: any) => {
title: '授权手机号中', title: '授权手机号中',
mask: true, mask: true,
}); });
const {code} = e.detail; const { code } = e.detail;
const res = await getPhone({ const res = await getPhone({
code: code, code: code,
}); });

View File

@@ -52,13 +52,13 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getHdOrJfGoods, createActiveOrder} from '@/api/goods'; import { getHdOrJfGoods, createActiveOrder } from '@/api/goods';
import {getUserPoint} from '@/api/admin'; import { getUserPoint } from '@/api/admin';
import {addCart} from '@/api/cart'; import { addCart } from '@/api/cart';
import Back from '@/components/Back.vue'; import Back from '@/components/Back.vue';
import {RectRight} from '@nutui/icons-vue-taro'; import { RectRight } from '@nutui/icons-vue-taro';
import './index.scss'; import './index.scss';
const data = ref<any[]>([]); const data = ref<any[]>([]);

View File

@@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<view class="head-wrapper" :style="{top: BarHeight + 'px'}"> <view class="head-wrapper" :style="{ top: BarHeight + 'px' }">
<view class="head-menu"> <view class="head-menu">
<Left class="iconfont" @click="returns" /> <Left class="iconfont" @click="returns" />
<Home class="iconfont" @click="goHome" /> <Home class="iconfont" @click="goHome" />
@@ -134,10 +134,10 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {Left, Home, Plus, Minus} from '@nutui/icons-vue-taro'; import { Left, Home, Plus, Minus } from '@nutui/icons-vue-taro';
import {Ref, ref} from 'vue'; import { Ref, ref } from 'vue';
import {calculateDistance} from '@/utils'; import { calculateDistance } from '@/utils';
import {getGoodList, getMerCategory, getMerDetail} from '@/api/goods'; import { getGoodList, getMerCategory, getMerDetail } from '@/api/goods';
import Cart from '@/components/Cart.vue'; import Cart from '@/components/Cart.vue';
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight; const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight;

View File

@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {Ref, ref} from 'vue'; import { Ref, ref } from 'vue';
import Upload from '../../../components/Upload.vue'; import Upload from '../../../components/Upload.vue';
import RichEditor from '../../../components/RichEditor.vue'; import RichEditor from '../../../components/RichEditor.vue';
import {addGood} from '@/api/product'; import { addGood } from '@/api/product';
const ruleForm = ref(null) as Ref; const ruleForm = ref(null) as Ref;
@@ -90,7 +90,7 @@ const confirmClass = (val: any) => {
}; };
const ok = async () => { const ok = async () => {
ruleForm.value.validate().then(({valid, errors}: any) => { ruleForm.value.validate().then(({ valid, errors }: any) => {
if (valid) { if (valid) {
console.log('success', basicData.value); console.log('success', basicData.value);
} else { } else {

View File

@@ -1,6 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import {ref} from 'vue'; import { ref } from 'vue';
import {productList} from '@/api/product'; import { productList } from '@/api/product';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
const swiperCur = ref(0); const swiperCur = ref(0);
@@ -69,7 +69,7 @@ const changeState = (item: List) => {
next-margin="0" next-margin="0"
:current="swiperCur" :current="swiperCur"
@change="swiperChange"> @change="swiperChange">
<swiper-item :class="{active: 0 == swiperCur}"> <swiper-item :class="{ active: 0 == swiperCur }">
<view class="slide-navigator"> <view class="slide-navigator">
<view class="item" @click="jumpAddGoods(null, 1)"> <view class="item" @click="jumpAddGoods(null, 1)">
<image <image
@@ -120,7 +120,7 @@ const changeState = (item: List) => {
</navigator> </navigator>
</view> </view>
</swiper-item> </swiper-item>
<swiper-item :class="{active: 1 == swiperCur}"> <swiper-item :class="{ active: 1 == swiperCur }">
<view class="slide-navigator"> <view class="slide-navigator">
<navigator <navigator
class="item" class="item"

View File

@@ -1,5 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import {ref, onMounted} from 'vue'; import { ref, onMounted } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import MerList from '@/components/MerList.vue'; import MerList from '@/components/MerList.vue';
import Storelist from '@/components/StoreList.vue'; import Storelist from '@/components/StoreList.vue';

View File

@@ -3,7 +3,7 @@
<view <view
class="user-center-card__header__transparent" class="user-center-card__header__transparent"
v-if="isLogin" v-if="isLogin"
:style="{width: isLogin ? '100%' : '70%'}"> :style="{ width: isLogin ? '100%' : '70%' }">
<view <view
class="user-center-card__header__avatar" class="user-center-card__header__avatar"
@click="toPage('/pages/users/user_setting/index')"> @click="toPage('/pages/users/user_setting/index')">
@@ -182,12 +182,12 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import {ref} from 'vue'; import { ref } from 'vue';
import {ArrowRight, IconFont} from '@nutui/icons-vue-taro'; import { ArrowRight, IconFont } from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import Auth from '@/components/Auth.vue'; import Auth from '@/components/Auth.vue';
import {getPersonalInfo, getPhone, bindParent} from '@/api/user'; import { getPersonalInfo, getPhone, bindParent } from '@/api/user';
import {maskString} from '@/utils'; import { maskString } from '@/utils';
const isShowLogin = ref(false); const isShowLogin = ref(false);

View File

@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import {computed, ref} from 'vue'; import { computed, ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import * as dayjs from 'dayjs'; import * as dayjs from 'dayjs';
import {getIntegralDetail, getBeanDetail, getGiftRecord} from '@/api/user'; import { getIntegralDetail, getBeanDetail, getGiftRecord } from '@/api/user';
import {TriangleDown} from '@nutui/icons-vue-taro'; import { TriangleDown } from '@nutui/icons-vue-taro';
const tabValue = ref(1); const tabValue = ref(1);

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {ref} from 'vue'; import { ref } from 'vue';
import {getVerifyCode, phoneLogin, getPersonalInfo} from '@/api/user'; import { getVerifyCode, phoneLogin, getPersonalInfo } from '@/api/user';
import logoImg from '../../../static/logo.jpg'; import logoImg from '../../../static/logo.jpg';
const optData = ref<any>({}); const optData = ref<any>({});

View File

@@ -14,7 +14,7 @@
<view style="width: 45%"></view> <view style="width: 45%"></view>
</view> </view>
<!-- 二维码弹窗 --> <!-- 二维码弹窗 -->
<nut-popup :style="{padding: '30px 50px'}" v-model:visible="show"> <nut-popup :style="{ padding: '30px 50px' }" v-model:visible="show">
<view class="popup"> <view class="popup">
<view>推荐人二维码绑定</view> <view>推荐人二维码绑定</view>
<image style="margin-top: 10px" :src="urlCode" /> <image style="margin-top: 10px" :src="urlCode" />
@@ -24,10 +24,10 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import {IconFont} from '@nutui/icons-vue-taro'; import { IconFont } from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getRefereeCode} from '@/api/user'; import { getRefereeCode } from '@/api/user';
const show = ref(false); const show = ref(false);

View File

@@ -29,9 +29,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {useLoad, showToast} from '@tarojs/taro'; import { useLoad, showToast } from '@tarojs/taro';
import {ref} from 'vue'; import { ref } from 'vue';
import {getTGIntegralDetail} from '../../../../api/user'; import { getTGIntegralDetail } from '../../../../api/user';
const data = ref([]); const data = ref([]);
@@ -59,7 +59,7 @@ const getData = async () => {
data.value = res.data.data || []; data.value = res.data.data || [];
page.value.ItemCount = res.data.count; page.value.ItemCount = res.data.count;
} catch (error) { } catch (error) {
showToast({title: error.msg, icon: 'none'}); showToast({ title: error.msg, icon: 'none' });
} }
}; };
</script> </script>

View File

@@ -27,9 +27,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import {useLoad, showToast} from '@tarojs/taro'; import { useLoad, showToast } from '@tarojs/taro';
import {getTGUserList} from '../../../../api/user'; import { getTGUserList } from '../../../../api/user';
useLoad(() => { useLoad(() => {
getData(); getData();
@@ -37,7 +37,7 @@ useLoad(() => {
const data = ref([]); const data = ref([]);
const page = ref({PageNum: 1, PageSize: 10, ItemCount: 0}); const page = ref({ PageNum: 1, PageSize: 10, ItemCount: 0 });
const pageChange = (e: number) => { const pageChange = (e: number) => {
page.value.PageNum = e; page.value.PageNum = e;
@@ -53,7 +53,7 @@ const getData = async () => {
data.value = res.data.data || []; data.value = res.data.data || [];
page.value.ItemCount = res.data.count; page.value.ItemCount = res.data.count;
} catch (error) { } catch (error) {
showToast({title: error.msg, icon: 'none'}); showToast({ title: error.msg, icon: 'none' });
} }
}; };
</script> </script>

View File

@@ -1,8 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import UserModal from '@/components/UserModal.vue'; import UserModal from '@/components/UserModal.vue';
import {ref} from 'vue'; import { ref } from 'vue';
import {getPhone, login, getPersonalInfo} from '@/api/user'; import { getPhone, login, getPersonalInfo } from '@/api/user';
import logoImg from '../../../static/logo.jpg'; import logoImg from '../../../static/logo.jpg';
const isShow = ref(false); const isShow = ref(false);
@@ -53,7 +53,7 @@ const getPhoneNumber = async (e: any) => {
title: '授权手机号中', title: '授权手机号中',
mask: true, mask: true,
}); });
const {code} = e.detail; const { code } = e.detail;
const res = await getPhone({ const res = await getPhone({
code: code, code: code,
}); });

View File

@@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import Pay from '@/components/Pay.vue'; import Pay from '@/components/Pay.vue';
import {getActiveOrderList, deleteActiveOrder} from '@/api/goods'; import { getActiveOrderList, deleteActiveOrder } from '@/api/goods';
import {getOrderStatistics} from '@/api/order'; import { getOrderStatistics } from '@/api/order';
import UQRCode from 'uqrcodejs'; import UQRCode from 'uqrcodejs';
const tabValue = ref(0); const tabValue = ref(0);
@@ -162,7 +162,7 @@ const toDetail = (item: any) => {
const delOrder = async (oid: string) => { const delOrder = async (oid: string) => {
try { try {
await deleteActiveOrder({oid}); await deleteActiveOrder({ oid });
} catch (error) { } catch (error) {
Taro.showToast({ Taro.showToast({
title: error.msg, title: error.msg,
@@ -249,7 +249,9 @@ const closed = () => {
>{{ item.title }} >{{ item.title }}
</view> </view>
<!-- <view>{{ item.num }}</view> --> <!-- <view>{{ item.num }}</view> -->
<view class="line" :class="{lineColor: item.value === tabValue}"></view> <view
class="line"
:class="{ lineColor: item.value === tabValue }"></view>
</view> </view>
</view> </view>
<view v-if="orderList.length > 0"> <view v-if="orderList.length > 0">
@@ -266,19 +268,19 @@ const closed = () => {
item.status === 0 item.status === 0
? '#FF850A' ? '#FF850A'
: item.status === 1 : item.status === 1
? '#F83D3D' ? '#F83D3D'
: item.status === 2 : item.status === 2
? '#333333' ? '#333333'
: '#9C9C9C', : '#9C9C9C',
}" }"
>{{ >{{
item.status === 0 item.status === 0
? '待付款' ? '待付款'
: item.status === 1 : item.status === 1
? '待使用' ? '待使用'
: item.status === 2 : item.status === 2
? '已使用' ? '已使用'
: '已失效' : '已失效'
}} }}
</view> </view>
</view> </view>

View File

@@ -146,10 +146,10 @@
goodInfo.status === 0 goodInfo.status === 0
? '待付款' ? '待付款'
: goodInfo.status === 1 : goodInfo.status === 1
? '待使用' ? '待使用'
: goodInfo.status === 2 : goodInfo.status === 2
? '已使用' ? '已使用'
: '已失效' : '已失效'
"></nut-cell> "></nut-cell>
</nut-cell-group> </nut-cell-group>
@@ -232,13 +232,13 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {onUnmounted, ref} from 'vue'; import { onUnmounted, ref } from 'vue';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import duration from 'dayjs/plugin/duration'; import duration from 'dayjs/plugin/duration';
import Pay from '@/components/Pay.vue'; import Pay from '@/components/Pay.vue';
import {calculateDistance} from '@/utils'; import { calculateDistance } from '@/utils';
import {IconFont} from '@nutui/icons-vue-taro'; import { IconFont } from '@nutui/icons-vue-taro';
import {getActiveOrderDetail} from '@/api/goods'; import { getActiveOrderDetail } from '@/api/goods';
import UQRCode from 'uqrcodejs'; import UQRCode from 'uqrcodejs';
dayjs.extend(duration); dayjs.extend(duration);

View File

@@ -74,9 +74,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getUserAfterOrderList} from '../../../api/user'; import { getUserAfterOrderList } from '../../../api/user';
const tabsIndex = ref(0); const tabsIndex = ref(0);
@@ -121,7 +121,7 @@ const get_list = async () => {
title: '加载中', title: '加载中',
}); });
const user_info = await Taro.getStorageSync('userInfo'); const user_info = await Taro.getStorageSync('userInfo');
const {data: res} = await getUserAfterOrderList({ const { data: res } = await getUserAfterOrderList({
phone: user_info.data.phone, phone: user_info.data.phone,
status: tabsIndex.value, status: tabsIndex.value,
PageNum: pageOpt.value.page, PageNum: pageOpt.value.page,

View File

@@ -58,9 +58,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {getUserAfterOrderDetail} from '../../../../api/user'; import { getUserAfterOrderDetail } from '../../../../api/user';
const data = ref<any>({}); const data = ref<any>({});

View File

@@ -70,9 +70,9 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref} from 'vue'; import { ref } from 'vue';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {editTradePwd, getVerifyCode} from '@/api/user'; import { editTradePwd, getVerifyCode } from '@/api/user';
const userinfo = ref<any>({}); const userinfo = ref<any>({});
@@ -100,23 +100,23 @@ Taro.useLoad(() => {
const formSubmit = async () => { const formSubmit = async () => {
try { try {
if (!formVal.value.password) if (!formVal.value.password)
return Taro.showToast({title: '请输入交易密码', icon: 'none'}); return Taro.showToast({ title: '请输入交易密码', icon: 'none' });
if (!formVal.value.confirmPassword) if (!formVal.value.confirmPassword)
return Taro.showToast({title: '请再次输入交易密码', icon: 'none'}); return Taro.showToast({ title: '请再次输入交易密码', icon: 'none' });
if (formVal.value.password !== formVal.value.confirmPassword) if (formVal.value.password !== formVal.value.confirmPassword)
return Taro.showToast({title: '两次密码不一致', icon: 'none'}); return Taro.showToast({ title: '两次密码不一致', icon: 'none' });
if (!formVal.value.code) if (!formVal.value.code)
return Taro.showToast({title: '请输入验证码', icon: 'none'}); return Taro.showToast({ title: '请输入验证码', icon: 'none' });
const res = await editTradePwd({ const res = await editTradePwd({
pay_password: formVal.value.password, pay_password: formVal.value.password,
code: formVal.value.code, code: formVal.value.code,
}); });
Taro.showToast({title: res.msg, icon: 'none'}); Taro.showToast({ title: res.msg, icon: 'none' });
Taro.navigateBack({ Taro.navigateBack({
delta: 1, delta: 1,
}); });
} catch (err) { } catch (err) {
Taro.showToast({title: err.msg, icon: 'none'}); Taro.showToast({ title: err.msg, icon: 'none' });
} }
}; };

View File

@@ -2,7 +2,7 @@
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
const toPage = (url: string) => { const toPage = (url: string) => {
if (url === '1') return Taro.showToast({title: '暂未开放', icon: 'none'}); if (url === '1') return Taro.showToast({ title: '暂未开放', icon: 'none' });
Taro.navigateTo({ Taro.navigateTo({
url: url, url: url,
}); });

View File

@@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {ref} from 'vue'; import { ref } from 'vue';
import {applyMer, getMerTypeList, getVerifyCode} from '@/api/user'; import { applyMer, getMerTypeList, getVerifyCode } from '@/api/user';
import Upload from '@/components/Upload.vue'; import Upload from '@/components/Upload.vue';
const visible = ref(false); const visible = ref(false);
@@ -116,7 +116,7 @@ const onOk = async () => {
// 获取验证码 // 获取验证码
const getSmsCode = () => { const getSmsCode = () => {
ruleForm.value.validate('phone').then(async ({valid}: any) => { ruleForm.value.validate('phone').then(async ({ valid }: any) => {
if (valid) { if (valid) {
try { try {
await getVerifyCode({ await getVerifyCode({
@@ -152,7 +152,7 @@ const confirmGooType = (e: any) => {
// 提交 // 提交
const submit = () => { const submit = () => {
ruleForm.value.validate().then(({valid, errors}: any) => { ruleForm.value.validate().then(({ valid, errors }: any) => {
if (valid) { if (valid) {
console.log('success', formValue.value); console.log('success', formValue.value);
visible.value = true; visible.value = true;

View File

@@ -4,8 +4,8 @@
<script setup lang="ts"> <script setup lang="ts">
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {ref} from 'vue'; import { ref } from 'vue';
import {getAgreement} from '../../../api/user'; import { getAgreement } from '../../../api/user';
const nodes = ref(``); const nodes = ref(``);

View File

@@ -1,15 +1,15 @@
<script lang="ts" setup> <script lang="ts" setup>
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import {ref} from 'vue'; import { ref } from 'vue';
import {editPersonalInfo} from '@/api/user'; import { editPersonalInfo } from '@/api/user';
import {BASE_URL} from '@/utils/request'; import { BASE_URL } from '@/utils/request';
// const toPage = (e: string) => {}; // const toPage = (e: string) => {};
const userInfo = ref<any>({}); const userInfo = ref<any>({});
Taro.useLoad(() => { Taro.useLoad(() => {
const {data: data} = Taro.getStorageSync('userInfo'); const { data: data } = Taro.getStorageSync('userInfo');
userInfo.value = data; userInfo.value = data;
}); });

View File

@@ -1,4 +1,4 @@
import {app} from '@/config'; import { app } from '@/config';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
export interface RequestParams { export interface RequestParams {

View File

@@ -113,8 +113,8 @@ var util = {
}, },
}; };
function getH5Offset(t) { function getH5Offset(t) {
t.mp = {changedTouches: []}; t.mp = { changedTouches: [] };
t.mp.changedTouches.push({x: t.offsetX, y: t.offsetY}); t.mp.changedTouches.push({ x: t.offsetX, y: t.offsetY });
return t; return t;
} }
function hexToRgb(t, e) { function hexToRgb(t, e) {
@@ -159,7 +159,7 @@ function findRange(t, e, a) {
function calCandleMA(o, t, e, n) { function calCandleMA(o, t, e, n) {
let a = []; let a = [];
for (let r = 0; r < o.length; r++) { for (let r = 0; r < o.length; r++) {
let i = {data: [], name: t[r], color: e[r]}; let i = { data: [], name: t[r], color: e[r] };
for (let a = 0, t = n.length; a < t; a++) { for (let a = 0, t = n.length; a < t; a++) {
if (a < o[r]) { if (a < o[r]) {
i.data.push(null); i.data.push(null);
@@ -292,10 +292,10 @@ function createCurveControlPoints(t, e) {
if (l >= Math.max(t[e].x, t[e + 1].x) || l <= Math.min(t[e].x, t[e + 1].x)) { if (l >= Math.max(t[e].x, t[e + 1].x) || l <= Math.min(t[e].x, t[e + 1].x)) {
l = t[e + 1].x; l = t[e + 1].x;
} }
return {ctrA: {x: o, y: n}, ctrB: {x: l, y: s}}; return { ctrA: { x: o, y: n }, ctrB: { x: l, y: s } };
} }
function convertCoordinateOrigin(t, e, a) { function convertCoordinateOrigin(t, e, a) {
return {x: a.x + t, y: a.y - e}; return { x: a.x + t, y: a.y - e };
} }
function avoidCollision(t, e) { function avoidCollision(t, e) {
if (e) { if (e) {
@@ -503,7 +503,7 @@ function getTouches(t, e, a) {
r = t.y * e.pix; r = t.y * e.pix;
} }
} }
return {x: i, y: r}; return { x: i, y: r };
} }
function getSeriesDataItem(e, i, a) { function getSeriesDataItem(e, i, a) {
var r = []; var r = [];
@@ -590,8 +590,8 @@ function getToolTipData(t, a, i, r, o) {
: a.extra.tooltip.legendShape, : a.extra.tooltip.legendShape,
}; };
}); });
var h = {x: Math.round(s.x), y: Math.round(s.y)}; var h = { x: Math.round(s.x), y: Math.round(s.y) };
return {textList: e, offset: h}; return { textList: e, offset: h };
} }
function getMixToolTipData(t, e, a, i) { function getMixToolTipData(t, e, a, i) {
var r = var r =
@@ -613,8 +613,8 @@ function getMixToolTipData(t, e, a, i) {
return t; return t;
} }
}); });
var l = {x: Math.round(o), y: 0}; var l = { x: Math.round(o), y: 0 };
return {textList: n, offset: l}; return { textList: n, offset: l };
} }
function getCandleToolTipData(o, e, n, l, i, t) { function getCandleToolTipData(o, e, n, l, i, t) {
var r = var r =
@@ -680,7 +680,7 @@ function getCandleToolTipData(o, e, n, l, i, t) {
d.push(e, a, i, r); d.push(e, a, i, r);
}); });
var x = []; var x = [];
var f = {x: 0, y: 0}; var f = { x: 0, y: 0 };
for (let e = 0; e < a.length; e++) { for (let e = 0; e < a.length; e++) {
let t = a[e]; let t = a[e];
if (typeof t[l] !== 'undefined' && t[l] !== null) { if (typeof t[l] !== 'undefined' && t[l] !== null) {
@@ -688,7 +688,7 @@ function getCandleToolTipData(o, e, n, l, i, t) {
} }
} }
f.x = Math.round(x[0][0].x); f.x = Math.round(x[0][0].x);
return {textList: d, offset: f}; return { textList: d, offset: f };
} }
function filterSeries(e) { function filterSeries(e) {
let a = []; let a = [];
@@ -701,7 +701,7 @@ function filterSeries(e) {
} }
function findCurrentIndex(o, n, e, t) { function findCurrentIndex(o, n, e, t) {
var a = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; var a = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
var l = {index: -1, group: []}; var l = { index: -1, group: [] };
var i = e.chartData.eachSpacing / 2; var i = e.chartData.eachSpacing / 2;
let r = []; let r = [];
if (n && n.length > 0) { if (n && n.length > 0) {
@@ -754,7 +754,7 @@ function findCurrentIndex(o, n, e, t) {
} }
function findBarChartCurrentIndex(a, t, e, i) { function findBarChartCurrentIndex(a, t, e, i) {
var r = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; var r = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
var o = {index: -1, group: []}; var o = { index: -1, group: [] };
var n = e.chartData.eachSpacing / 2; var n = e.chartData.eachSpacing / 2;
let l = e.chartData.yAxisPoints; let l = e.chartData.yAxisPoints;
if (t && t.length > 0) { if (t && t.length > 0) {
@@ -972,8 +972,8 @@ function splitPoints(t, a) {
function calLegendData(l, s, e, t, h) { function calLegendData(l, s, e, t, h) {
let c = { let c = {
area: { area: {
start: {x: 0, y: 0}, start: { x: 0, y: 0 },
end: {x: 0, y: 0}, end: { x: 0, y: 0 },
width: 0, width: 0,
height: 0, height: 0,
wholeWidth: 0, wholeWidth: 0,
@@ -1210,7 +1210,7 @@ function getXAxisTextList(t, e, h, c) {
return f; return f;
} }
function calXAxisData(t, e, a, i) { function calXAxisData(t, e, a, i) {
var r = assign({}, {type: ''}, e.extra.bar); var r = assign({}, { type: '' }, e.extra.bar);
var o = { var o = {
angle: 0, angle: 0,
xAxisHeight: e.xAxis.lineHeight * e.pix + e.xAxis.marginTop * e.pix, xAxisHeight: e.xAxis.lineHeight * e.pix + e.xAxis.marginTop * e.pix,
@@ -1611,7 +1611,7 @@ function getXAxisPoints(t, e, h) {
n.push(s); n.push(s);
} }
} }
return {xAxisPoints: n, startX: l, endX: s, eachSpacing: o}; return { xAxisPoints: n, startX: l, endX: s, eachSpacing: o };
} }
function getCandleDataPoints(t, l, s, h, c, d, a) { function getCandleDataPoints(t, l, s, h, c, d, a) {
var x = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1; var x = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
@@ -1953,7 +1953,7 @@ function getYAxisTextList(t, e, h, c, a) {
return u.reverse(); return u.reverse();
} }
function calYAxisData(a, o, e, n) { function calYAxisData(a, o, e, n) {
var l = assign({}, {type: ''}, o.extra.column); var l = assign({}, { type: '' }, o.extra.column);
var t = o.yAxis.data.length; var t = o.yAxis.data.length;
var s = new Array(t); var s = new Array(t);
if (t > 0) { if (t > 0) {
@@ -1990,7 +1990,7 @@ function calYAxisData(a, o, e, n) {
h[r] = getYAxisTextList(s[r], o, e, l.type, i, r); h[r] = getYAxisTextList(s[r], o, e, l.type, i, r);
} }
let a = i.fontSize * o.pix || e.fontSize; let a = i.fontSize * o.pix || e.fontSize;
d[r] = {position: i.position ? i.position : 'left', width: 0}; d[r] = { position: i.position ? i.position : 'left', width: 0 };
c[r] = h[r].map(function (t, e) { c[r] = h[r].map(function (t, e) {
t = i.formatter(t, e, o); t = i.formatter(t, e, o);
d[r].width = Math.max(d[r].width, measureText(t, a, n) + 5); d[r].width = Math.max(d[r].width, measureText(t, a, n) + 5);
@@ -2021,7 +2021,7 @@ function calYAxisData(a, o, e, n) {
} }
h[0] = getYAxisTextList(a, o, e, l.type, {}); h[0] = getYAxisTextList(a, o, e, l.type, {});
} }
d[0] = {position: 'left', width: 0}; d[0] = { position: 'left', width: 0 };
var i = o.yAxis.fontSize * o.pix || e.fontSize; var i = o.yAxis.fontSize * o.pix || e.fontSize;
c[0] = h[0].map(function (t, e) { c[0] = h[0].map(function (t, e) {
t = o.yAxis.formatter(t, e, o); t = o.yAxis.formatter(t, e, o);
@@ -2030,8 +2030,8 @@ function calYAxisData(a, o, e, n) {
}); });
d[0].width += 3 * o.pix; d[0].width += 3 * o.pix;
if (o.yAxis.disabled === true) { if (o.yAxis.disabled === true) {
d[0] = {position: 'left', width: 0}; d[0] = { position: 'left', width: 0 };
o.yAxis.data[0] = {disabled: true}; o.yAxis.data[0] = { disabled: true };
} else { } else {
o.yAxis.data[0] = { o.yAxis.data[0] = {
disabled: false, disabled: false,
@@ -2046,7 +2046,7 @@ function calYAxisData(a, o, e, n) {
} }
} }
} }
return {rangesFormat: c, ranges: h, yAxisWidth: d}; return { rangesFormat: c, ranges: h, yAxisWidth: d };
} }
function calTooltipYAxisData(r, t, o, e, a) { function calTooltipYAxisData(r, t, o, e, a) {
let n = [].concat(o.chartData.yAxisData.ranges); let n = [].concat(o.chartData.yAxisData.ranges);
@@ -2386,7 +2386,7 @@ function drawGaugeLabel(e, a, i, r, o, n) {
let l = e.startAngle; let l = e.startAngle;
let s = e.startNumber; let s = e.startNumber;
for (let t = 0; t < e.splitLine.splitNumber + 1; t++) { for (let t = 0; t < e.splitLine.splitNumber + 1; t++) {
var h = {x: a * Math.cos(l * Math.PI), y: a * Math.sin(l * Math.PI)}; var h = { x: a * Math.cos(l * Math.PI), y: a * Math.sin(l * Math.PI) };
var f = e.formatter ? e.formatter(s, t, r) : s; var f = e.formatter ? e.formatter(s, t, r) : s;
h.x += i.x - measureText(f, o.fontSize, n) / 2; h.x += i.x - measureText(f, o.fontSize, n) / 2;
h.y += i.y; h.y += i.y;
@@ -2409,7 +2409,7 @@ function drawRadarLabel(t, s, h, c, d, x) {
var f = c.extra.radar || {}; var f = c.extra.radar || {};
t.forEach(function (t, e) { t.forEach(function (t, e) {
if (f.labelPointShow === true && c.categories[e] !== '') { if (f.labelPointShow === true && c.categories[e] !== '') {
var a = {x: s * Math.cos(t), y: s * Math.sin(t)}; var a = { x: s * Math.cos(t), y: s * Math.sin(t) };
var i = convertCoordinateOrigin(a.x, a.y, h); var i = convertCoordinateOrigin(a.x, a.y, h);
x.setFillStyle(f.labelPointColor); x.setFillStyle(f.labelPointColor);
x.beginPath(); x.beginPath();
@@ -2474,7 +2474,7 @@ function drawPieText(n, d, x, f, t, l) {
let n = a; let n = a;
let l = measureText(t.text, t.textSize * d.pix || x.fontSize, f); let l = measureText(t.text, t.textSize * d.pix || x.fontSize, f);
let s = n; let s = n;
if (g && util.isSameXCoordinateArea(g.start, {x: o})) { if (g && util.isSameXCoordinateArea(g.start, { x: o })) {
if (o > 0) { if (o > 0) {
s = Math.min(n, g.start.y); s = Math.min(n, g.start.y);
} else if (e < 0) { } else if (e < 0) {
@@ -2491,9 +2491,9 @@ function drawPieText(n, d, x, f, t, l) {
o -= l; o -= l;
} }
let h = { let h = {
lineStart: {x: i, y: r}, lineStart: { x: i, y: r },
lineEnd: {x: e, y: a}, lineEnd: { x: e, y: a },
start: {x: o, y: s}, start: { x: o, y: s },
width: l, width: l,
height: x.fontSize, height: x.fontSize,
text: t.text, text: t.text,
@@ -2589,7 +2589,7 @@ function drawToolTipSplitLine(r, o, n, l) {
function drawMarkLine(h, t, c) { function drawMarkLine(h, t, c) {
let e = assign( let e = assign(
{}, {},
{type: 'solid', dashLength: 4, data: []}, { type: 'solid', dashLength: 4, data: [] },
h.extra.markLine, h.extra.markLine,
); );
let a = h.area[3]; let a = h.area[3];
@@ -2652,7 +2652,7 @@ function drawMarkLine(h, t, c) {
} }
} }
function drawToolTipHorizentalLine(x, f, p, t, e) { function drawToolTipHorizentalLine(x, f, p, t, e) {
var u = assign({}, {gridType: 'solid', dashLength: 4}, x.extra.tooltip); var u = assign({}, { gridType: 'solid', dashLength: 4 }, x.extra.tooltip);
var a = x.area[3]; var a = x.area[3];
var i = x.width - x.area[1]; var i = x.width - x.area[1];
if (u.gridType == 'dash') { if (u.gridType == 'dash') {
@@ -2715,7 +2715,7 @@ function drawToolTipHorizentalLine(x, f, p, t, e) {
function drawToolTipSplitArea(t, e, a, i, r) { function drawToolTipSplitArea(t, e, a, i, r) {
var o = assign( var o = assign(
{}, {},
{activeBgColor: '#000000', activeBgOpacity: 0.08, activeWidth: r}, { activeBgColor: '#000000', activeBgOpacity: 0.08, activeWidth: r },
e.extra.column, e.extra.column,
); );
o.activeWidth = o.activeWidth > r ? r : o.activeWidth; o.activeWidth = o.activeWidth > r ? r : o.activeWidth;
@@ -2731,7 +2731,7 @@ function drawToolTipSplitArea(t, e, a, i, r) {
function drawBarToolTipSplitArea(t, e, a, i, r) { function drawBarToolTipSplitArea(t, e, a, i, r) {
var o = assign( var o = assign(
{}, {},
{activeBgColor: '#000000', activeBgOpacity: 0.08}, { activeBgColor: '#000000', activeBgOpacity: 0.08 },
e.extra.bar, e.extra.bar,
); );
var n = e.area[3]; var n = e.area[3];
@@ -2767,7 +2767,7 @@ function drawToolTip(e, r, o, a, n, i, f) {
o.extra.tooltip, o.extra.tooltip,
); );
if (l.showCategory == true && o.categories) { if (l.showCategory == true && o.categories) {
e.unshift({text: o.categories[o.tooltip.index], color: null}); e.unshift({ text: o.categories[o.tooltip.index], color: null });
} }
var s = l.fontSize * o.pix; var s = l.fontSize * o.pix;
var p = l.lineHeight * o.pix; var p = l.lineHeight * o.pix;
@@ -2791,7 +2791,7 @@ function drawToolTip(e, r, o, a, n, i, f) {
drawToolTipSplitLine(o.tooltip.offset.x, o, a, n); drawToolTipSplitLine(o.tooltip.offset.x, o, a, n);
} }
} }
r = assign({x: 0, y: 0}, r); r = assign({ x: 0, y: 0 }, r);
r.y -= 8 * o.pix; r.y -= 8 * o.pix;
var y = e.map(function (t) { var y = e.map(function (t) {
return measureText(t.text, s, n); return measureText(t.text, s, n);
@@ -3168,7 +3168,7 @@ function drawColumnDataPoints(T, b, S, w) {
}); });
} }
w.restore(); w.restore();
return {xAxisPoints: P, calPoints: M, eachSpacing: C}; return { xAxisPoints: P, calPoints: M, eachSpacing: C };
} }
function drawMountDataPoints(i, r, o, n) { function drawMountDataPoints(i, r, o, n) {
let f = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; let f = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
@@ -3432,7 +3432,7 @@ function drawMountDataPoints(i, r, o, n) {
drawMountPointText(c, i, o, n, r, h); drawMountPointText(c, i, o, n, r, h);
} }
n.restore(); n.restore();
return {xAxisPoints: p, calPoints: c, eachSpacing: l}; return { xAxisPoints: p, calPoints: c, eachSpacing: l };
} }
function drawBarDataPoints(y, v, m, T) { function drawBarDataPoints(y, v, m, T) {
let b = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; let b = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
@@ -3585,11 +3585,11 @@ function drawBarDataPoints(y, v, m, T) {
} }
}); });
} }
return {yAxisPoints: S, calPoints: P, eachSpacing: w}; return { yAxisPoints: S, calPoints: P, eachSpacing: w };
} }
function drawCandleDataPoints(e, t, h, c, d) { function drawCandleDataPoints(e, t, h, c, d) {
var g = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1; var g = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
var s = assign({}, {color: {}, average: {}}, h.extra.candle); var s = assign({}, { color: {}, average: {} }, h.extra.candle);
s.color = assign( s.color = assign(
{}, {},
{ {
@@ -3602,7 +3602,7 @@ function drawCandleDataPoints(e, t, h, c, d) {
); );
s.average = assign( s.average = assign(
{}, {},
{show: false, name: [], day: [], color: c.color}, { show: false, name: [], day: [], color: c.color },
s.average, s.average,
); );
h.extra.candle = s; h.extra.candle = s;
@@ -3715,7 +3715,7 @@ function drawCandleDataPoints(e, t, h, c, d) {
} }
}); });
d.restore(); d.restore();
return {xAxisPoints: x, calPoints: y, eachSpacing: f}; return { xAxisPoints: x, calPoints: y, eachSpacing: f };
} }
function drawAreaDataPoints(t, s, h, c) { function drawAreaDataPoints(t, s, h, c) {
var d = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var d = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
@@ -3904,11 +3904,11 @@ function drawAreaDataPoints(t, s, h, c) {
}); });
} }
c.restore(); c.restore();
return {xAxisPoints: f, calPoints: v, eachSpacing: p}; return { xAxisPoints: f, calPoints: v, eachSpacing: p };
} }
function drawScatterDataPoints(t, s, h, c) { function drawScatterDataPoints(t, s, h, c) {
var d = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var d = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
var i = assign({}, {type: 'circle'}, s.extra.scatter); var i = assign({}, { type: 'circle' }, s.extra.scatter);
let e = s.chartData.xAxisData, let e = s.chartData.xAxisData,
x = e.xAxisPoints, x = e.xAxisPoints,
f = e.eachSpacing; f = e.eachSpacing;
@@ -3989,11 +3989,11 @@ function drawScatterDataPoints(t, s, h, c) {
}); });
} }
c.restore(); c.restore();
return {xAxisPoints: x, calPoints: r, eachSpacing: f}; return { xAxisPoints: x, calPoints: r, eachSpacing: f };
} }
function drawBubbleDataPoints(a, l, s, h) { function drawBubbleDataPoints(a, l, s, h) {
var c = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var c = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
var d = assign({}, {opacity: 1, border: 2}, l.extra.bubble); var d = assign({}, { opacity: 1, border: 2 }, l.extra.bubble);
let t = l.chartData.xAxisData, let t = l.chartData.xAxisData,
x = t.xAxisPoints, x = t.xAxisPoints,
f = t.eachSpacing; f = t.eachSpacing;
@@ -4043,7 +4043,7 @@ function drawBubbleDataPoints(a, l, s, h) {
} }
}); });
h.restore(); h.restore();
return {xAxisPoints: x, calPoints: i, eachSpacing: f}; return { xAxisPoints: x, calPoints: i, eachSpacing: f };
} }
function drawLineDataPoints(t, d, x, f) { function drawLineDataPoints(t, d, x, f) {
var p = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var p = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
@@ -4187,7 +4187,7 @@ function drawLineDataPoints(t, d, x, f) {
}); });
} }
f.restore(); f.restore();
return {xAxisPoints: g, calPoints: T, eachSpacing: y}; return { xAxisPoints: g, calPoints: T, eachSpacing: y };
} }
function drawMixDataPoints(t, v, m, T) { function drawMixDataPoints(t, v, m, T) {
let D = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; let D = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
@@ -4208,8 +4208,8 @@ function drawMixDataPoints(t, v, m, T) {
}, },
v.extra.mix.column, v.extra.mix.column,
); );
let A = assign({}, {opacity: 0.2, gradient: false}, v.extra.mix.area); let A = assign({}, { opacity: 0.2, gradient: false }, v.extra.mix.area);
let M = assign({}, {width: 2}, v.extra.mix.line); let M = assign({}, { width: 2 }, v.extra.mix.line);
let L = v.height - v.area[2]; let L = v.height - v.area[2];
let F = []; let F = [];
var _ = 0; var _ = 0;
@@ -4455,7 +4455,7 @@ function drawMixDataPoints(t, v, m, T) {
}); });
} }
T.restore(); T.restore();
return {xAxisPoints: b, calPoints: F, eachSpacing: S}; return { xAxisPoints: b, calPoints: F, eachSpacing: S };
} }
function drawToolTipBridge(t, e, a, i, r, o) { function drawToolTipBridge(t, e, a, i, r, o) {
var n = t.extra.tooltip || {}; var n = t.extra.tooltip || {};
@@ -5164,7 +5164,7 @@ function drawPieDataPoints(t, r, e, o) {
if (a === 1 && r.type === 'ring') { if (a === 1 && r.type === 'ring') {
drawRingTitle(r, e, o, l); drawRingTitle(r, e, o, l);
} }
return {center: l, radius: i, series: t}; return { center: l, radius: i, series: t };
} }
function drawRoseDataPoints(t, r, e, o) { function drawRoseDataPoints(t, r, e, o) {
var a = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var a = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
@@ -5263,7 +5263,7 @@ function drawRoseDataPoints(t, r, e, o) {
if (r.dataLabel !== false && a === 1) { if (r.dataLabel !== false && a === 1) {
drawPieText(t, r, e, o, i, l); drawPieText(t, r, e, o, i, l);
} }
return {center: l, radius: i, series: t}; return { center: l, radius: i, series: t };
} }
function drawArcbarDataPoints(a, i, t, r) { function drawArcbarDataPoints(a, i, t, r) {
var e = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var e = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
@@ -5290,7 +5290,7 @@ function drawArcbarDataPoints(a, i, t, r) {
y: o.centerY ? o.centerY : i.height / 2, y: o.centerY ? o.centerY : i.height / 2,
}; };
} else { } else {
n = {x: i.width / 2, y: i.height / 2}; n = { x: i.width / 2, y: i.height / 2 };
} }
var l; var l;
if (o.radius) { if (o.radius) {
@@ -5350,7 +5350,7 @@ function drawArcbarDataPoints(a, i, t, r) {
r.stroke(); r.stroke();
} }
drawRingTitle(i, t, r, n); drawRingTitle(i, t, r, n);
return {center: n, radius: l, series: a}; return { center: n, radius: l, series: a };
} }
function drawGaugeDataPoints(n, h, c, t, d) { function drawGaugeDataPoints(n, h, c, t, d) {
var x = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1; var x = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
@@ -5370,7 +5370,7 @@ function drawGaugeDataPoints(n, h, c, t, d) {
childNumber: 5, childNumber: 5,
childWidth: 5, childWidth: 5,
}, },
pointer: {width: 15, color: 'auto'}, pointer: { width: 15, color: 'auto' },
}, },
c.extra.gauge, c.extra.gauge,
); );
@@ -5381,7 +5381,7 @@ function drawGaugeDataPoints(n, h, c, t, d) {
f.oldData = 0; f.oldData = 0;
} }
n = getGaugeAxisPoints(n, f.startAngle, f.endAngle); n = getGaugeAxisPoints(n, f.startAngle, f.endAngle);
var p = {x: c.width / 2, y: c.height / 2}; var p = { x: c.width / 2, y: c.height / 2 };
var u = Math.min(p.x, p.y); var u = Math.min(p.x, p.y);
u -= 5 * c.pix; u -= 5 * c.pix;
u -= f.width / 2; u -= f.width / 2;
@@ -5556,7 +5556,7 @@ function drawGaugeDataPoints(n, h, c, t, d) {
c.extra.gauge.oldAngle = h[0]._proportion_; c.extra.gauge.oldAngle = h[0]._proportion_;
c.extra.gauge.oldData = h[0].data; c.extra.gauge.oldData = h[0].data;
} }
return {center: p, radius: u, innerRadius: g, categories: n, totalAngle: y}; return { center: p, radius: u, innerRadius: g, categories: n, totalAngle: y };
} }
function drawRadarDataPoints(o, n, i, l) { function drawRadarDataPoints(o, n, i, l) {
var t = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; var t = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
@@ -5727,7 +5727,7 @@ function drawRadarDataPoints(o, n, i, l) {
}); });
l.setTextAlign('left'); l.setTextAlign('left');
} }
return {center: h, radius: c, angleList: a}; return { center: h, radius: c, angleList: a };
} }
function lonlat2mercator(t, e) { function lonlat2mercator(t, e) {
var a = Array(2); var a = Array(2);
@@ -5766,7 +5766,7 @@ function getBoundingBox(t) {
for (var n = 0; n < a.length; n++) { for (var n = 0; n < a.length; n++) {
var l = a[n][0]; var l = a[n][0];
var s = a[n][1]; var s = a[n][1];
var h = {x: l, y: s}; var h = { x: l, y: s };
e.xMin = e.xMin < h.x ? e.xMin : h.x; e.xMin = e.xMin < h.x ? e.xMin : h.x;
e.xMax = e.xMax > h.x ? e.xMax : h.x; e.xMax = e.xMax > h.x ? e.xMax : h.x;
e.yMin = e.yMin < h.y ? e.yMin : h.y; e.yMin = e.yMin < h.y ? e.yMin : h.y;
@@ -5777,10 +5777,10 @@ function getBoundingBox(t) {
return e; return e;
} }
function coordinateToPoint(t, e, a, i, r, o) { function coordinateToPoint(t, e, a, i, r, o) {
return {x: (e - a.xMin) * i + r, y: (a.yMax - t) * i + o}; return { x: (e - a.xMin) * i + r, y: (a.yMax - t) * i + o };
} }
function pointToCoordinate(t, e, a, i, r, o) { function pointToCoordinate(t, e, a, i, r, o) {
return {x: (e - r) / i + a.xMin, y: a.yMax - (t - o) / i}; return { x: (e - r) / i + a.xMin, y: a.yMax - (t - o) / i };
} }
function isRayIntersectsSegment(t, e, a) { function isRayIntersectsSegment(t, e, a) {
if (e[1] == a[1]) { if (e[1] == a[1]) {
@@ -6086,7 +6086,7 @@ function getWordCloudPoint(c, t, d) {
} }
function drawWordCloudDataPoints(t, r, e, o) { function drawWordCloudDataPoints(t, r, e, o) {
let n = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1; let n = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
let a = assign({}, {type: 'normal', autoColors: true}, r.extra.word); let a = assign({}, { type: 'normal', autoColors: true }, r.extra.word);
if (!r.chartData.wordCloudData) { if (!r.chartData.wordCloudData) {
r.chartData.wordCloudData = getWordCloudPoint(r, a.type, o); r.chartData.wordCloudData = getWordCloudPoint(r, a.type, o);
} }
@@ -6394,7 +6394,7 @@ function drawFunnelDataPoints(t, e, c, a) {
if (d === 1) { if (d === 1) {
drawFunnelCenterText(l, e, a, r, i.labelAlign, n, o); drawFunnelCenterText(l, e, a, r, i.labelAlign, n, o);
} }
return {center: o, radius: x, series: l}; return { center: o, radius: x, series: l };
} }
function drawFunnelText(l, s, h, c, d, x, f) { function drawFunnelText(l, s, h, c, d, x, f) {
for (let n = 0; n < l.length; n++) { for (let n = 0; n < l.length; n++) {
@@ -6712,7 +6712,7 @@ function drawCharts(t, l, n, s) {
l.area[2] += e; l.area[2] += e;
l.chartData.categoriesData = t; l.chartData.categoriesData = t;
} else { } else {
l.chartData.xAxisData = {xAxisPoints: []}; l.chartData.xAxisData = { xAxisPoints: [] };
} }
} }
if ( if (
@@ -7275,7 +7275,7 @@ var uCharts = function t(a) {
}, },
a.legend, a.legend,
); );
a.extra = assign({tooltip: {legendShape: 'auto'}}, a.extra); a.extra = assign({ tooltip: { legendShape: 'auto' } }, a.extra);
a.rotate = a.rotate ? true : false; a.rotate = a.rotate ? true : false;
a.animation = a.animation ? true : false; a.animation = a.animation ? true : false;
a.rotate = a.rotate ? true : false; a.rotate = a.rotate ? true : false;
@@ -7475,10 +7475,10 @@ uCharts.prototype.dobuleZoom = function (t) {
const c = Math.abs(i[0].x - i[1].x); const c = Math.abs(i[0].x - i[1].x);
if (!this.scrollOption.moveCount) { if (!this.scrollOption.moveCount) {
let t = { let t = {
changedTouches: [{x: a[0].x, y: this.opts.area[0] / this.opts.pix + 2}], changedTouches: [{ x: a[0].x, y: this.opts.area[0] / this.opts.pix + 2 }],
}; };
let e = { let e = {
changedTouches: [{x: a[1].x, y: this.opts.area[0] / this.opts.pix + 2}], changedTouches: [{ x: a[1].x, y: this.opts.area[0] / this.opts.pix + 2 }],
}; };
if (this.opts.rotate) { if (this.opts.rotate) {
t = { t = {
@@ -7561,37 +7561,37 @@ uCharts.prototype.getCurrentDataIndex = function (e) {
let t = getTouches(a, this.opts, e); let t = getTouches(a, this.opts, e);
if (this.opts.type === 'pie' || this.opts.type === 'ring') { if (this.opts.type === 'pie' || this.opts.type === 'ring') {
return findPieChartCurrentIndex( return findPieChartCurrentIndex(
{x: t.x, y: t.y}, { x: t.x, y: t.y },
this.opts.chartData.pieData, this.opts.chartData.pieData,
this.opts, this.opts,
); );
} else if (this.opts.type === 'rose') { } else if (this.opts.type === 'rose') {
return findRoseChartCurrentIndex( return findRoseChartCurrentIndex(
{x: t.x, y: t.y}, { x: t.x, y: t.y },
this.opts.chartData.pieData, this.opts.chartData.pieData,
this.opts, this.opts,
); );
} else if (this.opts.type === 'radar') { } else if (this.opts.type === 'radar') {
return findRadarChartCurrentIndex( return findRadarChartCurrentIndex(
{x: t.x, y: t.y}, { x: t.x, y: t.y },
this.opts.chartData.radarData, this.opts.chartData.radarData,
this.opts.categories.length, this.opts.categories.length,
); );
} else if (this.opts.type === 'funnel') { } else if (this.opts.type === 'funnel') {
return findFunnelChartCurrentIndex( return findFunnelChartCurrentIndex(
{x: t.x, y: t.y}, { x: t.x, y: t.y },
this.opts.chartData.funnelData, this.opts.chartData.funnelData,
); );
} else if (this.opts.type === 'map') { } else if (this.opts.type === 'map') {
return findMapChartCurrentIndex({x: t.x, y: t.y}, this.opts); return findMapChartCurrentIndex({ x: t.x, y: t.y }, this.opts);
} else if (this.opts.type === 'word') { } else if (this.opts.type === 'word') {
return findWordChartCurrentIndex( return findWordChartCurrentIndex(
{x: t.x, y: t.y}, { x: t.x, y: t.y },
this.opts.chartData.wordCloudData, this.opts.chartData.wordCloudData,
); );
} else if (this.opts.type === 'bar') { } else if (this.opts.type === 'bar') {
return findBarChartCurrentIndex( return findBarChartCurrentIndex(
{x: t.x, y: t.y}, { x: t.x, y: t.y },
this.opts.chartData.calPoints, this.opts.chartData.calPoints,
this.opts, this.opts,
this.config, this.config,
@@ -7599,7 +7599,7 @@ uCharts.prototype.getCurrentDataIndex = function (e) {
); );
} else { } else {
return findCurrentIndex( return findCurrentIndex(
{x: t.x, y: t.y}, { x: t.x, y: t.y },
this.opts.chartData.calPoints, this.opts.chartData.calPoints,
this.opts, this.opts,
this.config, this.config,
@@ -7618,7 +7618,7 @@ uCharts.prototype.getLegendDataIndex = function (e) {
} }
if (a) { if (a) {
let t = getTouches(a, this.opts, e); let t = getTouches(a, this.opts, e);
return findLegendIndex({x: t.x, y: t.y}, this.opts.chartData.legendData); return findLegendIndex({ x: t.x, y: t.y }, this.opts.chartData.legendData);
} }
return -1; return -1;
}; };
@@ -7666,7 +7666,7 @@ uCharts.prototype.showToolTip = function (t) {
} }
var a = getTouches(c, this.opts, t); var a = getTouches(c, this.opts, t);
var d = this.scrollOption.currentOffset; var d = this.scrollOption.currentOffset;
var i = assign({}, this.opts, {_scrollDistance_: d, animation: false}); var i = assign({}, this.opts, { _scrollDistance_: d, animation: false });
if ( if (
this.opts.type === 'line' || this.opts.type === 'line' ||
this.opts.type === 'area' || this.opts.type === 'area' ||
@@ -7704,7 +7704,7 @@ uCharts.prototype.showToolTip = function (t) {
if (this.opts.type === 'mount') { if (this.opts.type === 'mount') {
var o = e.index == undefined ? this.getCurrentDataIndex(t).index : e.index; var o = e.index == undefined ? this.getCurrentDataIndex(t).index : e.index;
if (o > -1) { if (o > -1) {
var i = assign({}, this.opts, {animation: false}); var i = assign({}, this.opts, { animation: false });
var n = assign({}, i._series_[o]); var n = assign({}, i._series_[o]);
var s = [ var s = [
{ {
@@ -7718,7 +7718,7 @@ uCharts.prototype.showToolTip = function (t) {
: this.opts.extra.tooltip.legendShape, : this.opts.extra.tooltip.legendShape,
}, },
]; ];
var h = {x: i.chartData.calPoints[o].x, y: a.y}; var h = { x: i.chartData.calPoints[o].x, y: a.y };
i.tooltip = { i.tooltip = {
textList: e.textList ? e.textList : s, textList: e.textList ? e.textList : s,
offset: e.offset !== undefined ? e.offset : h, offset: e.offset !== undefined ? e.offset : h,
@@ -7760,7 +7760,7 @@ uCharts.prototype.showToolTip = function (t) {
var o = e.index == undefined ? r.index : e.index; var o = e.index == undefined ? r.index : e.index;
if (o > -1) { if (o > -1) {
var d = this.scrollOption.currentOffset; var d = this.scrollOption.currentOffset;
var i = assign({}, this.opts, {_scrollDistance_: d, animation: false}); var i = assign({}, this.opts, { _scrollDistance_: d, animation: false });
var n = getSeriesDataItem(this.opts.series, o); var n = getSeriesDataItem(this.opts.series, o);
if (n.length !== 0) { if (n.length !== 0) {
var x = getMixToolTipData(n, this.opts, o, this.opts.categories, e), var x = getMixToolTipData(n, this.opts, o, this.opts.categories, e),
@@ -7782,7 +7782,7 @@ uCharts.prototype.showToolTip = function (t) {
var o = e.index == undefined ? r.index : e.index; var o = e.index == undefined ? r.index : e.index;
if (o > -1) { if (o > -1) {
var d = this.scrollOption.currentOffset; var d = this.scrollOption.currentOffset;
var i = assign({}, this.opts, {_scrollDistance_: d, animation: false}); var i = assign({}, this.opts, { _scrollDistance_: d, animation: false });
var n = getSeriesDataItem(this.opts.series, o); var n = getSeriesDataItem(this.opts.series, o);
if (n.length !== 0) { if (n.length !== 0) {
var l = getCandleToolTipData( var l = getCandleToolTipData(
@@ -7815,7 +7815,7 @@ uCharts.prototype.showToolTip = function (t) {
) { ) {
var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index; var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index;
if (o > -1) { if (o > -1) {
var i = assign({}, this.opts, {animation: false}); var i = assign({}, this.opts, { animation: false });
var n = assign({}, i._series_[o]); var n = assign({}, i._series_[o]);
var s = [ var s = [
{ {
@@ -7829,7 +7829,7 @@ uCharts.prototype.showToolTip = function (t) {
: this.opts.extra.tooltip.legendShape, : this.opts.extra.tooltip.legendShape,
}, },
]; ];
var h = {x: a.x, y: a.y}; var h = { x: a.x, y: a.y };
i.tooltip = { i.tooltip = {
textList: e.textList ? e.textList : s, textList: e.textList ? e.textList : s,
offset: e.offset !== undefined ? e.offset : h, offset: e.offset !== undefined ? e.offset : h,
@@ -7842,7 +7842,7 @@ uCharts.prototype.showToolTip = function (t) {
if (this.opts.type === 'map') { if (this.opts.type === 'map') {
var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index; var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index;
if (o > -1) { if (o > -1) {
var i = assign({}, this.opts, {animation: false}); var i = assign({}, this.opts, { animation: false });
var n = assign({}, this.opts.series[o]); var n = assign({}, this.opts.series[o]);
n.name = n.properties.name; n.name = n.properties.name;
var s = [ var s = [
@@ -7855,7 +7855,7 @@ uCharts.prototype.showToolTip = function (t) {
: this.opts.extra.tooltip.legendShape, : this.opts.extra.tooltip.legendShape,
}, },
]; ];
var h = {x: a.x, y: a.y}; var h = { x: a.x, y: a.y };
i.tooltip = { i.tooltip = {
textList: e.textList ? e.textList : s, textList: e.textList ? e.textList : s,
offset: e.offset !== undefined ? e.offset : h, offset: e.offset !== undefined ? e.offset : h,
@@ -7869,7 +7869,7 @@ uCharts.prototype.showToolTip = function (t) {
if (this.opts.type === 'word') { if (this.opts.type === 'word') {
var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index; var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index;
if (o > -1) { if (o > -1) {
var i = assign({}, this.opts, {animation: false}); var i = assign({}, this.opts, { animation: false });
var n = assign({}, this.opts.series[o]); var n = assign({}, this.opts.series[o]);
var s = [ var s = [
{ {
@@ -7881,7 +7881,7 @@ uCharts.prototype.showToolTip = function (t) {
: this.opts.extra.tooltip.legendShape, : this.opts.extra.tooltip.legendShape,
}, },
]; ];
var h = {x: a.x, y: a.y}; var h = { x: a.x, y: a.y };
i.tooltip = { i.tooltip = {
textList: e.textList ? e.textList : s, textList: e.textList ? e.textList : s,
offset: e.offset !== undefined ? e.offset : h, offset: e.offset !== undefined ? e.offset : h,
@@ -7895,7 +7895,7 @@ uCharts.prototype.showToolTip = function (t) {
if (this.opts.type === 'radar') { if (this.opts.type === 'radar') {
var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index; var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index;
if (o > -1) { if (o > -1) {
var i = assign({}, this.opts, {animation: false}); var i = assign({}, this.opts, { animation: false });
var n = getSeriesDataItem(this.opts.series, o); var n = getSeriesDataItem(this.opts.series, o);
if (n.length !== 0) { if (n.length !== 0) {
var s = n.map(t => { var s = n.map(t => {
@@ -7910,7 +7910,7 @@ uCharts.prototype.showToolTip = function (t) {
: this.opts.extra.tooltip.legendShape, : this.opts.extra.tooltip.legendShape,
}; };
}); });
var h = {x: a.x, y: a.y}; var h = { x: a.x, y: a.y };
i.tooltip = { i.tooltip = {
textList: e.textList ? e.textList : s, textList: e.textList ? e.textList : s,
offset: e.offset !== undefined ? e.offset : h, offset: e.offset !== undefined ? e.offset : h,
@@ -7929,7 +7929,7 @@ uCharts.prototype.translate = function (t) {
distance: 0, distance: 0,
lastMoveTime: 0, lastMoveTime: 0,
}; };
let e = assign({}, this.opts, {_scrollDistance_: t, animation: false}); let e = assign({}, this.opts, { _scrollDistance_: t, animation: false });
drawCharts.call(this, this.opts.type, e, this.config, this.context); drawCharts.call(this, this.opts.type, e, this.config, this.context);
}; };
uCharts.prototype.scrollStart = function (t) { uCharts.prototype.scrollStart = function (t) {

View File

@@ -27,7 +27,7 @@ const request = (
'content-type': 'application/json', 'content-type': 'application/json',
token: Taro.getStorageSync('token') || '', token: Taro.getStorageSync('token') || '',
}, },
success: ({data}) => { success: ({ data }) => {
if (data.code !== 200) { if (data.code !== 200) {
if (!IGNORED_TIPS.includes(url)) { if (!IGNORED_TIPS.includes(url)) {
Taro.showToast({ Taro.showToast({