修复ws返回信息

This commit is contained in:
2023-02-17 11:12:51 +08:00
parent 1e5085f4cc
commit 01bb09da30

View File

@@ -39,7 +39,6 @@
</template>
<script>
import {resolve} from "../../../../../../dvcp_v2_wechat_app/dist/dev/mp-weixin/common/vendor";
export default {
name: "list",
@@ -149,8 +148,8 @@ export default {
this.ws = new WebSocket(`ws://192.168.1.87:12525/ws`)
this.ws.onopen = () => resolve()
this.ws.onmessage = res => {
if (this.$checkJson(res)) {
const data = JSON.parse(res),
if (this.$checkJson(res?.data)) {
const data = JSON.parse(res.data),
row = this.tableData.find(e => e.id == data?.row?.id)
if (data.code == '0') {
row.count = data.progress