1458 lines
135 KiB
Diff
1458 lines
135 KiB
Diff
Index: components.d.ts
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+>// generated by unplugin-vue-components\n// We suggest you to commit this file into source control\n// Read more: https://github.com/vuejs/core/pull/3399\nimport '@vue/runtime-core'\n\nexport {}\n\ndeclare module '@vue/runtime-core' {\n export interface GlobalComponents {\n Auth: typeof import('./src/components/Auth.vue')['default']\n Back: typeof import('./src/components/Back.vue')['default']\n Cart: typeof import('./src/components/Cart.vue')['default']\n MerList: typeof import('./src/components/MerList.vue')['default']\n NutAvatar: typeof import('@nutui/nutui-taro')['Avatar']\n NutBacktop: typeof import('@nutui/nutui-taro')['Backtop']\n NutButton: typeof import('@nutui/nutui-taro')['Button']\n NutCalendar: typeof import('@nutui/nutui-taro')['Calendar']\n NutCell: typeof import('@nutui/nutui-taro')['Cell']\n NutCellGroup: typeof import('@nutui/nutui-taro')['CellGroup']\n NutCheckbox: typeof import('@nutui/nutui-taro')['Checkbox']\n NutCheckboxGroup: typeof import('@nutui/nutui-taro')['CheckboxGroup']\n NutDialog: typeof import('@nutui/nutui-taro')['Dialog']\n NutEllipsis: typeof import('@nutui/nutui-taro')['Ellipsis']\n NutEmpty: typeof import('@nutui/nutui-taro')['Empty']\n NutForm: typeof import('@nutui/nutui-taro')['Form']\n NutFormItem: typeof import('@nutui/nutui-taro')['FormItem']\n NutGrid: typeof import('@nutui/nutui-taro')['Grid']\n NutGridItem: typeof import('@nutui/nutui-taro')['GridItem']\n NutImagePreview: typeof import('@nutui/nutui-taro')['ImagePreview']\n NutInput: typeof import('@nutui/nutui-taro')['Input']\n NutInputNumber: typeof import('@nutui/nutui-taro')['InputNumber']\n NutOverlay: typeof import('@nutui/nutui-taro')['Overlay']\n NutPagination: typeof import('@nutui/nutui-taro')['Pagination']\n NutPicker: typeof import('@nutui/nutui-taro')['Picker']\n NutPopover: typeof import('@nutui/nutui-taro')['Popover']\n NutPopup: typeof import('@nutui/nutui-taro')['Popup']\n NutPrice: typeof import('@nutui/nutui-taro')['Price']\n NutRadio: typeof import('@nutui/nutui-taro')['Radio']\n NutRadioGroup: typeof import('@nutui/nutui-taro')['RadioGroup']\n NutRate: typeof import('@nutui/nutui-taro')['Rate']\n NutSwiper: typeof import('@nutui/nutui-taro')['Swiper']\n NutSwiperItem: typeof import('@nutui/nutui-taro')['SwiperItem']\n NutSwitch: typeof import('@nutui/nutui-taro')['Switch']\n NutTable: typeof import('@nutui/nutui-taro')['Table']\n NutTabPane: typeof import('@nutui/nutui-taro')['TabPane']\n NutTabs: typeof import('@nutui/nutui-taro')['Tabs']\n NutTextarea: typeof import('@nutui/nutui-taro')['Textarea']\n NutUploader: typeof import('@nutui/nutui-taro')['Uploader']\n Pay: typeof import('./src/components/Pay.vue')['default']\n Popup: typeof import('./src/components/Popup.vue')['default']\n RichEditor: typeof import('./src/components/RichEditor.vue')['default']\n StoreList: typeof import('./src/components/StoreList.vue')['default']\n Ucharts: typeof import('./src/components/Ucharts.vue')['default']\n Upload: typeof import('./src/components/Upload.vue')['default']\n UserModal: typeof import('./src/components/UserModal.vue')['default']\n }\n}\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/components.d.ts b/components.d.ts
|
||
--- a/components.d.ts (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/components.d.ts (date 1727095397349)
|
||
@@ -1,57 +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']
|
||
- 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']
|
||
+ 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'];
|
||
}
|
||
}
|
||
Index: src/components/Cart.vue
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+><script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport Taro from '@tarojs/taro';\nimport { addCart, getCart, clearCart } from '@/api/cart';\nimport { Plus, Minus } from '@nutui/icons-vue-taro';\nimport { createActiveOrder } from '@/api/goods';\nimport { createAfterOrder, getUserPoint } from '@/api/admin';\nimport Pay from '@/components/Pay.vue';\n\ninterface CardList {\n name: string;\n cover: string;\n bid: string;\n gid: string;\n number: string;\n discount_price: string;\n price: number;\n exchange: number;\n discount_integral: number;\n}\n\nconst show = ref(false);\n\nconst props = defineProps({\n merInfo: {\n required: true,\n type: Object,\n },\n IsPendingOrder: {\n type: Boolean,\n default: false,\n },\n});\n\nconst emit = defineEmits(['updateCart']);\n\nconst openModal = async () => {\n await get_cart_list();\n if (card_list.value.length === 0) return;\n show.value = !show.value;\n};\n\nconst add_cart = async (\n item: CardList,\n num: number = 1,\n bid: string = props.merInfo.bid,\n) => {\n try {\n const res = await addCart({\n Bid: item.bid,\n Gid: item.gid,\n Number: Number(num),\n });\n Taro.showToast({\n title: res.msg,\n icon: 'none',\n });\n await get_cart_list(bid);\n } catch (e) {\n Taro.showToast({\n title: e.msg,\n icon: 'none',\n });\n }\n};\n\nconst onAdd = async (item: CardList) => {\n await add_cart(item, Number(item.number) + 1);\n};\n\nconst onReduce = async (item: CardList) => {\n await add_cart(item, Number(item.number) - 1);\n if (card_list.value.length === 0) show.value = false;\n};\n\nconst card_list = ref<CardList[]>([]);\n\nconst cartInfo = ref({\n count: 0,\n price: 0,\n discount_price: 0,\n exchange: 0,\n discount_integral: 0,\n});\n\nconst get_cart_list = async (bid: string = props.merInfo.bid) => {\n try {\n const res = await getCart({\n Bid: bid,\n });\n card_list.value = res.data.data || [];\n cartInfo.value = {\n count: 0,\n price: 0,\n discount_price: 0,\n exchange: 0,\n discount_integral: 0,\n };\n card_list.value.forEach((item: CardList) => {\n cartInfo.value.count += Number(item.number);\n cartInfo.value.discount_price += Number(item.price);\n cartInfo.value.exchange += Number(item.exchange);\n cartInfo.value.discount_integral += Number(item.discount_integral);\n });\n emit('updateCart', res.data.data || []);\n } catch (e) {\n Taro.showToast({\n title: e.msg,\n icon: 'none',\n });\n }\n};\n\nconst clear_cart = async () => {\n try {\n await clearCart({\n Bid: props.merInfo.bid,\n });\n await get_cart_list();\n } catch (e) {\n Taro.showToast({\n title: e.msg,\n icon: 'none',\n });\n }\n show.value = false;\n};\n\nconst isShowPay = ref(false);\n\nconst orderData = ref<any>([]);\n\nconst closePay = (val: boolean) => {\n isShowPay.value = val;\n orderData.value = [];\n Taro.redirectTo({\n url: '/pages/users/order_list/index?type=0',\n });\n};\n\nconst create_order = async () => {\n try {\n show.value = false;\n let res;\n if (props.IsPendingOrder) {\n const data = props.merInfo;\n delete data.$taroTimestamp;\n delete data.type;\n res = await createAfterOrder(data);\n await get_cart_list();\n Taro.navigateTo({\n url: `/pages/admin/add_order/pending_order/pending_order_detail/index?oid=${res.data.oid}&bid=${props.merInfo.bid}`,\n });\n } else {\n const user_info = Taro.getStorageSync('userInfo');\n const data = await getUserPoint({\n phone: user_info.data.phone,\n bid: props.merInfo.bid,\n });\n res = await createActiveOrder({\n Bid: [props.merInfo.bid],\n custID: data.data.store_user_id,\n });\n if (res.data.oid) {\n orderData.value = {\n jh_info: data.data,\n oid: res.data.oid,\n };\n // isShowPay.value = true;\n Taro.navigateTo({\n url: `/pages/goods/pay/index?oid=${res.data.oid}&bid=${props.merInfo.bid}&OrderType=1`,\n });\n }\n }\n Taro.showToast({\n title: res.msg,\n icon: 'none',\n });\n } catch (e) {\n if (e.msg === '请先设置交易密码') {\n Taro.navigateTo({\n url: '/pages/users/pwd/index',\n });\n }\n Taro.showToast({\n title: e.msg,\n icon: 'none',\n });\n }\n};\n\ndefineExpose({\n add_cart,\n get_cart_list,\n});\n</script>\n\n<template>\n <view>\n <view class=\"cart\" @click.stop=\"openModal\">\n <view class=\"container flex items-center\">\n <!-- <view>购物车数量: {{ cartInfo.count }}</view> -->\n <view class=\"cardImg\">\n <image src=\"http://p1.meituan.net/csc/929f447a96a44b09a09b2e0055433222717.png\">\n </image>\n <view class=\"count-text\" v-if=\"cartInfo.count > 0\">\n <text>{{ cartInfo.count }}</text>\n </view>\n </view>\n <view class=\"ml-1 text-[28px]\">\n <text>总金额: {{ cartInfo.discount_price.toFixed(2) }}元</text>\n <text v-if=\"!IsPendingOrder\">,积分抵扣: {{ cartInfo.discount_integral.toFixed(2) }}\n </text>\n </view>\n </view>\n <view v-if=\"cartInfo.count > 0\" class=\"payBtn\" @click.stop=\"create_order\">去结算\n </view>\n </view>\n <!-- 购物车弹窗 -->\n <nut-popup :style=\"{ padding: '15px' }\" round position=\"bottom\" z-index=\"1\" :catch-move=\"true\"\n :safe-area-inset-bottom=\"true\" v-model:visible=\"show\">\n <view class=\"list-header\">\n <view class=\"left\" @click.stop=\"clear_cart\">\n <!-- <Del2 color=\"#666666\" /> -->\n <image class=\"w-[20px] h-[20px]\" src=\"http://p0.meituan.net/csc/db4d11fd744b69435c6ffdc6bfc868c5684.png\" />\n <text class=\"text-[20px]\" style=\"color: #666666\">清空购物车</text>\n </view>\n </view>\n <scroll-view :scroll-y=\"true\" class=\"cart-list\">\n <view class=\"item\" v-for=\"(item, index) in card_list\" :key=\"index\">\n <view class=\"left\">\n <image :src=\"item.cover\" />\n <view class=\"center\">\n <view class=\"name\">{{ item.name }}</view>\n\n <view class=\"price flex\">\n <view>现金:{{ item.price }}</view>\n <view v-if=\"item.discount_integral > 0\" class=\"ml-2\">积分:{{ item.discount_integral }}</view>\n </view>\n </view>\n </view>\n <nut-input-number v-model=\"item.number\" readonly :min=\"-1\" @add=\"() => onAdd(item)\"\n @reduce=\"() => onReduce(item)\">\n <template #left-icon>\n <view class=\"btn\" @click.stop=\"onReduce(item)\">\n <Minus />\n </view>\n </template>\n <template #right-icon>\n <view class=\"btn\" @click.stop=\"onAdd(item)\">\n <Plus />\n </view>\n </template>\n </nut-input-number>\n </view>\n </scroll-view>\n <view style=\"height: 140px\"></view>\n </nut-popup>\n <!-- 支付 -->\n <Pay :is-show-pay=\"isShowPay\" v-model:jfInfo=\"orderData\" @closePay=\"closePay\" @successPay=\"closePay\" />\n </view>\n</template>\n\n<style lang=\"scss\">\n$h-border-radius: 50px;\n\n.cart {\n position: fixed;\n bottom: 50px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 9999;\n width: 95%;\n background-color: #262323;\n border-radius: $h-border-radius;\n color: #fff;\n height: 100px;\n\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n .container {\n margin-left: 30px;\n\n .cardImg {\n position: relative;\n\n image {\n width: 60px;\n height: 60px;\n }\n\n .count-text {\n position: absolute;\n top: -10px;\n right: -10px;\n background-image: url('http://p0.meituan.net/csc/80b0e11d4270d09324df0b802d4c479b986.png');\n background-size: 100% 100%;\n // padding: 0 8px;\n width: 35px;\n height: 35px;\n text-align: center;\n line-height: 35px;\n\n text {\n margin: auto;\n font-size: 25px;\n }\n }\n }\n }\n\n .payBtn {\n width: 200px;\n height: 100px;\n line-height: 100px;\n text-align: center;\n background-color: #f83d3d;\n border-radius: 0 $h-border-radius $h-border-radius 0;\n }\n}\n\n.list-header {\n margin: 15px 0;\n\n .left {\n display: flex;\n align-items: center;\n }\n}\n\n.cart-list {\n height: 290px;\n\n .item {\n display: flex;\n align-items: flex-end;\n margin-bottom: 10px;\n justify-content: space-between;\n\n .left {\n display: flex;\n justify-content: space-between;\n\n image {\n width: 130px;\n height: 130px;\n border-radius: 15px;\n margin-right: 10px;\n }\n\n .center {\n height: 130px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n .price {\n color: red;\n // margin-bottom: 0px;\n }\n }\n }\n }\n}\n\n.btn {\n background-color: #ff0000;\n color: #fff;\n border-radius: 50%;\n text-align: center;\n line-height: 65px;\n width: 45px;\n height: 45px;\n}\n</style>\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/components/Cart.vue b/src/components/Cart.vue
|
||
--- a/src/components/Cart.vue (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/components/Cart.vue (date 1727095401820)
|
||
@@ -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 {
|
||
@@ -201,7 +201,8 @@
|
||
<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>
|
||
@@ -209,20 +210,30 @@
|
||
</view>
|
||
<view class="ml-1 text-[28px]">
|
||
<text>总金额: {{ cartInfo.discount_price.toFixed(2) }}元</text>
|
||
- <text v-if="!IsPendingOrder">,积分抵扣: {{ cartInfo.discount_integral.toFixed(2) }}
|
||
+ <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>
|
||
@@ -235,11 +246,17 @@
|
||
|
||
<view class="price flex">
|
||
<view>现金:{{ item.price }}</view>
|
||
- <view v-if="item.discount_integral > 0" class="ml-2">积分:{{ item.discount_integral }}</view>
|
||
+ <view v-if="item.discount_integral > 0" class="ml-2"
|
||
+ >积分:{{ item.discount_integral }}</view
|
||
+ >
|
||
</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)">
|
||
@@ -257,7 +274,11 @@
|
||
<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>
|
||
|
||
Index: src/pages/users/order_list/index.vue
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+><script lang=\"ts\" setup>\nimport { ref } from 'vue';\nimport Taro from '@tarojs/taro';\nimport Pay from '@/components/Pay.vue';\nimport { getActiveOrderList, deleteActiveOrder } from '@/api/goods';\nimport { getOrderStatistics } from '@/api/order';\nimport UQRCode from 'uqrcodejs';\n\nconst tabValue = ref(0);\n\nconst isShowPay = ref(false);\nconst isShowCode = ref(false);\nconst url = ref('');\n\nconst tabsList = ref([\n {\n title: '全部',\n value: 0,\n num: 0,\n },\n {\n title: '待付款',\n value: 1,\n num: 0,\n },\n {\n title: '待使用',\n value: 2,\n num: 0,\n },\n {\n title: '已使用',\n value: 3,\n num: 0,\n },\n {\n title: '已失效',\n value: 4,\n num: 0,\n },\n]);\n\nconst jfInfo = ref({});\n\ninterface OrderList {\n oid: string;\n add_time: string;\n status: number;\n Store: {\n bid: string;\n };\n OrderGoods: GoodsItem[];\n count: number;\n number: number;\n pay_type: number;\n exchange: number;\n price: number;\n joint_oid: string;\n bid: string;\n discount_price: number;\n discount_integral: number;\n}\n\ninterface GoodsItem {\n Goods: {\n name: string;\n cover: string;\n discount_price: number;\n exchange: number;\n };\n ID: number;\n gid: string;\n number: number;\n oid: string;\n pay_integral: number;\n pay_price: number;\n}\n\nconst orderList = ref<OrderList[]>([]);\n\nTaro.useLoad(options => {\n tabValue.value = Number(options.type);\n});\n\nTaro.useDidShow(() => {\n getList();\n});\n\n// Taro.startPullDownRefresh({\n// success: () => {\n// getList();\n// },\n// });\n\nconst getList = async () => {\n try {\n const res = await getActiveOrderList({\n status: tabValue.value,\n });\n orderList.value = res.data.data;\n } catch (error) {\n Taro.showToast({\n title: error.msg,\n icon: 'none',\n });\n }\n // await getTj();\n // Taro.stopPullDownRefresh();\n};\n\nconst tabChange = (index: number) => {\n tabValue.value = index;\n getList();\n};\n\nconst openPay = async (item: OrderList) => {\n // isShowPay.value = true;\n // const user_info = Taro.getStorageSync('userInfo');\n // const data = await getUserPoint({\n // phone: user_info.data.phone,\n // bid: item.Store.bid,\n // });\n // jfInfo.value = {\n // jh_info: data.data,\n // oid: item.oid,\n // };\n Taro.navigateTo({\n url: `/pages/goods/pay/index?oid=${item.joint_oid}&bid=${item.bid}&OrderType=1`,\n });\n};\n\nconst errPay = () => {\n isShowPay.value = false;\n Taro.showToast({\n title: '支付失败',\n icon: 'none',\n });\n jfInfo.value = {};\n getList();\n};\nconst closePay = () => {\n isShowPay.value = false;\n Taro.showToast({\n title: '支付取消',\n icon: 'none',\n });\n jfInfo.value = {};\n getList();\n};\n\nconst successPay = () => {\n isShowPay.value = false;\n jfInfo.value = {};\n getList();\n};\n\nconst toDetail = (item: any) => {\n Taro.navigateTo({\n url: `/pages/users/order_list_detail/index?orderId=${item.oid}&OrderType=2`,\n });\n};\n\nconst delOrder = async (oid: string) => {\n try {\n await deleteActiveOrder({ oid });\n } catch (error) {\n Taro.showToast({\n title: error.msg,\n icon: 'none',\n });\n }\n await getList();\n};\n\nconst t_id = ref();\n\nconst openCode = item => {\n if (item.status === 2) return;\n // url.value = `https://api.pwmqr.com/qrcode/create?url=${item.oid}`;\n // 获取uQRCode实例\n const qr = new UQRCode();\n // 设置二维码内容\n qr.data = item.oid;\n // 设置二维码大小,必须与canvas设置的宽高一致\n qr.size = 200;\n // 调用制作二维码方法\n qr.make();\n // 获取canvas元素\n const ctx = Taro.createCanvasContext('qrcode');\n // 设置uQRCode实例的canvas上下文\n qr.canvasContext = ctx;\n // 调用绘制方法将二维码图案绘制到canvas上\n qr.drawCanvas();\n isShowCode.value = true;\n t_id.value = setInterval(() => {\n checkStatus(item);\n }, 1000);\n};\n\nconst checkStatus = async itm => {\n await getList();\n orderList.value.forEach(item => {\n if (item.oid === itm.oid) {\n console.log(item);\n if (item.status === 2) {\n clearInterval(t_id.value);\n isShowCode.value = false;\n url.value = '';\n Taro.showToast({\n title: '核销成功',\n icon: 'none',\n });\n }\n }\n });\n};\n\nconst closed = () => {\n isShowCode.value = false;\n url.value = '';\n clearInterval(t_id.value);\n};\n</script>\n\n<template>\n <view>\n <!-- <view class=\"topTips\">\n <view>\n <view style=\"font-weight: bold\">订单信息</view>\n <view style=\"font-size: 15px\"\n >总消费积分:{{ countInfo.ExchangeTotal || 0 }}\n </view>\n <view style=\"font-size: 15px\"\n >总消费金额:{{ countInfo.PriceTotal || 0 }}\n </view>\n </view>\n <image src=\"../static/user/order_list_top.png\" />\n </view> -->\n <view class=\"tabs-box\">\n <view v-for=\"item in tabsList\" :key=\"item.value\" @click=\"tabChange(item.value)\">\n <view class=\"text\" :style=\"{\n color: tabValue === item.value ? '#000' : '#9C9C9C',\n }\">{{ item.title }}\n </view>\n <!-- <view>{{ item.num }}</view> -->\n <view class=\"line\" :class=\"{ lineColor: item.value === tabValue }\"></view>\n </view>\n </view>\n <view v-if=\"orderList.length > 0\">\n <view class=\"order-card\" v-for=\"(item, index) in orderList\" :key=\"index\" @click=\"toDetail(item)\">\n <view class=\"top\">\n <view class=\"text-[#9C9C9C] text-[28px]\">订单号:{{ item.oid }}</view>\n <view :style=\"{\n color:\n item.status === 0\n ? '#FF850A'\n : item.status === 1\n ? '#F83D3D'\n : item.status === 2\n ? '#333333'\n : '#9C9C9C',\n }\">{{\n item.status === 0\n ? '待付款'\n : item.status === 1\n ? '待使用'\n : item.status === 2\n ? '已使用'\n : '已失效'\n }}\n </view>\n </view>\n <view class=\"line\"></view>\n <view class=\"center\" v-for=\"(itm, idx) in item.OrderGoods\" :key=\"idx\">\n <view class=\"top\">\n <image :src=\"itm.Goods.cover\" />\n <view class=\"flex flex-col justify-between flex-1\">\n <view class=\"title\">{{ itm.Goods?.name }}</view>\n <view class=\"text-[#F83D3D] mt-5\">\n <view>{{ itm.Goods.discount_price }}元\n <text v-if=\"itm.Goods.exchange > 0\">+{{ itm.Goods.exchange }}积分</text>\n </view>\n </view>\n </view>\n <view class=\"right\">\n <view>x{{ itm.number }}</view>\n </view>\n </view>\n </view>\n <!-- <view class=\"line\"></view> -->\n <view class=\"flex justify-between items-center mt-2 mb-2 text-[25px]\" v-if=\"item.status !== 0\"\n style=\"text-align: right\">\n <text class=\"text-[#9C9C9C] text-[28px]\">共{{ item.count }}件商品\n </text>\n <text class=\"text-[26px]\">{{ item.status !== 0 ? '实' : '应' }}付款:\n {{ item.discount_price }} (元)\n <text v-if=\"item.exchange > 0\">积分抵扣: {{ item.exchange }}</text>\n </text>\n <!-- <view class=\"line\"></view> -->\n </view>\n <view class=\"btn\">\n <nut-button v-if=\"item.status === 0\" plain size=\"mini\" type=\"primary\" @click.stop=\"delOrder(item.oid)\">取消订单\n </nut-button>\n <!-- <nut-button\n style=\"margin-left: 5px\"\n size=\"mini\"\n type=\"primary\"\n @click=\"toDetail(item)\"\n >查看详情\n </nut-button> -->\n <nut-button style=\"margin-left: 5px\" size=\"mini\" type=\"primary\" v-if=\"item.status === 0\"\n @click.stop=\"openPay(item)\">立即付款\n </nut-button>\n <nut-button style=\"margin-left: 5px\" size=\"mini\" type=\"primary\" v-if=\"item.status === 1\"\n @click.stop=\"openCode(item)\">出示核销码\n </nut-button>\n </view>\n </view>\n </view>\n <nut-empty v-else description=\"暂无订单\"></nut-empty>\n <!-- 核销码弹窗 -->\n <nut-popup v-model:visible=\"isShowCode\" position=\"center\" style=\"padding: 20px; border-radius: 15px\"\n :maskClosable=\"true\" safe-area-inset-bottom @click-overlay=\"closed\" @closed=\"closed\">\n <view class=\"code-box\">\n <view>核销码</view>\n <!-- <image class=\"qrcode\" :src=\"url\"></image> -->\n <!-- <view class=\"qrcode\"> -->\n <canvas ref=\"qrcode\" id=\"qrcode\" style=\"width: 200px; height: 200px\" canvas-id=\"qrcode\"></canvas>\n <!-- </view> -->\n </view>\n </nut-popup>\n <pay :isShowPay=\"isShowPay\" :interval=\"false\" :jfInfo=\"jfInfo\" :OrderType=\"2\" @errPay=\"errPay\"\n @successPay=\"successPay\" @closePay=\"closePay\" />\n </view>\n</template>\n\n<style lang=\"scss\">\npage {\n // IOS安全区域\n padding-bottom: constant(safe-area-inset-bottom);\n padding-bottom: env(safe-area-inset-bottom);\n}\n\n.topTips {\n box-sizing: border-box;\n width: 100%;\n background-color: #ff0000;\n color: #ffffff;\n padding: 20px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n image {\n width: 200px;\n height: 200px;\n }\n}\n\n.tabs-box {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n background-color: #fff;\n padding: 20px 20px 0 20px;\n text-align: center;\n\n .text {\n align-items: center;\n font-size: 30px;\n }\n\n .line {\n margin: 10px auto;\n width: 50px;\n height: 10px;\n border-radius: 30px;\n transition: all 0.3s ease-in-out;\n }\n\n .lineColor {\n background-color: #ff0000;\n }\n}\n\n.order-card {\n width: 95%;\n box-sizing: border-box;\n margin: 20px auto;\n background-color: #fff;\n border-radius: 10px;\n padding: 20px;\n\n .line {\n width: 100%;\n height: 1px;\n background-color: #f5f5f5;\n margin: 20px auto;\n }\n\n .top {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n\n .btn {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n }\n\n .center {\n .top {\n display: flex;\n align-items: flex-start;\n\n image {\n width: 150px;\n height: 150px;\n border-radius: 15px;\n margin-right: 20px;\n }\n\n .title {\n display: -webkit-box;\n overflow: hidden;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n width: 350px;\n }\n\n .right {\n margin-left: 10px;\n font-size: 28px;\n text-align: right;\n color: #9c9c9c;\n }\n }\n }\n}\n\n.code-box {\n padding: 20px;\n box-sizing: border-box;\n text-align: center;\n font-size: large;\n}\n\n.qrcode {\n width: 370px;\n height: 370px;\n padding: 10px;\n}\n</style>\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/pages/users/order_list/index.vue b/src/pages/users/order_list/index.vue
|
||
--- a/src/pages/users/order_list/index.vue (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/pages/users/order_list/index.vue (date 1727095403246)
|
||
@@ -1,9 +1,9 @@
|
||
<script lang="ts" setup>
|
||
-import { ref } from 'vue';
|
||
+import {ref} from 'vue';
|
||
import Taro from '@tarojs/taro';
|
||
import Pay from '@/components/Pay.vue';
|
||
-import { getActiveOrderList, deleteActiveOrder } from '@/api/goods';
|
||
-import { getOrderStatistics } from '@/api/order';
|
||
+import {getActiveOrderList, deleteActiveOrder} from '@/api/goods';
|
||
+import {getOrderStatistics} from '@/api/order';
|
||
import UQRCode from 'uqrcodejs';
|
||
|
||
const tabValue = ref(0);
|
||
@@ -162,7 +162,7 @@
|
||
|
||
const delOrder = async (oid: string) => {
|
||
try {
|
||
- await deleteActiveOrder({ oid });
|
||
+ await deleteActiveOrder({oid});
|
||
} catch (error) {
|
||
Taro.showToast({
|
||
title: error.msg,
|
||
@@ -237,37 +237,49 @@
|
||
<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="{
|
||
- color: tabValue === item.value ? '#000' : '#9C9C9C',
|
||
- }">{{ item.title }}
|
||
+ <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 }}
|
||
</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="{
|
||
- color:
|
||
- item.status === 0
|
||
- ? '#FF850A'
|
||
- : item.status === 1
|
||
+ <view
|
||
+ :style="{
|
||
+ color:
|
||
+ item.status === 0
|
||
+ ? '#FF850A'
|
||
+ : item.status === 1
|
||
? '#F83D3D'
|
||
: item.status === 2
|
||
- ? '#333333'
|
||
- : '#9C9C9C',
|
||
- }">{{
|
||
- item.status === 0
|
||
- ? '待付款'
|
||
- : item.status === 1
|
||
+ ? '#333333'
|
||
+ : '#9C9C9C',
|
||
+ }"
|
||
+ >{{
|
||
+ item.status === 0
|
||
+ ? '待付款'
|
||
+ : item.status === 1
|
||
? '待使用'
|
||
: item.status === 2
|
||
- ? '已使用'
|
||
- : '已失效'
|
||
- }}
|
||
+ ? '已使用'
|
||
+ : '已失效'
|
||
+ }}
|
||
</view>
|
||
</view>
|
||
<view class="line"></view>
|
||
@@ -277,8 +289,11 @@
|
||
<view class="flex flex-col justify-between flex-1">
|
||
<view class="title">{{ itm.Goods?.name }}</view>
|
||
<view class="text-[#F83D3D] mt-5">
|
||
- <view>{{ itm.Goods.discount_price }}元
|
||
- <text v-if="itm.Goods.exchange > 0">+{{ itm.Goods.exchange }}积分</text>
|
||
+ <view
|
||
+ >{{ itm.Goods.discount_price }}元
|
||
+ <text v-if="itm.Goods.exchange > 0"
|
||
+ >+{{ itm.Goods.exchange }}积分</text
|
||
+ >
|
||
</view>
|
||
</view>
|
||
</view>
|
||
@@ -288,18 +303,28 @@
|
||
</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 ? '实' : '应' }}付款:
|
||
+ <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"
|
||
@@ -308,29 +333,55 @@
|
||
@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>
|
||
|
||
Index: src/pages/admin/order_manage/list/index.vue
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+><template>\n <view>\n <view class=\"tabs-1\">\n <view class=\"item\" v-for=\"(item, index) in opt\" :key=\"index\" @click=\"tabChange(item.value)\">\n <view :style=\"{\n color: item.value === tabVal ? '#333333' : '#9C9C9C',\n }\">{{ item.text }}</view>\n <view class=\"line\" :style=\"{\n backgroundColor: item.value === tabVal ? '#FFD940' : '',\n }\"></view>\n </view>\n </view>\n <view v-if=\"dataList.length > 0\">\n <view class=\"order-card\" v-for=\"(item, index) in dataList\" :key=\"index\" @click=\"toDetailPage(item)\">\n <view class=\"top\">\n <view class=\"text-[#9C9C9C] text-[25px]\">订单号:{{ item.oid }}</view>\n <view :style=\"{\n color:\n item.status === 0\n ? '#FF850A'\n : item.status === 1\n ? '#F83D3D'\n : item.status === 2\n ? '#333333'\n : '#9C9C9C',\n }\">{{\n item.status === 0\n ? '待付款'\n : item.status === 1\n ? '待使用'\n : item.status === 2\n ? '已使用'\n : '已失效'\n }}\n </view>\n </view>\n <view class=\"line\"></view>\n <view class=\"center\" v-for=\"(itm, idx) in item.OrderGoods\" :key=\"idx\">\n <view class=\"top\">\n <image class=\"mr-10\" :src=\"itm.Goods.cover\" />\n <view class=\"flex-1\">\n <view class=\"title\">{{ itm.Goods?.name }}</view>\n <view class=\"text-[#F83D3D] mt-5\">\n <view>{{ itm.pay_price }}元\n <text v-if=\"itm.pay_integral > 0\">+{{ itm.pay_integral }}积分</text>\n </view>\n </view>\n </view>\n <view class=\"right\">\n <view>x{{ itm.number }}</view>\n </view>\n </view>\n </view>\n <view class=\"flex justify-between items-center mt-2 mb-2 text-[25px]\" v-if=\"item.status !== 0\">\n <text class=\"text-[#9C9C9C]\">共{{ item.count }}件商品</text>\n <text class=\"text-[26px] flex-1 text-right\">{{ item.status !== 0 ? '实' : '应' }}付款:\n {{ item.discount_price }} (元)\n <text v-if=\"item.exchange > 0\">积分抵扣: {{ item.exchange }}</text>\n </text>\n </view>\n </view>\n </view>\n <nut-empty v-else description=\"暂无订单\"></nut-empty>\n </view>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue';\nimport Taro from '@tarojs/taro';\nimport { getActiveOrderList } from '../../../../api/admin';\n\nconst opt = ref([\n {\n text: '全部',\n value: 0,\n },\n {\n text: '待付款',\n value: 1,\n },\n {\n text: '待核销',\n value: 2,\n },\n {\n text: '已核销',\n value: 3,\n },\n {\n text: '已失效',\n value: 4,\n },\n]);\n\nconst tabVal = ref(0);\n\nconst dataList = ref<any>([]);\n\nconst pageOpt = ref({\n page: 1,\n total: 0,\n});\n\nTaro.useLoad(options => {\n tabVal.value = Number(options.type);\n getData();\n});\n\nconst getData = async () => {\n Taro.showLoading({\n title: '加载中',\n });\n try {\n const user_info = Taro.getStorageSync('userInfo');\n const data = {\n bid: user_info.data.bid,\n status: tabVal.value,\n PageNum: pageOpt.value.page,\n PageSize: 10,\n };\n const res = await getActiveOrderList(data);\n dataList.value.push(...res.data.data);\n pageOpt.value.total = res.data.total || 0;\n } catch (error) {\n Taro.showToast({\n title: error.msg,\n icon: 'none',\n });\n }\n Taro.hideLoading();\n};\n\nconst tabChange = (e: number) => {\n tabVal.value = e;\n dataList.value = [];\n getData();\n};\n\nconst toDetailPage = (item: any) => {\n Taro.setStorageSync('ver_order_info', item);\n Taro.navigateTo({\n url: '/pages/admin/order_manage/detail/index',\n });\n};\n\nTaro.useReachBottom(() => {\n if (pageOpt.value.total >= dataList.value.length)\n return Taro.showToast({\n title: '没有更多数据了',\n icon: 'none',\n });\n pageOpt.value.page++;\n getData();\n});\n</script>\n\n<style lang=\"scss\">\n@import './index.scss';\n</style>\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/pages/admin/order_manage/list/index.vue b/src/pages/admin/order_manage/list/index.vue
|
||
--- a/src/pages/admin/order_manage/list/index.vue (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/pages/admin/order_manage/list/index.vue (date 1727095402342)
|
||
@@ -1,37 +1,52 @@
|
||
<template>
|
||
<view>
|
||
<view class="tabs-1">
|
||
- <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="{
|
||
- backgroundColor: item.value === tabVal ? '#FFD940' : '',
|
||
- }"></view>
|
||
+ <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="{
|
||
+ 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="{
|
||
- color:
|
||
- item.status === 0
|
||
- ? '#FF850A'
|
||
- : item.status === 1
|
||
+ <view
|
||
+ :style="{
|
||
+ color:
|
||
+ item.status === 0
|
||
+ ? '#FF850A'
|
||
+ : item.status === 1
|
||
? '#F83D3D'
|
||
: item.status === 2
|
||
- ? '#333333'
|
||
- : '#9C9C9C',
|
||
- }">{{
|
||
- item.status === 0
|
||
- ? '待付款'
|
||
- : item.status === 1
|
||
+ ? '#333333'
|
||
+ : '#9C9C9C',
|
||
+ }"
|
||
+ >{{
|
||
+ item.status === 0
|
||
+ ? '待付款'
|
||
+ : item.status === 1
|
||
? '待使用'
|
||
: item.status === 2
|
||
- ? '已使用'
|
||
- : '已失效'
|
||
- }}
|
||
+ ? '已使用'
|
||
+ : '已失效'
|
||
+ }}
|
||
</view>
|
||
</view>
|
||
<view class="line"></view>
|
||
@@ -41,8 +56,11 @@
|
||
<view class="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>
|
||
@@ -51,9 +69,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>
|
||
- <text class="text-[26px] flex-1 text-right">{{ item.status !== 0 ? '实' : '应' }}付款:
|
||
+ <text class="text-[26px] flex-1 text-right"
|
||
+ >{{ item.status !== 0 ? '实' : '应' }}付款:
|
||
{{ item.discount_price }} (元)
|
||
<text v-if="item.exchange > 0">积分抵扣: {{ item.exchange }}</text>
|
||
</text>
|
||
@@ -65,9 +86,9 @@
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
-import { ref } from 'vue';
|
||
+import {ref} from 'vue';
|
||
import Taro from '@tarojs/taro';
|
||
-import { getActiveOrderList } from '../../../../api/admin';
|
||
+import {getActiveOrderList} from '../../../../api/admin';
|
||
|
||
const opt = ref([
|
||
{
|
||
Index: src/pages/admin/add_order/add_menu/index.vue
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+><template>\n <view>\n <!-- 商品列表 -->\n <view class=\"good-class\" v-if=\"class_list.length > 0\">\n <nut-tabs v-model=\"value\" title-scroll size=\"large\" direction=\"vertical\" title-gutter=\"5\" animated-time=\"0\"\n name=\"tabName\">\n <nut-tab-pane v-for=\"(itm, index) in good_list\" :key=\"index\" :title=\"itm.name\" :pane-key=\"index\">\n <view v-if=\"itm.Goods.length > 0\">\n <view class=\"list\" v-for=\"(item, index) in itm.Goods\" :key=\"index\">\n <view class=\"item\" @click.stop=\"toGoodDetails(item.gid, 1)\">\n <image :src=\"item.cover\" lazy-load />\n <view class=\"right\">\n <view class=\"name\">{{ item.name }}</view>\n <view class=\"stock\">剩余:{{ item.stock }}</view>\n <view class=\"bom\">\n <view>\n <view class=\"price\">\n <text style=\"font-size: 15px\">{{ item.number }}元</text>\n </view>\n <!-- <view class=\"price\">\n <text style=\"font-size: 15px\"\n >{{ item.exchange }}积分</text\n >\n </view> -->\n </view>\n <nut-button size=\"mini\" type=\"primary\" @click.stop=\"add_cart(item)\">\n <template #icon>\n <Cart2 />\n </template>\n </nut-button>\n </view>\n </view>\n </view>\n </view>\n </view>\n <nut-empty v-else description=\"该分类暂无商品\"></nut-empty>\n <view style=\"height: 180rpx\"></view>\n </nut-tab-pane>\n </nut-tabs>\n </view>\n <nut-empty v-else description=\"该商家暂无商品\"></nut-empty>\n <!-- 购物车 -->\n <cart ref=\"cartRef\" :mer-info=\"mer_info\" @update-cart=\"updateCartNum\" :IsPendingOrder=\"true\" />\n </view>\n</template>\n\n<script setup lang=\"ts\">\nimport { Ref, ref } from 'vue';\nimport Taro from '@tarojs/taro';\nimport Cart from '../../../../components/Cart.vue';\nimport { Cart2 } from '@nutui/icons-vue-taro';\nimport { getGoodList, getMerCategory } from '../../../../api/goods';\n\ninterface goodList {\n ID: number;\n name: string;\n bid: string;\n Goods: GoodsType[];\n}\n\ninterface GoodsType {\n gid: string;\n cover: string;\n name: string;\n number: number;\n stock: number;\n cartNum: number;\n exchange: number;\n}\n\ninterface CartItems {\n bid: string;\n gid: string;\n number: number;\n price: number;\n cover: string;\n name: string;\n exchange: number;\n}\n\nconst value = ref('0');\nconst good_list = ref<goodList[]>([]);\nconst class_list = ref<\n Array<{\n ID?: number;\n name?: string;\n }>\n>([]);\n\nTaro.useLoad(async e => {\n mer_info.value = e;\n await get_class_list(e.bid);\n await cartRef.value.get_cart_list();\n});\n\nconst get_class_list = async (bid: string) => {\n const res = await getMerCategory({\n Bid: bid,\n });\n class_list.value = res.data.data || [];\n await get_good_list(class_list.value[0].ID as number, bid);\n};\n\nconst get_good_list = async (id: number, bid: string) => {\n Taro.showLoading({\n title: '加载中',\n mask: true,\n });\n const res = await getGoodList({\n bid: bid,\n goods_class_id: id,\n status: 1,\n state: 1,\n });\n good_list.value = res.data.data || [];\n Taro.hideLoading();\n};\n\nconst toGoodDetails = (id: string, type: number) => {\n Taro.navigateTo({\n url: `/pages/goods/goods_detail/index?gid=${id}&type=${type}`,\n });\n};\n\nconst cartRef = ref(null) as Ref;\n\nconst mer_info = ref<any>({});\n\nconst add_cart = (item: GoodsType) => {\n const num = item.cartNum ? Number(item.cartNum) + 1 : 1;\n cartRef.value.add_cart(item, num);\n};\n\nconst updateCartNum = (cartItems: CartItems[]) => {\n if (cartItems.length > 0) {\n good_list.value.forEach((category: goodList) => {\n category.Goods.forEach((good: GoodsType) => {\n cartItems.forEach((cartItem: CartItems) => {\n if (good.gid === cartItem.gid) {\n good.cartNum = cartItem.number;\n }\n });\n });\n });\n } else {\n good_list.value.forEach((category: goodList) => {\n category.Goods.forEach((good: GoodsType) => {\n Reflect.deleteProperty(good, 'cartNum');\n });\n });\n }\n};\n</script>\n\n<style lang=\"scss\">\n@import './index.scss';\n</style>\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/pages/admin/add_order/add_menu/index.vue b/src/pages/admin/add_order/add_menu/index.vue
|
||
--- a/src/pages/admin/add_order/add_menu/index.vue (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/pages/admin/add_order/add_menu/index.vue (date 1727095402052)
|
||
@@ -2,9 +2,19 @@
|
||
<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)">
|
||
@@ -23,7 +33,10 @@
|
||
>
|
||
</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>
|
||
@@ -40,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 {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;
|
||
Index: src/pages/index/index.vue
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+><template>\n <view>\n <view :style=\"{ marginTop: BarHeight + 'px' }\"></view>\n <view class=\"local\">\n <view class=\"iconfont icon-dizhi\" style=\"font-size: 20px\"></view>\n <text class=\"text-[28px]\">{{ address }}</text>\n </view>\n <view class=\"search\">\n <view class=\"iconfont icon-sousuo\" style=\"color: #8f8f8f; margin-right: 8px\"></view>\n <input placeholder=\"请输入商家名称搜索\" v-model=\"searchVal\" />\n <view class=\"search-btn\" @click=\"clickSearch\">搜索</view>\n </view>\n <view class=\"banner\">\n <view class=\"title\"></view>\n <navigator class=\"jf-btn\" hover-class=\"none\"></navigator>\n <view class=\"footer\">\n <navigator hover-class=\"none\" class=\"btn-1\" url=\"/pages/fastBuy/index?type=1\"></navigator>\n <navigator hover-class=\"none\" openType=\"switchTab\" url=\"/pages/game/gamehome/index\" class=\"btn-2\"></navigator>\n <navigator hover-class=\"none\" class=\"btn-3\" url=\"/pages/fastBuy/index?type=2\"></navigator>\n </view>\n </view>\n <view class=\"navigation\">\n <view class=\"item\" v-for=\"(item, index) in navigationList\" :key=\"index\" @click=\"toPage(item)\">\n <image class=\"icon\" :src=\"item.icon\" />\n <view class=\"text\">{{ item.name }}</view>\n </view>\n </view>\n <navigator class=\"ad\" url=\"/pages/marketing/yq/index\" open-type=\"navigate\" hover-class=\"none\">\n </navigator>\n <MerList :get-user-location=\"getUserLocal\" />\n <Popup :imgArr=\"imgList\" />\n </view>\n</template>\n\n<script setup lang=\"ts\">\nimport Taro from '@tarojs/taro';\nimport { ref } from 'vue';\nimport { getHomeList } from '@/api/home';\nimport MerList from '@/components/MerList.vue';\nimport Popup from '@/components/Popup.vue';\n\nconst statusBarHeight = Taro.getSystemInfoSync().statusBarHeight;\nconst BarHeight = ref((statusBarHeight as number) + 7);\n\ninterface navigationType {\n ID?: number;\n type: number;\n icon: string;\n name: string;\n url: string;\n}\n\nconst navigationList = ref<Array<navigationType>>([]);\n\nconst imgList = ref([\n require('../../static/popTip.png'),\n]);\n\nTaro.useShareAppMessage(() => ({\n title: '捷兑通',\n path: `/pages/index/index?scene=${Taro.getStorageSync('token')}`,\n imageUrl: 'https://upload.jdt168.com/1714375021923881119_Share.jpg',\n}));\n\nconst searchVal = ref('');\n\nconst clickSearch = () => {\n if (!searchVal.value)\n return Taro.showToast({\n title: '请输入商家名称再搜索',\n icon: 'none',\n });\n Taro.navigateTo({\n url: `/pages/search/index?name=${searchVal.value}`,\n });\n searchVal.value = '';\n};\n\nTaro.useLoad(() => {\n Taro.getPrivacySetting({\n success: res => {\n if (res.needAuthorization) {\n Taro.requirePrivacyAuthorize({\n success: () => {\n console.log('用户同意授权');\n },\n fail: () => {\n console.log('用户拒绝授权');\n Taro.exitMiniProgram();\n },\n });\n }\n },\n });\n getNavLists();\n getUserLocal();\n});\n\nconst address = ref('获取位置中......');\n\nconst getUserLocal = async () => {\n Taro.getLocation({\n type: 'wgs84',\n success: res => {\n Taro.request({\n url: `https://apis.map.qq.com/ws/geocoder/v1/?location=${res.latitude},${res.longitude}&key=S3GBZ-WR26O-IXNW2-SXBOD-LZXV6-WAFNO&get_poi=1`,\n method: 'GET',\n success: res => {\n const data = res.data.result.address_component;\n address.value = `${data.district}${data.street_number}`;\n },\n });\n },\n });\n};\n\nconst getNavLists = async () => {\n navigationList.value = [\n // {\n // type: 1,\n // icon: '//p0.meituan.net/csc/5c770748f0028c63741c5ec14df3cc386715.png',\n // url: '',\n // name: '活动商家',\n // },\n // {\n // type: 1,\n // icon: '//p0.meituan.net/csc/4868c06b99008ff7d5f81e6514858c8a7950.png',\n // url: '',\n // name: '兑换商家',\n // },\n {\n type: 1,\n icon: '//p0.meituan.net/csc/f33ad2443a67e9f3474a1d5fd9d529db7504.png',\n url: '/pages/users/settled_mer/index',\n name: '商户入驻',\n },\n {\n type: 1,\n icon: '//p0.meituan.net/csc/0403cf37dd14a6b44b22ffccaa2878f95703.png',\n url: '/pages/allClassList/index',\n name: '全部服务',\n },\n ];\n const res = await getHomeList();\n res.data.data.forEach(item => {\n navigationList.value.unshift({\n ID: item.ID,\n type: 2,\n icon: item.icon,\n url: item.url,\n name: item.name,\n });\n });\n};\n\nconst toPage = item => {\n item.type !== 1\n ? Taro.navigateTo({\n url: `/pages/search/index?id=${item.ID}&name=${item.name}`,\n })\n : Taro.navigateTo({\n url: item.url as string,\n });\n};\n</script>\n\n<style lang=\"scss\">\n@import './index.scss';\n</style>\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
|
||
--- a/src/pages/index/index.vue (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/pages/index/index.vue (date 1727095402805)
|
||
@@ -1,12 +1,14 @@
|
||
<template>
|
||
<view>
|
||
- <view :style="{ marginTop: BarHeight + 'px' }"></view>
|
||
+ <view :style="{marginTop: BarHeight + 'px'}"></view>
|
||
<view class="local">
|
||
<view class="iconfont icon-dizhi" style="font-size: 20px"></view>
|
||
<text class="text-[28px]">{{ address }}</text>
|
||
</view>
|
||
<view class="search">
|
||
- <view class="iconfont icon-sousuo" style="color: #8f8f8f; margin-right: 8px"></view>
|
||
+ <view
|
||
+ class="iconfont icon-sousuo"
|
||
+ style="color: #8f8f8f; margin-right: 8px"></view>
|
||
<input placeholder="请输入商家名称搜索" v-model="searchVal" />
|
||
<view class="search-btn" @click="clickSearch">搜索</view>
|
||
</view>
|
||
@@ -14,18 +16,36 @@
|
||
<view class="title"></view>
|
||
<navigator class="jf-btn" hover-class="none"></navigator>
|
||
<view class="footer">
|
||
- <navigator hover-class="none" class="btn-1" url="/pages/fastBuy/index?type=1"></navigator>
|
||
- <navigator hover-class="none" openType="switchTab" url="/pages/game/gamehome/index" class="btn-2"></navigator>
|
||
- <navigator hover-class="none" class="btn-3" url="/pages/fastBuy/index?type=2"></navigator>
|
||
+ <navigator
|
||
+ hover-class="none"
|
||
+ class="btn-1"
|
||
+ url="/pages/fastBuy/index?type=1"></navigator>
|
||
+ <navigator
|
||
+ hover-class="none"
|
||
+ openType="switchTab"
|
||
+ url="/pages/game/gamehome/index"
|
||
+ class="btn-2"></navigator>
|
||
+ <navigator
|
||
+ hover-class="none"
|
||
+ class="btn-3"
|
||
+ url="/pages/fastBuy/index?type=2"></navigator>
|
||
</view>
|
||
</view>
|
||
<view class="navigation">
|
||
- <view class="item" v-for="(item, index) in navigationList" :key="index" @click="toPage(item)">
|
||
+ <view
|
||
+ class="item"
|
||
+ v-for="(item, index) in navigationList"
|
||
+ :key="index"
|
||
+ @click="toPage(item)">
|
||
<image class="icon" :src="item.icon" />
|
||
<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" />
|
||
<Popup :imgArr="imgList" />
|
||
@@ -34,8 +54,8 @@
|
||
|
||
<script setup lang="ts">
|
||
import Taro from '@tarojs/taro';
|
||
-import { ref } from 'vue';
|
||
-import { getHomeList } from '@/api/home';
|
||
+import {ref} from 'vue';
|
||
+import {getHomeList} from '@/api/home';
|
||
import MerList from '@/components/MerList.vue';
|
||
import Popup from '@/components/Popup.vue';
|
||
|
||
@@ -52,9 +72,7 @@
|
||
|
||
const navigationList = ref<Array<navigationType>>([]);
|
||
|
||
-const imgList = ref([
|
||
- require('../../static/popTip.png'),
|
||
-]);
|
||
+const imgList = ref([require('../../static/popTip.png')]);
|
||
|
||
Taro.useShareAppMessage(() => ({
|
||
title: '捷兑通',
|
||
@@ -156,11 +174,11 @@
|
||
const toPage = item => {
|
||
item.type !== 1
|
||
? Taro.navigateTo({
|
||
- url: `/pages/search/index?id=${item.ID}&name=${item.name}`,
|
||
- })
|
||
+ url: `/pages/search/index?id=${item.ID}&name=${item.name}`,
|
||
+ })
|
||
: Taro.navigateTo({
|
||
- url: item.url as string,
|
||
- });
|
||
+ url: item.url as string,
|
||
+ });
|
||
};
|
||
</script>
|
||
|
||
Index: src/pages/admin/order_manage/detail/index.vue
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+><template>\n <view>\n <!-- 订单信息 -->\n <nut-cell-group>\n <nut-cell>\n <template #default>\n <view class=\"center-box\">\n <view class=\"top\" v-for=\"(item, index) in info.OrderGoods\" :key=\"index\">\n <image class=\"mr-10\" :src=\"item.Goods?.cover\" />\n <view class=\"flex-1\">\n <view class=\"title\">{{ item.Goods?.name }}</view>\n <view class=\"text-[#F83D3D] mt-5\">\n <view>{{ item.pay_price }}元\n <text v-if=\"item.pay_integral > 0\">+{{ item.pay_integral }}积分</text>\n </view>\n </view>\n </view>\n <view class=\"right\">\n <view>x{{ item.number }}</view>\n </view>\n </view>\n <view class=\"flex justify-between items-center mt-2 mb-2 text-[25px]\">\n <view class=\"text-[#9C9C9C]\">{{ `共${info.count}件商品` }}</view>\n <text class=\"text-[26px] flex-1 text-right\">{{ info.status !== 0 ? '实' : '应' }}付款:\n {{ info.discount_price }} (元)\n <text v-if=\"info.exchange > 0\">积分抵扣: {{ info.exchange }}</text>\n </text>\n </view>\n </view>\n </template>\n </nut-cell>\n </nut-cell-group>\n <nut-cell-group>\n <nut-cell title=\"订单号:\" :desc=\"info.oid\"></nut-cell>\n <nut-cell title=\"订单状态:\" :desc=\"info.status === 0\n ? '待付款'\n : info.status === 1\n ? '待使用'\n : info.status === 2\n ? '已使用'\n : '已失效'\n \">\n </nut-cell>\n <nut-cell title=\"下单用户:\" :desc=\"info.User?.nickName\"></nut-cell>\n <nut-cell title=\"用户手机号:\" :desc=\"info.User?.phone\"></nut-cell>\n <nut-cell title=\"下单时间:\" :desc=\"info.add_time\"></nut-cell>\n <nut-cell v-if=\"info.status === 2\" title=\"核销时间:\" :desc=\"info.cancel_time\"></nut-cell>\n <nut-cell v-if=\"info.status === 2\" title=\"核销人员:\" :desc=\"info.CancelUser?.nickName\"></nut-cell>\n <nut-cell v-if=\"info.status === 2\" title=\"核销人手机号:\" :desc=\"info.CancelUser?.phone\"></nut-cell>\n </nut-cell-group>\n </view>\n</template>\n\n<script setup lang=\"ts\">\nimport Taro from '@tarojs/taro';\nimport { ref } from 'vue';\n\nconst info = ref<any>({});\n\nTaro.useLoad(() => {\n info.value = Taro.getStorageSync('ver_order_info');\n});\n</script>\n\n<style lang=\"scss\">\npage {\n --nut-cell-desc-color: #000;\n}\n\n.line {\n width: 100%;\n height: 1px;\n background-color: #f5f5f5;\n margin: 10px;\n}\n\n.header {\n background: linear-gradient(90deg, #2291f8 0, #1cd1dc);\n padding: 30px;\n color: #fff;\n font-size: 30px;\n}\n\n.user-info {\n background-color: #fff;\n width: 100%;\n}\n\n.good-info {\n margin-top: 20px;\n width: 100%;\n background-color: #fff;\n padding: 20px;\n\n .top {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n\n image {\n width: 200px;\n height: 200px;\n border-radius: 10px;\n }\n\n .title {\n flex: 1;\n padding: 10px;\n }\n\n .price {\n text-align: right;\n }\n }\n\n .public-total {\n font-size: 28px;\n color: #282828;\n border-top: 1px solid #eee;\n height: 92px;\n line-height: 92px;\n text-align: right;\n padding: 0 30px;\n background-color: #fff;\n }\n\n .public-total .money {\n color: #ff4c3c;\n }\n}\n\n.card {\n box-sizing: border-box;\n margin: 15px auto;\n background-color: #fff;\n padding: 20px;\n}\n\n.center {\n .top {\n display: flex;\n justify-content: space-between;\n // align-items: flex-start;\n margin-bottom: 10px;\n\n image {\n width: 150px;\n height: 150px;\n border-radius: 10px;\n }\n\n .title {\n margin-left: 10px;\n display: -webkit-box;\n overflow: hidden;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n width: 350px;\n }\n\n .right {\n margin-left: 10px;\n font-size: 28px;\n text-align: right;\n }\n }\n}\n\n.center-box {\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .top {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10rpx;\n\n image {\n width: 150px;\n height: 150px;\n border-radius: 10rpx;\n margin-right: 10px;\n }\n\n .title {\n margin-left: 10px;\n display: -webkit-box;\n overflow: hidden;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n width: 350px;\n }\n\n .right {\n margin-left: 10px;\n font-size: 28px;\n text-align: right;\n }\n }\n}\n</style>\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/pages/admin/order_manage/detail/index.vue b/src/pages/admin/order_manage/detail/index.vue
|
||
--- a/src/pages/admin/order_manage/detail/index.vue (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/pages/admin/order_manage/detail/index.vue (date 1727095402268)
|
||
@@ -5,13 +5,19 @@
|
||
<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 }}元
|
||
- <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>
|
||
@@ -19,11 +25,15 @@
|
||
<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>
|
||
- <text class="text-[26px] flex-1 text-right">{{ info.status !== 0 ? '实' : '应' }}付款:
|
||
+ <text class="text-[26px] flex-1 text-right"
|
||
+ >{{ info.status !== 0 ? '实' : '应' }}付款:
|
||
{{ info.discount_price }} (元)
|
||
- <text v-if="info.exchange > 0">积分抵扣: {{ info.exchange }}</text>
|
||
+ <text v-if="info.exchange > 0"
|
||
+ >积分抵扣: {{ info.exchange }}</text
|
||
+ >
|
||
</text>
|
||
</view>
|
||
</view>
|
||
@@ -32,11 +42,14 @@
|
||
</nut-cell-group>
|
||
<nut-cell-group>
|
||
<nut-cell title="订单号:" :desc="info.oid"></nut-cell>
|
||
- <nut-cell title="订单状态:" :desc="info.status === 0
|
||
- ? '待付款'
|
||
- : info.status === 1
|
||
- ? '待使用'
|
||
- : info.status === 2
|
||
+ <nut-cell
|
||
+ title="订单状态:"
|
||
+ :desc="
|
||
+ info.status === 0
|
||
+ ? '待付款'
|
||
+ : info.status === 1
|
||
+ ? '待使用'
|
||
+ : info.status === 2
|
||
? '已使用'
|
||
: '已失效'
|
||
">
|
||
@@ -44,16 +57,25 @@
|
||
<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>({});
|
||
|
||
Index: src/pages/admin/verify/verify_list/index.vue
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+><template>\n <view>\n <view class=\"card\">\n <view class=\"text-[#7A7A7A]\">订单号:{{ goodInfo.oid }}</view>\n <view class=\"line\"></view>\n <view class=\"container\" v-for=\"(item, index) in goodInfo.OrderGoods\" :key=\"index\">\n <image class=\"image\" :src=\"item.Goods.cover\"></image>\n <view class=\"info\">\n <view class=\"title\">{{ item.Goods.name }}</view>\n <view class=\"text-[#7A7A7A] text-[22px]\">{{\n item.Goods.profile || '此商品暂无描述'\n }}</view>\n </view>\n <view class=\"text-[#9C9C9C]\">x{{ item.number }}</view>\n </view>\n <view class=\"line\"></view>\n <view class=\"flex justify-between items-center mt-3 mb-2 text-[25px]\" style=\"text-align: right\">\n <text class=\"text-[#9C9C9C] text-left\">共{{ goodInfo.count }}件商品</text>\n <text class=\"text-[26px] flex-1\">实付款:\n {{ goodInfo.discount_price }} (元)\n <text v-if=\"goodInfo.exchange > 0\">积分抵扣: {{ goodInfo.exchange }}</text>\n </text>\n </view>\n <!-- <view class=\"line\"></view> -->\n <!-- <view class=\"cz\">\n <nut-button size=\"small\" type=\"primary\" @click=\"subVerify\"\n >确定核销</nut-button\n >\n </view> -->\n </view>\n <nut-cell-group>\n <nut-cell title=\"订单信息\"></nut-cell>\n <nut-cell title=\"下单时间:\" :desc=\"goodInfo.add_time?.slice(0, 19)\"></nut-cell>\n <nut-cell title=\"下单号码:\" :desc=\"goodInfo.User?.phone\"></nut-cell>\n <nut-cell title=\"下单用户:\" :desc=\"goodInfo.User?.nickName\"></nut-cell>\n <nut-cell title=\"付款方式:\" :desc=\"getPayType(goodInfo.pay_type)\"></nut-cell>\n </nut-cell-group>\n\n <view class=\"w-[90%] mt-[40px] m-auto\">\n <nut-button type=\"primary\" shape=\"square\" block @click=\"subVerify\">确定核销</nut-button>\n </view>\n </view>\n</template>\n\n<script setup lang=\"ts\">\nimport Taro from '@tarojs/taro';\nimport { getActiveVerifyList, activeOrderVerify } from '@/api/admin';\nimport { ref } from 'vue';\n\nconst opt = ref<any>({});\n\nTaro.useLoad(options => {\n opt.value = options;\n getData(options);\n});\n\nconst goodInfo = ref<any>({});\n\nconst getData = async (options: any) => {\n const merInfo = Taro.getStorageSync('userInfo');\n const res = await getActiveVerifyList({\n oid: options.oid,\n bid: merInfo.data.bid,\n });\n if (!res.data.data.oid) {\n Taro.showToast({\n title: '没有此订单',\n icon: 'none',\n });\n setTimeout(() => {\n Taro.navigateBack({\n delta: 1,\n });\n }, 3000);\n }\n goodInfo.value = res.data.data;\n};\n\nconst subVerify = async () => {\n try {\n const res = await activeOrderVerify({\n oid: goodInfo.value.oid,\n bid: goodInfo.value.bid,\n });\n Taro.showToast({\n title: res.msg,\n icon: 'none',\n });\n setTimeout(() => {\n Taro.navigateBack({\n delta: 1,\n });\n }, 3000);\n } catch (error) {\n Taro.showToast({\n title: error.msg,\n icon: 'none',\n });\n throw error;\n }\n};\n\nconst getPayType = (type: number) => {\n switch (type) {\n case 1:\n return '微信线上支付';\n case 2:\n return '平台积分支付';\n case 3:\n return '天才小猪支付';\n default:\n return '未知';\n }\n};\n</script>\n\n<style lang=\"scss\">\n@import './index.scss';\n</style>\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/pages/admin/verify/verify_list/index.vue b/src/pages/admin/verify/verify_list/index.vue
|
||
--- a/src/pages/admin/verify/verify_list/index.vue (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/pages/admin/verify/verify_list/index.vue (date 1727095402430)
|
||
@@ -3,22 +3,31 @@
|
||
<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>
|
||
<view class="text-[#7A7A7A] text-[22px]">{{
|
||
item.Goods.profile || '此商品暂无描述'
|
||
- }}</view>
|
||
+ }}</view>
|
||
</view>
|
||
<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="text-[26px] flex-1">实付款:
|
||
- {{ goodInfo.discount_price }} (元)
|
||
- <text v-if="goodInfo.exchange > 0">积分抵扣: {{ 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> -->
|
||
@@ -30,22 +39,28 @@
|
||
</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>({});
|
||
|
||
Index: src/pages/users/order_list_detail/index.vue
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+><template>\n <view class=\"p-4\">\n <!-- 步骤条 -->\n <!-- <view class=\"step-bar\">\n <view\n class=\"item\"\n v-for=\"item in statusList\"\n :key=\"item.id\"\n :class=\"{activation: item.id === goodInfo.status}\">\n <view class=\"text\">{{ item.text }}</view>\n <view class=\"dot\"></view>\n </view>\n </view> -->\n <!-- <view v-if=\"goodInfo.status === 1\" class=\"timeBox\">\n 订单剩余{{ timeStr }}过期,请尽快核销!\n </view> -->\n <view class=\"mb-3\">\n <view v-if=\"goodInfo.status === 0\">\n <view class=\"flex text-[#333333] items-center mb-1\">\n <view class=\"font-bold\">订单待付款</view>\n <IconFont name=\"rect-right\" size=\"15\" color=\"#333333\"></IconFont>\n </view>\n <view class=\"text-[#9C9C9C] text-[20px]\">订单未支付,请付款</view>\n </view>\n <view v-if=\"goodInfo.status === 1\">\n <view class=\"flex text-[#333333] items-center mb-1\">\n <view class=\"font-bold\">订单待使用</view>\n <IconFont name=\"rect-right\" size=\"15\" color=\"#333333\"></IconFont>\n </view>\n <view class=\"text-[#9C9C9C] text-[20px]\">订单剩余\n <text class=\"text-[#FF0000]\">{{ timeStr }} </text>\n 过期,请尽快核销!\n </view>\n </view>\n <view v-if=\"goodInfo.status === 2\">\n <view class=\"flex text-[#333333] items-center mb-1\">\n <view class=\"font-bold\">订单已使用</view>\n <IconFont name=\"rect-right\" size=\"15\" color=\"#333333\"></IconFont>\n </view>\n <view class=\"text-[#9C9C9C] text-[20px]\">订单已核销,欢迎下次光临</view>\n </view>\n <view v-if=\"goodInfo.status === 3\">\n <view class=\"flex text-[#333333] items-center mb-1\">\n <view class=\"font-bold\">订单失效</view>\n <IconFont name=\"rect-right\" size=\"15\" color=\"#333333\"></IconFont>\n </view>\n <view class=\"text-[#9C9C9C] text-[20px]\">未核销,已失效</view>\n </view>\n </view>\n <!-- 商家信息 -->\n <view class=\"mer-info\">\n <image class=\"w-[150px] h-[150px] rounded-lg mr-2\" :src=\"goodInfo.Store?.head_photo\" />\n <view class=\"right\">\n <view class=\"text-[#333333]\">{{ goodInfo.Store?.name }}</view>\n <view class=\"flex mt-2 items-center text-[#999999] text-[23px] text-ellipsis line-clamp-3\">\n <view style=\"font-size: 15px\" class=\"iconfont icon-dizhi text-[#C4C4C4]\"></view>\n <view>{{ goodInfo.Store?.address }}</view>\n </view>\n <view class=\"w-full flex items-center justify-between mt-1\">\n <view class=\"ml-3 text-[23px] text-[#999999]\">距离您{{\n calculateDistance(\n userLocalNum.t,\n userLocalNum.l,\n Number(goodInfo.Store?.lat),\n Number(goodInfo.Store?.lon),\n )\n }}\n </view>\n <view class=\"flex items-center\">\n <image @tap=\"toPhone()\" class=\"w-[50px] h-[50px]\"\n src=\"http://p0.meituan.net/csc/ab0493b124a6bb858bf82a2340767c0d919.png\" />\n <image @tap=\"toAdder()\" class=\"w-[50px] h-[50px] ml-2\"\n src=\"http://p1.meituan.net/csc/92ee8512c90527169b44e07fd11d250d924.png\" />\n </view>\n </view>\n </view>\n </view>\n\n <!-- 订单信息 -->\n <nut-cell-group>\n <nut-cell>\n <template #default>\n <view class=\"center-box\">\n <view class=\"top\" v-for=\"(item, index) in goodInfo.OrderGoods\" :key=\"index\">\n <image :src=\"item.Goods?.cover\" />\n <view class=\"flex flex-col justify-between flex-1\">\n <view class=\"title\">{{ item.Goods?.name }}</view>\n <view class=\"text-[#F83D3D] mt-5\">\n <view>{{ item.Goods.discount_price }}元\n <text v-if=\"item.Goods.exchange > 0\">+{{ item.Goods.exchange }}积分</text>\n </view>\n </view>\n </view>\n <view class=\"right\">\n <view>x{{ item.number }}</view>\n </view>\n </view>\n <view class=\"flex justify-between items-center mt-2 mb-2 text-[25px]\">\n <view class=\"text-[#9C9C9C]\">{{ `共${goodInfo.count}件商品` }}\n </view>\n <text class=\"text-[26px]\">{{ goodInfo.status !== 0 ? '实' : '应' }}付款:\n {{ goodInfo.discount_price }} (元)\n <text v-if=\"goodInfo.exchange > 0\">积分抵扣: {{ goodInfo.exchange }}</text>\n </text>\n </view>\n </view>\n </template>\n </nut-cell>\n </nut-cell-group>\n <nut-cell-group>\n <nut-cell title=\"订单号:\" :desc=\"goodInfo.oid\"></nut-cell>\n <nut-cell title=\"下单时间:\" :desc=\"goodInfo.add_time?.slice(0, 19)\"></nut-cell>\n <!-- <nut-cell\n v-if=\"goodInfo.expires !== 0\"\n title=\"订单过期时间:\"\n :desc=\"\n dayjs.unix(goodInfo.expires).format('YYYY-MM-DD HH:mm:ss')\n \"></nut-cell> -->\n <nut-cell title=\"订单状态:\" :desc=\"goodInfo.status === 0\n ? '待付款'\n : goodInfo.status === 1\n ? '待使用'\n : goodInfo.status === 2\n ? '已使用'\n : '已失效'\n \"></nut-cell>\n </nut-cell-group>\n\n <view class=\"mt-[30px] m-auto\">\n <nut-button v-if=\"goodInfo.status === 0\" shape=\"square\" type=\"primary\" block @click=\"openPay()\">继续付款\n </nut-button>\n <nut-button v-if=\"goodInfo.status === 1\" shape=\"square\" type=\"primary\" block @click=\"openCode()\">出示核销码\n </nut-button>\n </view>\n\n <!-- <view class=\"btn\">\n <nut-button\n plain\n v-if=\"goodInfo.status === 0\"\n size=\"small\"\n type=\"primary\"\n >取消订单\n </nut-button>\n <nut-button\n v-if=\"goodInfo.status === 0\"\n style=\"margin-left: 5px\"\n size=\"small\"\n type=\"primary\"\n @click=\"openPay()\"\n >立即付款\n </nut-button>\n <nut-button\n v-if=\"goodInfo.status === 1\"\n style=\"margin-left: 5px\"\n size=\"small\"\n type=\"primary\"\n @click=\"openCode()\"\n >出示核销码\n </nut-button>\n </view> -->\n\n <!-- 核销码弹窗 -->\n <nut-popup v-model:visible=\"isShowCode\" position=\"center\" style=\"padding: 20px; border-radius: 15px\"\n :maskClosable=\"true\" safe-area-inset-bottom @click-overlay=\"closed\" @closed=\"closed\">\n <view class=\"code-box\">\n <view>核销码</view>\n <!-- <image class=\"qrcode\" :src=\"url\"></image> -->\n <!-- <view class=\"qrcode\"> -->\n <canvas ref=\"qrcode\" id=\"qrcode\" style=\"width: 200px; height: 200px\" canvas-id=\"qrcode\"></canvas>\n <!-- </view> -->\n </view>\n </nut-popup>\n <pay :isShowPay=\"isShowPay\" :interval=\"false\" :jfInfo=\"jfInfo\" :OrderType=\"2\" @errPay=\"errPay\"\n @successPay=\"successPay\" @closePay=\"closePay\" />\n </view>\n</template>\n\n<script setup lang=\"ts\">\nimport Taro from '@tarojs/taro';\nimport { onUnmounted, ref } from 'vue';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\nimport Pay from '@/components/Pay.vue';\nimport { calculateDistance } from '@/utils';\nimport { IconFont } from '@nutui/icons-vue-taro';\nimport { getActiveOrderDetail } from '@/api/goods';\nimport UQRCode from 'uqrcodejs';\n\ndayjs.extend(duration);\n\nconst goodInfo = ref<any>({});\n\nconst userLocalNum = ref({\n l: 0,\n t: 0,\n});\n\nconst isShowCode = ref(false);\nconst isShowPay = ref(false);\nconst jfInfo = ref<any>({});\n\nconst qrcode = ref();\n\nconst type = ref('');\n\nconst url = ref('');\n\nconst oid = ref('');\n\nconst tId = ref();\n\nTaro.useLoad(options => {\n type.value = options.type;\n oid.value = options.orderId;\n tId.value = Number(options.OrderType);\n Taro.getLocation({\n type: 'wgs84',\n success: res => {\n userLocalNum.value.l = res.longitude;\n userLocalNum.value.t = res.latitude;\n },\n });\n // goodInfo.value = Taro.getStorageSync('item');\n getOrderDetail();\n});\n\nconst getOrderDetail = async () => {\n const res = await getActiveOrderDetail({\n oid: oid.value,\n OrderType: tId.value,\n });\n goodInfo.value = res.data.data[0];\n if (goodInfo.value.status === 1) {\n startTime();\n }\n\n if (goodInfo.value.status === 2 && isShowCode.value) {\n Taro.showToast({\n title: '订单核销完成',\n icon: 'none',\n });\n }\n};\n\nconst toPhone = () => {\n Taro.makePhoneCall({\n phoneNumber: goodInfo.value.Store.mobile,\n });\n};\n\nconst toAdder = () => {\n Taro.openLocation({\n latitude: Number(goodInfo.value.Store.lat),\n longitude: Number(goodInfo.value.Store.lon),\n scale: 18,\n });\n};\n\nconst openPay = async () => {\n // isShowPay.value = true;\n // const mer_info = Taro.getStorageSync('mer_info');\n // const user_info = Taro.getStorageSync('userInfo');\n // const data = await getUserPoint({\n // phone: user_info.data.phone,\n // bid: mer_info.bid,\n // });\n // jfInfo.value = {\n // jh_info: data.data,\n // oid: Taro.getStorageSync('item').oid,\n // };\n // console.log(goodInfo.value.bid, goodInfo.value.joint_oid);\n Taro.navigateTo({\n url: `/pages/goods/pay/index?oid=${goodInfo.value.joint_oid}&bid=${goodInfo.value.bid}`,\n });\n};\n\nconst successPay = (val: boolean) => {\n isShowPay.value = val;\n Taro.showToast({\n title: '支付成功',\n icon: 'none',\n });\n Taro.navigateBack({\n delta: 1,\n });\n};\n\nconst errPay = () => {\n isShowPay.value = false;\n Taro.showToast({\n title: '支付失败',\n icon: 'none',\n });\n jfInfo.value = {};\n};\nconst closePay = () => {\n isShowPay.value = false;\n Taro.showToast({\n title: '支付取消',\n icon: 'none',\n });\n jfInfo.value = {};\n};\n\nconst t_id = ref();\n\nconst openCode = () => {\n if (goodInfo.value.status === 2) return;\n // 获取uQRCode实例\n const qr = new UQRCode();\n // 设置二维码内容\n qr.data = goodInfo.value.oid;\n // 设置二维码大小,必须与canvas设置的宽高一致\n qr.size = 200;\n // 调用制作二维码方法\n qr.make();\n // 获取canvas元素\n const ctx = Taro.createCanvasContext('qrcode');\n // 设置uQRCode实例的canvas上下文\n qr.canvasContext = ctx;\n // 调用绘制方法将二维码图案绘制到canvas上\n qr.drawCanvas();\n // url.value = `https://api.pwmqr.com/qrcode/create?url=${goodInfo.value.oid}`;\n isShowCode.value = true;\n t_id.value = setInterval(() => {\n getOrderDetail();\n }, 1000);\n};\n\nconst closed = () => {\n isShowCode.value = false;\n url.value = '';\n clearInterval(t_id.value);\n};\n\nlet timeId: any;\n\nconst timeStr = ref('????');\n\nconst startTime = () => {\n const nowTime = dayjs();\n const endTime = dayjs(goodInfo.value.expires * 1000);\n\n // 计算剩余时间的持续时间对象\n const duration = dayjs.duration(endTime.diff(nowTime));\n\n // 格式化剩余时间\n timeStr.value = duration.format('D天H小时m分钟s秒');\n\n if (goodInfo.value.expires - dayjs().unix() > 0) {\n clearTimeout(timeId);\n timeId = setTimeout(() => {\n startTime();\n }, 1000);\n }\n};\n\nTaro.useUnload(() => {\n clearTimeout(timeId);\n clearInterval(t_id.value);\n});\n\nTaro.useDidHide(() => {\n clearTimeout(timeId);\n clearInterval(t_id.value);\n});\n\nonUnmounted(() => {\n clearTimeout(timeId);\n clearInterval(t_id.value);\n});\n</script>\n\n<style lang=\"scss\">\npage {\n --nut-cell-desc-color: #999;\n height: 100vh;\n box-sizing: border-box;\n padding-bottom: 100px;\n position: relative;\n}\n\n.timeBox {\n text-align: center;\n font-weight: bold;\n font-size: 30px;\n padding: 30px;\n}\n\n.step-bar {\n width: 100%;\n height: 100px;\n background: #fff;\n display: flex;\n\n .item {\n width: 200px;\n height: 100px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n font-size: small;\n\n .dot {\n width: 25px;\n height: 25px;\n border-radius: 50%;\n background: #cecece;\n margin-top: 5px;\n }\n }\n\n .activation {\n .text {\n color: #ff0000;\n }\n\n .dot {\n background: #ff0000;\n position: relative;\n\n &::before {\n content: '';\n width: 15px;\n height: 15px;\n border-radius: 50%;\n background: #fff;\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n }\n }\n }\n}\n\n.mer-info {\n background-color: white;\n padding: 15px;\n margin-top: 10px;\n box-sizing: border-box;\n display: flex;\n justify-content: space-betweenhh;\n align-items: center;\n border-radius: 15px;\n\n .right {\n color: #858585;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 70%;\n }\n}\n\n.btn {\n box-sizing: border-box;\n background-color: #fff;\n position: fixed;\n bottom: 0;\n left: 0;\n right: 0;\n padding: 20px;\n\n display: flex;\n justify-content: flex-end;\n align-items: flex-start;\n}\n\n.center-box {\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .top {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10rpx;\n\n image {\n width: 150px;\n height: 150px;\n border-radius: 10rpx;\n margin-right: 10px;\n }\n\n .title {\n margin-left: 10px;\n display: -webkit-box;\n overflow: hidden;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n width: 350px;\n }\n\n .right {\n margin-left: 10px;\n font-size: 28px;\n text-align: right;\n }\n }\n}\n\n.code-box {\n padding: 20px;\n box-sizing: border-box;\n text-align: center;\n font-size: large;\n}\n\n.qrcode {\n // width: 200px;\n // height: 200px;\n // padding: 10px;\n // display: flex;\n // justify-content: center;\n // align-items: center;\n\n // canvas {\n // width: calc(100% - 20px);\n // height: calc(100% - 20px);\n // }\n}\n\n.nut-button {\n border-radius: 20px;\n}\n</style>\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/pages/users/order_list_detail/index.vue b/src/pages/users/order_list_detail/index.vue
|
||
--- a/src/pages/users/order_list_detail/index.vue (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/pages/users/order_list_detail/index.vue (date 1727095403201)
|
||
@@ -27,7 +27,8 @@
|
||
<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>
|
||
@@ -49,27 +50,37 @@
|
||
</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]">距离您{{
|
||
- calculateDistance(
|
||
- userLocalNum.t,
|
||
- userLocalNum.l,
|
||
- Number(goodInfo.Store?.lat),
|
||
- Number(goodInfo.Store?.lon),
|
||
- )
|
||
- }}
|
||
+ <view class="ml-3 text-[23px] text-[#999999]"
|
||
+ >距离您{{
|
||
+ calculateDistance(
|
||
+ userLocalNum.t,
|
||
+ userLocalNum.l,
|
||
+ Number(goodInfo.Store?.lat),
|
||
+ Number(goodInfo.Store?.lon),
|
||
+ )
|
||
+ }}
|
||
</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>
|
||
@@ -81,13 +92,19 @@
|
||
<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.Goods.discount_price }}元
|
||
- <text v-if="item.Goods.exchange > 0">+{{ item.Goods.exchange }}积分</text>
|
||
+ <view
|
||
+ >{{ item.Goods.discount_price }}元
|
||
+ <text v-if="item.Goods.exchange > 0"
|
||
+ >+{{ item.Goods.exchange }}积分</text
|
||
+ >
|
||
</view>
|
||
</view>
|
||
</view>
|
||
@@ -95,12 +112,17 @@
|
||
<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 ? '实' : '应' }}付款:
|
||
+ <text class="text-[26px]"
|
||
+ >{{ goodInfo.status !== 0 ? '实' : '应' }}付款:
|
||
{{ goodInfo.discount_price }} (元)
|
||
- <text v-if="goodInfo.exchange > 0">积分抵扣: {{ goodInfo.exchange }}</text>
|
||
+ <text v-if="goodInfo.exchange > 0"
|
||
+ >积分抵扣: {{ goodInfo.exchange }}</text
|
||
+ >
|
||
</text>
|
||
</view>
|
||
</view>
|
||
@@ -109,27 +131,44 @@
|
||
</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
|
||
- ? '待付款'
|
||
- : goodInfo.status === 1
|
||
- ? '待使用'
|
||
- : goodInfo.status === 2
|
||
+ <nut-cell
|
||
+ title="订单状态:"
|
||
+ :desc="
|
||
+ goodInfo.status === 0
|
||
+ ? '待付款'
|
||
+ : goodInfo.status === 1
|
||
+ ? '待使用'
|
||
+ : goodInfo.status === 2
|
||
? '已使用'
|
||
: '已失效'
|
||
"></nut-cell>
|
||
</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>
|
||
|
||
@@ -160,30 +199,46 @@
|
||
</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);
|
||
Index: src/pages/mer/mer_detail/index.vue
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+><template>\n <view>\n <view class=\"head-wrapper\" :style=\"{ top: BarHeight + 'px' }\">\n <view class=\"head-menu\">\n <Left class=\"iconfont\" @click=\"returns\" />\n <Home class=\"iconfont\" @click=\"goHome\" />\n </view>\n </view>\n <!-- 幻灯片 -->\n <nut-swiper :init-page=\"0\" :pagination-visible=\"false\" pagination-color=\"red\" auto-play=\"3000\">\n <nut-swiper-item v-for=\"(itm, idx) in swiperList\" :key=\"idx\">\n <img style=\"width: 100%; height: 100%\" :src=\"itm\" :alt=\"idx.toString()\" />\n </nut-swiper-item>\n </nut-swiper>\n <!-- 商家信息 -->\n <view class=\"infoBox\">\n <view class=\"title text-[#333333]\">{{ mer_info.name }}</view>\n <view class=\"flex items-center justify-between mt-3\">\n <nut-rate spacing=\"1\" active-color=\"rgba(252, 207, 10, 1)\" v-model=\"mer_info.rate\" />\n <view class=\"text-[#9E9E9E] text-[25px]\">销量:10000</view>\n <view class=\"text-[#9E9E9E] text-[25px]\">营业时间:{{ mer_info.week_start }}-{{ mer_info.week_end }}\n </view>\n </view>\n <view class=\"line\"></view>\n <view class=\"bom\">\n <view class=\"iconfont icon-dizhi text-[#C4C4C4]\" style=\"width: 15px; height: 15px; margin-right: 15px\"></view>\n <view class=\"left\">\n <view>{{ mer_info.address || '暂无商家地址' }}</view>\n <view class=\"sub mt-1\">距离您{{\n calculateDistance(\n userLocalNum.t,\n userLocalNum.l,\n Number(mer_info.lat),\n Number(mer_info.lon),\n )\n }}\n </view>\n </view>\n <view class=\"right\">\n <view @click=\"clickMap\">\n <image class=\"w-[50px] h-[50px]\" src=\"http://p1.meituan.net/csc/92ee8512c90527169b44e07fd11d250d924.png\" />\n </view>\n <view @click=\"clickPhone\">\n <image class=\"w-[50px] h-[50px]\" src=\"http://p0.meituan.net/csc/ab0493b124a6bb858bf82a2340767c0d919.png\" />\n </view>\n </view>\n </view>\n </view>\n <!-- 商品列表 -->\n <view class=\"good-class\" v-if=\"class_list.length > 0\">\n <nut-tabs v-model=\"value\" title-scroll size=\"large\" direction=\"vertical\" title-gutter=\"5\" animated-time=\"0\"\n type=\"\" name=\"tabName\">\n <nut-tab-pane v-for=\"(itm, index) in good_list\" :key=\"index\" :title=\"itm.name\" :pane-key=\"index\">\n <view v-if=\"itm.Goods.length > 0\">\n <view class=\"list\" v-for=\"(item, index) in itm.Goods\" :key=\"index\">\n <view class=\"item\" @click.stop=\"toGoodDetails(item.gid, 1)\">\n <image :src=\"item.cover\" lazy-load />\n <view class=\"right\">\n <view class=\"name\">{{ item.name }}</view>\n <view class=\"bom\">\n <view class=\"price\">\n <text style=\"font-size: 15px\">{{ item.discount_price }}元\n <text style=\"font-size: 15px\" v-if=\"item.exchange\">+{{ item.exchange }}积分\n </text>\n </text>\n </view>\n </view>\n <view class=\"bom\">\n <view>\n <view class=\"stock text-[25px]\">剩余:{{ item.stock }}</view>\n </view>\n <view class=\"flex items-center justify-between\">\n <view v-if=\"item.cartNum > 0\" class=\"btn\" @click.stop=\"add_cart(item, 1)\">\n <Minus />\n </view>\n <view v-if=\"item.cartNum > 0\" style=\"margin: 0 10px\">\n {{ item.cartNum }}\n </view>\n <view class=\"btn\" @click.stop=\"add_cart(item, 2)\">\n <Plus />\n </view>\n </view>\n </view>\n </view>\n </view>\n </view>\n </view>\n <nut-empty v-else description=\"该分类暂无商品\"></nut-empty>\n <view style=\"height: 180rpx\"></view>\n </nut-tab-pane>\n </nut-tabs>\n </view>\n <nut-empty v-else description=\"该商家暂无商品\"></nut-empty>\n <!-- 购物车 -->\n <cart ref=\"cartRef\" :mer-info=\"mer_info\" @update-cart=\"updateCartNum\" />\n </view>\n</template>\n\n<script setup lang=\"ts\">\nimport Taro from '@tarojs/taro';\nimport { Left, Home, Plus, Minus } from '@nutui/icons-vue-taro';\nimport { Ref, ref } from 'vue';\nimport { calculateDistance } from '@/utils';\nimport { getGoodList, getMerCategory, getMerDetail } from '@/api/goods';\nimport Cart from '@/components/Cart.vue';\n\nconst statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight;\nconst BarHeight = ref((statusBarHeight as number) + 6);\n\nconst swiperList = ref([]);\n\nconst mer_info = ref<any>({});\n\nconst value = ref('0');\n\nconst userLocalNum = ref({\n l: 0,\n t: 0,\n});\n\nconst bid = ref('');\n\nTaro.useLoad(opt => {\n bid.value = opt.bid;\n});\n\nTaro.useDidShow(() => {\n if (!Taro.getStorageSync('token')) {\n Taro.navigateTo({\n url: '/pages/users/login/index?isBack=1',\n });\n return;\n }\n Taro.getLocation({\n type: 'wgs84',\n success: res => {\n userLocalNum.value.l = res.longitude;\n userLocalNum.value.t = res.latitude;\n },\n });\n get_class_list();\n cartRef.value.get_cart_list();\n getStoreInfo();\n});\n\nconst getStoreInfo = async () => {\n const res = await getMerDetail({\n Bid: bid.value,\n });\n mer_info.value = res.data.data;\n Taro.setNavigationBarTitle({\n title: mer_info.value.name,\n });\n swiperList.value = mer_info.value.img.split(',');\n};\n\nconst clickPhone = () => {\n Taro.makePhoneCall({\n phoneNumber: mer_info.value.mobile,\n });\n};\n\nconst clickMap = () => {\n Taro.openLocation({\n name: mer_info.value.name,\n address: mer_info.value.address,\n latitude: Number(mer_info.value.lat),\n longitude: Number(mer_info.value.lon),\n scale: 18,\n });\n};\n\nconst class_list = ref<\n Array<{\n ID?: number;\n name?: string;\n }>\n>([]);\nconst get_class_list = async () => {\n const res = await getMerCategory({\n Bid: bid.value,\n });\n class_list.value = res.data.data || [];\n await get_good_list(class_list.value[0]?.ID as number);\n};\n\n// const clickTab = (val: any) => {\n// get_good_list(class_list.value[val.paneKey].ID as number);\n// };\n\ninterface goodList {\n ID: number;\n name: string;\n bid: string;\n Goods: GoodsType[];\n}\n\ninterface GoodsType {\n gid: string;\n cover: string;\n name: string;\n number: number;\n discount_price: number;\n stock: number;\n cartNum: number;\n exchange: number;\n}\n\ninterface CartItems {\n bid: string;\n gid: string;\n number: number;\n price: number;\n cover: string;\n name: string;\n exchange: number;\n}\n\nconst good_list = ref<goodList[]>([]);\nconst get_good_list = async (id: number) => {\n Taro.showLoading({\n title: '加载中',\n mask: true,\n });\n const res = await getGoodList({\n bid: bid.value,\n goods_class_id: id,\n status: 1,\n state: 1,\n });\n good_list.value = res.data.data || [];\n Taro.hideLoading();\n};\n\nconst toGoodDetails = (id: string, type: number) => {\n Taro.navigateTo({\n url: `/pages/goods/goods_detail/index?gid=${id}&type=${type}&bid=${bid.value}`,\n });\n};\n\nconst cartRef = ref(null) as Ref;\n\nconst add_cart = (item: GoodsType, type: number) => {\n let num = 0;\n if (type === 1) {\n num = Number(item.cartNum) - 1;\n } else {\n num = item.cartNum ? Number(item.cartNum) + 1 : 1;\n }\n\n cartRef.value.add_cart(item, num);\n};\n\nconst updateCartNum = (cartItems: CartItems[]) => {\n if (cartItems.length > 0) {\n good_list.value.forEach((category: goodList) => {\n category.Goods.forEach((good: GoodsType) => {\n cartItems.forEach((cartItem: CartItems) => {\n if (good.gid === cartItem.gid) {\n good.cartNum = cartItem.number;\n }\n });\n });\n });\n } else {\n good_list.value.forEach((category: goodList) => {\n category.Goods.forEach((good: GoodsType) => {\n Reflect.deleteProperty(good, 'cartNum');\n });\n });\n }\n};\n\nconst returns = () => {\n Taro.navigateBack({\n delta: 1,\n });\n};\n\nconst goHome = () => {\n Taro.switchTab({\n url: '/pages/index/index',\n });\n};\n</script>\n\n<style lang=\"scss\">\n@import './index.scss';\n</style>\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/pages/mer/mer_detail/index.vue b/src/pages/mer/mer_detail/index.vue
|
||
--- a/src/pages/mer/mer_detail/index.vue (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/pages/mer/mer_detail/index.vue (date 1727095402907)
|
||
@@ -1,56 +1,85 @@
|
||
<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">距离您{{
|
||
- calculateDistance(
|
||
- userLocalNum.t,
|
||
- userLocalNum.l,
|
||
- Number(mer_info.lat),
|
||
- Number(mer_info.lon),
|
||
- )
|
||
- }}
|
||
+ <view class="sub mt-1"
|
||
+ >距离您{{
|
||
+ calculateDistance(
|
||
+ userLocalNum.t,
|
||
+ userLocalNum.l,
|
||
+ Number(mer_info.lat),
|
||
+ Number(mer_info.lon),
|
||
+ )
|
||
+ }}
|
||
</view>
|
||
</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)">
|
||
@@ -59,18 +88,25 @@
|
||
<view class="name">{{ item.name }}</view>
|
||
<view class="bom">
|
||
<view class="price">
|
||
- <text style="font-size: 15px">{{ item.discount_price }}元
|
||
- <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">
|
||
@@ -98,10 +134,10 @@
|
||
|
||
<script setup lang="ts">
|
||
import Taro from '@tarojs/taro';
|
||
-import { Left, Home, Plus, Minus } from '@nutui/icons-vue-taro';
|
||
-import { Ref, ref } from 'vue';
|
||
-import { calculateDistance } from '@/utils';
|
||
-import { getGoodList, getMerCategory, getMerDetail } from '@/api/goods';
|
||
+import {Left, Home, Plus, Minus} from '@nutui/icons-vue-taro';
|
||
+import {Ref, ref} from 'vue';
|
||
+import {calculateDistance} from '@/utils';
|
||
+import {getGoodList, getMerCategory, getMerDetail} from '@/api/goods';
|
||
import Cart from '@/components/Cart.vue';
|
||
|
||
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight;
|
||
Index: src/pages/admin/withdrawal/index.vue
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+><script lang=\"ts\" setup>\nimport { ref } from 'vue';\nimport Taro from '@tarojs/taro';\nimport { getWithdrawList, addWithdraw } from '@/api/admin';\n\nconst user_info = ref<any>({});\n\nconst mer_info = ref<any>({});\n\nconst row = ref(0);\nconst str = ref(0);\n\nconst formRef = ref();\n\nconst basicData = ref({\n num: '',\n});\n\nconst showPreview = ref(false);\n\nconst visible1 = ref(false);\n\nconst imgData = ref([\n {\n src: '',\n },\n]);\n\nconst data = ref<any>([]);\n\nconst pagination = ref({\n page: 1,\n total: 0,\n});\n\nTaro.useLoad(() => {\n user_info.value = Taro.getStorageSync('userInfo');\n mer_info.value = Taro.getStorageSync('mer_info');\n getData();\n});\n\nconst getData = async () => {\n try {\n const res = await getWithdrawList({\n PageNum: pagination.value.page,\n PageSize: 10,\n Bid: user_info.value.data.bid,\n });\n data.value.push(...res.data.data);\n pagination.value.total = res.data.total;\n row.value = res.data.integral || 0;\n str.value = res.data.number || 0;\n } catch (e) {\n throw e;\n }\n};\n\nconst add = async () => {\n try {\n formRef.value?.validate().then(async ({ valid }) => {\n if (valid) {\n const res = await addWithdraw({\n Bid: user_info.value.data.bid,\n Number: Number(basicData.value.num),\n });\n Taro.showToast({\n title: res.msg,\n icon: 'none',\n });\n basicData.value.num = '';\n await getData();\n }\n });\n } catch (e) {\n throw e;\n }\n};\n\nconst rules = ref({\n num: [\n {\n message: '请填写提现余额',\n validator: (value, _) => {\n return value;\n },\n },\n {\n message: '提现余额最低为1元',\n validator: (value, _) => {\n return Number(value) >= 1;\n },\n },\n {\n message: '提现余额不能大于可提现余额',\n validator: (value, _) => {\n return Number(value) <= row.value;\n },\n },\n ],\n});\n\nconst openPreview = item => {\n imgData.value[0].src = item.status_img;\n showPreview.value = true;\n};\n\nconst closePreview = () => {\n showPreview.value = false;\n imgData.value[0].src = '';\n};\n\nTaro.usePullDownRefresh(() => {\n pagination.value.page = 1;\n getData();\n Taro.stopPullDownRefresh();\n});\n\nTaro.useReachBottom(() => {\n if (pagination.value.total === data.value.length)\n return Taro.showToast({\n title: '没有更多数据了',\n icon: 'none',\n });\n pagination.value.page++;\n getData();\n});\n</script>\n\n<template>\n <view>\n <view class=\"card\">\n <view class=\"container\">\n <view>\n <view class=\"font-bold text-[35px]\">{{ row }}</view>\n <view class=\"text-[25px] mt-2\">可提现余额</view>\n </view>\n <!-- <view class=\"line\"></view>\n <view class=\"\">\n <view class=\"font-bold text-[35px]\">{{ str }}</view>\n <view class=\"text-[25px] mt-2\">实际到账</view>\n </view> -->\n </view>\n <view class=\"footer\">\n <text>到账方式</text>\n <!-- <text>{{\n `${mer_info.bank}(${mer_info.bank_card?.substring(\n mer_info.bank_card.length - 4,\n )})`\n }}</text> -->\n <text>银行卡汇款</text>\n </view>\n </view>\n <view class=\"formCard\">\n <view class=\"flex justify-between mb-[25px]\">\n <text>余额提现</text>\n <!-- <view class=\"flex items-center\" @click=\"visible1 = true\">\n <image\n class=\"w-[26px] h-[26px]\"\n src=\"http://p1.meituan.net/csc/5437a800f4ed4a49f14984494c1c3077994.png\"></image>\n <view class=\"text-[#EC4443] text-[26px] ml-1\">提现疑问</view>\n </view> -->\n </view>\n <nut-form ref=\"formRef\" :model-value=\"basicData\" :rules=\"rules\">\n <nut-form-item prop=\"num\">\n <nut-input v-model=\"basicData.num\" class=\"nut-input-text\" placeholder=\"请输入提现余额\" type=\"text\">\n <template #right>\n <text class=\"text-[#EC4443] text-[26px]\" @tap=\"basicData.num = row.toString()\">全部</text>\n </template>\n </nut-input>\n </nut-form-item>\n </nut-form>\n <nut-button block type=\"primary\" @click=\"add\">立即提现</nut-button>\n </view>\n\n <view class=\"title\">\n <view class=\"title-line\"></view>\n <view class=\"title-text\">提现记录</view>\n </view>\n\n <view class=\"list\" v-if=\"data.length > 0\">\n <view class=\"item\" v-for=\"(item, index) in data\" :key=\"index\">\n <view class=\"flex justify-between items-center\">\n <view class=\"text-[25px] text-[#9C9C9C]\">到账金额</view>\n <view class=\"text-[27px]\" :class=\"item.status === 1\n ? 'success'\n : item.status === 1\n ? 'danger'\n : 'warning'\n \">{{\n item.status === 1\n ? '已打款'\n : item.status === 2\n ? '已拒绝'\n : '待审核'\n }}</view>\n </view>\n <view>\n <view class=\"mt-3 mb-3 text-[35px]\">¥{{ item.number }}</view>\n <view class=\"text-[25px] mb-1\">提现金额:{{ item.integral }}</view>\n <view class=\"text-[25px] mb-1\">信息服务费:{{ item.commission }}</view>\n <view class=\"text-[25px] mb-1\">手续费:{{ item.commission_number }}%</view>\n <view class=\"text-[25px] mb-1\">时间:{{ item.add_time }}</view>\n <view v-if=\"item.status === 2\" class=\"text-[25px] text-[#9C9C9C]\">备注:</view>\n <view v-if=\"item.status === 1\" class=\"text-[23px] mt-2 text-[#df3526]\" @click=\"openPreview(item)\">点我查看回执单\n </view>\n </view>\n </view>\n </view>\n <nut-empty v-else description=\"暂无提现记录\"></nut-empty>\n <!-- 图片预览 -->\n <nut-image-preview :show=\"showPreview\" :images=\"imgData\" @close=\"closePreview\" />\n\n <nut-dialog title=\"提现疑问?\" content=\"这是基础弹框。\" ok-text=\"我已知晓\" :no-cancel-btn=\"true\" v-model:visible=\"visible1\">\n <template #default>\n <text>\n 积分和人民币兑换比例为\n <text class=\"text-[#F83D3D]\">100:1</text>\n 平台收取<text class=\"text-[#F83D3D]\">10%服务费</text>和<text class=\"text-[#F83D3D]\">0.038%手续费</text>\n </text>\n </template>\n </nut-dialog>\n </view>\n</template>\n\n<style lang=\"scss\">\n@import './index.scss';\n</style>\n
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/pages/admin/withdrawal/index.vue b/src/pages/admin/withdrawal/index.vue
|
||
--- a/src/pages/admin/withdrawal/index.vue (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/pages/admin/withdrawal/index.vue (date 1727095402467)
|
||
@@ -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 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,
|
||
@@ -162,9 +162,17 @@
|
||
</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>
|
||
@@ -181,41 +189,67 @@
|
||
<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
|
||
- ? 'success'
|
||
- : item.status === 1
|
||
- ? 'danger'
|
||
- : 'warning'
|
||
- ">{{
|
||
+ <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 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>
|
||
Index: src/pages/goods/pay/index.scss
|
||
IDEA additional info:
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
|
||
<+>.nut-price {\r\n color: #333333;\r\n}\r\n\r\n.nut-price--symbol-large {\r\n font-size: 25px;\r\n}\r\n\r\n.line {\r\n width: 1;\r\n height: 30px;\r\n border-left: 1px solid #a3a3a3;\r\n margin: 0 50px;\r\n display: inline-block;\r\n}\r\n\r\n.nut-radio {\r\n margin-left: 10px;\r\n}\r\n\r\n.nut-radio__label {\r\n margin-left: 0;\r\n}\r\n\r\n.nut-button {\r\n border-radius: 20px;\r\n}\r\n\r\n.nut-short-password {\r\n // .nut-icon-tips {\r\n // display: none;\r\n // }\r\n\r\n @for $i from 1 through 5 {\r\n .nut-short-password__item:nth-child(#{$i}) {\r\n border-right: 1px solid var(--nut-shortpassword-border-color, #ddd);\r\n }\r\n }\r\n}\r\n\r\n.order-card {\r\n width: 95%;\r\n box-sizing: border-box;\r\n margin: 10px auto;\r\n background-color: #fff;\r\n border-radius: 10px;\r\n padding: 20px;\r\n\r\n .line {\r\n width: 100%;\r\n height: 1px;\r\n background-color: #f5f5f5;\r\n margin: 20px auto;\r\n }\r\n\r\n .top {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n }\r\n\r\n .btn {\r\n display: flex;\r\n justify-content: flex-end;\r\n align-items: center;\r\n }\r\n\r\n .center {\r\n .top {\r\n display: flex;\r\n align-items: flex-start;\r\n\r\n image {\r\n width: 150px;\r\n height: 150px;\r\n border-radius: 15px;\r\n margin-right: 20px;\r\n }\r\n\r\n .title {\r\n display: -webkit-box;\r\n overflow: hidden;\r\n -webkit-line-clamp: 2;\r\n -webkit-box-orient: vertical;\r\n text-overflow: ellipsis;\r\n width: 350px;\r\n }\r\n\r\n .right {\r\n margin-left: 10px;\r\n font-size: 28px;\r\n text-align: right;\r\n color: #9c9c9c;\r\n }\r\n }\r\n }\r\n}
|
||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||
<+>UTF-8
|
||
===================================================================
|
||
diff --git a/src/pages/goods/pay/index.scss b/src/pages/goods/pay/index.scss
|
||
--- a/src/pages/goods/pay/index.scss (revision 097029128cd2749b71a445397d04a48d9ddaba1a)
|
||
+++ b/src/pages/goods/pay/index.scss (date 1727095402688)
|
||
@@ -94,4 +94,4 @@
|
||
}
|
||
}
|
||
}
|
||
-}
|
||
\ No newline at end of file
|
||
+}
|