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,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: '个人资料',
});