This commit is contained in:
5
.idea/.gitignore
generated
vendored
5
.idea/.gitignore
generated
vendored
@@ -1,5 +0,0 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
57
.idea/codeStyles/Project.xml
generated
57
.idea/codeStyles/Project.xml
generated
@@ -1,57 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<HTMLCodeStyleSettings>
|
||||
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
|
||||
</HTMLCodeStyleSettings>
|
||||
<JSCodeStyleSettings version="0">
|
||||
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
||||
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
||||
<option name="USE_DOUBLE_QUOTES" value="false" />
|
||||
<option name="FORCE_QUOTE_STYlE" value="true" />
|
||||
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
||||
<option name="SPACES_WITHIN_OBJECT_TYPE_BRACES" value="false" />
|
||||
</JSCodeStyleSettings>
|
||||
<TypeScriptCodeStyleSettings version="0">
|
||||
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
||||
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
||||
<option name="USE_DOUBLE_QUOTES" value="false" />
|
||||
<option name="FORCE_QUOTE_STYlE" value="true" />
|
||||
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
||||
<option name="SPACES_WITHIN_OBJECT_TYPE_BRACES" value="false" />
|
||||
</TypeScriptCodeStyleSettings>
|
||||
<VueCodeStyleSettings>
|
||||
<option name="INTERPOLATION_NEW_LINE_AFTER_START_DELIMITER" value="false" />
|
||||
<option name="INTERPOLATION_NEW_LINE_BEFORE_END_DELIMITER" value="false" />
|
||||
</VueCodeStyleSettings>
|
||||
<codeStyleSettings language="HTML">
|
||||
<option name="SOFT_MARGINS" value="80" />
|
||||
<indentOptions>
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="JavaScript">
|
||||
<option name="SOFT_MARGINS" value="80" />
|
||||
<indentOptions>
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="TypeScript">
|
||||
<option name="SOFT_MARGINS" value="80" />
|
||||
<indentOptions>
|
||||
<option name="INDENT_SIZE" value="2" />
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||
<option name="TAB_SIZE" value="2" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
<codeStyleSettings language="Vue">
|
||||
<option name="SOFT_MARGINS" value="80" />
|
||||
<indentOptions>
|
||||
<option name="CONTINUATION_INDENT_SIZE" value="2" />
|
||||
</indentOptions>
|
||||
</codeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
||||
5
.idea/codeStyles/codeStyleConfig.xml
generated
5
.idea/codeStyles/codeStyleConfig.xml
generated
@@ -1,5 +0,0 @@
|
||||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||
</state>
|
||||
</component>
|
||||
6
.idea/git_toolbox_blame.xml
generated
6
.idea/git_toolbox_blame.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxBlameSettings">
|
||||
<option name="version" value="2" />
|
||||
</component>
|
||||
</project>
|
||||
7
.idea/inspectionProfiles/Project_Default.xml
generated
7
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,7 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="Stylelint" enabled="true" level="ERROR" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
12
.idea/jdt-user.iml
generated
12
.idea/jdt-user.iml
generated
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/jdt-user.iml" filepath="$PROJECT_DIR$/.idea/jdt-user.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
4
.idea/watcherTasks.xml
generated
4
.idea/watcherTasks.xml
generated
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectTasksOptions" suppressed-tasks="SCSS" />
|
||||
</project>
|
||||
98
components.d.ts
vendored
98
components.d.ts
vendored
@@ -1,59 +1,57 @@
|
||||
// generated by unplugin-vue-components
|
||||
// We suggest you to commit this file into source control
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core';
|
||||
import '@vue/runtime-core'
|
||||
|
||||
export {};
|
||||
export {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
Auth: typeof import('./src/components/Auth.vue')['default'];
|
||||
Back: typeof import('./src/components/Back.vue')['default'];
|
||||
Cart: typeof import('./src/components/Cart.vue')['default'];
|
||||
MerList: typeof import('./src/components/MerList.vue')['default'];
|
||||
NutAvatar: typeof import('@nutui/nutui-taro')['Avatar'];
|
||||
NutBacktop: typeof import('@nutui/nutui-taro')['Backtop'];
|
||||
NutButton: typeof import('@nutui/nutui-taro')['Button'];
|
||||
NutCalendar: typeof import('@nutui/nutui-taro')['Calendar'];
|
||||
NutCell: typeof import('@nutui/nutui-taro')['Cell'];
|
||||
NutCellGroup: typeof import('@nutui/nutui-taro')['CellGroup'];
|
||||
NutCheckbox: typeof import('@nutui/nutui-taro')['Checkbox'];
|
||||
NutCheckboxGroup: typeof import('@nutui/nutui-taro')['CheckboxGroup'];
|
||||
NutDialog: typeof import('@nutui/nutui-taro')['Dialog'];
|
||||
NutEllipsis: typeof import('@nutui/nutui-taro')['Ellipsis'];
|
||||
NutEmpty: typeof import('@nutui/nutui-taro')['Empty'];
|
||||
NutForm: typeof import('@nutui/nutui-taro')['Form'];
|
||||
NutFormItem: typeof import('@nutui/nutui-taro')['FormItem'];
|
||||
NutGrid: typeof import('@nutui/nutui-taro')['Grid'];
|
||||
NutGridItem: typeof import('@nutui/nutui-taro')['GridItem'];
|
||||
NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview'];
|
||||
NutInput: typeof import('@nutui/nutui-taro')['Input'];
|
||||
NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber'];
|
||||
NutNumberKeyboard: typeof import('@nutui/nutui-taro')['NumberKeyboard'];
|
||||
NutOverlay: typeof import('@nutui/nutui-taro')['Overlay'];
|
||||
NutPagination: typeof import('@nutui/nutui-taro')['Pagination'];
|
||||
NutPicker: typeof import('@nutui/nutui-taro')['Picker'];
|
||||
NutPopover: typeof import('@nutui/nutui-taro')['Popover'];
|
||||
NutPopup: typeof import('@nutui/nutui-taro')['Popup'];
|
||||
NutPrice: typeof import('@nutui/nutui-taro')['Price'];
|
||||
NutRadio: typeof import('@nutui/nutui-taro')['Radio'];
|
||||
NutRadioGroup: typeof import('@nutui/nutui-taro')['RadioGroup'];
|
||||
NutRate: typeof import('@nutui/nutui-taro')['Rate'];
|
||||
NutShortPassword: typeof import('@nutui/nutui-taro')['ShortPassword'];
|
||||
NutSwiper: typeof import('@nutui/nutui-taro')['Swiper'];
|
||||
NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem'];
|
||||
NutSwitch: typeof import('@nutui/nutui-taro')['Switch'];
|
||||
NutTable: typeof import('@nutui/nutui-taro')['Table'];
|
||||
NutTabPane: typeof import('@nutui/nutui-taro')['TabPane'];
|
||||
NutTabs: typeof import('@nutui/nutui-taro')['Tabs'];
|
||||
NutTextarea: typeof import('@nutui/nutui-taro')['Textarea'];
|
||||
NutUploader: typeof import('@nutui/nutui-taro')['Uploader'];
|
||||
Pay: typeof import('./src/components/Pay.vue')['default'];
|
||||
Popup: typeof import('./src/components/Popup.vue')['default'];
|
||||
RichEditor: typeof import('./src/components/RichEditor.vue')['default'];
|
||||
StoreList: typeof import('./src/components/StoreList.vue')['default'];
|
||||
Ucharts: typeof import('./src/components/Ucharts.vue')['default'];
|
||||
Upload: typeof import('./src/components/Upload.vue')['default'];
|
||||
UserModal: typeof import('./src/components/UserModal.vue')['default'];
|
||||
Auth: typeof import('./src/components/Auth.vue')['default']
|
||||
Back: typeof import('./src/components/Back.vue')['default']
|
||||
Cart: typeof import('./src/components/Cart.vue')['default']
|
||||
MerList: typeof import('./src/components/MerList.vue')['default']
|
||||
NutAvatar: typeof import('@nutui/nutui-taro')['Avatar']
|
||||
NutBacktop: typeof import('@nutui/nutui-taro')['Backtop']
|
||||
NutButton: typeof import('@nutui/nutui-taro')['Button']
|
||||
NutCalendar: typeof import('@nutui/nutui-taro')['Calendar']
|
||||
NutCell: typeof import('@nutui/nutui-taro')['Cell']
|
||||
NutCellGroup: typeof import('@nutui/nutui-taro')['CellGroup']
|
||||
NutCheckbox: typeof import('@nutui/nutui-taro')['Checkbox']
|
||||
NutCheckboxGroup: typeof import('@nutui/nutui-taro')['CheckboxGroup']
|
||||
NutDialog: typeof import('@nutui/nutui-taro')['Dialog']
|
||||
NutEllipsis: typeof import('@nutui/nutui-taro')['Ellipsis']
|
||||
NutEmpty: typeof import('@nutui/nutui-taro')['Empty']
|
||||
NutForm: typeof import('@nutui/nutui-taro')['Form']
|
||||
NutFormItem: typeof import('@nutui/nutui-taro')['FormItem']
|
||||
NutGrid: typeof import('@nutui/nutui-taro')['Grid']
|
||||
NutGridItem: typeof import('@nutui/nutui-taro')['GridItem']
|
||||
NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview']
|
||||
NutInput: typeof import('@nutui/nutui-taro')['Input']
|
||||
NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber']
|
||||
NutOverlay: typeof import('@nutui/nutui-taro')['Overlay']
|
||||
NutPagination: typeof import('@nutui/nutui-taro')['Pagination']
|
||||
NutPicker: typeof import('@nutui/nutui-taro')['Picker']
|
||||
NutPopover: typeof import('@nutui/nutui-taro')['Popover']
|
||||
NutPopup: typeof import('@nutui/nutui-taro')['Popup']
|
||||
NutPrice: typeof import('@nutui/nutui-taro')['Price']
|
||||
NutRadio: typeof import('@nutui/nutui-taro')['Radio']
|
||||
NutRadioGroup: typeof import('@nutui/nutui-taro')['RadioGroup']
|
||||
NutRate: typeof import('@nutui/nutui-taro')['Rate']
|
||||
NutSwiper: typeof import('@nutui/nutui-taro')['Swiper']
|
||||
NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem']
|
||||
NutSwitch: typeof import('@nutui/nutui-taro')['Switch']
|
||||
NutTable: typeof import('@nutui/nutui-taro')['Table']
|
||||
NutTabPane: typeof import('@nutui/nutui-taro')['TabPane']
|
||||
NutTabs: typeof import('@nutui/nutui-taro')['Tabs']
|
||||
NutTextarea: typeof import('@nutui/nutui-taro')['Textarea']
|
||||
NutUploader: typeof import('@nutui/nutui-taro')['Uploader']
|
||||
Pay: typeof import('./src/components/Pay.vue')['default']
|
||||
Popup: typeof import('./src/components/Popup.vue')['default']
|
||||
RichEditor: typeof import('./src/components/RichEditor.vue')['default']
|
||||
StoreList: typeof import('./src/components/StoreList.vue')['default']
|
||||
Ucharts: typeof import('./src/components/Ucharts.vue')['default']
|
||||
Upload: typeof import('./src/components/Upload.vue')['default']
|
||||
UserModal: typeof import('./src/components/UserModal.vue')['default']
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ const config = {
|
||||
375: 2,
|
||||
},
|
||||
sourceRoot: 'src',
|
||||
outputRoot: 'dist',
|
||||
outputRoot: `dist/${process.env.TARO_ENV}`,
|
||||
plugins: ['@tarojs/plugin-html', ['@tarojs/plugin-mini-ci', CIPluginOptFn]],
|
||||
defineConstants: {},
|
||||
copy: {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"miniprogramRoot": "./dist",
|
||||
"projectname": "taroApp",
|
||||
"projectname": "捷兑通",
|
||||
"description": "",
|
||||
"setting": {
|
||||
"urlCheck": true,
|
||||
"es6": false,
|
||||
"enhance": false,
|
||||
"es6": true,
|
||||
"enhance": true,
|
||||
"compileHotReLoad": false,
|
||||
"postcss": false,
|
||||
"minified": false
|
||||
"postcss": true,
|
||||
"minified": true
|
||||
},
|
||||
"compileType": "miniprogram"
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {addCart, getCart, clearCart} from '@/api/cart';
|
||||
import {Plus, Minus} from '@nutui/icons-vue-taro';
|
||||
import {createActiveOrder} from '@/api/goods';
|
||||
import {createAfterOrder, getUserPoint} from '@/api/admin';
|
||||
import { addCart, getCart, clearCart } from '@/api/cart';
|
||||
import { Plus, Minus } from '@nutui/icons-vue-taro';
|
||||
import { createActiveOrder } from '@/api/goods';
|
||||
import { createAfterOrder, getUserPoint } from '@/api/admin';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
|
||||
interface CardList {
|
||||
@@ -13,6 +13,7 @@ interface CardList {
|
||||
bid: string;
|
||||
gid: string;
|
||||
number: string;
|
||||
discount_price: string;
|
||||
price: number;
|
||||
exchange: number;
|
||||
discount_integral: number;
|
||||
@@ -77,6 +78,7 @@ const card_list = ref<CardList[]>([]);
|
||||
const cartInfo = ref({
|
||||
count: 0,
|
||||
price: 0,
|
||||
discount_price: 0,
|
||||
exchange: 0,
|
||||
discount_integral: 0,
|
||||
});
|
||||
@@ -86,17 +88,17 @@ const get_cart_list = async (bid: string = props.merInfo.bid) => {
|
||||
const res = await getCart({
|
||||
Bid: bid,
|
||||
});
|
||||
|
||||
card_list.value = res.data.data || [];
|
||||
cartInfo.value = {
|
||||
count: 0,
|
||||
price: 0,
|
||||
discount_price: 0,
|
||||
exchange: 0,
|
||||
discount_integral: 0,
|
||||
};
|
||||
card_list.value.forEach((item: CardList) => {
|
||||
cartInfo.value.count += Number(item.number);
|
||||
cartInfo.value.price += Number(item.price);
|
||||
cartInfo.value.discount_price += Number(item.price);
|
||||
cartInfo.value.exchange += Number(item.exchange);
|
||||
cartInfo.value.discount_integral += Number(item.discount_integral);
|
||||
});
|
||||
@@ -199,39 +201,28 @@ defineExpose({
|
||||
<view class="container flex items-center">
|
||||
<!-- <view>购物车数量: {{ cartInfo.count }}</view> -->
|
||||
<view class="cardImg">
|
||||
<image
|
||||
src="http://p1.meituan.net/csc/929f447a96a44b09a09b2e0055433222717.png">
|
||||
<image src="http://p1.meituan.net/csc/929f447a96a44b09a09b2e0055433222717.png">
|
||||
</image>
|
||||
<view class="count-text" v-if="cartInfo.count > 0">
|
||||
<text>{{ cartInfo.count }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ml-1 text-[25px]">
|
||||
<text>总金额: {{ cartInfo.price.toFixed(2) }}元</text>
|
||||
<text v-if="!IsPendingOrder"
|
||||
>,积分抵扣: {{ cartInfo.discount_integral.toFixed(2) }}
|
||||
<text>总金额: {{ cartInfo.discount_price.toFixed(2) }}元</text>
|
||||
<text v-if="!IsPendingOrder">,积分抵扣: {{ cartInfo.discount_integral.toFixed(2) }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="cartInfo.count > 0" class="payBtn" @click.stop="create_order"
|
||||
>去结算
|
||||
<view v-if="cartInfo.count > 0" class="payBtn" @click.stop="create_order">去结算
|
||||
</view>
|
||||
</view>
|
||||
<!-- 购物车弹窗 -->
|
||||
<nut-popup
|
||||
:style="{padding: '15px'}"
|
||||
round
|
||||
position="bottom"
|
||||
z-index="1"
|
||||
:catch-move="true"
|
||||
:safe-area-inset-bottom="true"
|
||||
v-model:visible="show">
|
||||
<nut-popup :style="{ padding: '15px' }" round position="bottom" z-index="1" :catch-move="true"
|
||||
:safe-area-inset-bottom="true" v-model:visible="show">
|
||||
<view class="list-header">
|
||||
<view class="left" @click.stop="clear_cart">
|
||||
<!-- <Del2 color="#666666" /> -->
|
||||
<image
|
||||
class="w-[20px] h-[20px]"
|
||||
src="http://p0.meituan.net/csc/db4d11fd744b69435c6ffdc6bfc868c5684.png" />
|
||||
<image class="w-[20px] h-[20px]" src="http://p0.meituan.net/csc/db4d11fd744b69435c6ffdc6bfc868c5684.png" />
|
||||
<text class="text-[20px]" style="color: #666666">清空购物车</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -248,11 +239,7 @@ defineExpose({
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<nut-input-number
|
||||
v-model="item.number"
|
||||
readonly
|
||||
:min="-1"
|
||||
@add="() => onAdd(item)"
|
||||
<nut-input-number v-model="item.number" readonly :min="-1" @add="() => onAdd(item)"
|
||||
@reduce="() => onReduce(item)">
|
||||
<template #left-icon>
|
||||
<view class="btn" @click.stop="onReduce(item)">
|
||||
@@ -270,11 +257,7 @@ defineExpose({
|
||||
<view style="height: 140px"></view>
|
||||
</nut-popup>
|
||||
<!-- 支付 -->
|
||||
<Pay
|
||||
:is-show-pay="isShowPay"
|
||||
v-model:jfInfo="orderData"
|
||||
@closePay="closePay"
|
||||
@successPay="closePay" />
|
||||
<Pay :is-show-pay="isShowPay" v-model:jfInfo="orderData" @closePay="closePay" @successPay="closePay" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -2,19 +2,9 @@
|
||||
<view>
|
||||
<!-- 商品列表 -->
|
||||
<view class="good-class" v-if="class_list.length > 0">
|
||||
<nut-tabs
|
||||
v-model="value"
|
||||
title-scroll
|
||||
size="large"
|
||||
direction="vertical"
|
||||
title-gutter="5"
|
||||
animated-time="0"
|
||||
<nut-tabs v-model="value" title-scroll size="large" direction="vertical" title-gutter="5" animated-time="0"
|
||||
name="tabName">
|
||||
<nut-tab-pane
|
||||
v-for="(itm, index) in good_list"
|
||||
:key="index"
|
||||
:title="itm.name"
|
||||
:pane-key="index">
|
||||
<nut-tab-pane v-for="(itm, index) in good_list" :key="index" :title="itm.name" :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)">
|
||||
@@ -27,16 +17,13 @@
|
||||
<view class="price">
|
||||
<text style="font-size: 15px">{{ item.number }}元</text>
|
||||
</view>
|
||||
<view class="price">
|
||||
<!-- <view class="price">
|
||||
<text style="font-size: 15px"
|
||||
>{{ item.exchange }}积分</text
|
||||
>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<nut-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click.stop="add_cart(item)">
|
||||
<nut-button size="mini" type="primary" @click.stop="add_cart(item)">
|
||||
<template #icon>
|
||||
<Cart2 />
|
||||
</template>
|
||||
@@ -53,20 +40,16 @@
|
||||
</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 { Ref, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import Cart from '../../../../components/Cart.vue';
|
||||
import {Cart2} from '@nutui/icons-vue-taro';
|
||||
import {getGoodList, getMerCategory} from '../../../../api/goods';
|
||||
import { Cart2 } from '@nutui/icons-vue-taro';
|
||||
import { getGoodList, getMerCategory } from '../../../../api/goods';
|
||||
|
||||
interface goodList {
|
||||
ID: number;
|
||||
|
||||
@@ -5,30 +5,26 @@
|
||||
<nut-cell>
|
||||
<template #default>
|
||||
<view class="center-box">
|
||||
<view
|
||||
class="top"
|
||||
v-for="(item, index) in info.OrderGoods"
|
||||
:key="index">
|
||||
<view class="top" v-for="(item, index) in info.OrderGoods" :key="index">
|
||||
<image class="mr-10" :src="item.Goods?.cover" />
|
||||
<view class="flex-1">
|
||||
<view class="title">{{ item.Goods?.name }}</view>
|
||||
<view class="text-[#F83D3D] mt-5">
|
||||
<view>{{ item.pay_price }}元</view>
|
||||
<view>{{ item.pay_integral }}积分</view>
|
||||
<view>{{ item.pay_price }}元
|
||||
<text v-if="item.pay_integral > 0">+{{ item.pay_integral }}积分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view>x{{ item.number }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex justify-between items-center mt-2 mb-2 text-[25px]">
|
||||
<view class="flex justify-between items-center mt-2 mb-2 text-[25px]">
|
||||
<view class="text-[#9C9C9C]">{{ `共${info.count}件商品` }}</view>
|
||||
<view
|
||||
>{{ info.status !== 0 ? '实' : '应' }}付款{{
|
||||
info.pay_type === 1 ? '(元): ' : '(积分): '
|
||||
}}{{ info.pay_type === 1 ? info.price : info.exchange }}</view
|
||||
>
|
||||
<text class="text-[26px] flex-1 text-right">{{ info.status !== 0 ? '实' : '应' }}付款:
|
||||
{{ info.discount_price }} (元)
|
||||
<text v-if="info.exchange > 0">积分抵扣: {{ info.exchange }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -36,10 +32,7 @@
|
||||
</nut-cell-group>
|
||||
<nut-cell-group>
|
||||
<nut-cell title="订单号:" :desc="info.oid"></nut-cell>
|
||||
<nut-cell
|
||||
title="订单状态:"
|
||||
:desc="
|
||||
info.status === 0
|
||||
<nut-cell title="订单状态:" :desc="info.status === 0
|
||||
? '待付款'
|
||||
: info.status === 1
|
||||
? '待使用'
|
||||
@@ -51,25 +44,16 @@
|
||||
<nut-cell title="下单用户:" :desc="info.User?.nickName"></nut-cell>
|
||||
<nut-cell title="用户手机号:" :desc="info.User?.phone"></nut-cell>
|
||||
<nut-cell title="下单时间:" :desc="info.add_time"></nut-cell>
|
||||
<nut-cell
|
||||
v-if="info.status === 2"
|
||||
title="核销时间:"
|
||||
:desc="info.cancel_time"></nut-cell>
|
||||
<nut-cell
|
||||
v-if="info.status === 2"
|
||||
title="核销人员:"
|
||||
:desc="info.CancelUser?.nickName"></nut-cell>
|
||||
<nut-cell
|
||||
v-if="info.status === 2"
|
||||
title="核销人手机号:"
|
||||
:desc="info.CancelUser?.phone"></nut-cell>
|
||||
<nut-cell v-if="info.status === 2" title="核销时间:" :desc="info.cancel_time"></nut-cell>
|
||||
<nut-cell v-if="info.status === 2" title="核销人员:" :desc="info.CancelUser?.nickName"></nut-cell>
|
||||
<nut-cell v-if="info.status === 2" title="核销人手机号:" :desc="info.CancelUser?.phone"></nut-cell>
|
||||
</nut-cell-group>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const info = ref<any>({});
|
||||
|
||||
|
||||
@@ -1,34 +1,20 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="tabs-1">
|
||||
<view
|
||||
class="item"
|
||||
v-for="(item, index) in opt"
|
||||
:key="index"
|
||||
@click="tabChange(item.value)">
|
||||
<view
|
||||
:style="{
|
||||
<view class="item" v-for="(item, index) in opt" :key="index" @click="tabChange(item.value)">
|
||||
<view :style="{
|
||||
color: item.value === tabVal ? '#333333' : '#9C9C9C',
|
||||
}"
|
||||
>{{ item.text }}</view
|
||||
>
|
||||
<view
|
||||
class="line"
|
||||
:style="{
|
||||
}">{{ item.text }}</view>
|
||||
<view class="line" :style="{
|
||||
backgroundColor: item.value === tabVal ? '#FFD940' : '',
|
||||
}"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="dataList.length > 0">
|
||||
<view
|
||||
class="order-card"
|
||||
v-for="(item, index) in dataList"
|
||||
:key="index"
|
||||
@click="toDetailPage(item)">
|
||||
<view class="order-card" v-for="(item, index) in dataList" :key="index" @click="toDetailPage(item)">
|
||||
<view class="top">
|
||||
<view class="text-[#9C9C9C] text-[25px]">订单号:{{ item.oid }}</view>
|
||||
<view
|
||||
:style="{
|
||||
<view :style="{
|
||||
color:
|
||||
item.status === 0
|
||||
? '#FF850A'
|
||||
@@ -37,8 +23,7 @@
|
||||
: item.status === 2
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
}"
|
||||
>{{
|
||||
}">{{
|
||||
item.status === 0
|
||||
? '待付款'
|
||||
: item.status === 1
|
||||
@@ -56,8 +41,9 @@
|
||||
<view class="flex-1">
|
||||
<view class="title">{{ itm.Goods?.name }}</view>
|
||||
<view class="text-[#F83D3D] mt-5">
|
||||
<view>{{ itm.pay_price }}元</view>
|
||||
<view>{{ itm.pay_integral }}积分</view>
|
||||
<view>{{ itm.pay_price }}元
|
||||
<text v-if="itm.pay_integral > 0">+{{ itm.pay_integral }}积分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
@@ -65,15 +51,12 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex justify-between items-center mt-2 mb-2 text-[25px]"
|
||||
v-if="item.status !== 0">
|
||||
<view class="flex justify-between items-center mt-2 mb-2 text-[25px]" v-if="item.status !== 0">
|
||||
<text class="text-[#9C9C9C]">共{{ item.count }}件商品</text>
|
||||
<view
|
||||
>{{ item.status !== 0 ? '实' : '应' }}付款{{
|
||||
item.pay_type === 1 ? '(元): ' : '(积分): '
|
||||
}}{{ item.pay_type === 1 ? item.price : item.exchange }}</view
|
||||
>
|
||||
<text class="text-[26px] flex-1 text-right">{{ item.status !== 0 ? '实' : '应' }}付款:
|
||||
{{ item.discount_price }} (元)
|
||||
<text v-if="item.exchange > 0">积分抵扣: {{ item.exchange }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -82,9 +65,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getActiveOrderList} from '../../../../api/admin';
|
||||
import { getActiveOrderList } from '../../../../api/admin';
|
||||
|
||||
const opt = ref([
|
||||
{
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
<view class="card">
|
||||
<view class="text-[#7A7A7A]">订单号:{{ goodInfo.oid }}</view>
|
||||
<view class="line"></view>
|
||||
<view
|
||||
class="container"
|
||||
v-for="(item, index) in goodInfo.OrderGoods"
|
||||
:key="index">
|
||||
<view class="container" v-for="(item, index) in goodInfo.OrderGoods" :key="index">
|
||||
<image class="image" :src="item.Goods.cover"></image>
|
||||
<view class="info">
|
||||
<view class="title">{{ item.Goods.name }}</view>
|
||||
@@ -17,19 +14,12 @@
|
||||
<view class="text-[#9C9C9C]">x{{ item.number }}</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view
|
||||
class="flex justify-between items-center mt-3 mb-2 text-[25px]"
|
||||
style="text-align: right">
|
||||
<text class="text-[#9C9C9C] text-left"
|
||||
>共{{ goodInfo.count }}件商品</text
|
||||
>
|
||||
<text class="flex-1"
|
||||
>{{ goodInfo.status !== 0 ? '实' : '应' }}付款{{
|
||||
goodInfo.pay_type === 1 ? '(元): ' : '(积分): '
|
||||
}}{{
|
||||
goodInfo.pay_type === 1 ? goodInfo.price : goodInfo.exchange
|
||||
}}</text
|
||||
>
|
||||
<view class="flex justify-between items-center mt-3 mb-2 text-[25px]" style="text-align: right">
|
||||
<text class="text-[#9C9C9C] text-left">共{{ goodInfo.count }}件商品</text>
|
||||
<text class="text-[26px] flex-1">实付款:
|
||||
{{ goodInfo.discount_price }} (元)
|
||||
<text v-if="goodInfo.exchange > 0">积分抵扣: {{ goodInfo.exchange }}</text>
|
||||
</text>
|
||||
</view>
|
||||
<!-- <view class="line"></view> -->
|
||||
<!-- <view class="cz">
|
||||
@@ -40,28 +30,22 @@
|
||||
</view>
|
||||
<nut-cell-group>
|
||||
<nut-cell title="订单信息"></nut-cell>
|
||||
<nut-cell
|
||||
title="下单时间:"
|
||||
:desc="goodInfo.add_time?.slice(0, 19)"></nut-cell>
|
||||
<nut-cell title="下单时间:" :desc="goodInfo.add_time?.slice(0, 19)"></nut-cell>
|
||||
<nut-cell title="下单号码:" :desc="goodInfo.User?.phone"></nut-cell>
|
||||
<nut-cell title="下单用户:" :desc="goodInfo.User?.nickName"></nut-cell>
|
||||
<nut-cell
|
||||
title="付款方式:"
|
||||
:desc="getPayType(goodInfo.pay_type)"></nut-cell>
|
||||
<nut-cell title="付款方式:" :desc="getPayType(goodInfo.pay_type)"></nut-cell>
|
||||
</nut-cell-group>
|
||||
|
||||
<view class="w-[90%] mt-[40px] m-auto">
|
||||
<nut-button type="primary" shape="square" block @click="subVerify"
|
||||
>确定核销</nut-button
|
||||
>
|
||||
<nut-button type="primary" shape="square" block @click="subVerify">确定核销</nut-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getActiveVerifyList, activeOrderVerify} from '@/api/admin';
|
||||
import {ref} from 'vue';
|
||||
import { getActiveVerifyList, activeOrderVerify } from '@/api/admin';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const opt = ref<any>({});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {getWithdrawList, addWithdraw} from '@/api/admin';
|
||||
import { getWithdrawList, addWithdraw } from '@/api/admin';
|
||||
|
||||
const user_info = ref<any>({});
|
||||
|
||||
@@ -57,7 +57,7 @@ const getData = async () => {
|
||||
|
||||
const add = async () => {
|
||||
try {
|
||||
formRef.value?.validate().then(async ({valid}) => {
|
||||
formRef.value?.validate().then(async ({ valid }) => {
|
||||
if (valid) {
|
||||
const res = await addWithdraw({
|
||||
Bid: user_info.value.data.bid,
|
||||
@@ -79,19 +79,19 @@ const add = async () => {
|
||||
const rules = ref({
|
||||
num: [
|
||||
{
|
||||
message: '请填写提现积分',
|
||||
message: '请填写提现余额',
|
||||
validator: (value, _) => {
|
||||
return value;
|
||||
},
|
||||
},
|
||||
{
|
||||
message: '提现积分最低为100',
|
||||
message: '提现余额最低为1元',
|
||||
validator: (value, _) => {
|
||||
return Number(value) >= 100;
|
||||
return Number(value) >= 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
message: '提现积分不能大于可提现积分',
|
||||
message: '提现余额不能大于可提现余额',
|
||||
validator: (value, _) => {
|
||||
return Number(value) <= row.value;
|
||||
},
|
||||
@@ -162,17 +162,9 @@ Taro.useReachBottom(() => {
|
||||
</view>
|
||||
<nut-form ref="formRef" :model-value="basicData" :rules="rules">
|
||||
<nut-form-item prop="num">
|
||||
<nut-input
|
||||
v-model="basicData.num"
|
||||
class="nut-input-text"
|
||||
placeholder="请输入提现余额"
|
||||
type="text">
|
||||
<nut-input v-model="basicData.num" class="nut-input-text" placeholder="请输入提现余额" type="text">
|
||||
<template #right>
|
||||
<text
|
||||
class="text-[#EC4443] text-[26px]"
|
||||
@tap="basicData.num = row.toString()"
|
||||
>全部</text
|
||||
>
|
||||
<text class="text-[#EC4443] text-[26px]" @tap="basicData.num = row.toString()">全部</text>
|
||||
</template>
|
||||
</nut-input>
|
||||
</nut-form-item>
|
||||
@@ -189,67 +181,41 @@ Taro.useReachBottom(() => {
|
||||
<view class="item" v-for="(item, index) in data" :key="index">
|
||||
<view class="flex justify-between items-center">
|
||||
<view class="text-[25px] text-[#9C9C9C]">到账金额</view>
|
||||
<view
|
||||
class="text-[27px]"
|
||||
:class="
|
||||
item.status === 1
|
||||
<view class="text-[27px]" :class="item.status === 1
|
||||
? 'success'
|
||||
: item.status === 1
|
||||
? 'danger'
|
||||
: 'warning'
|
||||
"
|
||||
>{{
|
||||
">{{
|
||||
item.status === 1
|
||||
? '已打款'
|
||||
: item.status === 2
|
||||
? '已拒绝'
|
||||
: '待审核'
|
||||
}}</view
|
||||
>
|
||||
}}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="mt-3 mb-3 text-[35px]">¥{{ item.number }}</view>
|
||||
<view class="text-[25px] mb-1">提现金额:{{ item.integral }}</view>
|
||||
<view class="text-[25px] mb-1"
|
||||
>信息服务费:{{ item.commission }}</view
|
||||
>
|
||||
<view class="text-[25px] mb-1"
|
||||
>手续费:{{ item.commission_number }}%</view
|
||||
>
|
||||
<view class="text-[25px] mb-1">信息服务费:{{ item.commission }}</view>
|
||||
<view class="text-[25px] mb-1">手续费:{{ item.commission_number }}%</view>
|
||||
<view class="text-[25px] mb-1">时间:{{ item.add_time }}</view>
|
||||
<view v-if="item.status === 2" class="text-[25px] text-[#9C9C9C]"
|
||||
>备注:</view
|
||||
>
|
||||
<view
|
||||
v-if="item.status === 1"
|
||||
class="text-[23px] mt-2 text-[#df3526]"
|
||||
@click="openPreview(item)"
|
||||
>点我查看回执单</view
|
||||
>
|
||||
<view v-if="item.status === 2" class="text-[25px] text-[#9C9C9C]">备注:</view>
|
||||
<view v-if="item.status === 1" class="text-[23px] mt-2 text-[#df3526]" @click="openPreview(item)">点我查看回执单
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无提现记录"></nut-empty>
|
||||
<!-- 图片预览 -->
|
||||
<nut-image-preview
|
||||
:show="showPreview"
|
||||
:images="imgData"
|
||||
@close="closePreview" />
|
||||
<nut-image-preview :show="showPreview" :images="imgData" @close="closePreview" />
|
||||
|
||||
<nut-dialog
|
||||
title="提现疑问?"
|
||||
content="这是基础弹框。"
|
||||
ok-text="我已知晓"
|
||||
:no-cancel-btn="true"
|
||||
v-model:visible="visible1">
|
||||
<nut-dialog title="提现疑问?" content="这是基础弹框。" ok-text="我已知晓" :no-cancel-btn="true" v-model:visible="visible1">
|
||||
<template #default>
|
||||
<text>
|
||||
积分和人民币兑换比例为
|
||||
<text class="text-[#F83D3D]">100:1</text>
|
||||
平台收取<text class="text-[#F83D3D]">10%服务费</text>和<text
|
||||
class="text-[#F83D3D]"
|
||||
>0.038%手续费</text
|
||||
>
|
||||
平台收取<text class="text-[#F83D3D]">10%服务费</text>和<text class="text-[#F83D3D]">0.038%手续费</text>
|
||||
</text>
|
||||
</template>
|
||||
</nut-dialog>
|
||||
|
||||
@@ -3,16 +3,11 @@
|
||||
<view v-if="list.length > 0">
|
||||
<nut-cell-group v-for="(itm, idx) in list" :key="idx">
|
||||
<nut-cell>
|
||||
<nut-checkbox
|
||||
v-model="itm.state.checkbox"
|
||||
:indeterminate="itm.state.indeterminate"
|
||||
@change="(val: boolean) => changeBoxAll(val, idx)"
|
||||
>{{ itm.StoreName }}
|
||||
<nut-checkbox v-model="itm.state.checkbox" :indeterminate="itm.state.indeterminate"
|
||||
@change="(val: boolean) => changeBoxAll(val, idx)">{{ itm.StoreName }}
|
||||
</nut-checkbox>
|
||||
</nut-cell>
|
||||
<nut-checkbox-group
|
||||
v-model="itm.state.checkboxgroup"
|
||||
:ref="el => getGroup(el, idx)"
|
||||
<nut-checkbox-group v-model="itm.state.checkboxgroup" :ref="el => getGroup(el, idx)"
|
||||
@change="label => changeBox(label, itm)">
|
||||
<nut-cell v-for="(item, idx1) in itm.Goods" :key="idx1">
|
||||
<nut-checkbox :label="item.gid" style="width: 10%"></nut-checkbox>
|
||||
@@ -22,16 +17,13 @@
|
||||
<view class="center">
|
||||
<view>{{ item.name }}</view>
|
||||
<view class="price">
|
||||
<view>{{ item.price }} 元</view>
|
||||
<view>{{ item.exchange }} 积分</view>
|
||||
<view>{{ item.price }}元
|
||||
<text v-if="item.discount_integral > 0">+{{ item.discount_integral }}积分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<nut-input-number
|
||||
v-model="item.number"
|
||||
readonly
|
||||
:min="-1"
|
||||
@add.stop="() => onAdd(item)"
|
||||
</view>
|
||||
<nut-input-number v-model="item.number" readonly :min="-1" @add.stop="() => onAdd(item)"
|
||||
@reduce.stop="() => onReduce(item)" />
|
||||
</view>
|
||||
</nut-cell>
|
||||
@@ -50,36 +42,26 @@
|
||||
<view>
|
||||
<view class="text-box">
|
||||
总金额:
|
||||
<nut-price
|
||||
v-model:price="localCount.price"
|
||||
size="normal"
|
||||
:need-symbol="false" />
|
||||
<nut-price v-model:price="localCount.price" size="normal" :need-symbol="false" />
|
||||
</view>
|
||||
<view class="text-box">
|
||||
总积分:
|
||||
<nut-price
|
||||
v-model:price="localCount.exchange"
|
||||
size="normal"
|
||||
:need-symbol="false" />
|
||||
<nut-price v-model:price="localCount.exchange" size="normal" :need-symbol="false" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<nut-button type="primary" @click="sub">去结算</nut-button>
|
||||
</view>
|
||||
<!-- 支付 -->
|
||||
<Pay
|
||||
:is-show-pay="isShowPay"
|
||||
:interval="true"
|
||||
v-model:jfInfo="orderData"
|
||||
@closePay="closePay" />
|
||||
<Pay :is-show-pay="isShowPay" :interval="true" v-model:jfInfo="orderData" @closePay="closePay" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {nextTick, ref} from 'vue';
|
||||
import { nextTick, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {addCart, getAllCart} from '@/api/cart';
|
||||
import {createActiveOrder} from '@/api/goods';
|
||||
import { addCart, getAllCart } from '@/api/cart';
|
||||
import { createActiveOrder } from '@/api/goods';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
|
||||
interface CardList {
|
||||
@@ -90,6 +72,8 @@ interface CardList {
|
||||
number: string;
|
||||
price: number;
|
||||
exchange: number;
|
||||
pay_price: number;
|
||||
discount_integral: number;
|
||||
}
|
||||
|
||||
// const selectAllVal = ref(false);
|
||||
@@ -139,7 +123,7 @@ const changeBox = (label: string[], item: any) => {
|
||||
item.Goods.forEach((itm: any) => {
|
||||
if (itm.gid === id) {
|
||||
item['Count'].priceCount += itm.price;
|
||||
item['Count'].exchangeCount += itm.exchange;
|
||||
item['Count'].exchangeCount += itm.discount_integral;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -200,7 +184,7 @@ const sub = async () => {
|
||||
});
|
||||
return;
|
||||
}
|
||||
const {data: res} = await createActiveOrder({
|
||||
const { data: res } = await createActiveOrder({
|
||||
Bid: arr.map((item: any) => item.StoreBid),
|
||||
});
|
||||
if (res.oid) {
|
||||
|
||||
@@ -10,20 +10,14 @@
|
||||
<!-- </view>-->
|
||||
<!-- 商品信息 -->
|
||||
<view class="order-card">
|
||||
<view
|
||||
class="center mb-[20px]"
|
||||
v-for="(item, index) in orderData.OrderGoods"
|
||||
:key="index">
|
||||
<view class="center mb-[20px]" v-for="(item, index) in orderData.OrderGoods" :key="index">
|
||||
<view class="top">
|
||||
<image :src="item.Goods.cover" />
|
||||
<view class="flex flex-col justify-between flex-1">
|
||||
<view class="title">{{ item.Goods?.name }}</view>
|
||||
<view class="text-[#F83D3D] mt-5">
|
||||
<view
|
||||
>¥{{ item.pay_price }}元
|
||||
<text v-if="item.pay_integral > 0"
|
||||
>+{{ item.pay_integral }}积分</text
|
||||
>
|
||||
<view>¥{{ item.pay_price }}元
|
||||
<text v-if="item.pay_integral > 0">+{{ item.pay_integral }}积分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -33,17 +27,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="line"></view> -->
|
||||
<view
|
||||
class="flex justify-between items-center mt-2 mb-2 text-[25px]"
|
||||
style="text-align: right">
|
||||
<text class="text-[#9C9C9C] text-[28px]"
|
||||
>共{{ orderData.count }}件商品
|
||||
<view class="flex justify-between items-center mt-2 mb-2 text-[25px]" style="text-align: right">
|
||||
<text class="text-[#9C9C9C] text-[28px]">共{{ orderData.count }}件商品
|
||||
</text>
|
||||
<text class="text-[26px]"
|
||||
>应付款: ¥{{ orderData.discount_price }}元
|
||||
<text class="text-[26px]">应付款: ¥{{ orderData.discount_price }}元
|
||||
<text v-if="orderData.exchange > 0">
|
||||
积分抵扣: {{ (orderData.exchange / 100).toFixed(2) }}元</text
|
||||
>
|
||||
积分抵扣: {{ orderData.exchange }}</text>
|
||||
</text>
|
||||
<!-- <view class="line"></view> -->
|
||||
</view>
|
||||
@@ -51,14 +40,9 @@
|
||||
<!-- {{ payVal }} -->
|
||||
<nut-radio-group class="w-[95%]" v-model="payVal">
|
||||
<nut-cell-group class="w-full">
|
||||
<nut-cell class="text-[#333333]" title="选择积分抵扣"></nut-cell>
|
||||
<nut-cell
|
||||
v-for="(item, index) in payList"
|
||||
:key="index"
|
||||
class="flex items-center"
|
||||
:title="item.name"
|
||||
:desc="item.number > 0 ? `可用积分:${item.number}` : ''"
|
||||
@click="cellClick(item.ID)">
|
||||
<nut-cell class="text-[#333333]" title="支付方式"></nut-cell>
|
||||
<nut-cell v-for="(item, index) in payList" :key="index" class="flex items-center" :title="item.name"
|
||||
:desc="item.number > 0 ? `可用积分:${item.number}` : ''" @click="cellClick(item.ID)">
|
||||
<template #icon>
|
||||
<IconFont size="30" :name="item.icon" />
|
||||
</template>
|
||||
@@ -69,13 +53,7 @@
|
||||
</nut-cell-group>
|
||||
</nut-radio-group>
|
||||
<view class="w-[90%] mt-[100px]">
|
||||
<nut-button
|
||||
shape="square"
|
||||
:loading="isLoading"
|
||||
type="primary"
|
||||
block
|
||||
@click="pay"
|
||||
>确认支付
|
||||
<nut-button shape="square" :loading="isLoading" type="primary" block @click="pay">确认支付
|
||||
</nut-button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -83,11 +61,11 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {IconFont} from '@nutui/icons-vue-taro';
|
||||
import {onUnmounted, ref} from 'vue';
|
||||
import {getActiveOrderDetail, getPayList} from '@/api/goods';
|
||||
import {getUserPoint} from '@/api/admin';
|
||||
import {payOrder} from '@/api/order';
|
||||
import { IconFont } from '@nutui/icons-vue-taro';
|
||||
import { onUnmounted, ref } from 'vue';
|
||||
import { getActiveOrderDetail, getPayList } from '@/api/goods';
|
||||
import { getUserPoint } from '@/api/admin';
|
||||
import { payOrder } from '@/api/order';
|
||||
import * as dayjs from 'dayjs';
|
||||
|
||||
const payVal = ref();
|
||||
@@ -103,7 +81,7 @@ const isLoading = ref(false);
|
||||
const opt = ref<any>({});
|
||||
|
||||
Taro.useLoad(e => {
|
||||
const {oid, bid, OrderType} = e;
|
||||
const { oid, bid, OrderType } = e;
|
||||
opt.value = e;
|
||||
get_pay_list();
|
||||
getData(oid, bid, OrderType);
|
||||
@@ -160,7 +138,7 @@ const pay = async () => {
|
||||
try {
|
||||
isLoading.value = true;
|
||||
if (!payVal.value)
|
||||
return Taro.showToast({title: '请选择支付方式', icon: 'none'});
|
||||
return Taro.showToast({ title: '请选择支付方式', icon: 'none' });
|
||||
|
||||
await confirmPay();
|
||||
} catch (error) {
|
||||
|
||||
@@ -1,46 +1,32 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="head-wrapper" :style="{top: BarHeight + 'px'}">
|
||||
<view class="head-wrapper" :style="{ top: BarHeight + 'px' }">
|
||||
<view class="head-menu">
|
||||
<Left class="iconfont" @click="returns" />
|
||||
<Home class="iconfont" @click="goHome" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 幻灯片 -->
|
||||
<nut-swiper
|
||||
:init-page="0"
|
||||
:pagination-visible="false"
|
||||
pagination-color="red"
|
||||
auto-play="3000">
|
||||
<nut-swiper :init-page="0" :pagination-visible="false" pagination-color="red" auto-play="3000">
|
||||
<nut-swiper-item v-for="(itm, idx) in swiperList" :key="idx">
|
||||
<img
|
||||
style="width: 100%; height: 100%"
|
||||
:src="itm"
|
||||
:alt="idx.toString()" />
|
||||
<img style="width: 100%; height: 100%" :src="itm" :alt="idx.toString()" />
|
||||
</nut-swiper-item>
|
||||
</nut-swiper>
|
||||
<!-- 商家信息 -->
|
||||
<view class="infoBox">
|
||||
<view class="title text-[#333333]">{{ mer_info.name }}</view>
|
||||
<view class="flex items-center justify-between mt-3">
|
||||
<nut-rate
|
||||
spacing="1"
|
||||
active-color="rgba(252, 207, 10, 1)"
|
||||
v-model="mer_info.rate" />
|
||||
<nut-rate spacing="1" active-color="rgba(252, 207, 10, 1)" v-model="mer_info.rate" />
|
||||
<view class="text-[#9E9E9E] text-[25px]">销量:10000</view>
|
||||
<view class="text-[#9E9E9E] text-[25px]"
|
||||
>营业时间:{{ mer_info.week_start }}-{{ mer_info.week_end }}
|
||||
<view class="text-[#9E9E9E] text-[25px]">营业时间:{{ mer_info.week_start }}-{{ mer_info.week_end }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="bom">
|
||||
<view
|
||||
class="iconfont icon-dizhi text-[#C4C4C4]"
|
||||
style="width: 15px; height: 15px; margin-right: 15px"></view>
|
||||
<view class="iconfont icon-dizhi text-[#C4C4C4]" style="width: 15px; height: 15px; margin-right: 15px"></view>
|
||||
<view class="left">
|
||||
<view>{{ mer_info.address || '暂无商家地址' }}</view>
|
||||
<view class="sub mt-1"
|
||||
>距离您{{
|
||||
<view class="sub mt-1">距离您{{
|
||||
calculateDistance(
|
||||
userLocalNum.t,
|
||||
userLocalNum.l,
|
||||
@@ -52,34 +38,19 @@
|
||||
</view>
|
||||
<view class="right">
|
||||
<view @click="clickMap">
|
||||
<image
|
||||
class="w-[50px] h-[50px]"
|
||||
src="http://p1.meituan.net/csc/92ee8512c90527169b44e07fd11d250d924.png" />
|
||||
<image class="w-[50px] h-[50px]" src="http://p1.meituan.net/csc/92ee8512c90527169b44e07fd11d250d924.png" />
|
||||
</view>
|
||||
<view @click="clickPhone">
|
||||
<image
|
||||
class="w-[50px] h-[50px]"
|
||||
src="http://p0.meituan.net/csc/ab0493b124a6bb858bf82a2340767c0d919.png" />
|
||||
<image class="w-[50px] h-[50px]" src="http://p0.meituan.net/csc/ab0493b124a6bb858bf82a2340767c0d919.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商品列表 -->
|
||||
<view class="good-class" v-if="class_list.length > 0">
|
||||
<nut-tabs
|
||||
v-model="value"
|
||||
title-scroll
|
||||
size="large"
|
||||
direction="vertical"
|
||||
title-gutter="5"
|
||||
animated-time="0"
|
||||
type=""
|
||||
name="tabName">
|
||||
<nut-tab-pane
|
||||
v-for="(itm, index) in good_list"
|
||||
:key="index"
|
||||
:title="itm.name"
|
||||
:pane-key="index">
|
||||
<nut-tabs v-model="value" title-scroll size="large" direction="vertical" title-gutter="5" animated-time="0"
|
||||
type="" name="tabName">
|
||||
<nut-tab-pane v-for="(itm, index) in good_list" :key="index" :title="itm.name" :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)">
|
||||
@@ -88,25 +59,18 @@
|
||||
<view class="name">{{ item.name }}</view>
|
||||
<view class="bom">
|
||||
<view class="price">
|
||||
<text style="font-size: 15px"
|
||||
>{{ item.number }}元
|
||||
<text style="font-size: 15px" v-if="item.exchange"
|
||||
>+{{ item.exchange }}积分
|
||||
<text style="font-size: 15px">{{ item.discount_price }}元
|
||||
<text style="font-size: 15px" v-if="item.exchange">+{{ item.exchange }}积分
|
||||
</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bom">
|
||||
<view>
|
||||
<view class="stock text-[25px]"
|
||||
>剩余:{{ item.stock }}</view
|
||||
>
|
||||
<view class="stock text-[25px]">剩余:{{ item.stock }}</view>
|
||||
</view>
|
||||
<view class="flex items-center justify-between">
|
||||
<view
|
||||
v-if="item.cartNum > 0"
|
||||
class="btn"
|
||||
@click.stop="add_cart(item, 1)">
|
||||
<view v-if="item.cartNum > 0" class="btn" @click.stop="add_cart(item, 1)">
|
||||
<Minus />
|
||||
</view>
|
||||
<view v-if="item.cartNum > 0" style="margin: 0 10px">
|
||||
@@ -134,10 +98,10 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {Left, Home, Plus, Minus} from '@nutui/icons-vue-taro';
|
||||
import {Ref, ref} from 'vue';
|
||||
import {calculateDistance} from '@/utils';
|
||||
import {getGoodList, getMerCategory, getMerDetail} from '@/api/goods';
|
||||
import { Left, Home, Plus, Minus } from '@nutui/icons-vue-taro';
|
||||
import { Ref, ref } from 'vue';
|
||||
import { calculateDistance } from '@/utils';
|
||||
import { getGoodList, getMerCategory, getMerDetail } from '@/api/goods';
|
||||
import Cart from '@/components/Cart.vue';
|
||||
|
||||
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight;
|
||||
@@ -236,6 +200,7 @@ interface GoodsType {
|
||||
cover: string;
|
||||
name: string;
|
||||
number: number;
|
||||
discount_price: number;
|
||||
stock: number;
|
||||
cartNum: number;
|
||||
exchange: number;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
import {getActiveOrderList, deleteActiveOrder} from '@/api/goods';
|
||||
import {getOrderStatistics} from '@/api/order';
|
||||
import { getActiveOrderList, deleteActiveOrder } from '@/api/goods';
|
||||
import { getOrderStatistics } from '@/api/order';
|
||||
import UQRCode from 'uqrcodejs';
|
||||
|
||||
const tabValue = ref(0);
|
||||
@@ -160,7 +160,7 @@ const toDetail = (item: any) => {
|
||||
|
||||
const delOrder = async (oid: string) => {
|
||||
try {
|
||||
await deleteActiveOrder({oid});
|
||||
await deleteActiveOrder({ oid });
|
||||
} catch (error) {
|
||||
Taro.showToast({
|
||||
title: error.msg,
|
||||
@@ -235,31 +235,20 @@ const closed = () => {
|
||||
<image src="../static/user/order_list_top.png" />
|
||||
</view> -->
|
||||
<view class="tabs-box">
|
||||
<view
|
||||
v-for="item in tabsList"
|
||||
:key="item.value"
|
||||
@click="tabChange(item.value)">
|
||||
<view
|
||||
class="text"
|
||||
:style="{
|
||||
<view v-for="item in tabsList" :key="item.value" @click="tabChange(item.value)">
|
||||
<view class="text" :style="{
|
||||
color: tabValue === item.value ? '#000' : '#9C9C9C',
|
||||
}"
|
||||
>{{ item.title }}
|
||||
}">{{ 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"
|
||||
@click="toDetail(item)">
|
||||
<view class="order-card" v-for="(item, index) in orderList" :key="index" @click="toDetail(item)">
|
||||
<view class="top">
|
||||
<view class="text-[#9C9C9C] text-[28px]">订单号:{{ item.oid }}</view>
|
||||
<view
|
||||
:style="{
|
||||
<view :style="{
|
||||
color:
|
||||
item.status === 0
|
||||
? '#FF850A'
|
||||
@@ -268,8 +257,7 @@ const closed = () => {
|
||||
: item.status === 2
|
||||
? '#333333'
|
||||
: '#9C9C9C',
|
||||
}"
|
||||
>{{
|
||||
}">{{
|
||||
item.status === 0
|
||||
? '待付款'
|
||||
: item.status === 1
|
||||
@@ -287,11 +275,8 @@ const closed = () => {
|
||||
<view class="flex flex-col justify-between flex-1">
|
||||
<view class="title">{{ itm.Goods?.name }}</view>
|
||||
<view class="text-[#F83D3D] mt-5">
|
||||
<view
|
||||
>{{ itm.pay_price }}元
|
||||
<text v-if="itm.pay_integral > 0"
|
||||
>+{{ itm.pay_integral }}积分</text
|
||||
>
|
||||
<view>{{ itm.pay_price }}元
|
||||
<text v-if="itm.pay_integral > 0">+{{ itm.pay_integral }}积分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -301,30 +286,18 @@ const closed = () => {
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="line"></view> -->
|
||||
<view
|
||||
class="flex justify-between items-center mt-2 mb-2 text-[25px]"
|
||||
v-if="item.status !== 0"
|
||||
<view class="flex justify-between items-center mt-2 mb-2 text-[25px]" v-if="item.status !== 0"
|
||||
style="text-align: right">
|
||||
<text class="text-[#9C9C9C] text-[28px]"
|
||||
>共{{ item.count }}件商品
|
||||
<text class="text-[#9C9C9C] text-[28px]">共{{ item.count }}件商品
|
||||
</text>
|
||||
<text class="text-[26px]"
|
||||
>{{ item.status !== 0 ? '实' : '应' }}付款:
|
||||
{{ item.discount_price }}(元)
|
||||
<text v-if="item.exchange > 0"
|
||||
>积分抵扣: {{ item.exchange }}元</text
|
||||
>
|
||||
<text class="text-[26px]">{{ item.status !== 0 ? '实' : '应' }}付款:
|
||||
{{ item.discount_price }} (元)
|
||||
<text v-if="item.exchange > 0">积分抵扣: {{ item.exchange }}</text>
|
||||
</text>
|
||||
<!-- <view class="line"></view> -->
|
||||
</view>
|
||||
<view class="btn">
|
||||
<nut-button
|
||||
v-if="item.status === 0"
|
||||
plain
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click.stop="delOrder(item.oid)"
|
||||
>取消订单
|
||||
<nut-button v-if="item.status === 0" plain size="mini" type="primary" @click.stop="delOrder(item.oid)">取消订单
|
||||
</nut-button>
|
||||
<!-- <nut-button
|
||||
style="margin-left: 5px"
|
||||
@@ -333,55 +306,29 @@ const closed = () => {
|
||||
@click="toDetail(item)"
|
||||
>查看详情
|
||||
</nut-button> -->
|
||||
<nut-button
|
||||
style="margin-left: 5px"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="item.status === 0"
|
||||
@click.stop="openPay(item)"
|
||||
>立即付款
|
||||
<nut-button style="margin-left: 5px" size="mini" type="primary" v-if="item.status === 0"
|
||||
@click.stop="openPay(item)">立即付款
|
||||
</nut-button>
|
||||
<nut-button
|
||||
style="margin-left: 5px"
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="item.status === 1"
|
||||
@click.stop="openCode(item)"
|
||||
>出示核销码
|
||||
<nut-button style="margin-left: 5px" size="mini" type="primary" v-if="item.status === 1"
|
||||
@click.stop="openCode(item)">出示核销码
|
||||
</nut-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<nut-empty v-else description="暂无订单"></nut-empty>
|
||||
<!-- 核销码弹窗 -->
|
||||
<nut-popup
|
||||
v-model:visible="isShowCode"
|
||||
position="center"
|
||||
style="padding: 20px; border-radius: 15px"
|
||||
:maskClosable="true"
|
||||
safe-area-inset-bottom
|
||||
@click-overlay="closed"
|
||||
@closed="closed">
|
||||
<nut-popup v-model:visible="isShowCode" position="center" style="padding: 20px; border-radius: 15px"
|
||||
:maskClosable="true" safe-area-inset-bottom @click-overlay="closed" @closed="closed">
|
||||
<view class="code-box">
|
||||
<view>核销码</view>
|
||||
<!-- <image class="qrcode" :src="url"></image> -->
|
||||
<!-- <view class="qrcode"> -->
|
||||
<canvas
|
||||
ref="qrcode"
|
||||
id="qrcode"
|
||||
style="width: 200px; height: 200px"
|
||||
canvas-id="qrcode"></canvas>
|
||||
<canvas ref="qrcode" id="qrcode" style="width: 200px; height: 200px" canvas-id="qrcode"></canvas>
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
</nut-popup>
|
||||
<pay
|
||||
:isShowPay="isShowPay"
|
||||
:interval="false"
|
||||
:jfInfo="jfInfo"
|
||||
:OrderType="2"
|
||||
@errPay="errPay"
|
||||
@successPay="successPay"
|
||||
@closePay="closePay" />
|
||||
<pay :isShowPay="isShowPay" :interval="false" :jfInfo="jfInfo" :OrderType="2" @errPay="errPay"
|
||||
@successPay="successPay" @closePay="closePay" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -27,8 +27,7 @@
|
||||
<view class="font-bold">订单待使用</view>
|
||||
<IconFont name="rect-right" size="15" color="#333333"></IconFont>
|
||||
</view>
|
||||
<view class="text-[#9C9C9C] text-[20px]"
|
||||
>订单剩余
|
||||
<view class="text-[#9C9C9C] text-[20px]">订单剩余
|
||||
<text class="text-[#FF0000]">{{ timeStr }} </text>
|
||||
过期,请尽快核销!
|
||||
</view>
|
||||
@@ -50,21 +49,15 @@
|
||||
</view>
|
||||
<!-- 商家信息 -->
|
||||
<view class="mer-info">
|
||||
<image
|
||||
class="w-[150px] h-[150px] rounded-lg mr-2"
|
||||
:src="goodInfo.Store?.head_photo" />
|
||||
<image class="w-[150px] h-[150px] rounded-lg mr-2" :src="goodInfo.Store?.head_photo" />
|
||||
<view class="right">
|
||||
<view class="text-[#333333]">{{ goodInfo.Store?.name }}</view>
|
||||
<view
|
||||
class="flex mt-2 items-center text-[#999999] text-[23px] text-ellipsis line-clamp-3">
|
||||
<view
|
||||
style="font-size: 15px"
|
||||
class="iconfont icon-dizhi text-[#C4C4C4]"></view>
|
||||
<view class="flex mt-2 items-center text-[#999999] text-[23px] text-ellipsis line-clamp-3">
|
||||
<view style="font-size: 15px" class="iconfont icon-dizhi text-[#C4C4C4]"></view>
|
||||
<view>{{ goodInfo.Store?.address }}</view>
|
||||
</view>
|
||||
<view class="w-full flex items-center justify-between mt-1">
|
||||
<view class="ml-3 text-[23px] text-[#999999]"
|
||||
>距离您{{
|
||||
<view class="ml-3 text-[23px] text-[#999999]">距离您{{
|
||||
calculateDistance(
|
||||
userLocalNum.t,
|
||||
userLocalNum.l,
|
||||
@@ -74,13 +67,9 @@
|
||||
}}
|
||||
</view>
|
||||
<view class="flex items-center">
|
||||
<image
|
||||
@tap="toPhone()"
|
||||
class="w-[50px] h-[50px]"
|
||||
<image @tap="toPhone()" class="w-[50px] h-[50px]"
|
||||
src="http://p0.meituan.net/csc/ab0493b124a6bb858bf82a2340767c0d919.png" />
|
||||
<image
|
||||
@tap="toAdder()"
|
||||
class="w-[50px] h-[50px] ml-2"
|
||||
<image @tap="toAdder()" class="w-[50px] h-[50px] ml-2"
|
||||
src="http://p1.meituan.net/csc/92ee8512c90527169b44e07fd11d250d924.png" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -92,19 +81,13 @@
|
||||
<nut-cell>
|
||||
<template #default>
|
||||
<view class="center-box">
|
||||
<view
|
||||
class="top"
|
||||
v-for="(item, index) in goodInfo.OrderGoods"
|
||||
:key="index">
|
||||
<view class="top" v-for="(item, index) in goodInfo.OrderGoods" :key="index">
|
||||
<image :src="item.Goods?.cover" />
|
||||
<view class="flex flex-col justify-between flex-1">
|
||||
<view class="title">{{ item.Goods?.name }}</view>
|
||||
<view class="text-[#F83D3D] mt-5">
|
||||
<view
|
||||
>{{ item.pay_price }}元
|
||||
<text v-if="item.pay_integral > 0"
|
||||
>+{{ item.pay_integral }}积分</text
|
||||
>
|
||||
<view>{{ item.pay_price }}元
|
||||
<text v-if="item.pay_integral > 0">+{{ item.pay_integral }}积分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -112,17 +95,12 @@
|
||||
<view>x{{ item.number }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="flex justify-between items-center mt-2 mb-2 text-[25px]">
|
||||
<view class="text-[#9C9C9C]"
|
||||
>{{ `共${goodInfo.count}件商品` }}
|
||||
<view class="flex justify-between items-center mt-2 mb-2 text-[25px]">
|
||||
<view class="text-[#9C9C9C]">{{ `共${goodInfo.count}件商品` }}
|
||||
</view>
|
||||
<text class="text-[26px]"
|
||||
>{{ goodInfo.status !== 0 ? '实' : '应' }}付款:
|
||||
{{ goodInfo.discount_price }}(元)
|
||||
<text v-if="goodInfo.exchange > 0"
|
||||
>积分抵扣: {{ goodInfo.exchange }}元</text
|
||||
>
|
||||
<text class="text-[26px]">{{ goodInfo.status !== 0 ? '实' : '应' }}付款:
|
||||
{{ goodInfo.discount_price }} (元)
|
||||
<text v-if="goodInfo.exchange > 0">积分抵扣: {{ goodInfo.exchange }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -131,19 +109,14 @@
|
||||
</nut-cell-group>
|
||||
<nut-cell-group>
|
||||
<nut-cell title="订单号:" :desc="goodInfo.oid"></nut-cell>
|
||||
<nut-cell
|
||||
title="下单时间:"
|
||||
:desc="goodInfo.add_time?.slice(0, 19)"></nut-cell>
|
||||
<nut-cell title="下单时间:" :desc="goodInfo.add_time?.slice(0, 19)"></nut-cell>
|
||||
<!-- <nut-cell
|
||||
v-if="goodInfo.expires !== 0"
|
||||
title="订单过期时间:"
|
||||
:desc="
|
||||
dayjs.unix(goodInfo.expires).format('YYYY-MM-DD HH:mm:ss')
|
||||
"></nut-cell> -->
|
||||
<nut-cell
|
||||
title="订单状态:"
|
||||
:desc="
|
||||
goodInfo.status === 0
|
||||
<nut-cell title="订单状态:" :desc="goodInfo.status === 0
|
||||
? '待付款'
|
||||
: goodInfo.status === 1
|
||||
? '待使用'
|
||||
@@ -154,21 +127,9 @@
|
||||
</nut-cell-group>
|
||||
|
||||
<view class="mt-[30px] m-auto">
|
||||
<nut-button
|
||||
v-if="goodInfo.status === 0"
|
||||
shape="square"
|
||||
type="primary"
|
||||
block
|
||||
@click="openPay()"
|
||||
>继续付款
|
||||
<nut-button v-if="goodInfo.status === 0" shape="square" type="primary" block @click="openPay()">继续付款
|
||||
</nut-button>
|
||||
<nut-button
|
||||
v-if="goodInfo.status === 1"
|
||||
shape="square"
|
||||
type="primary"
|
||||
block
|
||||
@click="openCode()"
|
||||
>出示核销码
|
||||
<nut-button v-if="goodInfo.status === 1" shape="square" type="primary" block @click="openCode()">出示核销码
|
||||
</nut-button>
|
||||
</view>
|
||||
|
||||
@@ -199,46 +160,30 @@
|
||||
</view> -->
|
||||
|
||||
<!-- 核销码弹窗 -->
|
||||
<nut-popup
|
||||
v-model:visible="isShowCode"
|
||||
position="center"
|
||||
style="padding: 20px; border-radius: 15px"
|
||||
:maskClosable="true"
|
||||
safe-area-inset-bottom
|
||||
@click-overlay="closed"
|
||||
@closed="closed">
|
||||
<nut-popup v-model:visible="isShowCode" position="center" style="padding: 20px; border-radius: 15px"
|
||||
:maskClosable="true" safe-area-inset-bottom @click-overlay="closed" @closed="closed">
|
||||
<view class="code-box">
|
||||
<view>核销码</view>
|
||||
<!-- <image class="qrcode" :src="url"></image> -->
|
||||
<!-- <view class="qrcode"> -->
|
||||
<canvas
|
||||
ref="qrcode"
|
||||
id="qrcode"
|
||||
style="width: 200px; height: 200px"
|
||||
canvas-id="qrcode"></canvas>
|
||||
<canvas ref="qrcode" id="qrcode" style="width: 200px; height: 200px" canvas-id="qrcode"></canvas>
|
||||
<!-- </view> -->
|
||||
</view>
|
||||
</nut-popup>
|
||||
<pay
|
||||
:isShowPay="isShowPay"
|
||||
:interval="false"
|
||||
:jfInfo="jfInfo"
|
||||
:OrderType="2"
|
||||
@errPay="errPay"
|
||||
@successPay="successPay"
|
||||
@closePay="closePay" />
|
||||
<pay :isShowPay="isShowPay" :interval="false" :jfInfo="jfInfo" :OrderType="2" @errPay="errPay"
|
||||
@successPay="successPay" @closePay="closePay" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {onUnmounted, ref} from 'vue';
|
||||
import { onUnmounted, ref } from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
import duration from 'dayjs/plugin/duration';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
import {calculateDistance} from '@/utils';
|
||||
import {IconFont} from '@nutui/icons-vue-taro';
|
||||
import {getActiveOrderDetail} from '@/api/goods';
|
||||
import { calculateDistance } from '@/utils';
|
||||
import { IconFont } from '@nutui/icons-vue-taro';
|
||||
import { getActiveOrderDetail } from '@/api/goods';
|
||||
import UQRCode from 'uqrcodejs';
|
||||
|
||||
dayjs.extend(duration);
|
||||
|
||||
Reference in New Issue
Block a user