feat(custom): 地图apiKey更换,订单核销详情新增支付方式
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
module.exports = {
|
||||
types: [
|
||||
{value: 'feat', name: 'feat: 新增功能'},
|
||||
{value: 'fix', name: 'fix: 修复bug'},
|
||||
{value: 'docs', name: 'docs: 文档变更'},
|
||||
{ value: 'feat', name: 'feat: 新增功能' },
|
||||
{ value: 'fix', name: 'fix: 修复bug' },
|
||||
{ value: 'docs', name: 'docs: 文档变更' },
|
||||
{
|
||||
value: 'style',
|
||||
name: 'style: 代码格式(不影响功能,例如空格、分号等格式修正)',
|
||||
@@ -11,21 +11,21 @@ module.exports = {
|
||||
value: 'refactor',
|
||||
name: 'refactor: 代码重构(不包括 bug 修复、功能新增)',
|
||||
},
|
||||
{value: 'perf', name: 'perf: 性能优化'},
|
||||
{value: 'test', name: 'test: 添加、修改测试用例'},
|
||||
{ value: 'perf', name: 'perf: 性能优化' },
|
||||
{ value: 'test', name: 'test: 添加、修改测试用例' },
|
||||
{
|
||||
value: 'build',
|
||||
name: 'build: 构建流程、外部依赖变更(如升级 npm 包、修改 脚手架 配置等)',
|
||||
},
|
||||
{value: 'ci', name: 'ci: 修改 CI 配置、脚本'},
|
||||
{ value: 'ci', name: 'ci: 修改 CI 配置、脚本' },
|
||||
{
|
||||
value: 'chore',
|
||||
name: 'chore: 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)',
|
||||
},
|
||||
{value: 'revert', name: 'revert: 回滚 commit'},
|
||||
{value: 'wip', name: 'wip: 开发中'},
|
||||
{value: 'mod', name: 'mod: 不确定分类的修改'},
|
||||
{value: 'release', name: 'release: 发布'},
|
||||
{ value: 'revert', name: 'revert: 回滚 commit' },
|
||||
{ value: 'wip', name: 'wip: 开发中' },
|
||||
{ value: 'mod', name: 'mod: 不确定分类的修改' },
|
||||
{ value: 'release', name: 'release: 发布' },
|
||||
],
|
||||
scopes: [
|
||||
['custom', '自定义'],
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"arrowParens": "avoid",
|
||||
"bracketSameLine": true,
|
||||
"bracketSpacing": false,
|
||||
"bracketSpacing": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
"trailingComma": "all",
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import Components from 'unplugin-vue-components/webpack';
|
||||
import NutUIResolver from '@nutui/nutui-taro/dist/resolver';
|
||||
import {UnifiedWebpackPluginV5} from 'weapp-tailwindcss/webpack';
|
||||
import {join} from 'node:path';
|
||||
import {argv} from 'yargs';
|
||||
import { UnifiedWebpackPluginV5 } from 'weapp-tailwindcss/webpack';
|
||||
import { join } from 'node:path';
|
||||
import { argv } from 'yargs';
|
||||
|
||||
const {robot = 1, desc} = argv;
|
||||
const { robot = 1, desc } = argv;
|
||||
|
||||
const CIPluginOptFn = async () => {
|
||||
/**
|
||||
@@ -25,7 +25,7 @@ const CIPluginOptFn = async () => {
|
||||
const config = {
|
||||
projectName: 'taroApp',
|
||||
date: '2023-8-13',
|
||||
designWidth(input: {file: string}) {
|
||||
designWidth(input: { file: string }) {
|
||||
if (input?.file?.replace(/\\+/g, '/').indexOf('@nutui') > -1) {
|
||||
return 375;
|
||||
}
|
||||
@@ -48,10 +48,10 @@ const config = {
|
||||
framework: 'vue3',
|
||||
compiler: {
|
||||
type: 'webpack5',
|
||||
prebundle: {enable: false},
|
||||
prebundle: { enable: false },
|
||||
},
|
||||
cache: {
|
||||
enable: false, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
|
||||
enable: true, // Webpack 持久化缓存配置,建议开启。默认配置请参考:https://docs.taro.zone/docs/config-detail#cache
|
||||
},
|
||||
sass: {
|
||||
data: `@import "@nutui/nutui-taro/dist/styles/variables.scss";`,
|
||||
@@ -75,7 +75,7 @@ const config = {
|
||||
});
|
||||
chain.plugin('unplugin-vue-components').use(
|
||||
Components({
|
||||
resolvers: [NutUIResolver({taro: true})],
|
||||
resolvers: [NutUIResolver({ taro: true })],
|
||||
}),
|
||||
);
|
||||
},
|
||||
@@ -110,7 +110,7 @@ const config = {
|
||||
webpackChain(chain) {
|
||||
chain.plugin('unplugin-vue-components').use(
|
||||
Components({
|
||||
resolvers: [NutUIResolver({taro: true})],
|
||||
resolvers: [NutUIResolver({ taro: true })],
|
||||
}),
|
||||
);
|
||||
},
|
||||
|
||||
@@ -36,9 +36,8 @@
|
||||
"lint:fix": "eslint --fix --ext .ts,.vue .",
|
||||
"lint:staged": "lint-staged",
|
||||
"prepare": "husky install",
|
||||
"preview": "vite preview",
|
||||
"cz": "cz",
|
||||
"lf": "npx prettier --write --end-of-line lf .",
|
||||
"lf": "npx prettier --write",
|
||||
"postinstall": "weapp-tw patch",
|
||||
"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"
|
||||
@@ -112,6 +111,7 @@
|
||||
"miniprogram-ci": "^2.0.10",
|
||||
"postcss": "8.4.29",
|
||||
"postcss-rem-to-responsive-pixel": "^6.0.2",
|
||||
"prettier": "^3.5.3",
|
||||
"style-loader": "1.3.0",
|
||||
"stylelint": "9.3.0",
|
||||
"tailwindcss": "^3.4.17",
|
||||
@@ -122,6 +122,5 @@
|
||||
"weapp-tailwindcss": "^3.7.0",
|
||||
"webpack": "^5.97.1",
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
|
||||
}
|
||||
}
|
||||
|
||||
11
pnpm-workspace.yaml
Normal file
11
pnpm-workspace.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
onlyBuiltDependencies:
|
||||
- '@parcel/watcher'
|
||||
- '@swc/core'
|
||||
- '@tarojs/binding'
|
||||
- core-js
|
||||
- core-js-pure
|
||||
- esbuild
|
||||
- protobufjs
|
||||
- swiper
|
||||
- vue-demi
|
||||
- weapp-tailwindcss
|
||||
@@ -1,4 +1,4 @@
|
||||
import {createApp} from 'vue';
|
||||
import { createApp } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import './app.scss';
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<script setup lang="ts">
|
||||
// import { computed, ref } from "vue";
|
||||
import Taro from '@tarojs/taro';
|
||||
import {login} from '@/api/user';
|
||||
import { login } from '@/api/user';
|
||||
|
||||
defineProps({
|
||||
visible: {
|
||||
@@ -40,9 +40,9 @@ const onOk = () => {
|
||||
desc: '完善用户资料',
|
||||
success: async user => {
|
||||
Taro.login({
|
||||
success: async ({code}) => {
|
||||
success: async ({ code }) => {
|
||||
try {
|
||||
const {data}: any = await login({
|
||||
const { data }: any = await login({
|
||||
code: code,
|
||||
nickName: user.userInfo.nickName,
|
||||
avatarUrl: user.userInfo.avatarUrl,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="head-wrapper" :style="{top: BarHeight + 'px'}">
|
||||
<view class="head-wrapper" :style="{ top: BarHeight + 'px' }">
|
||||
<view class="head-menu">
|
||||
<Left class="iconfont" @click="returns" />
|
||||
<view class="line"></view>
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {computed} from 'vue';
|
||||
import {Home, Left} from '@nutui/icons-vue-taro';
|
||||
import { computed } from 'vue';
|
||||
import { Home, Left } from '@nutui/icons-vue-taro';
|
||||
|
||||
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight as number;
|
||||
const BarHeight = computed(() => statusBarHeight - 7);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {addCart, getCart, clearCart} from '@/api/cart';
|
||||
import {Plus, Minus} from '@nutui/icons-vue-taro';
|
||||
import {createActiveOrder} from '@/api/goods';
|
||||
import {createAfterOrder, getUserPoint} from '@/api/admin';
|
||||
import { addCart, getCart, clearCart } from '@/api/cart';
|
||||
import { Plus, Minus } from '@nutui/icons-vue-taro';
|
||||
import { createActiveOrder } from '@/api/goods';
|
||||
import { createAfterOrder, getUserPoint } from '@/api/admin';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
|
||||
interface CardList {
|
||||
@@ -221,7 +221,7 @@ defineExpose({
|
||||
</view>
|
||||
<!-- 购物车弹窗 -->
|
||||
<nut-popup
|
||||
:style="{padding: '15px'}"
|
||||
:style="{ padding: '15px' }"
|
||||
round
|
||||
position="bottom"
|
||||
z-index="1"
|
||||
|
||||
@@ -82,13 +82,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {calculateDistance, parseQueryString} from '@/utils';
|
||||
import {bindParent, getBanner} from '@/api/user';
|
||||
import {getMerList} from '@/api/goods';
|
||||
import { calculateDistance, parseQueryString } from '@/utils';
|
||||
import { bindParent, getBanner } from '@/api/user';
|
||||
import { getMerList } from '@/api/goods';
|
||||
|
||||
const classId = defineModel({default: 0});
|
||||
const classId = defineModel({ default: 0 });
|
||||
|
||||
const list1 = ref<Array<MerData>>([]);
|
||||
const list2 = ref<Array<MerData>>([]);
|
||||
@@ -166,7 +166,7 @@ const get_mer_list = async () => {
|
||||
const bannerList = ref<any[]>([]);
|
||||
|
||||
const get_banner_list = async () => {
|
||||
const {data}: any = await getBanner();
|
||||
const { data }: any = await getBanner();
|
||||
bannerList.value = data.data;
|
||||
};
|
||||
|
||||
@@ -175,7 +175,7 @@ const toPage = async (url: string) => {
|
||||
// url转对象
|
||||
const obj = parseQueryString(url);
|
||||
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];
|
||||
Taro.setStorageSync('mer_info', mer);
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
round
|
||||
safe-area-inset-bottom
|
||||
:close-on-click-overlay="false"
|
||||
:style="{height: 'auto'}"
|
||||
:style="{ height: 'auto' }"
|
||||
:visible="isShowPay"
|
||||
@click-close-icon="closePay">
|
||||
<view class="div">
|
||||
<view style="text-align: center">支付方式</view>
|
||||
<nut-cell-group
|
||||
:style="{margin: interval ? '40rpx 0 150rpx 0' : '40rpx 0'}">
|
||||
:style="{ margin: interval ? '40rpx 0 150rpx 0' : '40rpx 0' }">
|
||||
<nut-cell
|
||||
title="微信支付"
|
||||
desc="使用微信快捷支付"
|
||||
@@ -45,11 +45,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, watch} from 'vue';
|
||||
import {IconFont} from '@nutui/icons-vue-taro';
|
||||
import { ref, watch } from 'vue';
|
||||
import { IconFont } from '@nutui/icons-vue-taro';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {payOrder} from '@/api/order';
|
||||
import {getPersonalInfo} from '@/api/user';
|
||||
import { payOrder } from '@/api/order';
|
||||
import { getPersonalInfo } from '@/api/user';
|
||||
|
||||
const prop = defineProps({
|
||||
interval: {
|
||||
@@ -75,7 +75,7 @@ const prop = defineProps({
|
||||
|
||||
const emit = defineEmits(['closePay', 'successPay']);
|
||||
|
||||
const info = ref<{integral?: any}>({});
|
||||
const info = ref<{ integral?: any }>({});
|
||||
|
||||
watch(
|
||||
() => prop.isShowPay,
|
||||
@@ -106,7 +106,7 @@ const goPay = async (type: number) => {
|
||||
try {
|
||||
console.log(prop.jfInfo);
|
||||
// 1微信支付 2积分支付 3专属积分兑换
|
||||
const {data} = await payOrder({
|
||||
const { data } = await payOrder({
|
||||
oid: prop.jfInfo.oid,
|
||||
OrderType: prop.OrderType,
|
||||
PayType: type,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
const isShow = ref(false);
|
||||
|
||||
@@ -108,11 +108,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {reactive} from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
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;
|
||||
}>();
|
||||
|
||||
@@ -143,7 +143,7 @@ function onEditorReady() {
|
||||
}
|
||||
|
||||
// 失去焦点时,获取富文本的内容
|
||||
function getCtx(e: {detail: {html: any}}) {
|
||||
function getCtx(e: { detail: { html: any } }) {
|
||||
data.richText = 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);
|
||||
let {name, value} = e.target.dataset;
|
||||
let { name, value } = e.target.dataset;
|
||||
if (!name) return;
|
||||
data.editorCtx.format(name, value);
|
||||
}
|
||||
|
||||
//通过 Context 方法改变编辑器内样式时触发,返回选区已设置的样式
|
||||
function onStatusChange(e: {detail: any}) {
|
||||
function onStatusChange(e: { detail: any }) {
|
||||
data.formats = e.detail;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ function insertImage() {
|
||||
Taro.uploadFile({
|
||||
url: `${BASE_URL}/upload`,
|
||||
name: 'file',
|
||||
header: {token: Taro.getStorageSync('token')},
|
||||
header: { token: Taro.getStorageSync('token') },
|
||||
filePath: res.tempFilePaths[0],
|
||||
success: res => {
|
||||
console.log(res);
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {getStoreList} from '@/api/home';
|
||||
import { getStoreList } from '@/api/home';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
const name = defineModel({
|
||||
default: '',
|
||||
});
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {BASE_URL} from '@/utils/request';
|
||||
import {computed, ref} from 'vue';
|
||||
import { BASE_URL } from '@/utils/request';
|
||||
import { computed, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import {computed, ref} from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import headImg from '../static/def_avatar.png';
|
||||
import logoImg from '../static/logo.jpg';
|
||||
import {BASE_URL} from '@/utils/request';
|
||||
import {getPhone, login} from '@/api/user';
|
||||
import { BASE_URL } from '@/utils/request';
|
||||
import { getPhone, login } from '@/api/user';
|
||||
|
||||
const props = defineProps({
|
||||
isShow: {
|
||||
@@ -36,7 +36,7 @@ const closeAttr = () => {
|
||||
};
|
||||
|
||||
const onChooseAvatar = e => {
|
||||
const {avatarUrl} = e.detail;
|
||||
const { avatarUrl } = e.detail;
|
||||
Taro.uploadFile({
|
||||
url: `${BASE_URL}/upload`,
|
||||
filePath: avatarUrl,
|
||||
@@ -57,7 +57,7 @@ const getPhoneNumber = async (e: any) => {
|
||||
title: '授权手机号中',
|
||||
mask: true,
|
||||
});
|
||||
const {code} = e.detail;
|
||||
const { code } = e.detail;
|
||||
const res = await getPhone({
|
||||
code: code,
|
||||
});
|
||||
@@ -112,7 +112,7 @@ const formSubmit = async (e: any) => {
|
||||
position="bottom"
|
||||
safe-area-inset-bottom
|
||||
closeable
|
||||
:style="{padding: '20px 10px'}"
|
||||
:style="{ padding: '20px 10px' }"
|
||||
v-model:visible="show"
|
||||
@close="closeAttr"
|
||||
:close-on-click-overlay="false">
|
||||
|
||||
@@ -62,11 +62,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {Ref, ref} from 'vue';
|
||||
import { Ref, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import Cart from '../../../../components/Cart.vue';
|
||||
import {Cart2} from '@nutui/icons-vue-taro';
|
||||
import {getGoodList, getMerCategory} from '../../../../api/goods';
|
||||
import { Cart2 } from '@nutui/icons-vue-taro';
|
||||
import { getGoodList, getMerCategory } from '../../../../api/goods';
|
||||
|
||||
interface goodList {
|
||||
ID: number;
|
||||
|
||||
@@ -51,10 +51,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import BackComponent from '../../../../components/Back.vue';
|
||||
import {checkPhone} from '../../../../api/admin';
|
||||
import { checkPhone } from '../../../../api/admin';
|
||||
|
||||
const formVal = ref({
|
||||
seat: '',
|
||||
@@ -64,7 +64,7 @@ const formVal = ref({
|
||||
|
||||
const visible = ref(false);
|
||||
|
||||
const formSubmit = async ({detail}: any) => {
|
||||
const formSubmit = async ({ detail }: any) => {
|
||||
if (!detail.value.seat)
|
||||
return Taro.showToast({
|
||||
title: '请填写台号',
|
||||
@@ -80,7 +80,7 @@ const formSubmit = async ({detail}: any) => {
|
||||
icon: 'none',
|
||||
});
|
||||
try {
|
||||
await checkPhone({phone: detail.value.phone});
|
||||
await checkPhone({ phone: detail.value.phone });
|
||||
const user_info = await Taro.getStorageSync('userInfo');
|
||||
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}¬es=${formVal.value.notes}`,
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
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-repeat: no-repeat;
|
||||
|
||||
|
||||
@@ -78,8 +78,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {onMounted, ref} from 'vue';
|
||||
import {cancelAfterOrder, confirmAfterOrder, editAfterOrder} from '@/api/admin';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import {
|
||||
cancelAfterOrder,
|
||||
confirmAfterOrder,
|
||||
editAfterOrder,
|
||||
} from '@/api/admin';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -66,10 +66,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import Footer from './components/Footer.vue';
|
||||
import {getAfterOrderList} from '@/api/admin';
|
||||
import { getAfterOrderList } from '@/api/admin';
|
||||
|
||||
const tabsIndex = ref(0);
|
||||
|
||||
@@ -108,7 +108,7 @@ const get_list = async () => {
|
||||
title: '加载中',
|
||||
});
|
||||
const user_info = await Taro.getStorageSync('userInfo');
|
||||
const {data: res} = await getAfterOrderList({
|
||||
const { data: res } = await getAfterOrderList({
|
||||
bid: user_info.data.bid,
|
||||
status: tabsIndex.value,
|
||||
});
|
||||
|
||||
@@ -57,9 +57,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getAfterOrder, createPayQr} from '@/api/admin';
|
||||
import { getAfterOrder, createPayQr } from '@/api/admin';
|
||||
|
||||
const data = ref<any>({});
|
||||
|
||||
@@ -71,11 +71,11 @@ Taro.useLoad((e: any) => {
|
||||
get_data(e);
|
||||
});
|
||||
|
||||
const get_data = async ({bid, oid}) => {
|
||||
const get_data = async ({ bid, oid }) => {
|
||||
Taro.showLoading({
|
||||
title: '加载中',
|
||||
});
|
||||
const res = await getAfterOrder({bid, oid});
|
||||
const res = await getAfterOrder({ bid, oid });
|
||||
data.value = res.data.data;
|
||||
Taro.hideLoading();
|
||||
};
|
||||
|
||||
@@ -79,10 +79,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import Footer from '../components/Footer.vue';
|
||||
import {getAfterOrder} from '@/api/admin';
|
||||
import { getAfterOrder } from '@/api/admin';
|
||||
// import BackComponent from "../../../../../components/Back.vue";
|
||||
|
||||
const data = ref<any>({});
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {onUnmounted, ref} from 'vue';
|
||||
import { onUnmounted, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getAfterOrder} from '@/api/admin';
|
||||
import { getAfterOrder } from '@/api/admin';
|
||||
|
||||
const time_id = ref();
|
||||
|
||||
@@ -25,7 +25,7 @@ Taro.useLoad(e => {
|
||||
info.value = e;
|
||||
dataUrl.value = Taro.getStorageSync('pay_code');
|
||||
time_id.value = setInterval(async () => {
|
||||
const {data} = await getAfterOrder({
|
||||
const { data } = await getAfterOrder({
|
||||
bid: info.value.bid,
|
||||
oid: info.value.oid,
|
||||
});
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
info.status === 0
|
||||
? '待付款'
|
||||
: info.status === 1
|
||||
? '待使用'
|
||||
: info.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
? '待使用'
|
||||
: info.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
">
|
||||
</nut-cell>
|
||||
<nut-cell title="下单用户:" :desc="info.User?.nickName"></nut-cell>
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const info = ref<any>({});
|
||||
|
||||
|
||||
@@ -116,10 +116,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {h, ref} from 'vue';
|
||||
import { h, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {TriangleDown} from '@nutui/icons-vue-taro';
|
||||
import {orderStatistics} from '../../../api/admin';
|
||||
import { TriangleDown } from '@nutui/icons-vue-taro';
|
||||
import { orderStatistics } from '../../../api/admin';
|
||||
|
||||
Taro.useLoad(() => {
|
||||
getData();
|
||||
|
||||
@@ -33,19 +33,19 @@
|
||||
item.status === 0
|
||||
? '#FF850A'
|
||||
: item.status === 1
|
||||
? '#F83D3D'
|
||||
: item.status === 2
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
? '#F83D3D'
|
||||
: item.status === 2
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
}"
|
||||
>{{
|
||||
item.status === 0
|
||||
? '待付款'
|
||||
: item.status === 1
|
||||
? '待使用'
|
||||
: item.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
? '待使用'
|
||||
: item.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -86,9 +86,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getActiveOrderList} from '../../../../api/admin';
|
||||
import { getActiveOrderList } from '../../../../api/admin';
|
||||
|
||||
const opt = ref([
|
||||
{
|
||||
|
||||
@@ -116,9 +116,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, computed, h} from 'vue';
|
||||
import { ref, computed, h } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {growthRate} from '../../../api/admin';
|
||||
import { growthRate } from '../../../api/admin';
|
||||
import dayjs from 'dayjs';
|
||||
import uCharts from '../../../utils/js_sdk/u-charts.min.js';
|
||||
|
||||
|
||||
@@ -25,19 +25,19 @@
|
||||
item.status === 0
|
||||
? '#FF850A'
|
||||
: item.status === 1
|
||||
? '#F83D3D'
|
||||
: item.status === 2
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
? '#F83D3D'
|
||||
: item.status === 2
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
}"
|
||||
>{{
|
||||
item.status === 0
|
||||
? '待付款'
|
||||
: item.status === 1
|
||||
? '待使用'
|
||||
: item.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
? '待使用'
|
||||
: item.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
@@ -82,8 +82,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getActiveOrderList} from '@/api/admin';
|
||||
import {ref} from 'vue';
|
||||
import { getActiveOrderList } from '@/api/admin';
|
||||
import { ref } from 'vue';
|
||||
|
||||
// url参数转对象
|
||||
// const urlParse = (url: string) => {
|
||||
@@ -128,7 +128,7 @@ const list = ref<any[]>([]);
|
||||
|
||||
const getListOne = async () => {
|
||||
try {
|
||||
const {data} = Taro.getStorageSync('userInfo');
|
||||
const { data } = Taro.getStorageSync('userInfo');
|
||||
const res = await getActiveOrderList({
|
||||
PageNum: 1,
|
||||
PageSize: 1,
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getActiveVerifyList, activeOrderVerify} from '@/api/admin';
|
||||
import {ref} from 'vue';
|
||||
import { getActiveVerifyList, activeOrderVerify } from '@/api/admin';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const opt = ref<any>({});
|
||||
|
||||
@@ -129,6 +129,8 @@ const getPayType = (type: number) => {
|
||||
return '平台积分支付';
|
||||
case 3:
|
||||
return '智多鑫积分支付';
|
||||
case 3:
|
||||
return '渔乐潮玩支付';
|
||||
default:
|
||||
return '未知';
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getWithdrawList, addWithdraw} from '@/api/admin';
|
||||
import { getWithdrawList, addWithdraw } from '@/api/admin';
|
||||
|
||||
const user_info = ref<any>({});
|
||||
|
||||
@@ -57,7 +57,7 @@ const getData = async () => {
|
||||
|
||||
const add = async () => {
|
||||
try {
|
||||
formRef.value?.validate().then(async ({valid}) => {
|
||||
formRef.value?.validate().then(async ({ valid }) => {
|
||||
if (valid) {
|
||||
const res = await addWithdraw({
|
||||
Bid: user_info.value.data.bid,
|
||||
@@ -195,15 +195,15 @@ Taro.useReachBottom(() => {
|
||||
item.status === 1
|
||||
? 'success'
|
||||
: item.status === 1
|
||||
? 'danger'
|
||||
: 'warning'
|
||||
? 'danger'
|
||||
: 'warning'
|
||||
"
|
||||
>{{
|
||||
item.status === 1
|
||||
? '已打款'
|
||||
: item.status === 2
|
||||
? '已拒绝'
|
||||
: '待审核'
|
||||
? '已拒绝'
|
||||
: '待审核'
|
||||
}}</view
|
||||
>
|
||||
</view>
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getAllMerCategory} from '@/api/goods';
|
||||
import { getAllMerCategory } from '@/api/goods';
|
||||
|
||||
const list = ref<
|
||||
{
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {nextTick, ref} from 'vue';
|
||||
import { nextTick, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {addCart, getAllCart} from '@/api/cart';
|
||||
import {createActiveOrder} from '@/api/goods';
|
||||
import { addCart, getAllCart } from '@/api/cart';
|
||||
import { createActiveOrder } from '@/api/goods';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
|
||||
interface CardList {
|
||||
@@ -206,7 +206,7 @@ const sub = async () => {
|
||||
});
|
||||
return;
|
||||
}
|
||||
const {data: res} = await createActiveOrder({
|
||||
const { data: res } = await createActiveOrder({
|
||||
Bid: arr.map((item: any) => item.StoreBid),
|
||||
});
|
||||
if (res.oid) {
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import {getCategoryList, getCategoryGoods} from '@/api/goods';
|
||||
import { ref } from 'vue';
|
||||
import { getCategoryList, getCategoryGoods } from '@/api/goods';
|
||||
|
||||
const val = ref(0);
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getHdOrJfGoods, createActiveOrder} from '@/api/goods';
|
||||
import {getUserPoint} from '@/api/admin';
|
||||
import {addCart} from '@/api/cart';
|
||||
import { getHdOrJfGoods, createActiveOrder } from '@/api/goods';
|
||||
import { getUserPoint } from '@/api/admin';
|
||||
import { addCart } from '@/api/cart';
|
||||
import Back from '@/components/Back.vue';
|
||||
|
||||
const par = ref<any>({});
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import './index.scss';
|
||||
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
class="card_item"
|
||||
v-for="item in list"
|
||||
:key="item.ID"
|
||||
:style="{backgroundImage: `url(${item.cover})`}"
|
||||
:style="{ backgroundImage: `url(${item.cover})` }"
|
||||
@click="toPage(item)"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getPersonalInfo} from '@/api/user';
|
||||
import { getPersonalInfo } from '@/api/user';
|
||||
|
||||
const list = ref<any[]>([]);
|
||||
|
||||
@@ -58,7 +58,7 @@ const getList = async () => {
|
||||
Taro.request({
|
||||
url: `${process.env.TARO_APP_HOME}`,
|
||||
method: 'POST',
|
||||
success: ({data: res}) => {
|
||||
success: ({ data: res }) => {
|
||||
list.value =
|
||||
res.data.data.sort((a: any, b: any) => b.sort - a.sort) || [];
|
||||
},
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import {getStorageSync, useDidShow} from '@tarojs/taro';
|
||||
import {WebView} from '@tarojs/components';
|
||||
import { ref } from 'vue';
|
||||
import { getStorageSync, useDidShow } from '@tarojs/taro';
|
||||
import { WebView } from '@tarojs/components';
|
||||
|
||||
const url = ref('');
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="head-wrapper" :style="{top: BarHeight + 'px'}">
|
||||
<view class="head-wrapper" :style="{ top: BarHeight + 'px' }">
|
||||
<view class="head-menu">
|
||||
<Left class="iconfont" @click="returns" />
|
||||
<Home class="iconfont" @click="goHome" />
|
||||
@@ -62,13 +62,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {Ref, ref} from 'vue';
|
||||
import { Ref, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {Home, Left} from '@nutui/icons-vue-taro';
|
||||
import {getActiveGoodsDetail, getMerDetail} from '@/api/goods';
|
||||
import { Home, Left } from '@nutui/icons-vue-taro';
|
||||
import { getActiveGoodsDetail, getMerDetail } from '@/api/goods';
|
||||
import Cart from '@/components/Cart.vue';
|
||||
import {Cart2} from '@nutui/icons-vue-taro';
|
||||
import {nextTick} from 'vue';
|
||||
import { Cart2 } from '@nutui/icons-vue-taro';
|
||||
import { nextTick } from 'vue';
|
||||
|
||||
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight;
|
||||
const BarHeight = ref((statusBarHeight as number) + 7);
|
||||
@@ -105,7 +105,7 @@ Taro.useLoad(async options => {
|
||||
});
|
||||
|
||||
const getMerInfo = async () => {
|
||||
const res = await getMerDetail({bid: bid.value});
|
||||
const res = await getMerDetail({ bid: bid.value });
|
||||
mer_info.value = res.data.data;
|
||||
};
|
||||
|
||||
@@ -117,7 +117,7 @@ Taro.useShareAppMessage(() => ({
|
||||
|
||||
const get_good_detail = async (gid: string) => {
|
||||
try {
|
||||
const res = await getActiveGoodsDetail({gid: gid});
|
||||
const res = await getActiveGoodsDetail({ gid: gid });
|
||||
goodInfo.value = {
|
||||
...res.data.data,
|
||||
// details: res.data.data.details.,
|
||||
|
||||
@@ -48,10 +48,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {Find} from '@nutui/icons-vue-taro';
|
||||
import { Find } from '@nutui/icons-vue-taro';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {calculateDistance} from '@/utils';
|
||||
import {ref} from 'vue';
|
||||
import { calculateDistance } from '@/utils';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const distance = ref('');
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</template>
|
||||
|
||||
<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';
|
||||
|
||||
const toHome = () => {
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
item.number > 0
|
||||
? `可用积分:${item.number}`
|
||||
: item.name.includes('微信')
|
||||
? '微信全额支付'
|
||||
: ''
|
||||
? '微信全额支付'
|
||||
: ''
|
||||
"
|
||||
@click="cellClick(item.ID)">
|
||||
<template #icon>
|
||||
@@ -95,10 +95,10 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {IconFont} from '@nutui/icons-vue-taro';
|
||||
import {onUnmounted, ref} from 'vue';
|
||||
import {getActiveOrderDetail, getPayList} from '@/api/goods';
|
||||
import {payOrder} from '@/api/order';
|
||||
import { IconFont } from '@nutui/icons-vue-taro';
|
||||
import { onUnmounted, ref } from 'vue';
|
||||
import { getActiveOrderDetail, getPayList } from '@/api/goods';
|
||||
import { payOrder } from '@/api/order';
|
||||
import * as dayjs from 'dayjs';
|
||||
|
||||
const payVal = ref();
|
||||
@@ -114,7 +114,7 @@ const isLoading = ref(false);
|
||||
const opt = ref<any>({});
|
||||
|
||||
Taro.useLoad(e => {
|
||||
const {oid, bid, OrderType} = e;
|
||||
const { oid, bid, OrderType } = e;
|
||||
opt.value = e;
|
||||
get_pay_list();
|
||||
getData(oid, bid, OrderType);
|
||||
@@ -176,7 +176,7 @@ const pay = async () => {
|
||||
if (isLoading.value) return;
|
||||
isLoading.value = true;
|
||||
if (!payVal.value)
|
||||
return Taro.showToast({title: '请选择支付方式', icon: 'none'});
|
||||
return Taro.showToast({ title: '请选择支付方式', icon: 'none' });
|
||||
await confirmPay();
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import {
|
||||
useLoad,
|
||||
useReachBottom,
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
setStorageSync,
|
||||
} from '@tarojs/taro';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
import {getActiveOrderList, deleteActiveOrder} from '@/api/goods';
|
||||
import {getOrderStatistics} from '@/api/order';
|
||||
import { getActiveOrderList, deleteActiveOrder } from '@/api/goods';
|
||||
import { getOrderStatistics } from '@/api/order';
|
||||
|
||||
const tabValue = ref(0);
|
||||
|
||||
@@ -189,7 +189,9 @@ const delOrder = async (oid: string) => {
|
||||
@click="tabChange(item.value)">
|
||||
<view class="text">{{ item.title }}</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 v-if="orderList.length > 0">
|
||||
@@ -201,10 +203,10 @@ const delOrder = async (oid: string) => {
|
||||
item.status === 0
|
||||
? '待付款'
|
||||
: item.status === 1
|
||||
? '待使用'
|
||||
: item.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
? '待使用'
|
||||
: item.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -67,14 +67,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {
|
||||
// getActiveGoods,
|
||||
getMerList,
|
||||
} from '../../../api/goods';
|
||||
import {IconFont} from '@nutui/icons-vue-taro';
|
||||
import {calculateDistance} from '@/utils';
|
||||
import { IconFont } from '@nutui/icons-vue-taro';
|
||||
import { calculateDistance } from '@/utils';
|
||||
|
||||
// const list = ref<any>([]);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<view :style="{marginTop: BarHeight + 'px'}"></view>
|
||||
<view :style="{ marginTop: BarHeight + 'px' }"></view>
|
||||
<view class="local">
|
||||
<view class="iconfont icon-dizhi" style="font-size: 20px"></view>
|
||||
<text class="text-[28px]">{{ address }}</text>
|
||||
@@ -54,8 +54,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import {getHomeList} from '@/api/home';
|
||||
import { ref } from 'vue';
|
||||
import { getHomeList } from '@/api/home';
|
||||
import MerList from '@/components/MerList.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`,
|
||||
method: 'GET',
|
||||
success: res => {
|
||||
const data = res.data.result.address_component;
|
||||
address.value = `${data.district}${data.street_number}`;
|
||||
switch (res.data.status) {
|
||||
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;
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import {getPhone, login} from '@/api/user';
|
||||
import {getQrCode, bindQrCode} from '@/api/code';
|
||||
import { ref } from 'vue';
|
||||
import { getPhone, login } from '@/api/user';
|
||||
import { getQrCode, bindQrCode } from '@/api/code';
|
||||
import './index.scss';
|
||||
|
||||
const status = ref(0);
|
||||
@@ -104,7 +104,7 @@ const getPhoneNumber = async (e: any) => {
|
||||
title: '授权手机号中',
|
||||
mask: true,
|
||||
});
|
||||
const {code} = e.detail;
|
||||
const { code } = e.detail;
|
||||
const res = await getPhone({
|
||||
code: code,
|
||||
});
|
||||
|
||||
@@ -52,13 +52,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getHdOrJfGoods, createActiveOrder} from '@/api/goods';
|
||||
import {getUserPoint} from '@/api/admin';
|
||||
import {addCart} from '@/api/cart';
|
||||
import { getHdOrJfGoods, createActiveOrder } from '@/api/goods';
|
||||
import { getUserPoint } from '@/api/admin';
|
||||
import { addCart } from '@/api/cart';
|
||||
import Back from '@/components/Back.vue';
|
||||
import {RectRight} from '@nutui/icons-vue-taro';
|
||||
import { RectRight } from '@nutui/icons-vue-taro';
|
||||
import './index.scss';
|
||||
|
||||
const data = ref<any[]>([]);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="head-wrapper" :style="{top: BarHeight + 'px'}">
|
||||
<view class="head-wrapper" :style="{ top: BarHeight + 'px' }">
|
||||
<view class="head-menu">
|
||||
<Left class="iconfont" @click="returns" />
|
||||
<Home class="iconfont" @click="goHome" />
|
||||
@@ -134,10 +134,10 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {Left, Home, Plus, Minus} from '@nutui/icons-vue-taro';
|
||||
import {Ref, ref} from 'vue';
|
||||
import {calculateDistance} from '@/utils';
|
||||
import {getGoodList, getMerCategory, getMerDetail} from '@/api/goods';
|
||||
import { Left, Home, Plus, Minus } from '@nutui/icons-vue-taro';
|
||||
import { Ref, ref } from 'vue';
|
||||
import { calculateDistance } from '@/utils';
|
||||
import { getGoodList, getMerCategory, getMerDetail } from '@/api/goods';
|
||||
import Cart from '@/components/Cart.vue';
|
||||
|
||||
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import Taro from '@tarojs/taro';
|
||||
import {Ref, ref} from 'vue';
|
||||
import { Ref, ref } from 'vue';
|
||||
import Upload from '../../../components/Upload.vue';
|
||||
import RichEditor from '../../../components/RichEditor.vue';
|
||||
import {addGood} from '@/api/product';
|
||||
import { addGood } from '@/api/product';
|
||||
|
||||
const ruleForm = ref(null) as Ref;
|
||||
|
||||
@@ -90,7 +90,7 @@ const confirmClass = (val: any) => {
|
||||
};
|
||||
|
||||
const ok = async () => {
|
||||
ruleForm.value.validate().then(({valid, errors}: any) => {
|
||||
ruleForm.value.validate().then(({ valid, errors }: any) => {
|
||||
if (valid) {
|
||||
console.log('success', basicData.value);
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import {ref} from 'vue';
|
||||
import {productList} from '@/api/product';
|
||||
import { ref } from 'vue';
|
||||
import { productList } from '@/api/product';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
const swiperCur = ref(0);
|
||||
@@ -69,7 +69,7 @@ const changeState = (item: List) => {
|
||||
next-margin="0"
|
||||
:current="swiperCur"
|
||||
@change="swiperChange">
|
||||
<swiper-item :class="{active: 0 == swiperCur}">
|
||||
<swiper-item :class="{ active: 0 == swiperCur }">
|
||||
<view class="slide-navigator">
|
||||
<view class="item" @click="jumpAddGoods(null, 1)">
|
||||
<image
|
||||
@@ -120,7 +120,7 @@ const changeState = (item: List) => {
|
||||
</navigator>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item :class="{active: 1 == swiperCur}">
|
||||
<swiper-item :class="{ active: 1 == swiperCur }">
|
||||
<view class="slide-navigator">
|
||||
<navigator
|
||||
class="item"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import {ref, onMounted} from 'vue';
|
||||
import { ref, onMounted } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import MerList from '@/components/MerList.vue';
|
||||
import Storelist from '@/components/StoreList.vue';
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<view
|
||||
class="user-center-card__header__transparent"
|
||||
v-if="isLogin"
|
||||
:style="{width: isLogin ? '100%' : '70%'}">
|
||||
:style="{ width: isLogin ? '100%' : '70%' }">
|
||||
<view
|
||||
class="user-center-card__header__avatar"
|
||||
@click="toPage('/pages/users/user_setting/index')">
|
||||
@@ -182,12 +182,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {ref} from 'vue';
|
||||
import {ArrowRight, IconFont} from '@nutui/icons-vue-taro';
|
||||
import { ref } from 'vue';
|
||||
import { ArrowRight, IconFont } from '@nutui/icons-vue-taro';
|
||||
import Taro from '@tarojs/taro';
|
||||
import Auth from '@/components/Auth.vue';
|
||||
import {getPersonalInfo, getPhone, bindParent} from '@/api/user';
|
||||
import {maskString} from '@/utils';
|
||||
import { getPersonalInfo, getPhone, bindParent } from '@/api/user';
|
||||
import { maskString } from '@/utils';
|
||||
|
||||
const isShowLogin = ref(false);
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import {computed, ref} from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import * as dayjs from 'dayjs';
|
||||
import {getIntegralDetail, getBeanDetail, getGiftRecord} from '@/api/user';
|
||||
import {TriangleDown} from '@nutui/icons-vue-taro';
|
||||
import { getIntegralDetail, getBeanDetail, getGiftRecord } from '@/api/user';
|
||||
import { TriangleDown } from '@nutui/icons-vue-taro';
|
||||
|
||||
const tabValue = ref(1);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import {getVerifyCode, phoneLogin, getPersonalInfo} from '@/api/user';
|
||||
import { ref } from 'vue';
|
||||
import { getVerifyCode, phoneLogin, getPersonalInfo } from '@/api/user';
|
||||
import logoImg from '../../../static/logo.jpg';
|
||||
|
||||
const optData = ref<any>({});
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<view style="width: 45%"></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>推荐人二维码绑定</view>
|
||||
<image style="margin-top: 10px" :src="urlCode" />
|
||||
@@ -24,10 +24,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import {IconFont} from '@nutui/icons-vue-taro';
|
||||
import { ref } from 'vue';
|
||||
import { IconFont } from '@nutui/icons-vue-taro';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getRefereeCode} from '@/api/user';
|
||||
import { getRefereeCode } from '@/api/user';
|
||||
|
||||
const show = ref(false);
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {useLoad, showToast} from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import {getTGIntegralDetail} from '../../../../api/user';
|
||||
import { useLoad, showToast } from '@tarojs/taro';
|
||||
import { ref } from 'vue';
|
||||
import { getTGIntegralDetail } from '../../../../api/user';
|
||||
|
||||
const data = ref([]);
|
||||
|
||||
@@ -59,7 +59,7 @@ const getData = async () => {
|
||||
data.value = res.data.data || [];
|
||||
page.value.ItemCount = res.data.count;
|
||||
} catch (error) {
|
||||
showToast({title: error.msg, icon: 'none'});
|
||||
showToast({ title: error.msg, icon: 'none' });
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import {useLoad, showToast} from '@tarojs/taro';
|
||||
import {getTGUserList} from '../../../../api/user';
|
||||
import { ref } from 'vue';
|
||||
import { useLoad, showToast } from '@tarojs/taro';
|
||||
import { getTGUserList } from '../../../../api/user';
|
||||
|
||||
useLoad(() => {
|
||||
getData();
|
||||
@@ -37,7 +37,7 @@ useLoad(() => {
|
||||
|
||||
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) => {
|
||||
page.value.PageNum = e;
|
||||
@@ -53,7 +53,7 @@ const getData = async () => {
|
||||
data.value = res.data.data || [];
|
||||
page.value.ItemCount = res.data.count;
|
||||
} catch (error) {
|
||||
showToast({title: error.msg, icon: 'none'});
|
||||
showToast({ title: error.msg, icon: 'none' });
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import UserModal from '@/components/UserModal.vue';
|
||||
import {ref} from 'vue';
|
||||
import {getPhone, login, getPersonalInfo} from '@/api/user';
|
||||
import { ref } from 'vue';
|
||||
import { getPhone, login, getPersonalInfo } from '@/api/user';
|
||||
import logoImg from '../../../static/logo.jpg';
|
||||
|
||||
const isShow = ref(false);
|
||||
@@ -53,7 +53,7 @@ const getPhoneNumber = async (e: any) => {
|
||||
title: '授权手机号中',
|
||||
mask: true,
|
||||
});
|
||||
const {code} = e.detail;
|
||||
const { code } = e.detail;
|
||||
const res = await getPhone({
|
||||
code: code,
|
||||
});
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
import {getActiveOrderList, deleteActiveOrder} from '@/api/goods';
|
||||
import {getOrderStatistics} from '@/api/order';
|
||||
import { getActiveOrderList, deleteActiveOrder } from '@/api/goods';
|
||||
import { getOrderStatistics } from '@/api/order';
|
||||
import UQRCode from 'uqrcodejs';
|
||||
|
||||
const tabValue = ref(0);
|
||||
@@ -162,7 +162,7 @@ const toDetail = (item: any) => {
|
||||
|
||||
const delOrder = async (oid: string) => {
|
||||
try {
|
||||
await deleteActiveOrder({oid});
|
||||
await deleteActiveOrder({ oid });
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
@@ -249,7 +249,9 @@ const closed = () => {
|
||||
>{{ item.title }}
|
||||
</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 v-if="orderList.length > 0">
|
||||
@@ -266,19 +268,19 @@ const closed = () => {
|
||||
item.status === 0
|
||||
? '#FF850A'
|
||||
: item.status === 1
|
||||
? '#F83D3D'
|
||||
: item.status === 2
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
? '#F83D3D'
|
||||
: item.status === 2
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
}"
|
||||
>{{
|
||||
item.status === 0
|
||||
? '待付款'
|
||||
: item.status === 1
|
||||
? '待使用'
|
||||
: item.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
? '待使用'
|
||||
: item.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -146,10 +146,10 @@
|
||||
goodInfo.status === 0
|
||||
? '待付款'
|
||||
: goodInfo.status === 1
|
||||
? '待使用'
|
||||
: goodInfo.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
? '待使用'
|
||||
: goodInfo.status === 2
|
||||
? '已使用'
|
||||
: '已失效'
|
||||
"></nut-cell>
|
||||
</nut-cell-group>
|
||||
|
||||
@@ -232,13 +232,13 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {onUnmounted, ref} from 'vue';
|
||||
import { onUnmounted, ref } from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
import {calculateDistance} from '@/utils';
|
||||
import {IconFont} from '@nutui/icons-vue-taro';
|
||||
import {getActiveOrderDetail} from '@/api/goods';
|
||||
import { calculateDistance } from '@/utils';
|
||||
import { IconFont } from '@nutui/icons-vue-taro';
|
||||
import { getActiveOrderDetail } from '@/api/goods';
|
||||
import UQRCode from 'uqrcodejs';
|
||||
|
||||
dayjs.extend(duration);
|
||||
|
||||
@@ -74,9 +74,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getUserAfterOrderList} from '../../../api/user';
|
||||
import { getUserAfterOrderList } from '../../../api/user';
|
||||
|
||||
const tabsIndex = ref(0);
|
||||
|
||||
@@ -121,7 +121,7 @@ const get_list = async () => {
|
||||
title: '加载中',
|
||||
});
|
||||
const user_info = await Taro.getStorageSync('userInfo');
|
||||
const {data: res} = await getUserAfterOrderList({
|
||||
const { data: res } = await getUserAfterOrderList({
|
||||
phone: user_info.data.phone,
|
||||
status: tabsIndex.value,
|
||||
PageNum: pageOpt.value.page,
|
||||
|
||||
@@ -58,9 +58,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getUserAfterOrderDetail} from '../../../../api/user';
|
||||
import { getUserAfterOrderDetail } from '../../../../api/user';
|
||||
|
||||
const data = ref<any>({});
|
||||
|
||||
|
||||
@@ -70,9 +70,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {editTradePwd, getVerifyCode} from '@/api/user';
|
||||
import { editTradePwd, getVerifyCode } from '@/api/user';
|
||||
|
||||
const userinfo = ref<any>({});
|
||||
|
||||
@@ -100,23 +100,23 @@ Taro.useLoad(() => {
|
||||
const formSubmit = async () => {
|
||||
try {
|
||||
if (!formVal.value.password)
|
||||
return Taro.showToast({title: '请输入交易密码', icon: 'none'});
|
||||
return Taro.showToast({ title: '请输入交易密码', icon: 'none' });
|
||||
if (!formVal.value.confirmPassword)
|
||||
return Taro.showToast({title: '请再次输入交易密码', icon: 'none'});
|
||||
return Taro.showToast({ title: '请再次输入交易密码', icon: 'none' });
|
||||
if (formVal.value.password !== formVal.value.confirmPassword)
|
||||
return Taro.showToast({title: '两次密码不一致', icon: 'none'});
|
||||
return Taro.showToast({ title: '两次密码不一致', icon: 'none' });
|
||||
if (!formVal.value.code)
|
||||
return Taro.showToast({title: '请输入验证码', icon: 'none'});
|
||||
return Taro.showToast({ title: '请输入验证码', icon: 'none' });
|
||||
const res = await editTradePwd({
|
||||
pay_password: formVal.value.password,
|
||||
code: formVal.value.code,
|
||||
});
|
||||
Taro.showToast({title: res.msg, icon: 'none'});
|
||||
Taro.showToast({ title: res.msg, icon: 'none' });
|
||||
Taro.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
} catch (err) {
|
||||
Taro.showToast({title: err.msg, icon: 'none'});
|
||||
Taro.showToast({ title: err.msg, icon: 'none' });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
const toPage = (url: string) => {
|
||||
if (url === '1') return Taro.showToast({title: '暂未开放', icon: 'none'});
|
||||
if (url === '1') return Taro.showToast({ title: '暂未开放', icon: 'none' });
|
||||
Taro.navigateTo({
|
||||
url: url,
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import {applyMer, getMerTypeList, getVerifyCode} from '@/api/user';
|
||||
import { ref } from 'vue';
|
||||
import { applyMer, getMerTypeList, getVerifyCode } from '@/api/user';
|
||||
import Upload from '@/components/Upload.vue';
|
||||
|
||||
const visible = ref(false);
|
||||
@@ -116,7 +116,7 @@ const onOk = async () => {
|
||||
|
||||
// 获取验证码
|
||||
const getSmsCode = () => {
|
||||
ruleForm.value.validate('phone').then(async ({valid}: any) => {
|
||||
ruleForm.value.validate('phone').then(async ({ valid }: any) => {
|
||||
if (valid) {
|
||||
try {
|
||||
await getVerifyCode({
|
||||
@@ -152,7 +152,7 @@ const confirmGooType = (e: any) => {
|
||||
|
||||
// 提交
|
||||
const submit = () => {
|
||||
ruleForm.value.validate().then(({valid, errors}: any) => {
|
||||
ruleForm.value.validate().then(({ valid, errors }: any) => {
|
||||
if (valid) {
|
||||
console.log('success', formValue.value);
|
||||
visible.value = true;
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import {getAgreement} from '../../../api/user';
|
||||
import { ref } from 'vue';
|
||||
import { getAgreement } from '../../../api/user';
|
||||
|
||||
const nodes = ref(``);
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<script lang="ts" setup>
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import {editPersonalInfo} from '@/api/user';
|
||||
import {BASE_URL} from '@/utils/request';
|
||||
import { ref } from 'vue';
|
||||
import { editPersonalInfo } from '@/api/user';
|
||||
import { BASE_URL } from '@/utils/request';
|
||||
|
||||
// const toPage = (e: string) => {};
|
||||
|
||||
const userInfo = ref<any>({});
|
||||
|
||||
Taro.useLoad(() => {
|
||||
const {data: data} = Taro.getStorageSync('userInfo');
|
||||
const { data: data } = Taro.getStorageSync('userInfo');
|
||||
userInfo.value = data;
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {app} from '@/config';
|
||||
import { app } from '@/config';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
export interface RequestParams {
|
||||
|
||||
182
src/utils/js_sdk/u-charts.min.js
vendored
182
src/utils/js_sdk/u-charts.min.js
vendored
@@ -113,8 +113,8 @@ var util = {
|
||||
},
|
||||
};
|
||||
function getH5Offset(t) {
|
||||
t.mp = {changedTouches: []};
|
||||
t.mp.changedTouches.push({x: t.offsetX, y: t.offsetY});
|
||||
t.mp = { changedTouches: [] };
|
||||
t.mp.changedTouches.push({ x: t.offsetX, y: t.offsetY });
|
||||
return t;
|
||||
}
|
||||
function hexToRgb(t, e) {
|
||||
@@ -159,7 +159,7 @@ function findRange(t, e, a) {
|
||||
function calCandleMA(o, t, e, n) {
|
||||
let a = [];
|
||||
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++) {
|
||||
if (a < o[r]) {
|
||||
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)) {
|
||||
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) {
|
||||
return {x: a.x + t, y: a.y - e};
|
||||
return { x: a.x + t, y: a.y - e };
|
||||
}
|
||||
function avoidCollision(t, e) {
|
||||
if (e) {
|
||||
@@ -503,7 +503,7 @@ function getTouches(t, e, a) {
|
||||
r = t.y * e.pix;
|
||||
}
|
||||
}
|
||||
return {x: i, y: r};
|
||||
return { x: i, y: r };
|
||||
}
|
||||
function getSeriesDataItem(e, i, a) {
|
||||
var r = [];
|
||||
@@ -590,8 +590,8 @@ function getToolTipData(t, a, i, r, o) {
|
||||
: a.extra.tooltip.legendShape,
|
||||
};
|
||||
});
|
||||
var h = {x: Math.round(s.x), y: Math.round(s.y)};
|
||||
return {textList: e, offset: h};
|
||||
var h = { x: Math.round(s.x), y: Math.round(s.y) };
|
||||
return { textList: e, offset: h };
|
||||
}
|
||||
function getMixToolTipData(t, e, a, i) {
|
||||
var r =
|
||||
@@ -613,8 +613,8 @@ function getMixToolTipData(t, e, a, i) {
|
||||
return t;
|
||||
}
|
||||
});
|
||||
var l = {x: Math.round(o), y: 0};
|
||||
return {textList: n, offset: l};
|
||||
var l = { x: Math.round(o), y: 0 };
|
||||
return { textList: n, offset: l };
|
||||
}
|
||||
function getCandleToolTipData(o, e, n, l, i, t) {
|
||||
var r =
|
||||
@@ -680,7 +680,7 @@ function getCandleToolTipData(o, e, n, l, i, t) {
|
||||
d.push(e, a, i, r);
|
||||
});
|
||||
var x = [];
|
||||
var f = {x: 0, y: 0};
|
||||
var f = { x: 0, y: 0 };
|
||||
for (let e = 0; e < a.length; e++) {
|
||||
let t = a[e];
|
||||
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);
|
||||
return {textList: d, offset: f};
|
||||
return { textList: d, offset: f };
|
||||
}
|
||||
function filterSeries(e) {
|
||||
let a = [];
|
||||
@@ -701,7 +701,7 @@ function filterSeries(e) {
|
||||
}
|
||||
function findCurrentIndex(o, n, e, t) {
|
||||
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;
|
||||
let r = [];
|
||||
if (n && n.length > 0) {
|
||||
@@ -754,7 +754,7 @@ function findCurrentIndex(o, n, e, t) {
|
||||
}
|
||||
function findBarChartCurrentIndex(a, t, e, i) {
|
||||
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;
|
||||
let l = e.chartData.yAxisPoints;
|
||||
if (t && t.length > 0) {
|
||||
@@ -972,8 +972,8 @@ function splitPoints(t, a) {
|
||||
function calLegendData(l, s, e, t, h) {
|
||||
let c = {
|
||||
area: {
|
||||
start: {x: 0, y: 0},
|
||||
end: {x: 0, y: 0},
|
||||
start: { x: 0, y: 0 },
|
||||
end: { x: 0, y: 0 },
|
||||
width: 0,
|
||||
height: 0,
|
||||
wholeWidth: 0,
|
||||
@@ -1210,7 +1210,7 @@ function getXAxisTextList(t, e, h, c) {
|
||||
return f;
|
||||
}
|
||||
function calXAxisData(t, e, a, i) {
|
||||
var r = assign({}, {type: ''}, e.extra.bar);
|
||||
var r = assign({}, { type: '' }, e.extra.bar);
|
||||
var o = {
|
||||
angle: 0,
|
||||
xAxisHeight: e.xAxis.lineHeight * e.pix + e.xAxis.marginTop * e.pix,
|
||||
@@ -1611,7 +1611,7 @@ function getXAxisPoints(t, e, h) {
|
||||
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) {
|
||||
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();
|
||||
}
|
||||
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 s = new Array(t);
|
||||
if (t > 0) {
|
||||
@@ -1990,7 +1990,7 @@ function calYAxisData(a, o, e, n) {
|
||||
h[r] = getYAxisTextList(s[r], o, e, l.type, i, r);
|
||||
}
|
||||
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) {
|
||||
t = i.formatter(t, e, o);
|
||||
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, {});
|
||||
}
|
||||
d[0] = {position: 'left', width: 0};
|
||||
d[0] = { position: 'left', width: 0 };
|
||||
var i = o.yAxis.fontSize * o.pix || e.fontSize;
|
||||
c[0] = h[0].map(function (t, e) {
|
||||
t = o.yAxis.formatter(t, e, o);
|
||||
@@ -2030,8 +2030,8 @@ function calYAxisData(a, o, e, n) {
|
||||
});
|
||||
d[0].width += 3 * o.pix;
|
||||
if (o.yAxis.disabled === true) {
|
||||
d[0] = {position: 'left', width: 0};
|
||||
o.yAxis.data[0] = {disabled: true};
|
||||
d[0] = { position: 'left', width: 0 };
|
||||
o.yAxis.data[0] = { disabled: true };
|
||||
} else {
|
||||
o.yAxis.data[0] = {
|
||||
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) {
|
||||
let n = [].concat(o.chartData.yAxisData.ranges);
|
||||
@@ -2386,7 +2386,7 @@ function drawGaugeLabel(e, a, i, r, o, n) {
|
||||
let l = e.startAngle;
|
||||
let s = e.startNumber;
|
||||
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;
|
||||
h.x += i.x - measureText(f, o.fontSize, n) / 2;
|
||||
h.y += i.y;
|
||||
@@ -2409,7 +2409,7 @@ function drawRadarLabel(t, s, h, c, d, x) {
|
||||
var f = c.extra.radar || {};
|
||||
t.forEach(function (t, 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);
|
||||
x.setFillStyle(f.labelPointColor);
|
||||
x.beginPath();
|
||||
@@ -2474,7 +2474,7 @@ function drawPieText(n, d, x, f, t, l) {
|
||||
let n = a;
|
||||
let l = measureText(t.text, t.textSize * d.pix || x.fontSize, f);
|
||||
let s = n;
|
||||
if (g && util.isSameXCoordinateArea(g.start, {x: o})) {
|
||||
if (g && util.isSameXCoordinateArea(g.start, { x: o })) {
|
||||
if (o > 0) {
|
||||
s = Math.min(n, g.start.y);
|
||||
} else if (e < 0) {
|
||||
@@ -2491,9 +2491,9 @@ function drawPieText(n, d, x, f, t, l) {
|
||||
o -= l;
|
||||
}
|
||||
let h = {
|
||||
lineStart: {x: i, y: r},
|
||||
lineEnd: {x: e, y: a},
|
||||
start: {x: o, y: s},
|
||||
lineStart: { x: i, y: r },
|
||||
lineEnd: { x: e, y: a },
|
||||
start: { x: o, y: s },
|
||||
width: l,
|
||||
height: x.fontSize,
|
||||
text: t.text,
|
||||
@@ -2589,7 +2589,7 @@ function drawToolTipSplitLine(r, o, n, l) {
|
||||
function drawMarkLine(h, t, c) {
|
||||
let e = assign(
|
||||
{},
|
||||
{type: 'solid', dashLength: 4, data: []},
|
||||
{ type: 'solid', dashLength: 4, data: [] },
|
||||
h.extra.markLine,
|
||||
);
|
||||
let a = h.area[3];
|
||||
@@ -2652,7 +2652,7 @@ function drawMarkLine(h, t, c) {
|
||||
}
|
||||
}
|
||||
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 i = x.width - x.area[1];
|
||||
if (u.gridType == 'dash') {
|
||||
@@ -2715,7 +2715,7 @@ function drawToolTipHorizentalLine(x, f, p, t, e) {
|
||||
function drawToolTipSplitArea(t, e, a, i, r) {
|
||||
var o = assign(
|
||||
{},
|
||||
{activeBgColor: '#000000', activeBgOpacity: 0.08, activeWidth: r},
|
||||
{ activeBgColor: '#000000', activeBgOpacity: 0.08, activeWidth: r },
|
||||
e.extra.column,
|
||||
);
|
||||
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) {
|
||||
var o = assign(
|
||||
{},
|
||||
{activeBgColor: '#000000', activeBgOpacity: 0.08},
|
||||
{ activeBgColor: '#000000', activeBgOpacity: 0.08 },
|
||||
e.extra.bar,
|
||||
);
|
||||
var n = e.area[3];
|
||||
@@ -2767,7 +2767,7 @@ function drawToolTip(e, r, o, a, n, i, f) {
|
||||
o.extra.tooltip,
|
||||
);
|
||||
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 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);
|
||||
}
|
||||
}
|
||||
r = assign({x: 0, y: 0}, r);
|
||||
r = assign({ x: 0, y: 0 }, r);
|
||||
r.y -= 8 * o.pix;
|
||||
var y = e.map(function (t) {
|
||||
return measureText(t.text, s, n);
|
||||
@@ -3168,7 +3168,7 @@ function drawColumnDataPoints(T, b, S, w) {
|
||||
});
|
||||
}
|
||||
w.restore();
|
||||
return {xAxisPoints: P, calPoints: M, eachSpacing: C};
|
||||
return { xAxisPoints: P, calPoints: M, eachSpacing: C };
|
||||
}
|
||||
function drawMountDataPoints(i, r, o, n) {
|
||||
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);
|
||||
}
|
||||
n.restore();
|
||||
return {xAxisPoints: p, calPoints: c, eachSpacing: l};
|
||||
return { xAxisPoints: p, calPoints: c, eachSpacing: l };
|
||||
}
|
||||
function drawBarDataPoints(y, v, m, T) {
|
||||
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) {
|
||||
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(
|
||||
{},
|
||||
{
|
||||
@@ -3602,7 +3602,7 @@ function drawCandleDataPoints(e, t, h, c, d) {
|
||||
);
|
||||
s.average = assign(
|
||||
{},
|
||||
{show: false, name: [], day: [], color: c.color},
|
||||
{ show: false, name: [], day: [], color: c.color },
|
||||
s.average,
|
||||
);
|
||||
h.extra.candle = s;
|
||||
@@ -3715,7 +3715,7 @@ function drawCandleDataPoints(e, t, h, c, d) {
|
||||
}
|
||||
});
|
||||
d.restore();
|
||||
return {xAxisPoints: x, calPoints: y, eachSpacing: f};
|
||||
return { xAxisPoints: x, calPoints: y, eachSpacing: f };
|
||||
}
|
||||
function drawAreaDataPoints(t, s, h, c) {
|
||||
var d = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
||||
@@ -3904,11 +3904,11 @@ function drawAreaDataPoints(t, s, h, c) {
|
||||
});
|
||||
}
|
||||
c.restore();
|
||||
return {xAxisPoints: f, calPoints: v, eachSpacing: p};
|
||||
return { xAxisPoints: f, calPoints: v, eachSpacing: p };
|
||||
}
|
||||
function drawScatterDataPoints(t, s, h, c) {
|
||||
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,
|
||||
x = e.xAxisPoints,
|
||||
f = e.eachSpacing;
|
||||
@@ -3989,11 +3989,11 @@ function drawScatterDataPoints(t, s, h, c) {
|
||||
});
|
||||
}
|
||||
c.restore();
|
||||
return {xAxisPoints: x, calPoints: r, eachSpacing: f};
|
||||
return { xAxisPoints: x, calPoints: r, eachSpacing: f };
|
||||
}
|
||||
function drawBubbleDataPoints(a, l, s, h) {
|
||||
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,
|
||||
x = t.xAxisPoints,
|
||||
f = t.eachSpacing;
|
||||
@@ -4043,7 +4043,7 @@ function drawBubbleDataPoints(a, l, s, h) {
|
||||
}
|
||||
});
|
||||
h.restore();
|
||||
return {xAxisPoints: x, calPoints: i, eachSpacing: f};
|
||||
return { xAxisPoints: x, calPoints: i, eachSpacing: f };
|
||||
}
|
||||
function drawLineDataPoints(t, d, x, f) {
|
||||
var p = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
||||
@@ -4187,7 +4187,7 @@ function drawLineDataPoints(t, d, x, f) {
|
||||
});
|
||||
}
|
||||
f.restore();
|
||||
return {xAxisPoints: g, calPoints: T, eachSpacing: y};
|
||||
return { xAxisPoints: g, calPoints: T, eachSpacing: y };
|
||||
}
|
||||
function drawMixDataPoints(t, v, m, T) {
|
||||
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,
|
||||
);
|
||||
let A = assign({}, {opacity: 0.2, gradient: false}, v.extra.mix.area);
|
||||
let M = assign({}, {width: 2}, v.extra.mix.line);
|
||||
let A = assign({}, { opacity: 0.2, gradient: false }, v.extra.mix.area);
|
||||
let M = assign({}, { width: 2 }, v.extra.mix.line);
|
||||
let L = v.height - v.area[2];
|
||||
let F = [];
|
||||
var _ = 0;
|
||||
@@ -4455,7 +4455,7 @@ function drawMixDataPoints(t, v, m, T) {
|
||||
});
|
||||
}
|
||||
T.restore();
|
||||
return {xAxisPoints: b, calPoints: F, eachSpacing: S};
|
||||
return { xAxisPoints: b, calPoints: F, eachSpacing: S };
|
||||
}
|
||||
function drawToolTipBridge(t, e, a, i, r, o) {
|
||||
var n = t.extra.tooltip || {};
|
||||
@@ -5164,7 +5164,7 @@ function drawPieDataPoints(t, r, e, o) {
|
||||
if (a === 1 && r.type === 'ring') {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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,
|
||||
};
|
||||
} else {
|
||||
n = {x: i.width / 2, y: i.height / 2};
|
||||
n = { x: i.width / 2, y: i.height / 2 };
|
||||
}
|
||||
var l;
|
||||
if (o.radius) {
|
||||
@@ -5350,7 +5350,7 @@ function drawArcbarDataPoints(a, i, t, r) {
|
||||
r.stroke();
|
||||
}
|
||||
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) {
|
||||
var x = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
|
||||
@@ -5370,7 +5370,7 @@ function drawGaugeDataPoints(n, h, c, t, d) {
|
||||
childNumber: 5,
|
||||
childWidth: 5,
|
||||
},
|
||||
pointer: {width: 15, color: 'auto'},
|
||||
pointer: { width: 15, color: 'auto' },
|
||||
},
|
||||
c.extra.gauge,
|
||||
);
|
||||
@@ -5381,7 +5381,7 @@ function drawGaugeDataPoints(n, h, c, t, d) {
|
||||
f.oldData = 0;
|
||||
}
|
||||
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);
|
||||
u -= 5 * c.pix;
|
||||
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.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) {
|
||||
var t = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
|
||||
@@ -5727,7 +5727,7 @@ function drawRadarDataPoints(o, n, i, l) {
|
||||
});
|
||||
l.setTextAlign('left');
|
||||
}
|
||||
return {center: h, radius: c, angleList: a};
|
||||
return { center: h, radius: c, angleList: a };
|
||||
}
|
||||
function lonlat2mercator(t, e) {
|
||||
var a = Array(2);
|
||||
@@ -5766,7 +5766,7 @@ function getBoundingBox(t) {
|
||||
for (var n = 0; n < a.length; n++) {
|
||||
var l = a[n][0];
|
||||
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.xMax = e.xMax > h.x ? e.xMax : h.x;
|
||||
e.yMin = e.yMin < h.y ? e.yMin : h.y;
|
||||
@@ -5777,10 +5777,10 @@ function getBoundingBox(t) {
|
||||
return e;
|
||||
}
|
||||
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) {
|
||||
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) {
|
||||
if (e[1] == a[1]) {
|
||||
@@ -6086,7 +6086,7 @@ function getWordCloudPoint(c, t, d) {
|
||||
}
|
||||
function drawWordCloudDataPoints(t, r, e, o) {
|
||||
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) {
|
||||
r.chartData.wordCloudData = getWordCloudPoint(r, a.type, o);
|
||||
}
|
||||
@@ -6394,7 +6394,7 @@ function drawFunnelDataPoints(t, e, c, a) {
|
||||
if (d === 1) {
|
||||
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) {
|
||||
for (let n = 0; n < l.length; n++) {
|
||||
@@ -6712,7 +6712,7 @@ function drawCharts(t, l, n, s) {
|
||||
l.area[2] += e;
|
||||
l.chartData.categoriesData = t;
|
||||
} else {
|
||||
l.chartData.xAxisData = {xAxisPoints: []};
|
||||
l.chartData.xAxisData = { xAxisPoints: [] };
|
||||
}
|
||||
}
|
||||
if (
|
||||
@@ -7275,7 +7275,7 @@ var uCharts = function t(a) {
|
||||
},
|
||||
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.animation = a.animation ? 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);
|
||||
if (!this.scrollOption.moveCount) {
|
||||
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 = {
|
||||
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) {
|
||||
t = {
|
||||
@@ -7561,37 +7561,37 @@ uCharts.prototype.getCurrentDataIndex = function (e) {
|
||||
let t = getTouches(a, this.opts, e);
|
||||
if (this.opts.type === 'pie' || this.opts.type === 'ring') {
|
||||
return findPieChartCurrentIndex(
|
||||
{x: t.x, y: t.y},
|
||||
{ x: t.x, y: t.y },
|
||||
this.opts.chartData.pieData,
|
||||
this.opts,
|
||||
);
|
||||
} else if (this.opts.type === 'rose') {
|
||||
return findRoseChartCurrentIndex(
|
||||
{x: t.x, y: t.y},
|
||||
{ x: t.x, y: t.y },
|
||||
this.opts.chartData.pieData,
|
||||
this.opts,
|
||||
);
|
||||
} else if (this.opts.type === 'radar') {
|
||||
return findRadarChartCurrentIndex(
|
||||
{x: t.x, y: t.y},
|
||||
{ x: t.x, y: t.y },
|
||||
this.opts.chartData.radarData,
|
||||
this.opts.categories.length,
|
||||
);
|
||||
} else if (this.opts.type === 'funnel') {
|
||||
return findFunnelChartCurrentIndex(
|
||||
{x: t.x, y: t.y},
|
||||
{ x: t.x, y: t.y },
|
||||
this.opts.chartData.funnelData,
|
||||
);
|
||||
} 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') {
|
||||
return findWordChartCurrentIndex(
|
||||
{x: t.x, y: t.y},
|
||||
{ x: t.x, y: t.y },
|
||||
this.opts.chartData.wordCloudData,
|
||||
);
|
||||
} else if (this.opts.type === 'bar') {
|
||||
return findBarChartCurrentIndex(
|
||||
{x: t.x, y: t.y},
|
||||
{ x: t.x, y: t.y },
|
||||
this.opts.chartData.calPoints,
|
||||
this.opts,
|
||||
this.config,
|
||||
@@ -7599,7 +7599,7 @@ uCharts.prototype.getCurrentDataIndex = function (e) {
|
||||
);
|
||||
} else {
|
||||
return findCurrentIndex(
|
||||
{x: t.x, y: t.y},
|
||||
{ x: t.x, y: t.y },
|
||||
this.opts.chartData.calPoints,
|
||||
this.opts,
|
||||
this.config,
|
||||
@@ -7618,7 +7618,7 @@ uCharts.prototype.getLegendDataIndex = function (e) {
|
||||
}
|
||||
if (a) {
|
||||
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;
|
||||
};
|
||||
@@ -7666,7 +7666,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
}
|
||||
var a = getTouches(c, this.opts, t);
|
||||
var d = this.scrollOption.currentOffset;
|
||||
var i = assign({}, this.opts, {_scrollDistance_: d, animation: false});
|
||||
var i = assign({}, this.opts, { _scrollDistance_: d, animation: false });
|
||||
if (
|
||||
this.opts.type === 'line' ||
|
||||
this.opts.type === 'area' ||
|
||||
@@ -7704,7 +7704,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
if (this.opts.type === 'mount') {
|
||||
var o = e.index == undefined ? this.getCurrentDataIndex(t).index : e.index;
|
||||
if (o > -1) {
|
||||
var i = assign({}, this.opts, {animation: false});
|
||||
var i = assign({}, this.opts, { animation: false });
|
||||
var n = assign({}, i._series_[o]);
|
||||
var s = [
|
||||
{
|
||||
@@ -7718,7 +7718,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
: 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 = {
|
||||
textList: e.textList ? e.textList : s,
|
||||
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;
|
||||
if (o > -1) {
|
||||
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);
|
||||
if (n.length !== 0) {
|
||||
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;
|
||||
if (o > -1) {
|
||||
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);
|
||||
if (n.length !== 0) {
|
||||
var l = getCandleToolTipData(
|
||||
@@ -7815,7 +7815,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
) {
|
||||
var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index;
|
||||
if (o > -1) {
|
||||
var i = assign({}, this.opts, {animation: false});
|
||||
var i = assign({}, this.opts, { animation: false });
|
||||
var n = assign({}, i._series_[o]);
|
||||
var s = [
|
||||
{
|
||||
@@ -7829,7 +7829,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
: this.opts.extra.tooltip.legendShape,
|
||||
},
|
||||
];
|
||||
var h = {x: a.x, y: a.y};
|
||||
var h = { x: a.x, y: a.y };
|
||||
i.tooltip = {
|
||||
textList: e.textList ? e.textList : s,
|
||||
offset: e.offset !== undefined ? e.offset : h,
|
||||
@@ -7842,7 +7842,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
if (this.opts.type === 'map') {
|
||||
var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index;
|
||||
if (o > -1) {
|
||||
var i = assign({}, this.opts, {animation: false});
|
||||
var i = assign({}, this.opts, { animation: false });
|
||||
var n = assign({}, this.opts.series[o]);
|
||||
n.name = n.properties.name;
|
||||
var s = [
|
||||
@@ -7855,7 +7855,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
: this.opts.extra.tooltip.legendShape,
|
||||
},
|
||||
];
|
||||
var h = {x: a.x, y: a.y};
|
||||
var h = { x: a.x, y: a.y };
|
||||
i.tooltip = {
|
||||
textList: e.textList ? e.textList : s,
|
||||
offset: e.offset !== undefined ? e.offset : h,
|
||||
@@ -7869,7 +7869,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
if (this.opts.type === 'word') {
|
||||
var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index;
|
||||
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 s = [
|
||||
{
|
||||
@@ -7881,7 +7881,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
: this.opts.extra.tooltip.legendShape,
|
||||
},
|
||||
];
|
||||
var h = {x: a.x, y: a.y};
|
||||
var h = { x: a.x, y: a.y };
|
||||
i.tooltip = {
|
||||
textList: e.textList ? e.textList : s,
|
||||
offset: e.offset !== undefined ? e.offset : h,
|
||||
@@ -7895,7 +7895,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
if (this.opts.type === 'radar') {
|
||||
var o = e.index == undefined ? this.getCurrentDataIndex(t) : e.index;
|
||||
if (o > -1) {
|
||||
var i = assign({}, this.opts, {animation: false});
|
||||
var i = assign({}, this.opts, { animation: false });
|
||||
var n = getSeriesDataItem(this.opts.series, o);
|
||||
if (n.length !== 0) {
|
||||
var s = n.map(t => {
|
||||
@@ -7910,7 +7910,7 @@ uCharts.prototype.showToolTip = function (t) {
|
||||
: this.opts.extra.tooltip.legendShape,
|
||||
};
|
||||
});
|
||||
var h = {x: a.x, y: a.y};
|
||||
var h = { x: a.x, y: a.y };
|
||||
i.tooltip = {
|
||||
textList: e.textList ? e.textList : s,
|
||||
offset: e.offset !== undefined ? e.offset : h,
|
||||
@@ -7929,7 +7929,7 @@ uCharts.prototype.translate = function (t) {
|
||||
distance: 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);
|
||||
};
|
||||
uCharts.prototype.scrollStart = function (t) {
|
||||
|
||||
@@ -27,7 +27,7 @@ const request = (
|
||||
'content-type': 'application/json',
|
||||
token: Taro.getStorageSync('token') || '',
|
||||
},
|
||||
success: ({data}) => {
|
||||
success: ({ data }) => {
|
||||
if (data.code !== 200) {
|
||||
if (!IGNORED_TIPS.includes(url)) {
|
||||
Taro.showToast({
|
||||
|
||||
Reference in New Issue
Block a user