feat(custom): 新增消息订阅
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-08-27 17:06:59 +08:00
parent f199320de0
commit 1d8532eccf
104 changed files with 2350 additions and 2477 deletions

View File

@@ -1,40 +1,40 @@
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: 代码格式(不影响功能,例如空格、分号等格式修正)",
value: 'style',
name: 'style: 代码格式(不影响功能,例如空格、分号等格式修正)',
},
{
value: "refactor",
name: "refactor: 代码重构(不包括 bug 修复、功能新增)",
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: 'build',
name: 'build: 构建流程、外部依赖变更(如升级 npm 包、修改 脚手架 配置等)',
},
{ value: "ci", name: "ci: 修改 CI 配置、脚本" },
{value: 'ci', name: 'ci: 修改 CI 配置、脚本'},
{
value: "chore",
name: "chore: 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)",
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", "自定义"],
["projects", "项目搭建"],
["components", "组件相关"],
["utils", "utils 相关"],
["styles", "样式相关"],
["deps", "项目依赖"],
["other", "其他修改"],
['custom', '自定义'],
['projects', '项目搭建'],
['components', '组件相关'],
['utils', 'utils 相关'],
['styles', '样式相关'],
['deps', '项目依赖'],
['other', '其他修改'],
].map(([value, description]) => {
return {
value,
@@ -42,16 +42,16 @@ module.exports = {
};
}),
messages: {
type: "确保本次提交遵循 Angular 规范!选择你要提交的类型:\n",
scope: "选择一个 scope可选",
customScope: "请输入自定义的 scope",
subject: "填写简短精炼的变更描述:",
type: '确保本次提交遵循 Angular 规范!选择你要提交的类型:\n',
scope: '选择一个 scope可选',
customScope: '请输入自定义的 scope',
subject: '填写简短精炼的变更描述:',
body: '填写更加详细的变更描述(可选)。使用 "|" 换行:',
breaking: "列举非兼容性重大的变更(可选):",
footer: "列举出所有变更的 Issues Closed可选。 例如: #31, #34",
confirmCommit: "确认提交?",
breaking: '列举非兼容性重大的变更(可选):',
footer: '列举出所有变更的 Issues Closed可选。 例如: #31, #34',
confirmCommit: '确认提交?',
},
allowBreakingChanges: ["feat", "fix"],
allowBreakingChanges: ['feat', 'fix'],
subjectLimit: 100,
breaklineChar: "|",
breaklineChar: '|',
};

View File

@@ -1,25 +1,25 @@
module.exports = {
ignores: [(commit) => commit.includes("init")],
extends: ["@commitlint/config-conventional"],
ignores: [commit => commit.includes('init')],
extends: ['@commitlint/config-conventional'],
rules: {
"type-enum": [
'type-enum': [
2,
"always",
'always',
[
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore",
"revert",
"wip",
"mod",
"release",
'feat',
'fix',
'docs',
'style',
'refactor',
'perf',
'test',
'build',
'ci',
'chore',
'revert',
'wip',
'mod',
'release',
],
],
},

View File

@@ -133,7 +133,7 @@ const config = {
},
};
module.exports = function(merge) {
module.exports = function (merge) {
if (process.env.NODE_ENV === 'development') {
return merge({}, config, require('./dev'));
}

View File

@@ -1,125 +1,125 @@
{
"name": "jdt-user",
"version": "4.0.4",
"private": true,
"description": "",
"templateInfo": {
"name": "jdt-user",
"typescript": true,
"css": "sass"
},
"taroConfig": {
"version": "4.0.4"
},
"scripts": {
"build:weapp": "taro build --type weapp",
"build:test": "taro build --type weapp --mode test",
"build:swan": "taro build --type swan",
"build:alipay": "taro build --type alipay",
"build:tt": "taro build --type tt",
"build:h5": "taro build --type h5",
"build:rn": "taro build --type rn",
"build:qq": "taro build --type qq",
"build:jd": "taro build --type jd",
"build:quickapp": "taro build --type quickapp",
"dev:weapp": "taro build --type weapp --watch",
"dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch",
"dev:tt": "npm run build:tt -- --watch",
"dev:h5": "npm run build:h5 -- --watch",
"dev:rn": "npm run build:rn -- --watch",
"dev:qq": "npm run build:qq -- --watch",
"dev:jd": "npm run build:jd -- --watch",
"dev:quickapp": "npm run build:quickapp -- --watch",
"lint": "eslint --ext .ts,.vue .",
"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 .",
"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"
},
"browserslist": [
"last 3 versions",
"Android >= 4.1",
"ios >= 8"
],
"author": "",
"lint-staged": {
"*.{ts,vue}": [
"eslint --ext .ts,.vue .",
"npx prettier --write --end-of-line lf ."
]
},
"config": {
"commitizen": {
"path": "node_modules/cz-customizable"
}
},
"dependencies": {
"@babel/runtime": "^7.23.5",
"@nutui/icons-vue-taro": "^0.0.9",
"@nutui/nutui-taro": "^4.3.12",
"@qiun/vue-ucharts": "2.5.0-20230101",
"@tarojs/components": "3.6.34",
"@tarojs/helper": "3.6.34",
"@tarojs/plugin-framework-vue3": "3.6.34",
"@tarojs/plugin-html": "3.6.34",
"@tarojs/plugin-platform-alipay": "3.6.34",
"@tarojs/plugin-platform-h5": "3.6.34",
"@tarojs/plugin-platform-jd": "3.6.34",
"@tarojs/plugin-platform-qq": "3.6.34",
"@tarojs/plugin-platform-swan": "3.6.34",
"@tarojs/plugin-platform-tt": "3.6.34",
"@tarojs/plugin-platform-weapp": "3.6.34",
"@tarojs/runtime": "3.6.34",
"@tarojs/shared": "3.6.34",
"@tarojs/taro": "3.6.34",
"dayjs": "^1.11.10",
"pinia": "^2.1.7",
"uqrcodejs": "^4.0.7",
"vue": "^3.3.9"
},
"devDependencies": {
"@babel/core": "^7.23.5",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@tarojs/cli": "3.6.34",
"@tarojs/plugin-mini-ci": "3.6.34",
"@tarojs/taro-loader": "3.6.34",
"@tarojs/webpack5-runner": "3.6.34",
"@types/node": "^18.19.1",
"@types/webpack-env": "^1.18.4",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@unocss/webpack": "^0.60.0",
"@vue/babel-plugin-jsx": "^1.1.5",
"@vue/compiler-sfc": "^3.3.9",
"autoprefixer": "^10.4.19",
"babel-preset-taro": "3.6.34",
"commitizen": "^4.3.0",
"css-loader": "3.4.2",
"cz-customizable": "^7.0.0",
"eslint": "^8.55.0",
"eslint-config-taro": "3.6.34",
"eslint-plugin-vue": "^9.19.2",
"husky": "^8.0.3",
"lint-staged": "^15.1.0",
"miniprogram-ci": "^2.0.8",
"postcss": "8.4.29",
"postcss-rem-to-responsive-pixel": "^6.0.1",
"style-loader": "1.3.0",
"stylelint": "9.3.0",
"tailwindcss": "^3.4.3",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"unplugin-vue-components": "^0.23.0",
"vue-loader": "^17.3.1",
"weapp-tailwindcss": "^3.2.0",
"webpack": "^5.89.0"
},
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
"name": "jdt-user",
"version": "4.0.4",
"private": true,
"description": "",
"templateInfo": {
"name": "jdt-user",
"typescript": true,
"css": "sass"
},
"taroConfig": {
"version": "4.0.4"
},
"scripts": {
"build:weapp": "taro build --type weapp",
"build:test": "taro build --type weapp --mode test",
"build:swan": "taro build --type swan",
"build:alipay": "taro build --type alipay",
"build:tt": "taro build --type tt",
"build:h5": "taro build --type h5",
"build:rn": "taro build --type rn",
"build:qq": "taro build --type qq",
"build:jd": "taro build --type jd",
"build:quickapp": "taro build --type quickapp",
"dev:weapp": "taro build --type weapp --watch",
"dev:swan": "npm run build:swan -- --watch",
"dev:alipay": "npm run build:alipay -- --watch",
"dev:tt": "npm run build:tt -- --watch",
"dev:h5": "npm run build:h5 -- --watch",
"dev:rn": "npm run build:rn -- --watch",
"dev:qq": "npm run build:qq -- --watch",
"dev:jd": "npm run build:jd -- --watch",
"dev:quickapp": "npm run build:quickapp -- --watch",
"lint": "eslint --ext .ts,.vue .",
"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 .",
"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"
},
"browserslist": [
"last 3 versions",
"Android >= 4.1",
"ios >= 8"
],
"author": "",
"lint-staged": {
"*.{ts,vue}": [
"eslint --ext .ts,.vue .",
"npx prettier --write --end-of-line lf ."
]
},
"config": {
"commitizen": {
"path": "node_modules/cz-customizable"
}
},
"dependencies": {
"@babel/runtime": "^7.23.5",
"@nutui/icons-vue-taro": "^0.0.9",
"@nutui/nutui-taro": "^4.3.12",
"@qiun/vue-ucharts": "2.5.0-20230101",
"@tarojs/components": "3.6.34",
"@tarojs/helper": "3.6.34",
"@tarojs/plugin-framework-vue3": "3.6.34",
"@tarojs/plugin-html": "3.6.34",
"@tarojs/plugin-platform-alipay": "3.6.34",
"@tarojs/plugin-platform-h5": "3.6.34",
"@tarojs/plugin-platform-jd": "3.6.34",
"@tarojs/plugin-platform-qq": "3.6.34",
"@tarojs/plugin-platform-swan": "3.6.34",
"@tarojs/plugin-platform-tt": "3.6.34",
"@tarojs/plugin-platform-weapp": "3.6.34",
"@tarojs/runtime": "3.6.34",
"@tarojs/shared": "3.6.34",
"@tarojs/taro": "3.6.34",
"dayjs": "^1.11.10",
"pinia": "^2.1.7",
"uqrcodejs": "^4.0.7",
"vue": "^3.3.9"
},
"devDependencies": {
"@babel/core": "^7.23.5",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@tarojs/cli": "3.6.34",
"@tarojs/plugin-mini-ci": "3.6.34",
"@tarojs/taro-loader": "3.6.34",
"@tarojs/webpack5-runner": "3.6.34",
"@types/node": "^18.19.1",
"@types/webpack-env": "^1.18.4",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@unocss/webpack": "^0.60.0",
"@vue/babel-plugin-jsx": "^1.1.5",
"@vue/compiler-sfc": "^3.3.9",
"autoprefixer": "^10.4.19",
"babel-preset-taro": "3.6.34",
"commitizen": "^4.3.0",
"css-loader": "3.4.2",
"cz-customizable": "^7.0.0",
"eslint": "^8.55.0",
"eslint-config-taro": "3.6.34",
"eslint-plugin-vue": "^9.19.2",
"husky": "^8.0.3",
"lint-staged": "^15.1.0",
"miniprogram-ci": "^2.0.8",
"postcss": "8.4.29",
"postcss-rem-to-responsive-pixel": "^6.0.1",
"style-loader": "1.3.0",
"stylelint": "9.3.0",
"tailwindcss": "^3.4.3",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"unplugin-vue-components": "^0.23.0",
"vue-loader": "^17.3.1",
"weapp-tailwindcss": "^3.2.0",
"webpack": "^5.89.0"
},
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
}

View File

@@ -1,15 +1,15 @@
import request from "../utils/request";
import request from '../utils/request';
// 添加购物车
export const addCart = (data: object) =>
request("/goods/cart/add", data, "POST");
request('/goods/cart/add', data, 'POST');
// 获取购物车
export const getCart = (data: object) => request("/goods/cart", data, "POST");
export const getCart = (data: object) => request('/goods/cart', data, 'POST');
// 清空购物车
export const clearCart = (data: object) =>
request("/goods/cart/removeAll", data, "POST");
request('/goods/cart/removeAll', data, 'POST');
// 获取全部购物车
export const getAllCart = () => request("/goods/all/cart", {}, "POST");
export const getAllCart = () => request('/goods/all/cart', {}, 'POST');

View File

@@ -1,9 +1,8 @@
import request from "../utils/request";
import request from '../utils/request';
// 获取二维码信息
export const getQrCode = (data: object) =>
request("/qrcode/get", data, "POST");
export const getQrCode = (data: object) => request('/qrcode/get', data, 'POST');
// 绑定二维码
export const bindQrCode = (data: object) =>
request("/qrcode/bind", data, "POST");
request('/qrcode/bind', data, 'POST');

View File

@@ -1,10 +1,10 @@
import request from "../utils/request";
import request from '../utils/request';
// 获取商户分类
export const getHomeList = () => request("/home/classify", {}, "POST");
export const getHomeList = () => request('/home/classify', {}, 'POST');
// 获取商户子列表
export const getHomeSubList = () => request("/home/all/classify", {}, "POST");
export const getHomeSubList = () => request('/home/all/classify', {}, 'POST');
// 查找商家
export const getStoreList = (data) => request("/find/store", data, "POST");
export const getStoreList = data => request('/find/store', data, 'POST');

View File

@@ -1,9 +1,9 @@
import request from "@/utils/request";
import request from '@/utils/request';
// 订单支付
export const payOrder = (data: object) =>
request("/order/confirmOrder", data, "POST");
request('/order/confirmOrder', data, 'POST');
// 获取订单统计
export const getOrderStatistics = (data: object) =>
request("/user/order/count", data, "POST");
request('/user/order/count', data, 'POST');

View File

@@ -1,9 +1,9 @@
import request from "@/utils/request";
import request from '@/utils/request';
// 商品列表
export const productList = (data: object) =>
request("/store/goods", data, "POST");
request('/store/goods', data, 'POST');
// 商品添加
export const addGood = (data: object) =>
request("/store/goods/edit", data, "POST");
request('/store/goods/edit', data, 'POST');

View File

@@ -1,4 +1,4 @@
@import "./static/iconfont/iconfont.css";
@import './static/iconfont/iconfont.css';
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

View File

@@ -15,8 +15,8 @@
<script setup lang="ts">
// import { computed, ref } from "vue";
import Taro from "@tarojs/taro";
import { login } from "@/api/user";
import Taro from '@tarojs/taro';
import {login} from '@/api/user';
defineProps({
visible: {
@@ -25,38 +25,38 @@ defineProps({
},
});
const emit = defineEmits(["update:visible", "ok"]);
const emit = defineEmits(['update:visible', 'ok']);
const onCancel = () => {
emit("update:visible", false);
emit('update:visible', false);
};
const onOk = () => {
Taro.showLoading({
title: "正在授权中",
title: '正在授权中',
mask: true,
});
Taro.getUserProfile({
desc: "完善用户资料",
success: async (user) => {
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,
});
Taro.setStorageSync("token", data.token);
emit("ok", false);
Taro.setStorageSync('token', data.token);
emit('ok', false);
} catch (error) {
Taro.showToast({
title: error.message,
icon: "none",
icon: 'none',
});
}
},
fail: (err) => {
fail: err => {
console.log(err);
},
complete: () => {
@@ -64,7 +64,7 @@ const onOk = () => {
},
});
},
fail: (err) => {
fail: err => {
console.log(err);
},
complete: () => {

View File

@@ -1,18 +1,18 @@
<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>
<Home class="iconfont" @click="goHome" />
</view>
<text style="width: 2000px;text-align: center;">{{ props.title }}</text>
<text style="width: 2000px; text-align: center">{{ props.title }}</text>
</view>
</template>
<script setup lang="ts">
import Taro from "@tarojs/taro";
import { computed } from "vue";
import { Home, Left } from "@nutui/icons-vue-taro";
import Taro from '@tarojs/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);
@@ -20,7 +20,7 @@ const BarHeight = computed(() => statusBarHeight - 7);
const props = defineProps({
title: {
type: String,
default: "",
default: '',
},
});
@@ -32,7 +32,7 @@ const returns = () => {
const goHome = () => {
Taro.switchTab({
url: "/pages/index/index",
url: '/pages/index/index',
});
};
</script>

View File

@@ -185,8 +185,14 @@ const toPage = async (url: string) => {
};
const toMerDetails = item => {
Taro.navigateTo({
url: `/pages/mer/mer_detail/index?bid=${item.bid}`,
Taro.requestSubscribeMessage({
tmplIds: ['ewjjRxDJAQ_RbKU8CIjMNwfJXazyGQ95XbpKW16vMZs'],
entityIds: [],
complete: () => {
Taro.navigateTo({
url: `/pages/mer/mer_detail/index?bid=${item.bid}`,
});
},
});
};

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { ref } from "vue";
import Taro from "@tarojs/taro";
import {ref} from 'vue';
import Taro from '@tarojs/taro';
const show = ref(false);
@@ -14,7 +14,7 @@ defineProps({
src: {
required: true,
type: String,
default: "",
default: '',
},
type: Number,
cb: {
@@ -25,7 +25,7 @@ defineProps({
});
Taro.useLoad(async () => {
if (Taro.getStorageSync("token")) show.value = true;
if (Taro.getStorageSync('token')) show.value = true;
// const res = await getSignRecord()
// console.log(res)
});
@@ -35,8 +35,7 @@ Taro.useLoad(async () => {
<nut-overlay
v-model:visible="show"
:lock-scroll="true"
:close-on-click-overlay="false"
>
:close-on-click-overlay="false">
<view class="wrapper">
<view @click.stop="cb(type)">
<image class="image" :src="src" />

View File

@@ -5,80 +5,68 @@
<view
class="toolbar"
@click="format"
style="max-height: 240px; overflow-y: auto"
>
style="max-height: 240px; overflow-y: auto">
<!-- 加粗 -->
<view
:class="data.formats.bold ? 'ql-active' : ''"
class="iconfont icon-zitijiacu"
data-name="bold"
></view>
data-name="bold"></view>
<!-- 斜体 -->
<view
:class="data.formats.italic ? 'ql-active' : ''"
class="iconfont icon-zitixieti"
data-name="italic"
></view>
data-name="italic"></view>
<!-- 下划线 -->
<view
:class="data.formats.underline ? 'ql-active' : ''"
class="iconfont icon-zitixiahuaxian"
data-name="underline"
></view>
data-name="underline"></view>
<!-- 对齐方式 -->
<view
:class="data.formats.align === 'left' ? 'ql-active' : ''"
class="iconfont icon-zuoduiqi"
data-name="align"
data-value="left"
></view>
data-value="left"></view>
<!-- 对齐方式居中 -->
<view
:class="data.formats.align === 'center' ? 'ql-active' : ''"
class="iconfont icon-juzhongduiqi"
data-name="align"
data-value="center"
></view>
data-value="center"></view>
<!-- 对齐方式 -->
<view
:class="data.formats.align === 'right' ? 'ql-active' : ''"
class="iconfont icon-youduiqi"
data-name="align"
data-value="right"
></view>
data-value="right"></view>
<!-- 对齐方式两侧 -->
<view
:class="data.formats.align === 'justify' ? 'ql-active' : ''"
class="iconfont icon-zuoyouduiqi"
data-name="align"
data-value="justify"
></view>
data-value="justify"></view>
<!-- 有序排列 -->
<view
:class="data.formats.list === 'ordered' ? 'ql-active' : ''"
class="iconfont icon-youxupailie"
data-name="list"
data-value="ordered"
></view>
data-value="ordered"></view>
<!-- 无序排列 -->
<view
:class="data.formats.list === 'bullet' ? 'ql-active' : ''"
class="iconfont icon-wuxupailie"
data-name="list"
data-value="bullet"
></view>
data-value="bullet"></view>
<!-- 取消缩进 -->
<view
class="iconfont icon-outdent"
data-name="indent"
data-value="-1"
></view>
data-value="-1"></view>
<!-- 缩进 -->
<view
class="iconfont icon-indent"
data-name="indent"
data-value="+1"
></view>
data-value="+1"></view>
<!-- 添加分割线 -->
<view class="iconfont icon-fengexian" @click="insertDivider"></view>
<!-- 插入图片 -->
@@ -88,22 +76,19 @@
:class="data.formats.header === 3 ? 'ql-active' : ''"
class="iconfont icon-H"
data-name="header"
:data-value="3"
></view>
:data-value="3"></view>
<!-- 下标 -->
<view
:class="data.formats.script === 'sub' ? 'ql-active' : ''"
class="iconfont icon-zitixiabiao"
data-name="script"
data-value="sub"
></view>
data-value="sub"></view>
<!-- 上标 -->
<view
:class="data.formats.script === 'super' ? 'ql-active' : ''"
class="iconfont icon-zitishangbiao"
data-name="script"
data-value="super"
></view>
data-value="super"></view>
<view class="iconfont icon-undo" @click="undo"></view>
<view class="iconfont icon-redo" @click="redo"></view>
</view>
@@ -115,8 +100,7 @@
@statuschange="onStatusChange"
:show-img-resize="true"
@ready="onEditorReady"
@input="getCtx"
/>
@input="getCtx" />
</view>
</view>
</view>
@@ -124,29 +108,29 @@
</template>
<script lang="ts" setup>
import { reactive } from "vue";
import Taro from "@tarojs/taro";
import { BASE_URL } from "@/utils/request";
import {reactive} from 'vue';
import Taro from '@tarojs/taro';
import {BASE_URL} from '@/utils/request';
const { content } = defineProps<{
const {content} = defineProps<{
content: string;
}>();
let emits = defineEmits(["input"]);
let emits = defineEmits(['input']);
const data = reactive<any>({
editorCtx: "",
editorCtx: '',
readOnly: false,
placeholder: "请输入商品详情...",
richText: "",
placeholder: '请输入商品详情...',
richText: '',
formats: {},
});
function onEditorReady() {
// 富文本节点渲染完成
Taro.createSelectorQuery()
.select("#editor")
.context((res) => {
.select('#editor')
.context(res => {
data.editorCtx = res.context;
// 初始化数据
if (content) {
@@ -159,9 +143,9 @@ function onEditorReady() {
}
// 失去焦点时,获取富文本的内容
function getCtx(e: { detail: { html: any } }) {
function getCtx(e: {detail: {html: any}}) {
data.richText = e.detail.html;
emits("input", e.detail.html);
emits('input', e.detail.html);
}
// 撤销操作
@@ -175,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;
}
@@ -196,16 +180,16 @@ function insertDivider() {
function insertImage() {
Taro.chooseImage({
count: 1,
sizeType: ["original", "compressed"],
sourceType: ["album", "camera"],
success: (res) => {
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: res => {
// 上传图片的逻辑各有不同,自行调整即可
Taro.uploadFile({
url: `${BASE_URL}/upload`,
name: "file",
header: { token: Taro.getStorageSync("token") },
name: 'file',
header: {token: Taro.getStorageSync('token')},
filePath: res.tempFilePaths[0],
success: (res) => {
success: res => {
console.log(res);
const imgData = JSON.parse(res.data) as {
code: number;
@@ -215,19 +199,19 @@ function insertImage() {
if (imgData.code === 200) {
// 将图片展示在编辑器中
data.editorCtx.insertImage({
width: "100%",
height: "auto",
width: '100%',
height: 'auto',
src: imgData.data.data,
alt: "图像",
alt: '图像',
success: function () {
console.log("insert image success");
console.log('insert image success');
},
});
} else {
console.log("上传失败");
console.log('上传失败');
}
},
fail: (err) => {
fail: err => {
console.log(err);
},
});
@@ -237,7 +221,7 @@ function insertImage() {
</script>
<style lang="scss">
@import "../static/font_4211210_2x20brbrv94.css";
@import '../static/font_4211210_2x20brbrv94.css';
.wrapper {
height: 100%;
@@ -266,7 +250,7 @@ function insertImage() {
.toolbar {
box-sizing: border-box;
border-bottom: 0;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}
.ql-container {

View File

@@ -14,14 +14,13 @@
@touchstart="touchStart"
@touchmove="touchMove"
@touchend="touchEnd"
@error="error"
>
@error="error">
</canvas>
</template>
<script setup lang="ts" name="ucharts">
import uCharts from "../utils/js_sdk/u-charts.min.js";
import Taro from "@tarojs/taro";
import uCharts from '../utils/js_sdk/u-charts.min.js';
import Taro from '@tarojs/taro';
const canvases = {};
@@ -29,7 +28,7 @@ const props = defineProps({
chartType: {
required: true,
type: String,
default: "column",
default: 'column',
},
opts: {
required: true,
@@ -40,7 +39,7 @@ const props = defineProps({
},
canvasId: {
type: String,
default: "u-canvas",
default: 'u-canvas',
},
cWidth: {
default: 350,
@@ -60,10 +59,10 @@ Taro.useLoad(() => {
const init = () => {
switch (props.chartType) {
case "column":
case 'column':
initColumnChart();
break;
case "line":
case 'line':
initLineChart();
break;
default:
@@ -75,9 +74,9 @@ const initColumnChart = () => {
const ctx = Taro.createCanvasContext(props.canvasId);
canvases[props.canvasId] = new uCharts({
context: ctx,
type: "column",
type: 'column',
fontSize: 11,
background: "#FFFFFF",
background: '#FFFFFF',
pixelRatio: props.pixelRatio,
animation: true,
categories: props.opts.categories,
@@ -99,9 +98,9 @@ const initColumnChart = () => {
},
extra: {
column: {
type: "group",
type: 'group',
width: 30,
activeBgColor: "#000000",
activeBgColor: '#000000',
activeBgOpacity: 0.08,
},
},
@@ -112,12 +111,12 @@ const initLineChart = () => {
const ctx = Taro.createCanvasContext(props.canvasId);
canvases[props.canvasId] = new uCharts({
context: ctx,
type: "line",
type: 'line',
fontSize: 11,
legend: true,
dataLabel: false,
dataPointShape: true,
background: "#FFFFFF",
background: '#FFFFFF',
pixelRatio: props.pixelRatio,
categories: props.opts.categories,
series: props.opts.series,
@@ -133,21 +132,21 @@ const initLineChart = () => {
disableGrid: true,
},
yAxis: {
gridType: "dash",
gridColor: "#CCCCCC",
gridType: 'dash',
gridColor: '#CCCCCC',
dashLength: 8,
splitNumber: 5,
min: 10,
max: 180,
format: (val) => {
return val.toFixed(0) + "元";
format: val => {
return val.toFixed(0) + '元';
},
},
width: props.cWidth * props.pixelRatio,
height: props.cHeight * props.pixelRatio,
extra: {
line: {
type: "straight",
type: 'straight',
},
},
});
@@ -156,7 +155,7 @@ const initLineChart = () => {
const touchStart = (e: any) => {
canvases[props.canvasId].showToolTip(e, {
format: function (item: any, category: any) {
return category + " " + item.name + ":" + item.data;
return category + ' ' + item.name + ':' + item.data;
},
});
canvases[props.canvasId].scrollStart(e);

View File

@@ -6,15 +6,14 @@
:headers="config.headers"
@success="success"
@failure="failure"
:multiple="multiple"
>
:multiple="multiple">
</nut-uploader>
</template>
<script setup lang="ts">
import { BASE_URL } from "@/utils/request";
import { computed, ref } from "vue";
import Taro from "@tarojs/taro";
import {BASE_URL} from '@/utils/request';
import {computed, ref} from 'vue';
import Taro from '@tarojs/taro';
const props = defineProps({
list: {
@@ -31,17 +30,17 @@ const props = defineProps({
},
});
const emits = defineEmits(["update:list"]);
const emits = defineEmits(['update:list']);
const fileList = computed({
get: () => props.list,
set: (val) => emits("update:list", val),
set: val => emits('update:list', val),
});
const config = ref({
url: `${BASE_URL}/upload`,
headers: {
token: Taro.getStorageSync("token"),
token: Taro.getStorageSync('token'),
},
});
@@ -49,15 +48,15 @@ const success = (res: any) => {
const data = JSON.parse(res.responseText.data);
res.fileItem.url = data.data.data;
Taro.showToast({
title: "上传成功",
icon: "success",
title: '上传成功',
icon: 'success',
});
};
const failure = () => {
Taro.showToast({
title: "上传失败",
icon: "error",
title: '上传失败',
icon: 'error',
});
};
</script>

View File

@@ -1,10 +1,10 @@
<script lang="ts" setup>
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 {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';
const props = defineProps({
isShow: {
@@ -12,18 +12,18 @@ const props = defineProps({
default: false,
},
});
const emits = defineEmits(["closeEdit", "update:isShow"]);
const emits = defineEmits(['closeEdit', 'update:isShow']);
const userInfo = ref({
nickname: "",
avatar: "",
phone: "",
nickname: '',
avatar: '',
phone: '',
});
const show = computed({
get: (): boolean => props.isShow,
set: (val) => {
emits("update:isShow", val);
set: val => {
emits('update:isShow', val);
},
});
@@ -32,15 +32,15 @@ const mp_is_new = ref(true);
const canvasStatus = ref(false);
const closeAttr = () => {
emits("closeEdit");
emits('closeEdit');
};
const onChooseAvatar = (e) => {
const { avatarUrl } = e.detail;
const onChooseAvatar = e => {
const {avatarUrl} = e.detail;
Taro.uploadFile({
url: `${BASE_URL}/upload`,
filePath: avatarUrl,
name: "file",
name: 'file',
success: function (res) {
const data = JSON.parse(res.data);
userInfo.value.avatar = data.data.data;
@@ -54,10 +54,10 @@ const uploadPic = () => {
const getPhoneNumber = async (e: any) => {
Taro.showLoading({
title: "授权手机号中",
title: '授权手机号中',
mask: true,
});
const { code } = e.detail;
const {code} = e.detail;
const res = await getPhone({
code: code,
});
@@ -68,39 +68,39 @@ const getPhoneNumber = async (e: any) => {
const formSubmit = async (e: any) => {
if (!userInfo.value.avatar)
return Taro.showToast({
title: "请上传头像",
icon: "none",
title: '请上传头像',
icon: 'none',
});
userInfo.value.nickname = e.detail.value.nickname;
if (!userInfo.value.nickname)
return Taro.showToast({
title: "请输入昵称",
icon: "none",
title: '请输入昵称',
icon: 'none',
});
if (!userInfo.value.phone)
return Taro.showToast({
title: "请授权手机号码",
icon: "none",
title: '请授权手机号码',
icon: 'none',
});
const res = await login({
Code: Taro.getStorageSync("wx_code"),
Code: Taro.getStorageSync('wx_code'),
NickName: userInfo.value.nickname,
AvatarUrl: userInfo.value.avatar,
Phone: userInfo.value.phone,
Referee: Taro.getStorageSync("bind_id") || "",
Referee: Taro.getStorageSync('bind_id') || '',
});
emits("closeEdit");
emits('closeEdit');
Taro.showToast({
title: res.msg,
icon: "success",
icon: 'success',
duration: 2000,
});
Taro.setStorageSync("token", res.data.token);
Taro.setStorageSync('token', res.data.token);
setTimeout(() => {
Taro.removeStorageSync("wx_code");
Taro.removeStorageSync("bind_id");
Taro.removeStorageSync('wx_code');
Taro.removeStorageSync('bind_id');
Taro.switchTab({
url: "/pages/user/index",
url: '/pages/user/index',
});
}, 2000);
};
@@ -112,11 +112,10 @@ 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"
>
:close-on-click-overlay="false">
<view class="mp-data">
<image class="image" :src="logoImg"></image>
<text class="mp-name">捷兑通 申请</text>
@@ -133,23 +132,19 @@ const formSubmit = async (e: any) => {
<view
class="avatar-box"
v-if="!mp_is_new"
@click.stop="uploadPic"
>
@click.stop="uploadPic">
<image
:src="userInfo.avatar || headImg"
mode="aspectFill"
></image>
mode="aspectFill"></image>
</view>
<button
v-else
class="avatar-box"
open-type="chooseAvatar"
@chooseavatar="onChooseAvatar"
>
@chooseavatar="onChooseAvatar">
<image
:src="userInfo.avatar || headImg"
mode="aspectFill"
></image>
mode="aspectFill"></image>
</button>
</view>
</view>
@@ -163,8 +158,7 @@ const formSubmit = async (e: any) => {
placeholder="请输入昵称"
name="nickname"
:maxlength="16"
:value="userInfo.nickname"
/>
:value="userInfo.nickname" />
</view>
</view>
</view>
@@ -174,9 +168,8 @@ const formSubmit = async (e: any) => {
<view class="input">
<button
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
>
{{ !userInfo.phone ? "请授权手机号" : "授权成功" }}
@getphonenumber="getPhoneNumber">
{{ !userInfo.phone ? '请授权手机号' : '授权成功' }}
</button>
</view>
</view>

View File

@@ -4,8 +4,7 @@
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta
content="width=device-width,initial-scale=1,user-scalable=no"
name="viewport"
/>
name="viewport" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="format-detection" content="telephone=no,address=no" />

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "菜单",
navigationBarTitleText: '菜单',
});

View File

@@ -64,4 +64,4 @@ page {
}
}
}
}
}

View File

@@ -9,14 +9,12 @@
direction="vertical"
title-gutter="5"
animated-time="0"
name="tabName"
>
name="tabName">
<nut-tab-pane
v-for="(itm, index) in good_list"
:key="index"
:title="itm.name"
:pane-key="index"
>
:pane-key="index">
<view v-if="itm.Goods.length > 0">
<view class="list" v-for="(item, index) in itm.Goods" :key="index">
<view class="item" @click.stop="toGoodDetails(item.gid, 1)">
@@ -38,8 +36,7 @@
<nut-button
size="mini"
type="primary"
@click.stop="add_cart(item)"
>
@click.stop="add_cart(item)">
<template #icon>
<Cart2 />
</template>
@@ -56,16 +53,20 @@
</view>
<nut-empty v-else description="该商家暂无商品"></nut-empty>
<!-- 购物车 -->
<cart ref="cartRef" :mer-info="mer_info" @update-cart="updateCartNum" :IsPendingOrder="true" />
<cart
ref="cartRef"
:mer-info="mer_info"
@update-cart="updateCartNum"
:IsPendingOrder="true" />
</view>
</template>
<script setup lang="ts">
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 {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';
interface goodList {
ID: number;
@@ -94,7 +95,7 @@ interface CartItems {
exchange: number;
}
const value = ref("0");
const value = ref('0');
const good_list = ref<goodList[]>([]);
const class_list = ref<
Array<{
@@ -103,8 +104,8 @@ const class_list = ref<
}>
>([]);
Taro.useLoad(async (e) => {
mer_info.value = e
Taro.useLoad(async e => {
mer_info.value = e;
await get_class_list(e.bid);
await cartRef.value.get_cart_list();
});
@@ -119,7 +120,7 @@ const get_class_list = async (bid: string) => {
const get_good_list = async (id: number, bid: string) => {
Taro.showLoading({
title: "加载中",
title: '加载中',
mask: true,
});
const res = await getGoodList({
@@ -161,7 +162,7 @@ const updateCartNum = (cartItems: CartItems[]) => {
} else {
good_list.value.forEach((category: goodList) => {
category.Goods.forEach((good: GoodsType) => {
Reflect.deleteProperty(good, "cartNum");
Reflect.deleteProperty(good, 'cartNum');
});
});
}
@@ -169,5 +170,5 @@ const updateCartNum = (cartItems: CartItems[]) => {
</script>
<style lang="scss">
@import "./index.scss";
@import './index.scss';
</style>

View File

@@ -1,4 +1,4 @@
export default definePageConfig({
navigationBarTitleText: "填写信息",
navigationStyle: "custom",
navigationBarTitleText: '填写信息',
navigationStyle: 'custom',
});

View File

@@ -3,7 +3,7 @@
justify-content: center;
box-sizing: border-box;
height: 100vh;
background-image: url("https://cdn-we-retail.ym.tencent.com/miniapp/template/user-center-bg-v1.png");
background-image: url('https://cdn-we-retail.ym.tencent.com/miniapp/template/user-center-bg-v1.png');
background-size: auto 40%;
background-repeat: no-repeat;
@@ -43,4 +43,4 @@
.nut-dialog__content {
text-align: left !important;
font-size: 28px;
}
}

View File

@@ -10,8 +10,7 @@
placeholder="请输入台号比如包厢A01"
name="seat"
v-model="formVal.seat"
required
/>
required />
</view>
<view class="form-item">
<text class="label">手机号</text>
@@ -20,8 +19,7 @@
placeholder="请输入客人手机号码"
name="phone"
v-model="formVal.phone"
required
/>
required />
</view>
<view class="form-item">
<text class="label">备注</text>
@@ -29,8 +27,7 @@
type="textarea"
placeholder="备注"
name="notes"
v-model="formVal.notes"
/>
v-model="formVal.notes" />
</view>
<nut-button
style="border-radius: 7px"
@@ -47,52 +44,51 @@
<template #default
>客户手机号:
<text style="color: #fd0100">{{ formVal.phone }}</text>
没有注册捷兑
请通知他登录捷兑通小程序注册</template
没有注册捷兑 请通知他登录捷兑通小程序注册</template
>
</nut-dialog>
</view>
</template>
<script setup lang="ts">
import { ref } from "vue";
import Taro from "@tarojs/taro";
import BackComponent from "../../../../components/Back.vue";
import { checkPhone } from "../../../../api/admin";
import {ref} from 'vue';
import Taro from '@tarojs/taro';
import BackComponent from '../../../../components/Back.vue';
import {checkPhone} from '../../../../api/admin';
const formVal = ref({
seat: "",
phone: "",
notes: "",
seat: '',
phone: '',
notes: '',
});
const visible = ref(false);
const formSubmit = async ({ detail }: any) => {
const formSubmit = async ({detail}: any) => {
if (!detail.value.seat)
return Taro.showToast({
title: "请填写台号",
icon: "none",
title: '请填写台号',
icon: 'none',
});
if (
!/^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/.test(
detail.value.phone
detail.value.phone,
)
)
return Taro.showToast({
title: "请输入正确的手机号码",
icon: "none",
title: '请输入正确的手机号码',
icon: 'none',
});
try {
await checkPhone({ phone: detail.value.phone });
const user_info = await Taro.getStorageSync("userInfo");
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}&notes=${formVal.value.notes}`,
success: () => {
formVal.value = {
seat: "",
phone: "",
notes: "",
seat: '',
phone: '',
notes: '',
};
},
});
@@ -104,5 +100,5 @@ const formSubmit = async ({ detail }: any) => {
</script>
<style lang="scss">
@import "./index.scss";
@import './index.scss';
</style>

View File

@@ -1,4 +1,4 @@
export default definePageConfig({
navigationBarTitleText: "点单",
navigationStyle: "custom",
navigationBarTitleText: '点单',
navigationStyle: 'custom',
});

View File

@@ -3,7 +3,7 @@
justify-content: center;
box-sizing: border-box;
height: 100vh;
background-image: url("./static/WechatIMG10.jpg");
background-image: url('./static/WechatIMG10.jpg');
background-size: 100% 35%;
background-repeat: no-repeat;
@@ -39,7 +39,7 @@
.line {
width: 1px;
height: 188px;
background: #C8C8C8;
background: #c8c8c8;
}
}
}

View File

@@ -5,8 +5,7 @@
<view class="card">
<view
class="comm"
@click="navTo('/pages/admin/add_order/add_table/index')"
>
@click="navTo('/pages/admin/add_order/add_table/index')">
<text class="title">开始点单</text>
<image src="./static/dc.png"></image>
<text class="sub">线上点单后结系统</text>
@@ -14,8 +13,7 @@
<view class="line"></view>
<view
class="comm"
@click="navTo('/pages/admin/add_order/pending_order/index')"
>
@click="navTo('/pages/admin/add_order/pending_order/index')">
<text class="title">我的订单</text>
<image src="./static/ddan.png"></image>
<text class="sub">查看我点餐的订单</text>
@@ -26,8 +24,8 @@
</template>
<script setup lang="ts">
import Taro from "@tarojs/taro";
import BackComponent from "../../../components/Back.vue";
import Taro from '@tarojs/taro';
import BackComponent from '../../../components/Back.vue';
const navTo = (path: string) => {
Taro.navigateTo({
@@ -37,5 +35,5 @@ const navTo = (path: string) => {
</script>
<style lang="scss">
@import "./index.scss";
@import './index.scss';
</style>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "后结订单",
navigationBarTitleText: '后结订单',
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "收款",
navigationBarTitleText: '收款',
});

View File

@@ -18,12 +18,12 @@
}
&::before {
content: "¥";
content: '¥';
color: #666666;
}
&::after {
content: "";
content: '';
position: absolute;
bottom: -1px;
width: 700px;
@@ -38,46 +38,46 @@
border-radius: 12px;
margin: 20px auto;
box-sizing: border-box;
.header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
text {
margin-right: 10px;
color: #333333;
font-size: 28px;
}
}
.line {
width: inherit;
height: 1px;
background-color: #e9e9e9;
}
.goods-list {
display: flex;
margin: 20px;
image {
width: 195px;
height: 195px;
border-radius: 12px;
}
.center {
margin-left: 20px;
.title {
font-weight: bold;
text-align: left;
font-size: 30px;
}
}
.num {
flex: 1;
text-align: right;
@@ -85,7 +85,7 @@
font-size: 26px;
}
}
.desc {
padding: 10px 20px;
color: #666666;
@@ -101,7 +101,7 @@
.btn {
width: 709px;
height: 92px;
background: #FD0100;
background: #fd0100;
color: #ffffff;
font-size: 32px;
text-align: center;

View File

@@ -1,4 +1,4 @@
export default definePageConfig({
navigationBarTitleText: "订单详情",
navigationBarTitleText: '订单详情',
// navigationStyle: "custom",
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "收款码",
navigationBarTitleText: '收款码',
});

View File

@@ -35,4 +35,4 @@ page {
right: 55px;
}
}
}
}

View File

@@ -11,31 +11,31 @@
</template>
<script setup lang="ts">
import { onUnmounted, ref } from "vue";
import Taro from "@tarojs/taro";
import { getAfterOrder } from "@/api/admin";
import {onUnmounted, ref} from 'vue';
import Taro from '@tarojs/taro';
import {getAfterOrder} from '@/api/admin';
const time_id = ref();
const dataUrl = ref("");
const dataUrl = ref('');
const info = ref<any>({});
Taro.useLoad((e) => {
Taro.useLoad(e => {
info.value = e;
dataUrl.value = Taro.getStorageSync("pay_code");
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,
});
if (data.data.status !== 0 && data.data.status !== 2) {
Taro.showToast({
title: "支付成功",
icon: "success",
title: '支付成功',
icon: 'success',
});
setTimeout(() => {
Taro.removeStorageSync("pay_code");
Taro.removeStorageSync('pay_code');
Taro.navigateTo({
url: `/pages/admin/add_order/pending_order/pending_order_detail/index?oid=${info.value.oid}&bid=${info.value.bid}`,
});
@@ -46,15 +46,15 @@ Taro.useLoad((e) => {
Taro.useDidHide(() => {
clearInterval(time_id.value);
Taro.removeStorageSync("pay_code");
Taro.removeStorageSync('pay_code');
});
onUnmounted(() => {
clearInterval(time_id.value);
Taro.removeStorageSync("pay_code");
Taro.removeStorageSync('pay_code');
});
</script>
<style lang="scss">
@import "./index.scss";
@import './index.scss';
</style>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "订单详情",
navigationBarTitleText: '订单详情',
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "订单管理",
navigationBarTitleText: '订单管理',
});

View File

@@ -62,4 +62,4 @@
color: #999;
}
}
}
}

View File

@@ -34,16 +34,14 @@
<navigator
class="item"
hover-class="none"
:url="`/pages/admin/statistics/index?type=price&time=today`"
>
:url="`/pages/admin/statistics/index?type=price&time=today`">
<view class="title">{{ orderInfo?.total?.TodayNumber || 0 }}</view>
<view class="sub">今日成交额</view>
</navigator>
<navigator
class="item"
hover-class="none"
:url="`/pages/admin/statistics/index?type=price&time=yesterday`"
>
:url="`/pages/admin/statistics/index?type=price&time=yesterday`">
<view class="title">{{
orderInfo?.total?.YesterdayNumber || 0
}}</view>
@@ -52,32 +50,28 @@
<navigator
class="item"
hover-class="none"
:url="`/pages/admin/statistics/index?type=price&time=month`"
>
:url="`/pages/admin/statistics/index?type=price&time=month`">
<view class="title">{{ orderInfo?.total?.MonthNumber || 0 }}</view>
<view class="sub">本月成交额</view>
</navigator>
<navigator
class="item"
hover-class="none"
:url="`/pages/admin/statistics/index?type=order&time=today`"
>
:url="`/pages/admin/statistics/index?type=order&time=today`">
<view class="title">{{ orderInfo?.total?.TodayOrder || 0 }}</view>
<view class="sub">今日订单数</view>
</navigator>
<navigator
class="item"
hover-class="none"
:url="`/pages/admin/statistics/index?type=order&time=yesterday`"
>
:url="`/pages/admin/statistics/index?type=order&time=yesterday`">
<view class="title">{{ orderInfo?.total?.YesterdayOrder || 0 }}</view>
<view class="sub">昨日订单数</view>
</navigator>
<navigator
class="item"
hover-class="none"
:url="`/pages/admin/statistics/index?type=order&time=month`"
>
:url="`/pages/admin/statistics/index?type=order&time=month`">
<view class="title">{{ orderInfo?.total?.MonthOrder || 0 }}</view>
<view class="sub">本月订单数</view>
</navigator>
@@ -93,8 +87,7 @@
:bordered="true"
class="table"
:columns="columns"
:data="orderInfo?.list"
></nut-table>
:data="orderInfo?.list"></nut-table>
</view>
<nut-empty v-else description="暂无订单数据"></nut-empty>
</view>
@@ -102,9 +95,9 @@
</template>
<script lang="ts" setup>
import { h, ref } from "vue";
import Taro from "@tarojs/taro";
import { orderStatistics } from "../../../api/admin";
import {h, ref} from 'vue';
import Taro from '@tarojs/taro';
import {orderStatistics} from '../../../api/admin';
Taro.useLoad(() => {
getData();
@@ -114,35 +107,35 @@ const orderInfo = ref<any>({});
const columns = ref([
{
title: "日期",
key: "Date",
align: "center",
title: '日期',
key: 'Date',
align: 'center',
},
{
title: "订单数",
key: "TotalCount",
align: "center",
title: '订单数',
key: 'TotalCount',
align: 'center',
},
{
title: "交易额",
key: "NumberSum",
align: "center",
render: (row) => {
title: '交易额',
key: 'NumberSum',
align: 'center',
render: row => {
return h(
"view",
'view',
{
style: {
color: "red",
color: 'red',
},
},
row.NumberSum
row.NumberSum,
);
},
},
]);
const getData = async () => {
const user_info = Taro.getStorageSync("userInfo");
const user_info = Taro.getStorageSync('userInfo');
const res = await orderStatistics({
bid: user_info.data.bid,
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "订单列表",
navigationBarTitleText: '订单列表',
});

View File

@@ -141,4 +141,4 @@
}
}
}
}
}

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "订单数据统计",
navigationBarTitleText: '订单数据统计',
});

View File

@@ -5,62 +5,55 @@
<view
class="item"
:class="time == 'today' ? 'on' : ''"
@click="setTime('today')"
>
@click="setTime('today')">
今天
</view>
<view
class="item"
:class="time == 'yesterday' ? 'on' : ''"
@click="setTime('yesterday')"
>
@click="setTime('yesterday')">
昨天
</view>
<view
class="item"
:class="time == 'seven' ? 'on' : ''"
@click="setTime('seven')"
>
@click="setTime('seven')">
最近7天
</view>
<view
class="item"
:class="time == 'month' ? 'on' : ''"
@click="setTime('month')"
>
@click="setTime('month')">
本月
</view>
<view
class="item"
:class="time == 'date' ? 'on' : ''"
@click="dateTitle"
>
@click="dateTitle">
自定义
</view>
</view>
</view>
<view class="wrapper">
<view class="title">
{{ title }}{{ where.type == 1 ? "营业额" : "订单量" }}
{{ title }}{{ where.type == 1 ? '营业额' : '订单量' }}
</view>
<view v-if="where.type == 1" class="money">{{ dataObj.all || 0 }}</view>
<view v-else class="money">{{ dataObj.all || 0 }}</view>
<view class="increase">
<view>
{{ time === "date" ? "" : title }}增长率<text
:class="dataObj.growthRate >= 0 ? 'red' : 'green'"
>
{{ time === 'date' ? '' : title }}增长率<text
:class="dataObj.growthRate >= 0 ? 'red' : 'green'">
{{ dataObj.growthRate }}%
<text
class="iconfont"
:class="
dataObj.growthRate >= 0 ? 'icon-xiangshang1' : 'icon-xiangxia2'
"
></text
"></text
></text>
</view>
<view>
{{ time === "date" ? "" : title }}增长<text
{{ time === 'date' ? '' : title }}增长<text
:class="dataObj.growthNumber >= 0 ? 'red' : 'green'"
>{{ dataObj.growthNumber }}
<text
@@ -69,8 +62,7 @@
dataObj.growthNumber >= 0
? 'icon-xiangshang1'
: 'icon-xiangxia2'
"
></text
"></text
></text>
</view>
</view>
@@ -82,8 +74,7 @@
:ontouch="true"
@touchstart="touchStart"
@touchmove="touchMove"
@touchend="touchEnd"
/>
@touchend="touchEnd" />
</view>
<view class="Card">
@@ -96,8 +87,7 @@
:bordered="true"
class="table"
:columns="columns"
:data="dataObj?.list"
></nut-table>
:data="dataObj?.list"></nut-table>
</view>
<nut-empty v-else description="暂无订单数据"></nut-empty>
</view>
@@ -109,20 +99,19 @@
:default-value="pickerVal"
:start-date="date_start"
@close="isVisible = false"
@choose="setChooseValue"
>
@choose="setChooseValue">
</nut-calendar>
</view>
</template>
<script setup lang="ts">
import { ref, computed, h } from "vue";
import Taro from "@tarojs/taro";
import { growthRate } from "../../../api/admin";
import dayjs from "dayjs";
import uCharts from "../../../utils/js_sdk/u-charts.min.js";
import {ref, computed, h} from 'vue';
import Taro from '@tarojs/taro';
import {growthRate} from '../../../api/admin';
import dayjs from 'dayjs';
import uCharts from '../../../utils/js_sdk/u-charts.min.js';
const time = ref("");
const time = ref('');
const isVisible = ref(false);
@@ -138,44 +127,44 @@ const chartWH = ref({
const columns = ref([
{
title: "日期",
key: "Date",
align: "center",
title: '日期',
key: 'Date',
align: 'center',
},
{
title: "订单数",
key: "TotalCount",
align: "center",
title: '订单数',
key: 'TotalCount',
align: 'center',
},
{
title: "交易额",
key: "NumberSum",
align: "center",
render: (row) => {
title: '交易额',
key: 'NumberSum',
align: 'center',
render: row => {
return h(
"view",
'view',
{
style: {
color: "red",
color: 'red',
},
},
row.NumberSum
row.NumberSum,
);
},
},
]);
const date_start = computed(() => {
return dayjs().startOf("year").format("YYYY-MM-DD");
return dayjs().startOf('year').format('YYYY-MM-DD');
});
const title = ref("");
const title = ref('');
const where = ref({
type: 1,
status: 2,
start: "",
end: "",
start: '',
end: '',
});
const dataObj = ref<any>({});
@@ -184,20 +173,20 @@ const opts = ref<any>({
categories: [],
series: [
{
name: "营业额",
name: '营业额',
data: [],
},
{
name: "订单量",
name: '订单量',
data: [],
},
],
});
const pickerVal = ref<any>([])
const pickerVal = ref<any>([]);
Taro.useLoad((options) => {
where.value.type = options.type === "price" ? 1 : 2;
Taro.useLoad(options => {
where.value.type = options.type === 'price' ? 1 : 2;
time.value = options.time;
setTime(options.time);
// getData();
@@ -210,29 +199,29 @@ Taro.useLoad((options) => {
const setTime = (type: string) => {
time.value = type;
switch (type) {
case "today":
title.value = "今日";
case 'today':
title.value = '今日';
where.value.status = 2;
where.value.start = dayjs().format("YYYY-MM-DD");
where.value.end = dayjs().format("YYYY-MM-DD");
where.value.start = dayjs().format('YYYY-MM-DD');
where.value.end = dayjs().format('YYYY-MM-DD');
break;
case "yesterday":
title.value = "昨日";
case 'yesterday':
title.value = '昨日';
where.value.status = 2;
where.value.start = dayjs().add(-1, "day").format("YYYY-MM-DD");
where.value.end = dayjs().add(-1, "day").format("YYYY-MM-DD");
where.value.start = dayjs().add(-1, 'day').format('YYYY-MM-DD');
where.value.end = dayjs().add(-1, 'day').format('YYYY-MM-DD');
break;
case "seven":
title.value = "7天";
case 'seven':
title.value = '7天';
where.value.status = 2;
where.value.start = dayjs().add(-6, "day").format("YYYY-MM-DD");
where.value.end = dayjs().format("YYYY-MM-DD");
where.value.start = dayjs().add(-6, 'day').format('YYYY-MM-DD');
where.value.end = dayjs().format('YYYY-MM-DD');
break;
case "month":
title.value = "本月";
case 'month':
title.value = '本月';
where.value.status = 1;
where.value.start = dayjs().startOf("month").format("YYYY-MM-DD");
where.value.end = dayjs().format("YYYY-MM-DD");
where.value.start = dayjs().startOf('month').format('YYYY-MM-DD');
where.value.end = dayjs().format('YYYY-MM-DD');
break;
}
getData();
@@ -240,7 +229,7 @@ const setTime = (type: string) => {
const dateTitle = () => {
where.value.status = 1;
time.value = "date";
time.value = 'date';
isVisible.value = true;
};
@@ -253,7 +242,7 @@ const setChooseValue = (ref: any) => {
const getData = async () => {
try {
const user_info = Taro.getStorageSync("userInfo");
const user_info = Taro.getStorageSync('userInfo');
const res = await growthRate({
bid: user_info.data.bid,
status: where.value.status,
@@ -273,16 +262,16 @@ const getData = async () => {
} catch (error) {
Taro.showToast({
title: error.msg,
icon: "none",
icon: 'none',
});
throw error;
}
};
const create_canvas = () => {
const ctx = Taro.createCanvasContext("myChart");
const ctx = Taro.createCanvasContext('myChart');
canvas_obj = new uCharts({
type: "column",
type: 'column',
context: ctx,
width: chartWH.value.width,
height: chartWH.value.height,
@@ -290,17 +279,17 @@ const create_canvas = () => {
series: opts.value.series,
pixelRatio: chartWH.value.pixelRatio,
animation: true,
background: "#FFFFFF",
background: '#FFFFFF',
color: [
"#1890FF",
"#91CB74",
"#FAC858",
"#EE6666",
"#73C0DE",
"#3CA272",
"#FC8452",
"#9A60B4",
"#ea7ccc",
'#1890FF',
'#91CB74',
'#FAC858',
'#EE6666',
'#73C0DE',
'#3CA272',
'#FC8452',
'#9A60B4',
'#ea7ccc',
],
padding: [15, 15, 0, 15],
enableScroll: true,
@@ -319,9 +308,9 @@ const create_canvas = () => {
},
extra: {
column: {
type: "group",
type: 'group',
width: 20,
activeBgColor: "#000000",
activeBgColor: '#000000',
activeBgOpacity: 0.08,
},
},
@@ -331,7 +320,7 @@ const create_canvas = () => {
const touchStart = (e: any) => {
canvas_obj.showToolTip(e, {
format: function (item: any, category: any) {
return category + " " + item.name + ":" + item.data;
return category + ' ' + item.name + ':' + item.data;
},
});
canvas_obj.scrollStart(e);

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "订单核销",
navigationBarTitleText: '订单核销',
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "核销列表",
navigationBarTitleText: '核销列表',
});

View File

@@ -73,7 +73,7 @@ Taro.useLoad(options => {
const goodInfo = ref<any>({});
const getData = async (options: any) => {
const merInfo = Taro.getStorageSync("userInfo");
const merInfo = Taro.getStorageSync('userInfo');
const res = await getActiveVerifyList({
oid: options.oid,
bid: merInfo.data.bid,

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "全部服务",
navigationBarTitleText: '全部服务',
});

View File

@@ -8,8 +8,7 @@
v-for="itm in item.Classify"
:key="itm.ID"
:text="itm.name"
@click="toDetails(itm)"
>
@click="toDetails(itm)">
<image :src="itm.icon" />
</nut-grid-item>
</nut-grid>
@@ -20,9 +19,9 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import Taro from "@tarojs/taro";
import { getAllMerCategory } from "@/api/goods";
import {ref} from 'vue';
import Taro from '@tarojs/taro';
import {getAllMerCategory} from '@/api/goods';
const list = ref<
{

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "购物车",
navigationBarTitleText: '购物车',
});

View File

@@ -188,16 +188,16 @@ const orderData = ref<any>([]);
const sub = async () => {
const arr: any = list.value.filter(
(item: any) => item.state.checkboxgroup.length > 0,
);
console.log(arr);
if (arr.length === 0) {
Taro.showToast({
title: '请选择商品',
icon: 'none',
});
return;
}
(item: any) => item.state.checkboxgroup.length > 0,
);
console.log(arr);
if (arr.length === 0) {
Taro.showToast({
title: '请选择商品',
icon: 'none',
});
return;
}
try {
const {data: res} = await createActiveOrder({
Bid: arr.map((item: any) => item.StoreBid),

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "分类",
navigationBarTitleText: '分类',
});

View File

@@ -7,19 +7,16 @@
:animated-time="10"
name="tabs"
direction="vertical"
@change="tabChange"
>
@change="tabChange">
<nut-tab-pane
v-for="item in list"
:title="(item.name as string)"
:key="item.ID"
>
:key="item.ID">
<view v-if="goodList.length > 0">
<view
class="list"
v-for="(item, index) in (goodList as any)"
:key="index"
>
:key="index">
<view class="item">
<img :src="item.cover" />
<view class="right">
@@ -46,9 +43,9 @@
</template>
<script lang="ts" setup>
import Taro from "@tarojs/taro";
import { ref } from "vue";
import { getCategoryList, getCategoryGoods } from "@/api/goods";
import Taro from '@tarojs/taro';
import {ref} from 'vue';
import {getCategoryList, getCategoryGoods} from '@/api/goods';
const val = ref(0);

View File

@@ -2,5 +2,5 @@ page {
background-image: url('https://p1.meituan.net/csc/75a139bcec06745d385ec211aa313a98196174.png');
background-size: 100% 40%;
background-repeat: no-repeat;
background-color: #F9F8F6;
background-color: #f9f8f6;
}

View File

@@ -1,4 +1,4 @@
export default definePageConfig({
navigationBarTitleText: "游戏详情",
navigationStyle: "custom",
navigationBarTitleText: '游戏详情',
navigationStyle: 'custom',
});

View File

@@ -4,8 +4,7 @@
class="head-wrapper"
:style="{
top: statusHeight + 'px',
}"
>
}">
<view class="head-menu">
<Left class="iconfont" @click="returns" />
<Home class="iconfont" @click="goHome" />
@@ -15,31 +14,26 @@
class="swiper"
:pagination-visible="true"
pagination-color="#426543"
auto-play="3000"
>
auto-play="3000">
<nut-swiper-item>
<image
src="https://storage.360buyimg.com/jdc-article/NutUItaro34.jpg"
alt=""
/>
alt="" />
</nut-swiper-item>
<nut-swiper-item>
<image
src="https://storage.360buyimg.com/jdc-article/NutUItaro2.jpg"
alt=""
/>
alt="" />
</nut-swiper-item>
<nut-swiper-item>
<image
src="https://storage.360buyimg.com/jdc-article/welcomenutui.jpg"
alt=""
/>
alt="" />
</nut-swiper-item>
<nut-swiper-item>
<image
src="https://storage.360buyimg.com/jdc-article/fristfabu.jpg"
alt=""
/>
alt="" />
</nut-swiper-item>
</nut-swiper>
<view class="box">
@@ -53,15 +47,15 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import {ref} from 'vue';
import {
useLoad,
getSystemInfoSync,
navigateBack,
switchTab,
navigateTo,
} from "@tarojs/taro";
import { Left, Home } from "@nutui/icons-vue-taro";
} from '@tarojs/taro';
import {Left, Home} from '@nutui/icons-vue-taro';
var statusBarHeight = getSystemInfoSync().statusBarHeight as number;
console.log(statusBarHeight);
@@ -70,7 +64,7 @@ const statusHeight = ref<number>(statusBarHeight);
// const swiperList = ref([]);
useLoad((options) => {
useLoad(options => {
console.log(options);
});
@@ -80,13 +74,13 @@ const returns = () => {
const goHome = () => {
switchTab({
url: "/pages/index/index",
url: '/pages/index/index',
});
};
const toGame = () => {
navigateTo({
url: "/pages/game/gameview/index",
url: '/pages/game/gameview/index',
});
};
</script>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "GameView",
navigationBarTitleText: 'GameView',
});

View File

@@ -1,19 +1,18 @@
<template>
<web-view
style="height: 100vh; width: 100vw"
:src="`https://www.jdt168.com/public/?uid=${user.uid}`"
></web-view>
:src="`https://www.jdt168.com/public/?uid=${user.uid}`"></web-view>
</template>
<script setup lang="ts">
import { ref } from "vue";
import { getStorageSync, useLoad } from "@tarojs/taro";
import { WebView } from "@tarojs/components";
import {ref} from 'vue';
import {getStorageSync, useLoad} from '@tarojs/taro';
import {WebView} from '@tarojs/components';
const user = ref<any>({});
useLoad(() => {
user.value = getStorageSync("userInfo");
user.value = getStorageSync('userInfo');
console.log(user);
});
</script>

View File

@@ -1,4 +1,4 @@
export default definePageConfig({
navigationBarTitleText: "",
navigationStyle: "custom",
navigationBarTitleText: '',
navigationStyle: 'custom',
});

View File

@@ -1,5 +1,5 @@
export default definePageConfig({
navigationBarTitleText: "商品详情",
navigationStyle: "custom",
navigationBarTitleText: '商品详情',
navigationStyle: 'custom',
enableShareAppMessage: true,
});

View File

@@ -308,7 +308,7 @@ page {
.line1 {
width: 100%;
height: 1px;
background-color: #F0F0F0;
background-color: #f0f0f0;
margin: 20px auto;
}
</style>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "提交订单",
navigationBarTitleText: '提交订单',
});

View File

@@ -20,24 +20,21 @@
:border="false"
v-model="basicData.name"
placeholder="请输入姓名"
type="text"
/>
type="text" />
</nut-form-item>
<nut-form-item body-align="right" label="联系电话">
<nut-input
:border="false"
v-model="basicData.phone"
placeholder="请输入联系电话"
type="text"
/>
type="text" />
</nut-form-item>
<nut-form-item body-align="right" label="订单备注">
<nut-textarea
class="nut-input-text"
v-model="basicData.notes"
placeholder="请输入备注"
type="text"
/>
type="text" />
</nut-form-item>
</nut-form>
<!-- 底部 -->
@@ -51,22 +48,22 @@
</template>
<script setup lang="ts">
import { Find } from "@nutui/icons-vue-taro";
import Taro from "@tarojs/taro";
import { calculateDistance } from "@/utils";
import { ref } from "vue";
import {Find} from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro';
import {calculateDistance} from '@/utils';
import {ref} from 'vue';
const distance = ref("");
const distance = ref('');
const basicData = ref({
name: "",
phone: "",
notes: "",
name: '',
phone: '',
notes: '',
});
Taro.useLoad(() => {
Taro.getLocation({
type: "wgs84",
type: 'wgs84',
success: function (res) {
const latitude = res.latitude;
const longitude = res.longitude;
@@ -74,7 +71,7 @@ Taro.useLoad(() => {
108.24898,
22.83646,
longitude,
latitude
latitude,
);
},
});
@@ -90,12 +87,12 @@ const toLocal = () => {
const orderPay = () => {
Taro.showToast({
title: "支付成功",
icon: "success",
title: '支付成功',
icon: 'success',
success: () => {
setTimeout(() => {
Taro.redirectTo({
url: "/pages/goods/order_status/index",
url: '/pages/goods/order_status/index',
});
}, 2000);
},

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "订单状态",
navigationBarTitleText: '订单状态',
});

View File

@@ -24,18 +24,18 @@
</template>
<script setup lang="ts">
import { Check, CloseLittle } from "@nutui/icons-vue-taro";
import Taro from "@tarojs/taro";
import {Check, CloseLittle} from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro';
const toHome = () => {
Taro.switchTab({
url: "/pages/index/index",
url: '/pages/index/index',
});
};
const toOrderPage = () => {
Taro.redirectTo({
url: "/pages/users/order_list/index?type=0",
url: '/pages/users/order_list/index?type=0',
});
};
</script>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "活动订单",
navigationBarTitleText: '活动订单',
});

View File

@@ -1,15 +1,15 @@
<script lang="ts" setup>
import { ref } from "vue";
import {ref} from 'vue';
import {
useLoad,
useReachBottom,
showToast,
navigateTo,
setStorageSync,
} from "@tarojs/taro";
import Pay from "@/components/Pay.vue";
import { getActiveOrderList, deleteActiveOrder } from "@/api/goods";
import { getOrderStatistics } from "@/api/order";
} from '@tarojs/taro';
import Pay from '@/components/Pay.vue';
import {getActiveOrderList, deleteActiveOrder} from '@/api/goods';
import {getOrderStatistics} from '@/api/order';
const tabValue = ref(0);
@@ -17,27 +17,27 @@ const isShowPay = ref(false);
const tabsList = ref([
{
title: "全部",
title: '全部',
value: 0,
num: 0,
},
{
title: "待付款",
title: '待付款',
value: 1,
num: 0,
},
{
title: "待使用",
title: '待使用',
value: 2,
num: 0,
},
{
title: "已使用",
title: '已使用',
value: 3,
num: 0,
},
{
title: "已失效",
title: '已失效',
value: 4,
num: 0,
},
@@ -60,7 +60,7 @@ interface OrderList {
const orderList = ref<OrderList[]>([]);
useLoad((options) => {
useLoad(options => {
console.log(options);
// tabValue.value = Number(options.type);
getList();
@@ -83,7 +83,7 @@ const getTj = async () => {
} catch (error) {
showToast({
title: error.msg,
icon: "none",
icon: 'none',
});
}
};
@@ -98,7 +98,7 @@ const getList = async () => {
} catch (error) {
showToast({
title: error.msg,
icon: "none",
icon: 'none',
});
}
getTj();
@@ -110,7 +110,7 @@ const tabChange = (index: number) => {
};
useReachBottom(() => {
console.log("useReachBottom");
console.log('useReachBottom');
});
const openPay = (item: OrderList) => {
@@ -121,8 +121,8 @@ const openPay = (item: OrderList) => {
const errPay = () => {
isShowPay.value = false;
showToast({
title: "支付失败",
icon: "none",
title: '支付失败',
icon: 'none',
});
jfInfo.value = {};
getList();
@@ -141,15 +141,15 @@ const errPay = () => {
const closePay = () => {
isShowPay.value = false;
showToast({
title: "支付取消",
icon: "none",
title: '支付取消',
icon: 'none',
});
jfInfo.value = {};
getList();
};
const toDetail = (item: any) => {
setStorageSync("item", item);
setStorageSync('item', item);
navigateTo({
url: `/pages/users/order_list_detail/index?Id=${item.oid}&type=1`,
});
@@ -165,7 +165,7 @@ const delOrder = async (oid: string) => {
} catch (error) {
showToast({
title: error.msg,
icon: "none",
icon: 'none',
});
}
};
@@ -186,29 +186,25 @@ const delOrder = async (oid: string) => {
<view
v-for="item in tabsList"
:key="item.value"
@click="tabChange(item.value)"
>
@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">
<view class="order-card" v-for="(item, index) in orderList" :key="index">
<view class="top">
<view>{{ item.add_time.slice(0, 19).replace("T", " ") }}</view>
<view>{{ item.add_time.slice(0, 19).replace('T', ' ') }}</view>
<view style="color: red"
>{{
item.status === 0
? "待付款"
? '待付款'
: item.status === 1
? "待使用"
? '待使用'
: item.status === 2
? "已使用"
: "已失效"
? '已使用'
: '已失效'
}}
</view>
</view>
@@ -264,8 +260,7 @@ const delOrder = async (oid: string) => {
payType="wx"
@errPay="errPay"
@closePay="closePay"
:jfInfo="jfInfo"
/>
:jfInfo="jfInfo" />
</view>
</template>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "活动商品",
navigationBarTitleText: '活动商品',
});

View File

@@ -6,8 +6,7 @@
<view @click="hotGoodsDetail">
<IconFont
name="http://article.biliimg.com/bfs/article/131eda0add8662808d97ffb1191d19bf3e420647.png"
size="40"
/>
size="40" />
<view>我的订单</view>
</view>
</view>
@@ -47,8 +46,7 @@
class="good"
v-for="item in (merdata as any)"
:key="item.ID"
@click.stop="toMerDetails(item)"
>
@click.stop="toMerDetails(item)">
<image :src="(item.head_photo as string)" />
<view class="good-text-box">
<text class="good-text">{{ item.name }}</text>
@@ -58,7 +56,7 @@
userLocalNum.t,
userLocalNum.l,
Number(item.lat),
Number(item.lon)
Number(item.lon),
)
}}</text
>
@@ -69,14 +67,14 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import Taro from "@tarojs/taro";
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";
} from '../../../api/goods';
import {IconFont} from '@nutui/icons-vue-taro';
import {calculateDistance} from '@/utils';
// const list = ref<any>([]);
@@ -112,8 +110,8 @@ const userLocalNum = ref({
const get_mer_list = async () => {
Taro.getLocation({
type: "wgs84",
success: (res) => {
type: 'wgs84',
success: res => {
userLocalNum.value.l = res.longitude;
userLocalNum.value.t = res.latitude;
},
@@ -129,7 +127,7 @@ const get_mer_list = async () => {
};
const toMerDetails = (item: any) => {
Taro.setStorageSync("mer_info", item);
Taro.setStorageSync('mer_info', item);
Taro.navigateTo({
url: `/pages/mer/mer_detail/index`,
});

View File

@@ -1,5 +1,5 @@
export default definePageConfig({
navigationBarTitleText: "首页",
navigationBarTitleText: '首页',
enableShareAppMessage: true,
navigationStyle: "custom",
navigationStyle: 'custom',
});

View File

@@ -41,7 +41,11 @@
<view class="text">{{ item.name }}</view>
</view>
</view>
<navigator class="ad" url="/pages/marketing/yq/index" open-type="navigate" hover-class="none">
<navigator
class="ad"
url="/pages/marketing/yq/index"
open-type="navigate"
hover-class="none">
</navigator>
<MerList :get-user-location="getUserLocal" />
</view>
@@ -87,14 +91,13 @@ const clickSearch = () => {
searchVal.value = '';
};
Taro.useLoad(async () => {
Taro.useLoad(() => {
Taro.getPrivacySetting({
success: res => {
if (res.needAuthorization) {
Taro.requirePrivacyAuthorize({
success: res => {
success: () => {
console.log('用户同意授权');
console.log(res);
},
fail: () => {
console.log('用户拒绝授权');

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "刮奖",
navigationBarTitleText: '刮奖',
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "每日签到",
navigationBarTitleText: '每日签到',
});

View File

@@ -78,8 +78,6 @@ page {
color: #999;
text-align: center;
}
}
}
.btn {

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "商品添加/编辑",
navigationBarTitleText: '商品添加/编辑',
});

View File

@@ -1,19 +1,19 @@
<script lang="ts" setup>
import Taro from "@tarojs/taro";
import { Ref, ref } from "vue";
import Upload from "../../../components/Upload.vue";
import RichEditor from "../../../components/RichEditor.vue";
import { addGood } from "@/api/product";
import Taro from '@tarojs/taro';
import {Ref, ref} from 'vue';
import Upload from '../../../components/Upload.vue';
import RichEditor from '../../../components/RichEditor.vue';
import {addGood} from '@/api/product';
const ruleForm = ref(null) as Ref;
const basicData = ref({
name: "",
name: '',
class_id: null,
cover: [],
rotation: [],
profile: "",
details: "",
profile: '',
details: '',
stock: null,
number: null,
market_num: null,
@@ -24,20 +24,20 @@ const rules = {
name: [
{
required: true,
message: "请填写商品名称",
message: '请填写商品名称',
},
],
class_id: [
{
required: true,
message: "请选择商品分类",
message: '请选择商品分类',
},
],
cover: [
{
required: true,
message: "请上传商品封面",
validator: (value) => {
message: '请上传商品封面',
validator: value => {
return value.length > 0;
},
},
@@ -45,8 +45,8 @@ const rules = {
rotation: [
{
required: true,
message: "请上传商品轮播图",
validator: (value) => {
message: '请上传商品轮播图',
validator: value => {
return value.length > 0;
},
},
@@ -54,32 +54,32 @@ const rules = {
profile: [
{
required: true,
message: "请填写商品名称",
message: '请填写商品名称',
},
],
stock: [
{
required: true,
message: "请填写商品库存",
message: '请填写商品库存',
},
],
number: [
{
required: true,
message: "请填写商品价格",
message: '请填写商品价格',
},
],
market_num: [
{
required: true,
message: "请填写商品市场价",
message: '请填写商品市场价',
},
],
};
const columnsClass = ref([]);
Taro.useLoad((options) => {
Taro.useLoad(options => {
console.log(options);
});
@@ -90,11 +90,11 @@ 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);
console.log('success', basicData.value);
} else {
console.log("error submit!!", errors);
console.log('error submit!!', errors);
}
});
};
@@ -111,8 +111,7 @@ const ok = async () => {
v-model="basicData.class_id"
disabled
placeholder="请选择商品分类"
@click="openGoodClass = true"
/>
@click="openGoodClass = true" />
</nut-form-item>
<nut-form-item label="商品封面:" required prop="cover">
<Upload v-model:list="basicData.cover" />
@@ -124,20 +123,17 @@ const ok = async () => {
<nut-input
v-model="basicData.name"
placeholder="请输入商品名称"
type="text"
/>
type="text" />
</nut-form-item>
<nut-form-item label="商品价格:" required prop="number">
<nut-input
v-model="basicData.number"
placeholder="请输入商品价格"
/>
placeholder="请输入商品价格" />
</nut-form-item>
<nut-form-item label="市场价格:" required prop="market_num">
<nut-input
v-model="basicData.market_num"
placeholder="请输入市场价格"
/>
placeholder="请输入市场价格" />
</nut-form-item>
<nut-form-item label="商品库存:" required prop="stock">
<nut-input v-model="basicData.stock" placeholder="请输入商品库存" />
@@ -147,21 +143,18 @@ const ok = async () => {
class="textarea"
v-model="basicData.profile"
placeholder="请输入商品简介"
type="text"
/>
type="text" />
</nut-form-item>
<nut-form-item label="上架状态:" prop="state">
<nut-switch
v-model="basicData.state"
:active-value="1"
:inactive-value="2"
/>
:inactive-value="2" />
</nut-form-item>
<nut-form-item prop="details">
<RichEditor
:content="basicData.details"
@input="(val) => (basicData.details = val)"
/>
@input="val => (basicData.details = val)" />
</nut-form-item>
<nut-form-item prop="ok">
<nut-button block type="primary" @click="ok">提交</nut-button>
@@ -173,13 +166,11 @@ const ok = async () => {
<nut-popup
position="bottom"
v-model:visible="openGoodClass"
@close="openGoodClass = false"
>
@close="openGoodClass = false">
<nut-picker
:columns="columnsClass"
title="商品分类"
@confirm="confirmClass"
></nut-picker>
@confirm="confirmClass"></nut-picker>
</nut-popup>
</view>
</template>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "商品管理",
navigationBarTitleText: '商品管理',
});

File diff suppressed because one or more lines are too long

View File

@@ -138,4 +138,4 @@
background: transparent;
line-height: 1;
}
}
}

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "手机号登录",
navigationBarTitleText: '手机号登录',
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "我的推广",
navigationBarTitleText: '我的推广',
});

View File

@@ -5,8 +5,7 @@
class="item"
v-for="(item, index) in list"
:key="index"
@click="clickItem(item)"
>
@click="clickItem(item)">
<view class="text">
<IconFont :name="item.icon" color="red" size="30" />
<view>{{ item.label }}</view>
@@ -15,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" />
@@ -25,30 +24,30 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import { IconFont } from "@nutui/icons-vue-taro";
import Taro from "@tarojs/taro";
import { getRefereeCode } from "@/api/user";
import {ref} from 'vue';
import {IconFont} from '@nutui/icons-vue-taro';
import Taro from '@tarojs/taro';
import {getRefereeCode} from '@/api/user';
const show = ref(false);
const urlCode = ref("");
const urlCode = ref('');
const list = ref([
{
id: 1,
icon: "scan",
label: "推广名片",
icon: 'scan',
label: '推广名片',
},
{
id: 2,
icon: "date",
label: "积分明细",
icon: 'date',
label: '积分明细',
},
{
id: 3,
icon: "my2",
label: "推广用户",
icon: 'my2',
label: '推广用户',
},
]);
@@ -58,7 +57,7 @@ const clickItem = async (item: any) => {
// "token"
// )}`;
Taro.showLoading({
title: "加载中",
title: '加载中',
mask: true,
});
const res = await getRefereeCode();
@@ -67,11 +66,11 @@ const clickItem = async (item: any) => {
Taro.hideLoading();
} else if (item.id === 2) {
Taro.navigateTo({
url: "/pages/users/distribution/integral/index",
url: '/pages/users/distribution/integral/index',
});
} else {
Taro.navigateTo({
url: "/pages/users/distribution/userlist/index",
url: '/pages/users/distribution/userlist/index',
});
}
};

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "积分明细",
navigationBarTitleText: '积分明细',
});

View File

@@ -4,8 +4,7 @@
<view
class="card-list"
v-for="(item, index) in (data as any[])"
:key="index"
>
:key="index">
<view class="left">
<view>昵称{{ item.nick_name }}</view>
<view>订单号{{ item.oid }}</view>
@@ -21,8 +20,7 @@
v-model="page.PageNum"
:total-items="page.ItemCount"
:items-per-page="page.PageSize"
@change="pageChange"
/>
@change="pageChange" />
</view>
<view v-else>
<nut-empty description="暂无积分明细" />
@@ -31,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([]);
@@ -61,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>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "推广人统计",
navigationBarTitleText: '推广人统计',
});

View File

@@ -4,8 +4,7 @@
<view
class="card-list"
v-for="(item, index) in (data as any[])"
:key="index"
>
:key="index">
<view class="left">
<image :src="item.avatarUrl" />
<view class="text">
@@ -19,8 +18,7 @@
v-model="page.PageNum"
:total-items="page.ItemCount"
:items-per-page="page.PageSize"
@change="pageChange"
/>
@change="pageChange" />
</view>
<view v-else>
<nut-empty description="暂无明细"></nut-empty>
@@ -29,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();
@@ -39,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;
@@ -55,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>

View File

@@ -1,4 +1,4 @@
export default definePageConfig({
navigationBarTitleText: "登录",
navigationStyle: "custom",
navigationBarTitleText: '登录',
navigationStyle: 'custom',
});

View File

@@ -143,24 +143,25 @@ const clickText = (type: number, text: string) => {
type="primary"
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber"
>手机号一键登录</nut-button
>
>手机号一键登录
</nut-button>
<nut-button style="margin-top: 15px" @click="toPage"
>手机号登录/注册</nut-button
>
>手机号登录/注册
</nut-button>
</view>
<view class="checkbox"
><nut-checkbox v-model="val"></nut-checkbox>
<view class="checkbox">
<nut-checkbox v-model="val"></nut-checkbox>
<view class="text">
阅读并同意
<view style="color: #fa2c1a" @click.stop="clickText(1, '用户协议')">
用户协议
</view>
&<view style="color: #fa2c1a" @click.stop="clickText(2, '隐私政策')">
隐私政策 </view
>&<view
style="color: #fa2c1a"
@click.stop="clickText(3, '积分使用规则')">
&
<view style="color: #fa2c1a" @click.stop="clickText(2, '隐私政策')">
隐私政策
</view>
&
<view style="color: #fa2c1a" @click.stop="clickText(3, '积分使用规则')">
积分使用规则
</view>
</view>

View File

@@ -1,4 +1,4 @@
export default definePageConfig({
navigationBarTitleText: "我的订单",
navigationBarTitleText: '我的订单',
enablePullDownRefresh: true,
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "订单详情",
navigationBarTitleText: '订单详情',
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "后结订单",
navigationBarTitleText: '后结订单',
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "订单详情",
navigationBarTitleText: '订单详情',
});

View File

@@ -74,4 +74,4 @@
color: #333333;
font-size: 32px;
}
}
}

View File

@@ -20,8 +20,7 @@
<view class="center">
<nut-ellipsis
direction="end"
:content="itm.Goods.name"
></nut-ellipsis>
:content="itm.Goods.name"></nut-ellipsis>
<!-- <view class="title">{{ itm.Goods.name }}</view> -->
</view>
<view class="num">
@@ -46,8 +45,7 @@
<nut-cell title="挂帐时间" :desc="data.payment_time"></nut-cell>
<nut-cell
title="订单状态"
:desc="get_status_text(data.status)"
></nut-cell>
:desc="get_status_text(data.status)"></nut-cell>
<nut-cell title="下单数量" :desc="String(data.count)"></nut-cell>
<nut-cell title="订单金额" :desc="String(data.payments)"></nut-cell>
<nut-cell title="应收金额" :desc="String(data.payments)"></nut-cell>
@@ -60,9 +58,9 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import Taro from "@tarojs/taro";
import { getUserAfterOrderDetail } from "../../../../api/user";
import {ref} from 'vue';
import Taro from '@tarojs/taro';
import {getUserAfterOrderDetail} from '../../../../api/user';
const data = ref<any>({});
@@ -75,7 +73,7 @@ Taro.useLoad((e: any) => {
const get_data = async () => {
Taro.showLoading({
title: "加载中",
title: '加载中',
});
const res = await getUserAfterOrderDetail({
bid: params.value.bid,
@@ -88,26 +86,26 @@ const get_data = async () => {
const get_color = (status: number) => {
switch (status) {
case 0:
return "#FD0100";
return '#FD0100';
case 1:
return "#03A113";
return '#03A113';
case 2:
return "#FFA938";
return '#FFA938';
}
};
const get_status_text = (status: number) => {
switch (status) {
case 0:
return "未付款";
return '未付款';
case 1:
return "已付款";
return '已付款';
case 2:
return "挂帐中";
return '挂帐中';
}
};
</script>
<style lang="scss">
@import "./index.scss";
@import './index.scss';
</style>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "个人设置",
navigationBarTitleText: '个人设置',
});

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "商户入驻",
navigationBarTitleText: '商户入驻',
});

View File

@@ -1,15 +1,15 @@
<script lang="ts" setup>
import Taro from "@tarojs/taro";
import { ref } from "vue";
import { applyMer, getMerTypeList, getVerifyCode } from "@/api/user";
import Upload from "@/components/Upload.vue";
import Taro from '@tarojs/taro';
import {ref} from 'vue';
import {applyMer, getMerTypeList, getVerifyCode} from '@/api/user';
import Upload from '@/components/Upload.vue';
const visible = ref(false);
const merGooType = ref(false);
// 验证码按钮文字
const smsStr = ref("获取验证码");
const smsStr = ref('获取验证码');
// 验证码按钮是否禁用
const smsDisabled = ref(false);
@@ -34,23 +34,23 @@ const formValue = ref<{
bank_user: string;
address: string;
}>({
name: "",
userName: "",
phone: "",
mobile: "",
code: "",
classId: "",
merGooTypeStr: "",
name: '',
userName: '',
phone: '',
mobile: '',
code: '',
classId: '',
merGooTypeStr: '',
license: [],
front: [],
back: [],
head_photo: [],
img: [],
bank: "",
bank_card: "",
bank_name: "",
bank_user: "",
address: "",
bank: '',
bank_card: '',
bank_name: '',
bank_user: '',
address: '',
});
const merGooList = ref([]);
@@ -73,7 +73,7 @@ const getMerType = async () => {
} catch (e) {
Taro.showToast({
title: e.msg,
icon: "none",
icon: 'none',
});
}
};
@@ -87,22 +87,22 @@ const onOk = async () => {
front: formValue.value.front[0]?.url,
back: formValue.value.back[0]?.url,
head_photo: formValue.value.head_photo[0]?.url,
img: formValue.value.img.map((item: any) => item.url).join(","),
img: formValue.value.img.map((item: any) => item.url).join(','),
};
const res = await applyMer(data);
Taro.showToast({
title: res.msg,
icon: "none",
icon: 'none',
});
setTimeout(() => {
Taro.switchTab({
url: "/pages/index/index",
url: '/pages/index/index',
});
}, 3000);
} catch (e) {
Taro.showToast({
title: e.msg,
icon: "none",
icon: 'none',
});
}
visible.value = 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({
@@ -130,13 +130,13 @@ const getSmsCode = () => {
if (time === 0) {
clearInterval(timer);
smsDisabled.value = false;
smsStr.value = "获取验证码";
smsStr.value = '获取验证码';
}
}, 1000);
} catch (e) {
Taro.showToast({
title: e.message,
icon: "none",
icon: 'none',
});
}
}
@@ -152,12 +152,12 @@ 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);
console.log('success', formValue.value);
visible.value = true;
} else {
console.log("error submit!!", errors);
console.log('error submit!!', errors);
}
});
};
@@ -175,13 +175,11 @@ const submit = () => {
required: true,
message: '请输入商户名称',
},
]"
>
]">
<input
type="text"
v-model="formValue.name"
placeholder="请输入商户名称"
/>
placeholder="请输入商户名称" />
</nut-form-item>
<nut-form-item
required
@@ -192,13 +190,11 @@ const submit = () => {
required: true,
message: '请输入用户姓名',
},
]"
>
]">
<input
type="text"
v-model="formValue.userName"
placeholder="请输入真实姓名"
/>
placeholder="请输入真实姓名" />
</nut-form-item>
<nut-form-item
required
@@ -210,14 +206,12 @@ const submit = () => {
message: '请输入正确的电话号码',
regex: /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/,
},
]"
>
]">
<input
type="text"
:maxlength="11"
v-model="formValue.phone"
placeholder="请输入联系电话"
/>
placeholder="请输入联系电话" />
</nut-form-item>
<nut-form-item
:rules="[
@@ -229,14 +223,12 @@ const submit = () => {
]"
label="店铺号码"
prop="phone"
required
>
required>
<input
v-model="formValue.mobile"
:maxlength="11"
placeholder="请输入店铺号码"
type="text"
/>
type="text" />
</nut-form-item>
<nut-form-item
required
@@ -247,15 +239,13 @@ const submit = () => {
required: true,
message: '请输入验证码',
},
]"
>
]">
<view class="yanCode">
<input
type="text"
:maxlength="6"
v-model="formValue.code"
placeholder="请输入验证码"
/>
placeholder="请输入验证码" />
<nut-button
style="width: 100px; padding: 3px"
plain
@@ -263,8 +253,7 @@ const submit = () => {
size="mini"
:disabled="smsDisabled"
round
@click="getSmsCode"
>
@click="getSmsCode">
{{ smsStr }}
</nut-button>
</view>
@@ -278,13 +267,11 @@ const submit = () => {
required: true,
message: '请输入店铺详细地址',
},
]"
>
]">
<input
type="text"
v-model="formValue.address"
placeholder="请输入店铺详细地址"
/>
placeholder="请输入店铺详细地址" />
</nut-form-item>
<nut-form-item
required
@@ -295,13 +282,11 @@ const submit = () => {
required: true,
message: '请输入法人',
},
]"
>
]">
<input
type="text"
v-model="formValue.bank_user"
placeholder="请输入法人"
/>
placeholder="请输入法人" />
</nut-form-item>
<nut-form-item
required
@@ -312,13 +297,11 @@ const submit = () => {
required: true,
message: '请输入账户名称',
},
]"
>
]">
<input
type="text"
v-model="formValue.bank_name"
placeholder="请输入账户名称"
/>
placeholder="请输入账户名称" />
</nut-form-item>
<nut-form-item
required
@@ -329,13 +312,11 @@ const submit = () => {
required: true,
message: '请输入银行名称',
},
]"
>
]">
<input
type="text"
v-model="formValue.bank"
placeholder="请输入银行名称"
/>
placeholder="请输入银行名称" />
</nut-form-item>
<nut-form-item
required
@@ -346,13 +327,11 @@ const submit = () => {
required: true,
message: '请输入银行卡号',
},
]"
>
]">
<input
type="text"
v-model="formValue.bank_card"
placeholder="请输入银行卡号"
/>
placeholder="请输入银行卡号" />
</nut-form-item>
<nut-form-item
required
@@ -363,27 +342,23 @@ const submit = () => {
required: true,
message: '请选择经营类目',
},
]"
>
]">
<input
type="text"
:disabled="true"
v-model="formValue.merGooTypeStr"
placeholder="请选择经营类目"
@click="merGooType = true"
/>
@click="merGooType = true" />
<nut-popup
position="bottom"
v-model:visible="merGooType"
:safe-area-inset-bottom="true"
:catch-move="true"
>
:catch-move="true">
<nut-picker
v-model:columns="merGooList"
title="商户类型"
@confirm="confirmGooType"
@cancel="merGooType = false"
></nut-picker>
@cancel="merGooType = false"></nut-picker>
</nut-popup>
</nut-form-item>
<nut-form-item
@@ -394,12 +369,11 @@ const submit = () => {
{
required: true,
message: '请上传营业执照',
validator: (value) => {
validator: value => {
return value.length > 0;
},
},
]"
>
]">
<Upload v-model:list="formValue.license" />
</nut-form-item>
<nut-form-item
@@ -410,12 +384,11 @@ const submit = () => {
{
required: true,
message: '法人身份证(正面)',
validator: (value) => {
validator: value => {
return value.length > 0;
},
},
]"
>
]">
<Upload v-model:list="formValue.front" />
</nut-form-item>
<nut-form-item
@@ -426,12 +399,11 @@ const submit = () => {
{
required: true,
message: '法人身份证(反面)',
validator: (value) => {
validator: value => {
return value.length > 0;
},
},
]"
>
]">
<Upload v-model:list="formValue.back" />
</nut-form-item>
<nut-form-item
@@ -442,12 +414,11 @@ const submit = () => {
{
required: true,
message: '请上传门头照',
validator: (value) => {
validator: value => {
return value.length > 0;
},
},
]"
>
]">
<Upload v-model:list="formValue.head_photo" />
</nut-form-item>
<nut-form-item
@@ -458,12 +429,11 @@ const submit = () => {
{
required: true,
message: '请上传店内照至少3张',
validator: (value) => {
validator: value => {
return value.length >= 3;
},
},
]"
>
]">
<Upload v-model:list="formValue.img" :max="5" multiple />
</nut-form-item>
@@ -479,8 +449,7 @@ const submit = () => {
title="入驻协议"
ok-text="已阅读并且同意"
v-model:visible="visible"
@ok="onOk"
>
@ok="onOk">
<view>入驻协议</view>
</nut-dialog>
</view>
@@ -488,7 +457,7 @@ const submit = () => {
<style lang="scss">
page {
background-image: url("~@/static/merchantBg.jpg");
background-image: url('~@/static/merchantBg.jpg');
background-size: 100%;
background-color: #e93423;
background-repeat: no-repeat;

View File

@@ -3,13 +3,13 @@
</template>
<script setup lang="ts">
import Taro from "@tarojs/taro";
import { ref } from "vue";
import { getAgreement } from "../../../api/user";
import Taro from '@tarojs/taro';
import {ref} from 'vue';
import {getAgreement} from '../../../api/user';
const nodes = ref(``);
Taro.useLoad((e) => {
Taro.useLoad(e => {
Taro.setNavigationBarTitle({
title: e.name,
});
@@ -19,13 +19,13 @@ Taro.useLoad((e) => {
const get_data = async (type: string) => {
const res = await getAgreement();
switch (type) {
case "1":
case '1':
nodes.value = res.data.data.user;
break;
case "2":
case '2':
nodes.value = res.data.data.policy;
break;
case "3":
case '3':
nodes.value = res.data.data.integral;
break;
}
@@ -33,5 +33,5 @@ const get_data = async (type: string) => {
</script>
<style lang="scss">
@import "./index.scss";
@import './index.scss';
</style>

View File

@@ -1,3 +1,3 @@
export default definePageConfig({
navigationBarTitleText: "个人资料",
navigationBarTitleText: '个人资料',
});

View File

@@ -1,15 +1,15 @@
@font-face {
font-family: "iconfont"; /* Project id 4211210 */
src: url("https://at.alicdn.com/t/c/font_4211210_2x20brbrv94.woff2?t=1692081500100")
format("woff2"),
url("https://at.alicdn.com/t/c/font_4211210_2x20brbrv94.woff?t=1692081500100")
format("woff"),
url("https://at.alicdn.com/t/c/font_4211210_2x20brbrv94.ttf?t=1692081500100")
format("truetype");
font-family: 'iconfont'; /* Project id 4211210 */
src: url('https://at.alicdn.com/t/c/font_4211210_2x20brbrv94.woff2?t=1692081500100')
format('woff2'),
url('https://at.alicdn.com/t/c/font_4211210_2x20brbrv94.woff?t=1692081500100')
format('woff'),
url('https://at.alicdn.com/t/c/font_4211210_2x20brbrv94.ttf?t=1692081500100')
format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-family: 'iconfont' !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
@@ -17,125 +17,125 @@
}
.icon-H:before {
content: "\e609";
content: '\e609';
}
.icon-indent:before {
content: "\e618";
content: '\e618';
}
.icon-outdent:before {
content: "\e620";
content: '\e620';
}
.icon-image:before {
content: "\e63f";
content: '\e63f';
}
.icon-shanchu:before {
content: "\e74b";
content: '\e74b';
}
.icon-formatheader1:before {
content: "\e860";
content: '\e860';
}
.icon-zitishangbiao:before {
content: "\e65c";
content: '\e65c';
}
.icon-zitixiabiao:before {
content: "\e65d";
content: '\e65d';
}
.icon-direction-rtl:before {
content: "\e6de";
content: '\e6de';
}
.icon-fengexian:before {
content: "\e62d";
content: '\e62d';
}
.icon-clearformat:before {
content: "\e60b";
content: '\e60b';
}
.icon-redo:before {
content: "\e627";
content: '\e627';
}
.icon-undo:before {
content: "\e633";
content: '\e633';
}
.icon-font:before {
content: "\eae6";
content: '\eae6';
}
.icon-font-colors:before {
content: "\e7f7";
content: '\e7f7';
}
.icon-font-size:before {
content: "\e7f8";
content: '\e7f8';
}
.icon-Character-Spacing:before {
content: "\e964";
content: '\e964';
}
.icon-duanhouju:before {
content: "\e61a";
content: '\e61a';
}
.icon-duanqianju:before {
content: "\e61b";
content: '\e61b';
}
.icon-line-height:before {
content: "\e7c4";
content: '\e7c4';
}
.icon-juzhongduiqi:before {
content: "\e621";
content: '\e621';
}
.icon-wuxupailie:before {
content: "\e63e";
content: '\e63e';
}
.icon-youduiqi:before {
content: "\e64b";
content: '\e64b';
}
.icon-youxupailie:before {
content: "\e64c";
content: '\e64c';
}
.icon-zitijiacu:before {
content: "\e656";
content: '\e656';
}
.icon-zitishanchuxian:before {
content: "\e657";
content: '\e657';
}
.icon-zitixiahuaxian:before {
content: "\e658";
content: '\e658';
}
.icon-zitixieti:before {
content: "\e659";
content: '\e659';
}
.icon-zuoyouduiqi:before {
content: "\e65a";
content: '\e65a';
}
.icon-zuoduiqi:before {
content: "\e65b";
content: '\e65b';
}
.icon-fontbgcolor-copy:before {
content: "\eae7";
content: '\eae7';
}

File diff suppressed because it is too large Load Diff

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