From 4b6edf3a8ebe6eebb94615ce692938550556d441 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Fri, 11 Oct 2024 17:10:02 +0800
Subject: [PATCH] 1
---
src/page/user/compontents/cash-list.vue | 4 +-
src/page/home/home.vue | 8 ++--
src/page/list/tradingList/data.list.vue | 7 +++
src/page/user/Warehouse/data.list.vue | 42 +++++++++++++++-----
src/page/newUser/index.vue | 2
src/assets/img/img_log_home.png | 0
6 files changed, 44 insertions(+), 19 deletions(-)
diff --git a/src/assets/img/img_log_home.png b/src/assets/img/img_log_home.png
index 0c1f376..12e9547 100644
--- a/src/assets/img/img_log_home.png
+++ b/src/assets/img/img_log_home.png
Binary files differ
diff --git a/src/page/home/home.vue b/src/page/home/home.vue
index 75945b1..6a1bc2a 100644
--- a/src/page/home/home.vue
+++ b/src/page/home/home.vue
@@ -91,7 +91,7 @@
<div class="name">{{ $t("安全") }}</div>
</div>
</li> -->
- <li @click="aRouter1">
+ <!-- <li @click="aRouter1">
<div class="link">
<div class="icon">
<img
@@ -100,7 +100,7 @@
</div>
<div class="name">{{ $t("kf") }}</div>
</div>
- </li>
+ </li> -->
<!-- <li @click="$router.push('/warehouse')">
<div class="link">
<div class="icon">
@@ -492,10 +492,10 @@
},
},
- mounted() {
+ async mounted() {
this.getUserInfo();
this.getInfoSite();
- this.getNewsList(1);
+ await this.getNewsList(1);
this.getArtList();
this.getBanner();
diff --git a/src/page/list/tradingList/data.list.vue b/src/page/list/tradingList/data.list.vue
index f06795a..738e855 100644
--- a/src/page/list/tradingList/data.list.vue
+++ b/src/page/list/tradingList/data.list.vue
@@ -186,7 +186,12 @@
refreshing: false,
};
},
-
+ beforeDestroy() {
+ if (this.Trade) {
+ this.Trade.close();
+ console.log('WebSocket disconnected');
+ }
+ },
mounted() {
this.listArr = [];
this.pageNumVal = 1;
diff --git a/src/page/newUser/index.vue b/src/page/newUser/index.vue
index 692320d..02cb396 100644
--- a/src/page/newUser/index.vue
+++ b/src/page/newUser/index.vue
@@ -423,7 +423,7 @@
});
});
- const arr = data.data.filter((item) => item.accectType === "ALL");
+ const arr = data.data.filter((item) => item.accectType === "IN");
this.asstesAll = arr[0].totalMoney;
}
},
diff --git a/src/page/user/Warehouse/data.list.vue b/src/page/user/Warehouse/data.list.vue
index 136e699..b676e42 100644
--- a/src/page/user/Warehouse/data.list.vue
+++ b/src/page/user/Warehouse/data.list.vue
@@ -310,9 +310,10 @@
</div>
<div class="hang">
<div class="left">{{ $t("倉位(股)") }}</div>
- <div class="right" style="color: rgb(3, 173, 143)">
+ <!-- <div class="right" style="color: rgb(3, 173, 143)">
{{ closeSell.orderNum }}
- </div>
+ </div> -->
+ <input class="input_box" type="number" :max="closeSell.orderNum" :placeholder="$t('hj262')" v-model="ordernum" />
</div>
<div class="hang">
<div class="left">{{ $t("類型") }}</div>
@@ -348,6 +349,7 @@
closeSell: {},
show: false,
actives: 0,
+ ordernum:'',
dataList: [],
newdataList:[],
timer: null,
@@ -365,7 +367,7 @@
};
},
created(){
- this.dsq()
+ // this.dsq()
},
beforeDestroy() {
clearInterval(this.timer); // 在组件销毁前清除定时器
@@ -375,7 +377,7 @@
// this.dataList = [];
this.timer = setInterval(() => {
this.getList();
- }, 3000);
+ }, 1000);
},
pushRouter(item) {
const obj = {
@@ -404,14 +406,16 @@
this.loading = true;
},
async confirm() {
+ this.$refs.closeDialog.show = false;
const res = await sell({
positionSn: this.closeSell.positionSn,
+ number:this.ordernum
});
if (res.status === 0) {
- this.$refs.closeDialog.show = false;
this.dataList = [];
this.pageNum = 1;
this.finished = false;
+ Notify({ type: "success", message: res.msg });
this.getList();
this.$emit("closingPosition");
} else {
@@ -429,11 +433,13 @@
state: this.actives,
stockType: laber || this.activeObj.laber,
pageNum: 1,
- pageSize: 100,
+ pageSize: 30,
});
this.loading = false;
if (res.status === 0) {
+ this.dataList = []
+ this.newdataList = []
if(this.actives == 0){
this.dataList = res.data.list;
}else{
@@ -455,23 +461,31 @@
close(item) {
this.closeSell = item;
this.$refs.closeDialog.show = true;
+ this.ordernum = ''
},
+
clickTabs(e) {
this.dataList = [];
this.pageNum = 1;
this.finished = false;
this.actives = e.key;
- this.$forceUpdate(); // 强制Vue重新渲染
+ // this.newdataList = []
+ // this.dataList = []
+
if(e.key==1){
- clearTimeout(this.timer);
+ clearInterval(this.timer); // 在组件销毁前清除定时器
+ // clearTimeout(this.timer);
// setTimeout(()=>{
// clearInterval(this.timer); // 在组件销毁前清除定时器
// },3000)
- this.getList()
-
- }else{
this.dsq()
+ // this.startPolling();
+ // this.dsq()
+ }else{
+ clearInterval(this.timer); // 在组件销毁前清除定时器
+ this.getList()
}
+ this.$forceUpdate(); // 强制Vue重新渲染
// this.getList()
// if(e.key !=this.actives){
@@ -487,6 +501,12 @@
</script>
<style lang="less" scoped>
+ .input_box{
+ text-align: right;
+ font-size: 16px;
+
+ padding: 0 4px;
+ }
.sport-tabs {
// font-family: PingFang SC;
font-family: "DINPro";
diff --git a/src/page/user/compontents/cash-list.vue b/src/page/user/compontents/cash-list.vue
index 1a454f2..ac73f4e 100644
--- a/src/page/user/compontents/cash-list.vue
+++ b/src/page/user/compontents/cash-list.vue
@@ -90,12 +90,12 @@
</span>
</p>
</div>
- <div v-if="item.withStatus == 0" class="order-foot clearfix">
+ <!-- <div v-if="item.withStatus == 0" class="order-foot clearfix">
<div @click="cancle(item.id)" class="foot-btn">
<i class="font-icon"></i>
{{ $t("hjqxtx") }}
</div>
- </div>
+ </div> -->
</div>
<!-- <div class="capital">
<div class="pro">
--
Gitblit v1.9.3