From 22979e776a3a3301bd09dbbfed55f070c40021bb Mon Sep 17 00:00:00 2001
From: xiaolei <18931076385@163.com>
Date: Wed, 13 Mar 2024 15:13:53 +0800
Subject: [PATCH 1/2] axl
---
node/model/module/axl_db.js | 2 +-
node/routes/axl_api.js | 8 ++---
vite-project/components.d.ts | 10 +-----
vite-project/src/views/MyView/MapView.vue | 7 ++--
vite-project/src/views/MyView/Order2View.vue | 3 +-
vite-project/src/views/MyView/OrderView.vue | 3 +-
vite-project/src/views/MyView/PingView.vue | 35 ++++++++++----------
7 files changed, 31 insertions(+), 37 deletions(-)
diff --git a/node/model/module/axl_db.js b/node/model/module/axl_db.js
index fcdae73..c5c75ad 100644
--- a/node/model/module/axl_db.js
+++ b/node/model/module/axl_db.js
@@ -40,7 +40,7 @@ const orderSchema = new mongoose.Schema({
const order1Schema = new mongoose.Schema({
ordernum:String,//订单编号
ordername:String,//订单名称
- orderprice:String,//订单价格
+ orderprice:Number,//订单价格
orderimg:String,//订单图片
ordernumber:Number,//订单数量
ordersize:String,//订单尺码
diff --git a/node/routes/axl_api.js b/node/routes/axl_api.js
index 49467cc..a6a9d40 100644
--- a/node/routes/axl_api.js
+++ b/node/routes/axl_api.js
@@ -16,15 +16,13 @@ router.post('/order',async function(req, res, next) {
})
// 编辑
router.put('/order',async function(req, res, next) {
- console.log(req.query.id);
- console.log(req.body.params);
- let data = await orderModel.updateOne({_id:req.query.id},req.body.params)
+ console.log(req.body.obj);
+ let data = await orderModel.updateOne({_id:req.query._id},req.body.obj)
res.send({code:200,msg:'编辑成功'})
})
// 删除
router.delete('/order',async function(req, res, next) {
- console.log(req.query._id);
- let data = await orderModel.deleteOne({_id:req.query.id})
+ let data = await orderModel.deleteOne({_id:req.query._id})
res.send({code:200,msg:'删除成功'})
})
diff --git a/vite-project/components.d.ts b/vite-project/components.d.ts
index 2c9e551..b6da9fa 100644
--- a/vite-project/components.d.ts
+++ b/vite-project/components.d.ts
@@ -11,30 +11,22 @@ declare module 'vue' {
RouterView: typeof import('vue-router')['RouterView']
VanAddressList: typeof import('vant/es')['AddressList']
VanButton: typeof import('vant/es')['Button']
- VanCell: typeof import('vant/es')['Cell']
VanCellGroup: typeof import('vant/es')['CellGroup']
- VanConfigProvider: typeof import('vant/es')['ConfigProvider']
- VanDialog: typeof import('vant/es')['Dialog']
VanField: typeof import('vant/es')['Field']
VanForm: typeof import('vant/es')['Form']
VanGrid: typeof import('vant/es')['Grid']
VanGridItem: typeof import('vant/es')['GridItem']
VanIcon: typeof import('vant/es')['Icon']
- VanImage: typeof import('vant/es')['Image']
- VanList: typeof import('vant/es')['List']
VanNavBar: typeof import('vant/es')['NavBar']
- VanPopover: typeof import('vant/es')['Popover']
- VanPopup: typeof import('vant/es')['Popup']
VanRate: typeof import('vant/es')['Rate']
VanSearch: typeof import('vant/es')['Search']
- VanShareSheet: typeof import('vant/es')['ShareSheet']
VanSticky: typeof import('vant/es')['Sticky']
VanSwipe: typeof import('vant/es')['Swipe']
VanSwipeItem: typeof import('vant/es')['SwipeItem']
+ VanSwitch: typeof import('vant/es')['Switch']
VanTab: typeof import('vant/es')['Tab']
VanTabbar: typeof import('vant/es')['Tabbar']
VanTabbarItem: typeof import('vant/es')['TabbarItem']
VanTabs: typeof import('vant/es')['Tabs']
- VanWatermark: typeof import('vant/es')['Watermark']
}
}
diff --git a/vite-project/src/views/MyView/MapView.vue b/vite-project/src/views/MyView/MapView.vue
index 62b752b..bf8f670 100644
--- a/vite-project/src/views/MyView/MapView.vue
+++ b/vite-project/src/views/MyView/MapView.vue
@@ -4,7 +4,7 @@
-
+
编辑信息
姓名:
@@ -23,7 +23,7 @@ import axios from 'axios';
import {ref} from 'vue';
import {useRouter} from 'vue-router';
const router = useRouter();
-const chosenAddressId = ref('65eea77aa9adba8a28d02d74');
+const chosenAddressId = ref('1');
const id = ref('65ecaa74502b7e9ed5e0642d')
const show = ref(false)
const message = ref([])
@@ -67,6 +67,9 @@ const edit=async()=>{
const isno=()=>{
show.value = false
}
+const onSelect=async(item,index)=>{
+ chosenAddressId.value=item.id
+}
\ No newline at end of file
--
Gitee