From 21fcd260e5e58829c3425a5c316ee3c2767af21d Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Mon, 5 Aug 2024 08:52:56 +0800
Subject: [PATCH 01/13] 1
---
manifest.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/manifest.json b/manifest.json
index 2d21d1f..98c10e0 100644
--- a/manifest.json
+++ b/manifest.json
@@ -135,8 +135,8 @@
"https" : false,
"proxy" : {
"/HiatmpPro" : {
- // "target" : "http://49.235.207.167:8800",
- "target" : "http://219.147.31.25:30001/tht-app-api",
+ "target" : "http://49.235.207.167:8800",
+ // "target" : "http://219.147.31.25:30001/tht-app-api",
"changeOrigin" : true,
"secure" : false,
"pathRewrite" : {
From cd9e99ecb364d179d93a9a0141c41162058c2aba Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Mon, 5 Aug 2024 10:47:17 +0800
Subject: [PATCH 02/13] 1
---
components/mp-html/parser.js | 3 +-
.../zeroMarkdownView/zeroMarkdownView.vue | 392 ++++++++++--------
2 files changed, 215 insertions(+), 180 deletions(-)
diff --git a/components/mp-html/parser.js b/components/mp-html/parser.js
index e2e7a87..66c9bc5 100644
--- a/components/mp-html/parser.js
+++ b/components/mp-html/parser.js
@@ -979,7 +979,8 @@ Parser.prototype.popNode = function () {
const table = Object.assign({}, node)
node.name = 'div'
node.attrs = {
- style: 'overflow:auto'
+ style: 'overflow:auto',
+ class: 'scrollbar-container'
}
node.children = [table]
attrs = table.attrs
diff --git a/components/zeroMarkdownView/zeroMarkdownView.vue b/components/zeroMarkdownView/zeroMarkdownView.vue
index 9e77cad..5873618 100644
--- a/components/zeroMarkdownView/zeroMarkdownView.vue
+++ b/components/zeroMarkdownView/zeroMarkdownView.vue
@@ -1,180 +1,214 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
From 5e02cb516a8e4f9680448bc9d5885c3e4b9a50b4 Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Mon, 5 Aug 2024 13:44:21 +0800
Subject: [PATCH 03/13] =?UTF-8?q?=E7=9F=A5=E8=AF=86=E5=BA=93=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/zeroMarkdownView/zeroMarkdownView.vue | 13 +++++--------
pages/knowledge/index.vue | 8 +++++---
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/components/zeroMarkdownView/zeroMarkdownView.vue b/components/zeroMarkdownView/zeroMarkdownView.vue
index 5873618..93fc706 100644
--- a/components/zeroMarkdownView/zeroMarkdownView.vue
+++ b/components/zeroMarkdownView/zeroMarkdownView.vue
@@ -186,27 +186,24 @@
// }
/* 设置滚动条的宽度和背景色 */
/deep/ .scrollbar-container::-webkit-scrollbar {
+ display: block!important;
width: 3px!important; /* 滚动条宽度 */
height: 3px!important; /* 对于垂直滚动条,设置高度 */
- background-color: #f9f9f9!important; /* 滚动条背景色 */
+ background-color: #ffffff!important; /* 滚动条背景色 */
}
/* 设置滚动条滑块的样式 */
/deep/ .scrollbar-container::-webkit-scrollbar-thumb {
border-radius: 10px; /* 滑块圆角 */
- background-color: #c1c1c1; /* 滑块颜色 */
+ background-color: #cccccc; /* 滑块颜色 */
}
- /* 设置滚动条滑块hover样式 */
- /deep/ .scrollbar-container::-webkit-scrollbar-thumb:hover {
- background-color: #a8a8a8; /* 滑块hover颜色 */
- }
/* 设置滚动条轨道的样式 */
/deep/ .scrollbar-container::-webkit-scrollbar-track {
border-radius: 10px; /* 轨道圆角 */
- box-shadow: inset 0 0 5px grey; /* 轨道阴影 */
- background-color: #f0f0f0; /* 轨道颜色 */
+ box-shadow: inset 0 0 0px grey; /* 轨道阴影 */
+ background-color: rgba(255,255,255,0); /* 轨道颜色 */
}
/deep/ .md-table {
margin-bottom: 10rpx!important;
diff --git a/pages/knowledge/index.vue b/pages/knowledge/index.vue
index 13ca5a5..b355dcd 100644
--- a/pages/knowledge/index.vue
+++ b/pages/knowledge/index.vue
@@ -50,7 +50,7 @@
-
+
@@ -279,8 +279,10 @@
}
},
- handlePlus() {
- this.isExpanded = !this.isExpanded;
+ handlePlus() {
+ this.$.toast("此功能暂不开放");
+
+ // this.isExpanded = !this.isExpanded;
},
clickContent() {
if (this.isExpanded) {
From 5f03690545c9ee17fdb964e87a6f9d62809a4d65 Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Mon, 5 Aug 2024 13:52:58 +0800
Subject: [PATCH 04/13] 1
---
components/zeroMarkdownView/zeroMarkdownView.vue | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/components/zeroMarkdownView/zeroMarkdownView.vue b/components/zeroMarkdownView/zeroMarkdownView.vue
index 93fc706..3599da4 100644
--- a/components/zeroMarkdownView/zeroMarkdownView.vue
+++ b/components/zeroMarkdownView/zeroMarkdownView.vue
@@ -208,4 +208,13 @@
/deep/ .md-table {
margin-bottom: 10rpx!important;
}
+ /deep/ .md-td {
+ white-space: nowrap;
+ text-align: center;
+ }
+ /deep/ .md-th {
+ white-space: nowrap;
+ text-align: center;
+ }
+
\ No newline at end of file
From 8a4c86fe3196914dc67ed9c9a269328f16d87c91 Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Mon, 5 Aug 2024 14:59:46 +0800
Subject: [PATCH 05/13] 1
---
pages/knowledge/index.vue | 1984 +++++++++++++++++++------------------
1 file changed, 1040 insertions(+), 944 deletions(-)
diff --git a/pages/knowledge/index.vue b/pages/knowledge/index.vue
index b355dcd..9900e95 100644
--- a/pages/knowledge/index.vue
+++ b/pages/knowledge/index.vue
@@ -1,946 +1,1042 @@
-
-
-
-
-
-
- 您好,我是海信通途大模型
-
- 作为你的智能伙伴,我可以为你提供交通领域知识的答疑解惑。
-
- 你可以这样问我:
-
-
-
-
- {{ item.title }}
-
-
- {{ item.text }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 照片
-
-
-
- 视频
-
-
-
-
-
-
-
-
-
-
+
+ // this.isExpanded = !this.isExpanded;
+ },
+ clickContent() {
+ if (this.isExpanded) {
+ this.isExpanded = !this.isExpanded;
+ }
+ },
+ goToKnowledge() {
+ uni.navigateTo({
+ url: `/pages/home/detail?params=${encodeURIComponent(
+ JSON.stringify(item)
+ )}`,
+ });
+ },
+
+ // 选择图片
+ chooseImage() {
+ uni.chooseImage({
+ count: 6, //默认9
+ sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
+ sourceType: ["album"], //从相册选择
+ success: async (res) => {
+ console.log(res);
+ if (res.tempFilePaths && res.tempFilePaths.length) {
+ let str = "";
+ let jsonArr = [];
+ for (let i = 0; i < res.tempFilePaths.length; i++) {
+ const result = await this.uploadFilePromise(res.tempFilePaths[i]);
+ let json = JSON.parse(result);
+ str += ``;
+ jsonArr.push(json.result);
+ }
+
+ console.log(str);
+ if (this.id == 12121212) {
+ this.changeMsgList("0", str);
+ this.queryChat(jsonArr);
+ } else {
+ // this.addQuestion(str, "0");
+ // this.SSE(jsonArr, "0");
+ this.changeMsgList("0", str);
+ let j = jsonArr.join(',')
+ this.queryChat(j);
+ }
+ }
+ },
+ });
+ },
+ uploadFilePromise(url) {
+ return new Promise((resolve, reject) => {
+ let a = uni.uploadFile({
+ url: this.$.baseUrl + "/hiddenDanger/ftp/uploadFileToFtp", // 仅为示例,非真实的接口地址
+ filePath: url,
+ name: "file",
+ success: (res) => {
+ resolve(res.data);
+ },
+ });
+ });
+ },
+ },
+ // methods: {
+ // // 建立SSE长连接
+ // SSE(voiceText, answerId) {
+ // const ctrl = new AbortController();
+ // console.log(ctrl.signal);
+ // fetchEventSource($.chatUrl + "/chat", {
+ // method: "POST",
+ // headers: {
+ // "Content-Type": "application/json",
+ // Accept: ["text/event-stream", "application/json"],
+ // },
+ // body: JSON.stringify({
+ // voiceText,
+ // deptId: "3702000000",
+ // id: "37020017407",
+ // multiType: "",
+ // sceneFlag: "",
+ // stream: true,
+ // type: "0",
+ // userId: "admin1",
+ // }),
+ // signal: ctrl.signal,
+ // openWhenHidden: true,
+ // onopen: () => {},
+ // onmessage: (ev) => {
+ // console.log(ev);
+ // this.loading = true;
+ // const res = JSON.parse(ev.data);
+ // if (res?.code == 200 && res.result) {
+ // console.log(res.result.data.tabkey);
+ // console.log(res.result.data);
+ // this.tabkey = res.result.data.tabkey;
+ // if (this.tabkey - 1 != this.active) {
+ // this.active = this.tabkey - 1 > 0 ? this.tabkey - 1 : 0;
+ // }
+ // if (this.msgList.length == 0) {
+ // this.msgList = [
+ // {
+ // answerId,
+ // data: res.result.data.content,
+ // },
+ // ];
+ // } else {
+ // // debugger
+ // //回答
+ // if (this.msgList[this.msgList.length - 1].answerId == "1") {
+ // //最后一个是回答
+ // this.msgList[this.msgList.length - 1].data +=
+ // res.result.data.content;
+ // } else {
+ // //最后一个是问题
+ // this.msgList = [
+ // ...this.msgList,
+ // {
+ // answerId: "1",
+ // data: res.result.data.content,
+ // },
+ // ];
+ // }
+ // }
+
+ // // debugger
+
+ // this.scrollBottom();
+ // }
+ // },
+ // onclose: () => {
+ // console.log(1111);
+ // this.loading = false;
+
+ // if (this.isExpanded) {
+ // this.isExpanded = !this.isExpanded;
+ // }
+ // },
+ // onerror(error) {
+ // console.log("error", error);
+ // throw error;
+ // },
+ // });
+ // },
+
+ // async queryChat(voiceText) {
+
+ // // console.log(voiceText,"voiceText");
+ // this.loading = true;
+ // const [err, res] = await uni.request({
+ // // url: 'http://10.16.3.159:8777/api/local_doc_qa/local_doc_chat',
+ // url: $.chatUrl + "/chat",
+ // dataType: "json",
+ // method: "POST",
+ // // responseType: 'arraybuffer',
+ // headers: {
+ // // 'Accept': 'text/event-stream',
+ // "content-type": "application/json",
+ // },
+ // data: {
+ // voiceText,
+ // sceneFlag: "",
+ // sessionId: this.sessionId,
+ // id: this.id,
+ // multiType: "",
+ // userId: "admin1",
+ // deptId: "3702000000",
+ // type: '0',
+ // stream: false,
+ // // "user_id": "zzp",
+ // // "kb_ids": ["KBa80ea15e786241eca70a20f136f4e34c"],
+ // // "question": "隐患排查流程是什么",
+ // // "streaming": true,
+ // // "history": []
+ // },
+ // });
+ // if (res && res.data && res.data.code == 200) {
+ // // console.log('request success', res.data)
+ // const { result = {} } = res.data;
+ // const { data = {} } = result;
+ // if (data.tabkey - 1 != this.active) {
+ // this.active = data.tabkey - 1 > 0 ? data.tabkey - 1 : 0;
+ // }
+ // if (data.content) {
+ // this.changeMsgList(
+ // data.answerId || "1",
+ // data.content,
+ // data.answerOptions
+ // );
+ // }
+ // this.loading = false;
+ // if (this.isExpanded) {
+ // this.isExpanded = !this.isExpanded;
+ // }
+ // } else {
+ // if (err) {
+ // console.log("request fail", err.errMsg);
+ // }
+ // uni.showToast({
+ // title: "查询失败",
+ // icon: "error",
+ // duration: 2000,
+ // });
+ // }
+ // },
+ // // 输入框
+ // onKeyInput(event) {
+ // this.inputValue = event.detail.value;
+ // },
+ // addQuestion(q, answerId) {
+ // const newQuestion = {
+ // answerId,
+ // data: q,
+ // };
+ // this.msgList.push(newQuestion); // 将问题添加到消息列表
+ // // this.$store.commit('setMSg_List', this.msgList);
+ // this.scrollBottom();
+ // },
+ // scrollBottom() {
+ // this.$nextTick(() => {
+ // // const height =
+ // // this.$refs.scrollView &&
+ // // this.$refs.scrollView.$refs &&
+ // // this.$refs.scrollView.$refs.content
+ // // ? this.$refs.scrollView.$refs.content.scrollHeight
+ // // : 0;
+ // this.scrollTop = this.scrollTop + 1;
+ // });
+ // },
+ // // 发送
+ // handleSend(text) {
+ // if (!this.inputValue & !text) {
+ // uni.showToast({
+ // title: "请输入内容",
+ // icon: "closeempty",
+ // duration: 2000,
+ // });
+ // }
+ // if (text || this.inputValue) {
+ // // if (this.params.id == 12121212) {
+ // this.changeMsgList("0", this.inputValue || text);
+ // this.queryChat(this.inputValue || text);
+ // this.scrollBottom();
+ // // } else {
+ // // this.addQuestion(this.inputValue || text, "0");
+ // // this.SSE(this.inputValue || text, "0");
+ // // }
+ // this.inputValue = "";
+ // }
+ // },
+ // // 更新列表信息
+ // changeMsgList(answerId, data, answerOptions) {
+ // let id = 1;
+ // if (this.msgList.length > 0) {
+ // id = this.msgList[this.msgList.length - 1].id + 1;
+ // }
+ // if (answerId == "1") {
+ // // 后台返回来的消息
+ // let newdata = "";
+ // let index = 0;
+ // const timer = setInterval(() => {
+ // newdata = newdata += data[index];
+ // if (this.msgList?.filter((item) => item.id == id).length == 0) {
+ // this.msgList = [
+ // ...this.msgList,
+ // {
+ // id,
+ // answerId,
+ // data: newdata,
+ // // options: answerOptions // ['东南西北','东北','东南北','东南西北'] answerOptions
+ // },
+ // ];
+ // } else {
+ // this.msgList[this.msgList.length - 1].data = newdata;
+ // }
+ // index += 1;
+ // this.scrollBottom();
+ // if (newdata == data) {
+ // this.msgList[this.msgList.length - 1].options = answerOptions;
+ // clearInterval(timer);
+ // }
+ // }, 50);
+ // } else {
+ // this.msgList = [
+ // ...this.msgList,
+ // {
+ // id,
+ // answerId,
+ // data,
+ // },
+ // ];
+ // this.scrollBottom();
+ // }
+ // },
+
+ // handlePlus() {
+ // this.isExpanded = !this.isExpanded;
+ // },
+ // // 快捷回复
+ // handleBtn(text) {
+ // this.handleSend(text);
+ // },
+ // clickContent() {
+ // if (this.isExpanded) {
+ // this.isExpanded = !this.isExpanded;
+ // }
+ // },
+ // goToKnowledge() {
+ // uni.navigateTo({
+ // url: "/pages/home/knowledge",
+ // // url: `/pages/home/knowledge?params=${encodeURIComponent(JSON.stringify(this.$route.query.params))}`
+ // });
+ // },
+ // // 选择图片
+ // chooseImage() {
+ // uni.chooseImage({
+ // count: 6, //默认9
+ // sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
+ // sourceType: ["album"], //从相册选择
+ // success: async (res) => {
+ // console.log(res)
+ // if (res.tempFilePaths && res.tempFilePaths.length) {
+ // let str = "";
+ // let jsonArr = []
+ // for (let i = 0; i < res.tempFilePaths.length; i++) {
+ // const result = await this.uploadFilePromise(res.tempFilePaths[i]);
+ // let json = JSON.parse(result)
+ // str += ``;
+ // jsonArr.push(json.result)
+ // }
+
+ // console.log(str)
+ // if (this.id == 12121212) {
+ // this.changeMsgList("0", str);
+ // this.queryChat(jsonArr);
+ // } else {
+ // // this.addQuestion(str, "0");
+ // // this.SSE(jsonArr, "0");
+ // this.changeMsgList("0", str);
+ // this.queryChat(jsonArr);
+ // }
+ // }
+ // },
+ // });
+ // },
+ // uploadFilePromise(url) {
+ // return new Promise((resolve, reject) => {
+ // let a = uni.uploadFile({
+ // url: this.$.baseUrl + '/hiddenDanger/ftp/uploadFileToFtp', // 仅为示例,非真实的接口地址
+ // filePath: url,
+ // name: 'file',
+ // success: (res) => {
+ // resolve(res.data)
+ // }
+ // });
+ // })
+ // },
+ // },
+ };
+
+
+
\ No newline at end of file
From 57b10998483a27e00cc15cd4458b651e17348d3b Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Mon, 5 Aug 2024 16:39:23 +0800
Subject: [PATCH 06/13] 1
---
pages/investigation/index.vue | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/pages/investigation/index.vue b/pages/investigation/index.vue
index 3fc9733..6d919b4 100644
--- a/pages/investigation/index.vue
+++ b/pages/investigation/index.vue
@@ -32,17 +32,17 @@
-
+
全部
-
+
人工上报
-
+
-
+
系统下发
-
+
@@ -149,6 +149,13 @@
},
// 方法
methods: {
+ queryTypeChange(e) {
+ this.queryType = e
+ this.page = 1;
+ this.list = [];
+ this.isMore = true
+ this.getList()
+ },
handleTabClick(tab) {
this.tab = tab;
this.page = 1;
@@ -157,11 +164,13 @@
switch (tab) {
case 1:
this.status = '10';
+ this.queryType = null
break;
// case 2:
// this.status = '20';
// break;
case 3:
+ this.queryType = '1'
this.status = '20';
break;
}
@@ -195,7 +204,7 @@
}
this.loadmorestatus = 'loading'
this.$request.globalRequest(
- `/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}&search=${this.search}`,
+ `/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}&search=${this.search}&classificatio=${this.queryType}`,
datas, 'POST')
.then(res => {
this.loadmorestatus = 'loadmore'
@@ -394,7 +403,8 @@
width: calc(100% - 100rpx);
padding: 0 50rpx;
height: 108rpx;
- .type-item{
+
+ .type-item {
width: 28%;
border-radius: 200rpx;
height: 50rpx;
@@ -404,9 +414,10 @@
border: #999999 solid 1rpx;
margin-top: 15rpx;
}
- .type-active{
+
+ .type-active {
border: #3c6dc3 solid 1rpx;
- color:#3c6dc3;
+ color: #3c6dc3;
}
}
}
From b4664a626f17d6aed07aae96e99b53024ea438c7 Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Mon, 5 Aug 2024 16:47:45 +0800
Subject: [PATCH 07/13] =?UTF-8?q?=E5=B7=B2=E5=AE=8C=E6=88=90=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/investigation/complete.vue | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pages/investigation/complete.vue b/pages/investigation/complete.vue
index 01c4a99..654a858 100644
--- a/pages/investigation/complete.vue
+++ b/pages/investigation/complete.vue
@@ -2,7 +2,7 @@
-
+
@@ -310,6 +310,11 @@
// this.getList()
},
+ skipPage(){
+ this.$.setData('pageStatus', 3)
+ this.$.setData('pageType', '3')
+ this.$.openTab('/pages/investigation/index')
+ },
initTroubleshootingData(id, index) {
this.troubleshootingData[index].extraConfigs = []
this.$request
From 21d60ea748c22e443a7a7e4ce38dbe7252404f0f Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Tue, 6 Aug 2024 09:45:56 +0800
Subject: [PATCH 08/13] 1
---
components/top-title.vue | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/components/top-title.vue b/components/top-title.vue
index 267428d..9fea94d 100644
--- a/components/top-title.vue
+++ b/components/top-title.vue
@@ -36,7 +36,12 @@ export default {
isShowLeft: {
type: Boolean,
default: true,
- },
+ },
+ // 是否自定义方法
+ isCuMethod: {
+ type: Boolean,
+ default: false,
+ },
// 标题
title: {
type: String,
@@ -85,9 +90,14 @@ export default {
return curPage
},
// 返回
- backPage(){
+ backPage(){
+ if(this.isCuMethod){
+ this.$emit('skipPage')
+ }else{
+ this.$.back()
+ }
// this.$emit('backPage')
- this.$.back()
+
},
// 跳转页面
skipPage(item) {
From 63fcdd2a696e462dae7cc7a2ea09145b01d0e081 Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Tue, 6 Aug 2024 14:09:26 +0800
Subject: [PATCH 09/13] 1
---
common/globalJs/request.js | 923 +++++++++++++++++-----------------
components/no-data.vue | 4 +-
pages/index/detail.vue | 2 +-
pages/index/index.vue | 6 +-
pages/investigation/index.vue | 17 +-
pages/logIn/logIn.vue | 644 +++++++++++++-----------
pages/mine/index.vue | 24 +-
pages/mine/password.vue | 355 +++++++------
8 files changed, 1031 insertions(+), 944 deletions(-)
diff --git a/common/globalJs/request.js b/common/globalJs/request.js
index f631c22..de684b1 100644
--- a/common/globalJs/request.js
+++ b/common/globalJs/request.js
@@ -1,459 +1,464 @@
-/**
- * 请求封装
- */
-import $ from "./globalJs";
-const tokenKey = "token";
-const tokenKeyValue = "";
-
-class Request {
- constructor(config = {}) {
- this.config = {};
- this.config.baseUrl = config.baseUrl ? config.baseUrl : "";
- this.config.dataType = config.dataType ? config.dataType : "json";
- this.config.responseType = config.responseType
- ? config.responseType
- : "text";
- this.config.header = config.header ? config.header : {};
- this.reqInterceptors = null;
- this.resInterceptors = null;
- this.interceptors = {
- request: (fn) => {
- this.reqInterceptors = fn;
- },
- response: (fn) => {
- this.resInterceptors = fn;
- },
- };
- }
- setConfig(config = {}) {
- this.config = this._deepCopy(this._merge(this.config, config));
- }
- // 请求封装
- globalRequest(url, config, method, isForm = "") {
- const _this = this;
- let newConfig = this._deepCopy(this._merge(this.config, config));
- let lastConfig = {};
- if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
- let reqInterceptors = this.reqInterceptors(newConfig);
- if (!reqInterceptors && process.env.NODE_ENV === "development") {
- console.log("请求被拦截,此消息仅在开发环境显示。");
- return false;
- } else if (
- Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
- ) {
- return reqInterceptors;
- }
- lastConfig = this._deepCopy(reqInterceptors);
- } else {
- lastConfig = this._deepCopy(newConfig);
- }
- let header = {};
- let tokenData = $.getData("token");
- if (tokenData) {
- header[tokenKey] = tokenKeyValue + tokenData;
- }
- if (isForm) {
- header["content-type"] = "application/x-www-form-urlencoded";
- }
- let fullUrl = this._formatUrl(lastConfig.baseUrl, url);
- if (url.indexOf("http") != -1) {
- fullUrl = url;
- }
- return new Promise((resolve, reject) => {
- uni.request({
- url: fullUrl,
- method: method,
- data: config,
- header: header,
- async complete(response) {
- let res = response;
- if (response.statusCode == 404) {
- $.toast("请求地址不存在");
- } else if (response.statusCode == 500) {
- $.toast("服务器内部错误");
- } else {
- console.log("response", response.statusCode);
- let res = response;
- if (
- _this.resInterceptors &&
- typeof _this.resInterceptors === "function"
- ) {
- let resInterceptors = _this.resInterceptors(res);
- // console.log('resInterceptors-----------------',resInterceptors)
- if (
- resInterceptors.statusCode == 401 ||
- resInterceptors.data.code == 403
- ) {
- $.toast("登录信息已过期,请重新登录");
- $.removeData("token");
- setTimeout(() => {
- $.openNew("/pages/logIn/logIn");
- }, 1500);
- return;
- } else if (resInterceptors.statusCode != 200) {
- $.toast(resInterceptors.data.message);
- }
- if (!resInterceptors && resInterceptors != "") {
- reject("返回值已被您拦截!");
- return;
- } else if (
- Object.prototype.toString.call(resInterceptors) ===
- "[object Promise]"
- ) {
- try {
- let promiseRes = await resInterceptors;
- resolve(promiseRes);
- } catch (error) {
- reject(error);
- }
- } else {
- res = resInterceptors;
- }
- }
- }
- resolve(res.data);
- },
- });
- });
- }
-
- addFile(file, success, progress) {
- const _this = this;
- let newConfig = this._deepCopy(this._merge(this.config, {}));
- let lastConfig = {};
- if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
- let reqInterceptors = this.reqInterceptors(newConfig);
- if (!reqInterceptors && process.env.NODE_ENV === "development") {
- console.log("请求被拦截,此消息仅在开发环境显示。");
- return false;
- } else if (
- Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
- ) {
- return reqInterceptors;
- }
- lastConfig = this._deepCopy(reqInterceptors);
- } else {
- lastConfig = this._deepCopy(newConfig);
- }
- let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl);
- let header = {
- // 'content-Type':'multipart/form-data'
- };
- return new Promise((resolve, reject) => {
- const UploadTask = uni.uploadFile({
- url: fullUrl,
- filePath: file[0].path,
- header: header,
- name: $.fileImgKey,
- formData: {},
- async complete(response) {
- let res = response;
- if (
- _this.resInterceptors &&
- typeof _this.resInterceptors === "function"
- ) {
- let resInterceptors = _this.resInterceptors(res);
- if (!resInterceptors && resInterceptors != "") {
- reject("返回值已被您拦截!");
- return;
- } else if (
- Object.prototype.toString.call(resInterceptors) ===
- "[object Promise]"
- ) {
- try {
- let promiseRes = await resInterceptors;
- resolve(promiseRes);
- } catch (error) {
- reject(error);
- }
- } else {
- res = resInterceptors;
- }
- }
- success(JSON.parse(res.data));
- },
- });
- // 监听上传进度
- if (progress) {
- UploadTask.onProgressUpdate((res) => {
- progress(res.progress);
- });
- }
- });
- }
-
- // 上传图片
- addImg(length = 1, success, progress, type = 1) {
- // 获取本地图片的路径
- uni.chooseImage({
- count: length,
- // original原图compressed压缩图
- sizeType: ["compressed"], // 可以指定是原图还是压缩图,默认二者都有
- // camera相机album相册
- sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有
- success: (res) => {
- // 显示上传动画
- $.showLoading("图片上传中...");
- var imgs;
- imgs = res.tempFilePaths;
- // #ifdef H5
- // 调用上传图片的函数
- // 处理多选
- // if (imgs.length > length) {
- // imgs = imgs.slice(0, length);
- // }
- this.fileImg(imgs, 0, success, progress, type);
- // #endif
- // #ifdef APP
- console.log("imgs", imgs);
- // 将新添加的图片添加到imgs_arr中
- uni.compressImage({
- src: imgs[0],
- quality: 60, // 仅对jpg有效
- success: (ress) => {
- this.fileImg([ress.tempFilePath], 0, success, progress, type);
- },
- fail: (err) => {
- $.hideLoading("图片上传中...");
- },
- complete: (msg) => {},
- });
- // #endif
- },
- complete: (err) => {},
- });
- }
- fileImg(imgs, index, success, progress, type) {
- const _this = this;
- let newConfig = this._deepCopy(this._merge(this.config, {}));
- let lastConfig = {};
- if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
- let reqInterceptors = this.reqInterceptors(newConfig);
- if (!reqInterceptors && process.env.NODE_ENV === "development") {
- console.log("请求被拦截,此消息仅在开发环境显示。");
- return false;
- } else if (
- Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
- ) {
- return reqInterceptors;
- }
- lastConfig = this._deepCopy(reqInterceptors);
- } else {
- lastConfig = this._deepCopy(newConfig);
- }
- let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl);
- if (type == 2) {
- fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUserIdUrl);
- }
- let header = {
- token: $.getData("token"),
- };
- // 如果数组长度大于下标,说明没有上传完
- if (imgs.length > index) {
- var src = imgs[index];
- return new Promise((resolve, reject) => {
- const UploadTask = uni.uploadFile({
- url: fullUrl,
- filePath: src,
- header: header,
- name: $.fileImgKey,
- formData: {},
- async complete(response) {
- let res = response;
- if (
- _this.resInterceptors &&
- typeof _this.resInterceptors === "function"
- ) {
- let resInterceptors = _this.resInterceptors(res);
- // console.log('resInterceptors',resInterceptors)
- let datasJSON = JSON.parse(resInterceptors.data);
- if (datasJSON.code == 1101) {
- }
- if (!resInterceptors && resInterceptors != "") {
- reject("返回值已被您拦截!");
- return;
- } else if (
- Object.prototype.toString.call(resInterceptors) ===
- "[object Promise]"
- ) {
- try {
- let promiseRes = await resInterceptors;
- resolve(promiseRes);
- } catch (error) {
- reject(error);
- }
- } else {
- res = resInterceptors;
- }
- }
- success(JSON.parse(res.data));
- _this.fileImg(imgs, index + 1, progress);
- },
- });
- // 监听上传进度
- if (progress) {
- UploadTask.onProgressUpdate((res) => {
- progress(res.progress);
- });
- }
- });
- // #ifdef H5
- // 压缩
- // lrz(src, {
- // quality: 0.7,
- // }).then((rst) => { // fieldName 为 formData 中多媒体的字段名
-
- // })
- // #endif
- // #ifdef APP-PLUS
- // #endif
- } else {
- $.hideLoading();
- }
- }
-
- // 上传视频
- addVideo(url, success, progress) {
- // 获取本地视频的路径
- uni.chooseVideo({
- sourceType: ["album", "camera"], // 选择方式
- success: (res) => {
- if (res.size > $.videoSize) {
- let size = parseInt($.videoSize / 1024000);
- $.toast("上传视频过大,大小请不要超过" + size + "M");
- } else {
- // 显示上传动画
- $.showLoading("视频上传中...");
- // 调用上传视频的函数
- this.fileVideo(res.tempFilePath, url, success, progress);
- }
- },
- fail: (res) => {
- console.log(JSON.stringify(res));
- },
- });
- }
- fileVideo(src, url, success, progress) {
- const _this = this;
- let newConfig = this._deepCopy(this._merge(this.config, {}));
- let lastConfig = {};
- if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
- let reqInterceptors = this.reqInterceptors(newConfig);
- if (!reqInterceptors && process.env.NODE_ENV === "development") {
- console.log("请求被拦截,此消息仅在开发环境显示。");
- return false;
- } else if (
- Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
- ) {
- return reqInterceptors;
- }
- lastConfig = this._deepCopy(reqInterceptors);
- } else {
- lastConfig = this._deepCopy(newConfig);
- }
- let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl);
- //上传视频
- return new Promise((resolve, reject) => {
- const UploadTask = uni.uploadFile({
- url: fullUrl,
- filePath: src,
- name: $.fileVideoKey,
- async complete(response) {
- let res = response;
- if (
- _this.resInterceptors &&
- typeof _this.resInterceptors === "function"
- ) {
- let resInterceptors = _this.resInterceptors(res);
- // console.log('resInterceptors',resInterceptors)
- if (!resInterceptors && resInterceptors != "") {
- reject("返回值已被您拦截!");
- return;
- } else if (
- Object.prototype.toString.call(resInterceptors) ===
- "[object Promise]"
- ) {
- try {
- let promiseRes = await resInterceptors;
- resolve(promiseRes);
- } catch (error) {
- reject(error);
- }
- } else {
- res = resInterceptors;
- }
- }
- success(JSON.parse(res.data));
- $.hideLoading();
- },
- success: (res) => {
- success(JSON.parse(res.data));
- // 关闭上传动画
- },
- fail: (e) => {
- // 关闭上传动画
- $.hideLoading();
- $.toast("上传超时!");
- },
- });
- // 监听上传进度
- if (progress) {
- UploadTask.onProgressUpdate((res) => {
- progress(res.progress);
- });
- }
- });
- }
-
- _formatUrl(baseUrl, url) {
- if (!baseUrl) return url;
- let formatUrl = "";
- const baseUrlEndsWithSlash = baseUrl.endsWith("/");
- const urlStartsWithSlash = url.startsWith("/");
- if (baseUrlEndsWithSlash && urlStartsWithSlash) {
- formatUrl = baseUrl + url.substring(1);
- } else if (baseUrlEndsWithSlash || urlStartsWithSlash) {
- formatUrl = baseUrl + url;
- } else {
- formatUrl = baseUrl + "/" + url;
- }
- return formatUrl;
- }
- _merge(oldConfig, newConfig) {
- let mergeConfig = this._deepCopy(oldConfig);
- if (!newConfig || !Object.keys(newConfig).length) return mergeConfig;
- for (let key in newConfig) {
- if (key !== "header") {
- mergeConfig[key] = newConfig[key];
- } else {
- if (
- Object.prototype.toString.call(newConfig[key]) === "[object Object]"
- ) {
- for (let headerKey in newConfig[key]) {
- mergeConfig[key][headerKey] = newConfig[key][headerKey];
- }
- }
- }
- }
- return mergeConfig;
- }
- _deepCopy(obj) {
- let result = Array.isArray(obj) ? [] : {};
- for (let key in obj) {
- if (obj.hasOwnProperty(key)) {
- if (typeof obj[key] === "object") {
- result[key] = this._deepCopy(obj[key]);
- } else {
- result[key] = obj[key];
- }
- }
- }
- return result;
- }
-}
-
-if (!global.$request) {
- global.$request = new Request();
-}
-
-export default global.$request;
+/**
+ * 请求封装
+ */
+import $ from "./globalJs";
+const tokenKey = "token";
+const tokenKeyValue = "";
+
+class Request {
+ constructor(config = {}) {
+ this.config = {};
+ this.config.baseUrl = config.baseUrl ? config.baseUrl : "";
+ this.config.dataType = config.dataType ? config.dataType : "json";
+ this.config.responseType = config.responseType ?
+ config.responseType :
+ "text";
+ this.config.header = config.header ? config.header : {};
+ this.reqInterceptors = null;
+ this.resInterceptors = null;
+ this.interceptors = {
+ request: (fn) => {
+ this.reqInterceptors = fn;
+ },
+ response: (fn) => {
+ this.resInterceptors = fn;
+ },
+ };
+ }
+ setConfig(config = {}) {
+ this.config = this._deepCopy(this._merge(this.config, config));
+ }
+ // 请求封装
+ globalRequest(url, config, method, isForm = "") {
+ const _this = this;
+ let newConfig = this._deepCopy(this._merge(this.config, config));
+ let lastConfig = {};
+ if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
+ let reqInterceptors = this.reqInterceptors(newConfig);
+ if (!reqInterceptors && process.env.NODE_ENV === "development") {
+ console.log("请求被拦截,此消息仅在开发环境显示。");
+ return false;
+ } else if (
+ Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
+ ) {
+ return reqInterceptors;
+ }
+ lastConfig = this._deepCopy(reqInterceptors);
+ } else {
+ lastConfig = this._deepCopy(newConfig);
+ }
+ let header = {};
+ let tokenData = $.getData("token");
+ if (tokenData) {
+ header[tokenKey] = tokenKeyValue + tokenData;
+ }
+ if (isForm) {
+ header["content-type"] = "application/x-www-form-urlencoded";
+ }
+ let fullUrl = this._formatUrl(lastConfig.baseUrl, url);
+ if (url.indexOf("http") != -1) {
+ fullUrl = url;
+ }
+ return new Promise((resolve, reject) => {
+ uni.request({
+ url: fullUrl,
+ method: method,
+ data: config,
+ header: header,
+ async complete(response) {
+ let res = response;
+ if ((response.errMsg == 'request:ok')) {
+
+ if (response.statusCode == 404) {
+ $.toast("请求地址不存在");
+ } else if (response.statusCode == 500) {
+ $.toast("服务器内部错误");
+ } else {
+ // console.log("response", response.statusCode);
+ let res = response;
+ if (
+ _this.resInterceptors &&
+ typeof _this.resInterceptors === "function"
+ ) {
+ let resInterceptors = _this.resInterceptors(res);
+ // console.log('resInterceptors-----------------',resInterceptors)
+ if (
+ resInterceptors.statusCode == 401 ||
+ resInterceptors.data.code == 403
+ ) {
+ $.toast("登录信息已过期,请重新登录");
+ $.removeData("token");
+ setTimeout(() => {
+ $.openNew("/pages/logIn/logIn");
+ }, 1500);
+ return;
+ } else if (resInterceptors.statusCode != 200) {
+ $.toast(resInterceptors.data.message);
+ }
+ if (!resInterceptors && resInterceptors != "") {
+ reject("返回值已被您拦截!");
+ return;
+ } else if (
+ Object.prototype.toString.call(resInterceptors) ===
+ "[object Promise]"
+ ) {
+ try {
+ let promiseRes = await resInterceptors;
+ resolve(promiseRes);
+ } catch (error) {
+ reject(error);
+ }
+ } else {
+ res = resInterceptors;
+ }
+ }
+ }
+ resolve(res.data);
+ }else{
+ reject()
+ }
+
+ },
+ });
+ });
+ }
+
+ addFile(file, success, progress) {
+ const _this = this;
+ let newConfig = this._deepCopy(this._merge(this.config, {}));
+ let lastConfig = {};
+ if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
+ let reqInterceptors = this.reqInterceptors(newConfig);
+ if (!reqInterceptors && process.env.NODE_ENV === "development") {
+ console.log("请求被拦截,此消息仅在开发环境显示。");
+ return false;
+ } else if (
+ Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
+ ) {
+ return reqInterceptors;
+ }
+ lastConfig = this._deepCopy(reqInterceptors);
+ } else {
+ lastConfig = this._deepCopy(newConfig);
+ }
+ let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl);
+ let header = {
+ // 'content-Type':'multipart/form-data'
+ };
+ return new Promise((resolve, reject) => {
+ const UploadTask = uni.uploadFile({
+ url: fullUrl,
+ filePath: file[0].path,
+ header: header,
+ name: $.fileImgKey,
+ formData: {},
+ async complete(response) {
+ let res = response;
+ if (
+ _this.resInterceptors &&
+ typeof _this.resInterceptors === "function"
+ ) {
+ let resInterceptors = _this.resInterceptors(res);
+ if (!resInterceptors && resInterceptors != "") {
+ reject("返回值已被您拦截!");
+ return;
+ } else if (
+ Object.prototype.toString.call(resInterceptors) ===
+ "[object Promise]"
+ ) {
+ try {
+ let promiseRes = await resInterceptors;
+ resolve(promiseRes);
+ } catch (error) {
+ reject(error);
+ }
+ } else {
+ res = resInterceptors;
+ }
+ }
+ success(JSON.parse(res.data));
+ },
+ });
+ // 监听上传进度
+ if (progress) {
+ UploadTask.onProgressUpdate((res) => {
+ progress(res.progress);
+ });
+ }
+ });
+ }
+
+ // 上传图片
+ addImg(length = 1, success, progress, type = 1) {
+ // 获取本地图片的路径
+ uni.chooseImage({
+ count: length,
+ // original原图compressed压缩图
+ sizeType: ["compressed"], // 可以指定是原图还是压缩图,默认二者都有
+ // camera相机album相册
+ sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有
+ success: (res) => {
+ // 显示上传动画
+ $.showLoading("图片上传中...");
+ var imgs;
+ imgs = res.tempFilePaths;
+ // #ifdef H5
+ // 调用上传图片的函数
+ // 处理多选
+ // if (imgs.length > length) {
+ // imgs = imgs.slice(0, length);
+ // }
+ this.fileImg(imgs, 0, success, progress, type);
+ // #endif
+ // #ifdef APP
+ console.log("imgs", imgs);
+ // 将新添加的图片添加到imgs_arr中
+ uni.compressImage({
+ src: imgs[0],
+ quality: 60, // 仅对jpg有效
+ success: (ress) => {
+ this.fileImg([ress.tempFilePath], 0, success, progress, type);
+ },
+ fail: (err) => {
+ $.hideLoading("图片上传中...");
+ },
+ complete: (msg) => {},
+ });
+ // #endif
+ },
+ complete: (err) => {},
+ });
+ }
+ fileImg(imgs, index, success, progress, type) {
+ const _this = this;
+ let newConfig = this._deepCopy(this._merge(this.config, {}));
+ let lastConfig = {};
+ if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
+ let reqInterceptors = this.reqInterceptors(newConfig);
+ if (!reqInterceptors && process.env.NODE_ENV === "development") {
+ console.log("请求被拦截,此消息仅在开发环境显示。");
+ return false;
+ } else if (
+ Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
+ ) {
+ return reqInterceptors;
+ }
+ lastConfig = this._deepCopy(reqInterceptors);
+ } else {
+ lastConfig = this._deepCopy(newConfig);
+ }
+ let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl);
+ if (type == 2) {
+ fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUserIdUrl);
+ }
+ let header = {
+ token: $.getData("token"),
+ };
+ // 如果数组长度大于下标,说明没有上传完
+ if (imgs.length > index) {
+ var src = imgs[index];
+ return new Promise((resolve, reject) => {
+ const UploadTask = uni.uploadFile({
+ url: fullUrl,
+ filePath: src,
+ header: header,
+ name: $.fileImgKey,
+ formData: {},
+ async complete(response) {
+ let res = response;
+ if (
+ _this.resInterceptors &&
+ typeof _this.resInterceptors === "function"
+ ) {
+ let resInterceptors = _this.resInterceptors(res);
+ // console.log('resInterceptors',resInterceptors)
+ let datasJSON = JSON.parse(resInterceptors.data);
+ if (datasJSON.code == 1101) {}
+ if (!resInterceptors && resInterceptors != "") {
+ reject("返回值已被您拦截!");
+ return;
+ } else if (
+ Object.prototype.toString.call(resInterceptors) ===
+ "[object Promise]"
+ ) {
+ try {
+ let promiseRes = await resInterceptors;
+ resolve(promiseRes);
+ } catch (error) {
+ reject(error);
+ }
+ } else {
+ res = resInterceptors;
+ }
+ }
+ success(JSON.parse(res.data));
+ _this.fileImg(imgs, index + 1, progress);
+ },
+ });
+ // 监听上传进度
+ if (progress) {
+ UploadTask.onProgressUpdate((res) => {
+ progress(res.progress);
+ });
+ }
+ });
+ // #ifdef H5
+ // 压缩
+ // lrz(src, {
+ // quality: 0.7,
+ // }).then((rst) => { // fieldName 为 formData 中多媒体的字段名
+
+ // })
+ // #endif
+ // #ifdef APP-PLUS
+ // #endif
+ } else {
+ $.hideLoading();
+ }
+ }
+
+ // 上传视频
+ addVideo(url, success, progress) {
+ // 获取本地视频的路径
+ uni.chooseVideo({
+ sourceType: ["album", "camera"], // 选择方式
+ success: (res) => {
+ if (res.size > $.videoSize) {
+ let size = parseInt($.videoSize / 1024000);
+ $.toast("上传视频过大,大小请不要超过" + size + "M");
+ } else {
+ // 显示上传动画
+ $.showLoading("视频上传中...");
+ // 调用上传视频的函数
+ this.fileVideo(res.tempFilePath, url, success, progress);
+ }
+ },
+ fail: (res) => {
+ console.log(JSON.stringify(res));
+ },
+ });
+ }
+ fileVideo(src, url, success, progress) {
+ const _this = this;
+ let newConfig = this._deepCopy(this._merge(this.config, {}));
+ let lastConfig = {};
+ if (this.reqInterceptors && typeof this.reqInterceptors === "function") {
+ let reqInterceptors = this.reqInterceptors(newConfig);
+ if (!reqInterceptors && process.env.NODE_ENV === "development") {
+ console.log("请求被拦截,此消息仅在开发环境显示。");
+ return false;
+ } else if (
+ Object.prototype.toString.call(reqInterceptors) === "[object Promise]"
+ ) {
+ return reqInterceptors;
+ }
+ lastConfig = this._deepCopy(reqInterceptors);
+ } else {
+ lastConfig = this._deepCopy(newConfig);
+ }
+ let fullUrl = this._formatUrl(lastConfig.baseUrl, $.imgUrl);
+ //上传视频
+ return new Promise((resolve, reject) => {
+ const UploadTask = uni.uploadFile({
+ url: fullUrl,
+ filePath: src,
+ name: $.fileVideoKey,
+ async complete(response) {
+ let res = response;
+ if (
+ _this.resInterceptors &&
+ typeof _this.resInterceptors === "function"
+ ) {
+ let resInterceptors = _this.resInterceptors(res);
+ // console.log('resInterceptors',resInterceptors)
+ if (!resInterceptors && resInterceptors != "") {
+ reject("返回值已被您拦截!");
+ return;
+ } else if (
+ Object.prototype.toString.call(resInterceptors) ===
+ "[object Promise]"
+ ) {
+ try {
+ let promiseRes = await resInterceptors;
+ resolve(promiseRes);
+ } catch (error) {
+ reject(error);
+ }
+ } else {
+ res = resInterceptors;
+ }
+ }
+ success(JSON.parse(res.data));
+ $.hideLoading();
+ },
+ success: (res) => {
+ success(JSON.parse(res.data));
+ // 关闭上传动画
+ },
+ fail: (e) => {
+ // 关闭上传动画
+ $.hideLoading();
+ $.toast("上传超时!");
+ },
+ });
+ // 监听上传进度
+ if (progress) {
+ UploadTask.onProgressUpdate((res) => {
+ progress(res.progress);
+ });
+ }
+ });
+ }
+
+ _formatUrl(baseUrl, url) {
+ if (!baseUrl) return url;
+ let formatUrl = "";
+ const baseUrlEndsWithSlash = baseUrl.endsWith("/");
+ const urlStartsWithSlash = url.startsWith("/");
+ if (baseUrlEndsWithSlash && urlStartsWithSlash) {
+ formatUrl = baseUrl + url.substring(1);
+ } else if (baseUrlEndsWithSlash || urlStartsWithSlash) {
+ formatUrl = baseUrl + url;
+ } else {
+ formatUrl = baseUrl + "/" + url;
+ }
+ return formatUrl;
+ }
+ _merge(oldConfig, newConfig) {
+ let mergeConfig = this._deepCopy(oldConfig);
+ if (!newConfig || !Object.keys(newConfig).length) return mergeConfig;
+ for (let key in newConfig) {
+ if (key !== "header") {
+ mergeConfig[key] = newConfig[key];
+ } else {
+ if (
+ Object.prototype.toString.call(newConfig[key]) === "[object Object]"
+ ) {
+ for (let headerKey in newConfig[key]) {
+ mergeConfig[key][headerKey] = newConfig[key][headerKey];
+ }
+ }
+ }
+ }
+ return mergeConfig;
+ }
+ _deepCopy(obj) {
+ let result = Array.isArray(obj) ? [] : {};
+ for (let key in obj) {
+ if (obj.hasOwnProperty(key)) {
+ if (typeof obj[key] === "object") {
+ result[key] = this._deepCopy(obj[key]);
+ } else {
+ result[key] = obj[key];
+ }
+ }
+ }
+ return result;
+ }
+}
+
+if (!global.$request) {
+ global.$request = new Request();
+}
+
+export default global.$request;
\ No newline at end of file
diff --git a/components/no-data.vue b/components/no-data.vue
index b3cc468..a50668b 100644
--- a/components/no-data.vue
+++ b/components/no-data.vue
@@ -51,8 +51,8 @@ export default {
-
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ btnText }}
+
+
+
+
+
+
+
+
+
+
+ 找回密码?
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 2d61da3..44c65f0 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -6,7 +6,7 @@
- {{ userInfo.realName || userInfo.username || '请登录'}}
+ {{ dataInfo.cusername || userInfo.username || '请登录'}}
-
-
-
+
+
+
+
@@ -59,9 +60,9 @@
-
-
-
+
\ No newline at end of file
From f838d8bbb1d9cd10bf301d78d6cc5d4ce9470147 Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Tue, 6 Aug 2024 14:31:53 +0800
Subject: [PATCH 10/13] =?UTF-8?q?=E6=8E=92=E6=9F=A5=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/investigation/task.vue | 1 -
pages/map/index.vue | 2187 +++++++++++++++++-----------------
pages/mine/index.vue | 6 +-
3 files changed, 1097 insertions(+), 1097 deletions(-)
diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue
index 1b9636a..f690c89 100644
--- a/pages/investigation/task.vue
+++ b/pages/investigation/task.vue
@@ -500,7 +500,6 @@
this.sectionCode = e.sectionCode
this.name = e.taskName
this.sectionName = e.sectionName
- console.log(e)
this.type = e.type;
this.getBaseData(e.id);
diff --git a/pages/map/index.vue b/pages/map/index.vue
index f00b91a..7441b29 100644
--- a/pages/map/index.vue
+++ b/pages/map/index.vue
@@ -1,1095 +1,1094 @@
-
-
-
-
-
-
-
-
-
- 超期
- 延期
-
-
-
-
- {{ pageType1Result.name }}
-
- 排查
- {{ pageType1Result.deadlineStatus }}
-
-
-
-
- 智能排查
- 人工排查
- 查看排查详情
-
-
-
- 根据当前定位信息,您要排查的是这条路吗?
- {{ rname }}
-
- 更换
- 智能排查
- 人工排查
- 查看排查详情
-
-
-
-
-
-
-
-
- 新增
-
-
-
-
-
-
- {{ item.name }}
-
- {{ item.distance }}m内
-
-
-
-
-
-
- 对象
-
- 路段
- 路口
-
-
-
- 道路名称
-
-
-
-
-
- 起始路口
-
-
-
-
-
- 终止路口
-
-
-
-
-
- 路口名称
-
-
-
-
-
- 取消
- 确定
-
-
-
-
-
- 新增成功
-
-
-
- 人工排查
-
-
-
- 智能排查
-
-
-
-
-
-
-
- 您将进入人工排查,智能排查数据将自动转入
- 人工排查结果,但无法再次转回智能排查。
- 是否继续,请确认?
-
-
-
-
-
- 取消
-
-
-
-
- 确认
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index 44c65f0..c02a5ae 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -80,7 +80,7 @@ const base64Avatar ='data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYA
timer: null,
num: 0,
dataInfo: {},
- tabbarShow: true
+ tabbarShow: true,
// funcList: [
// { id:1,name:'个人信息',url:'/pages/logIn/userInfo',icon:'/mine/userinfo.png' },
// { id:2,name:'劳务保险',url:'/pages/mine/insurance',icon:'/mine/insurance.png' },
@@ -89,6 +89,7 @@ const base64Avatar ='data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYA
// { id:5,name:'找活记录',url:'/pages/mine/jobfind',icon:'/mine/jobfind.png' },
// { id:6,name:'人员管理',url:'/pages/mine/worker',icon:'/mine/jobfind.png' },
// ]
+
}
},
computed: {
@@ -131,7 +132,8 @@ const base64Avatar ='data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYA
onHide() {
// this.timer && clearInterval(this.timer)
},
- onLoad() {
+ onLoad(e) {
+
},
methods: {
From 1394352f6cf7547fb7f6422c7e95a44e5ecd0cdd Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Tue, 6 Aug 2024 16:12:31 +0800
Subject: [PATCH 11/13] =?UTF-8?q?=E9=87=8D=E7=82=B9=E6=8E=92=E6=9F=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/investigation/task.vue | 4 ++--
uni_modules/uview-ui/components/u-checkbox/props.js | 4 ++++
uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue | 7 +++++--
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue
index f690c89..038974e 100644
--- a/pages/investigation/task.vue
+++ b/pages/investigation/task.vue
@@ -270,7 +270,7 @@
{{ indexData + 1 }}.
{{ itemData.length > 0 ? itemData[0].nname : '' }}
-
@@ -324,7 +324,7 @@
-
diff --git a/uni_modules/uview-ui/components/u-checkbox/props.js b/uni_modules/uview-ui/components/u-checkbox/props.js
index be1d842..7d21f68 100644
--- a/uni_modules/uview-ui/components/u-checkbox/props.js
+++ b/uni_modules/uview-ui/components/u-checkbox/props.js
@@ -4,6 +4,10 @@ export default {
name: {
type: [String, Number, Boolean],
default: uni.$u.props.checkbox.name,
+ },
+ isSel: {
+ type: [Boolean],
+ default:true,
},
// item
obj: {
diff --git a/uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue b/uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue
index b9f3d6b..920903c 100644
--- a/uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue
+++ b/uni_modules/uview-ui/components/u-checkbox/u-checkbox.vue
@@ -213,8 +213,11 @@
labelClickHandler(e) {
this.preventEvent(e)
// 如果按钮整体被禁用或者label被禁用,则不允许点击文字修改状态
- if (!this.elLabelDisabled && !this.elDisabled) {
- this.setRadioCheckedStatus()
+ if (!this.elLabelDisabled && !this.elDisabled) {
+ if(this.isSel){
+ this.setRadioCheckedStatus()
+ }
+
this.$emit('click', this.obj)
}
},
From 2893cfa8d36dfb693bb5152e04f1825abc11d0fb Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Tue, 6 Aug 2024 19:25:37 +0800
Subject: [PATCH 12/13] 1
---
pages/investigation/index.vue | 25 +-
pages/mine/password.vue | 30 +-
uni_modules/uni-easyinput/changelog.md | 115 +++
.../components/uni-easyinput/common.js | 54 ++
.../uni-easyinput/uni-easyinput.vue | 676 ++++++++++++++++++
uni_modules/uni-easyinput/package.json | 88 +++
uni_modules/uni-easyinput/readme.md | 11 +
.../components/uni-icons/uni-icons.uvue | 180 ++---
.../components/uni-icons/uni-icons.vue | 218 +++---
.../components/uni-icons/uniicons_file.ts | 36 +-
.../components/uni-icons/uniicons_file_vue.js | 6 +-
11 files changed, 1194 insertions(+), 245 deletions(-)
create mode 100644 uni_modules/uni-easyinput/changelog.md
create mode 100644 uni_modules/uni-easyinput/components/uni-easyinput/common.js
create mode 100644 uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
create mode 100644 uni_modules/uni-easyinput/package.json
create mode 100644 uni_modules/uni-easyinput/readme.md
diff --git a/pages/investigation/index.vue b/pages/investigation/index.vue
index 9009af4..35395e5 100644
--- a/pages/investigation/index.vue
+++ b/pages/investigation/index.vue
@@ -26,7 +26,7 @@
正在办理
{{ totalData.InGovernance }}
-->
-
+
已完成
{{ totalData.InGovernance }}
@@ -125,8 +125,10 @@
// tabFun.tabbar()
this.getData()
let pageStatus = this.$.getData('pageStatus')
- this.pageStatus = pageStatus
this.queryType = this.$.getData('pageType')
+ this.pageStatus = pageStatus
+ console.log(this.$.getData('pageType'))
+
if (pageStatus == 1) {
this.handleTabClick(1)
this.$.setData('pageStatus', '0')
@@ -157,7 +159,7 @@
this.isMore = true
this.getList()
},
- handleTabClick(tab) {
+ handleTabClick(tab, falg = false) {
this.tab = tab;
this.page = 1;
this.list = [];
@@ -171,7 +173,10 @@
// this.status = '20';
// break;
case 3:
- this.queryType = '1'
+ if (falg) {
+ this.queryType = '1'
+ }
+
this.status = '20';
break;
}
@@ -224,11 +229,11 @@
} else {
this.$.toast(res.message)
}
- if(this.status==10){
- this.$set(this.totalData,'UnderInvestigation',res.result.total)
+ if (this.status == 10) {
+ this.$set(this.totalData, 'UnderInvestigation', res.result.total)
}
- if(this.status==20){
- this.$set(this.totalData,'InGovernance',res.result.total)
+ if (this.status == 20) {
+ this.$set(this.totalData, 'InGovernance', res.result.total)
}
}).catch((err) => {
this.loadmorestatus = 'nomore'
@@ -250,7 +255,7 @@
'&deptId=' + row.handleDept +
'&pcType=' + row.pcType +
'&type=' + (this.tab == 1 ? 'edit' : 'view') + '§ionName=' + row.sectionName +
- '§ionCode=' + row.sectionCode)
+ '§ionCode=' + row.sectionCode + '&taskName=' + row.name)
// this.$.open('/pages/map/index?businessId=' + row.businessId)
}
@@ -438,7 +443,7 @@
}
.Unit {
- padding:20rpx 12rpx;
+ padding: 20rpx 12rpx;
display: flex;
justify-content: space-between;
align-items: center;
diff --git a/pages/mine/password.vue b/pages/mine/password.vue
index a958b2f..249efeb 100644
--- a/pages/mine/password.vue
+++ b/pages/mine/password.vue
@@ -1,25 +1,25 @@
-
+
-
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
密码需要包含数字、大小写字母、特殊符号中3种以上组合。
diff --git a/uni_modules/uni-easyinput/changelog.md b/uni_modules/uni-easyinput/changelog.md
new file mode 100644
index 0000000..84c72eb
--- /dev/null
+++ b/uni_modules/uni-easyinput/changelog.md
@@ -0,0 +1,115 @@
+## 1.1.19(2024-07-18)
+- 修复 初始值传入 null 导致input报错的bug
+## 1.1.18(2024-04-11)
+- 修复 easyinput组件双向绑定问题
+## 1.1.17(2024-03-28)
+- 修复 在头条小程序下丢失事件绑定的问题
+## 1.1.16(2024-03-20)
+- 修复 在密码输入情况下 清除和小眼睛覆盖bug 在edge浏览器下显示双眼睛bug
+## 1.1.15(2024-02-21)
+- 新增 左侧插槽:left
+## 1.1.14(2024-02-19)
+- 修复 onBlur的emit传值错误
+## 1.1.12(2024-01-29)
+- 补充 adjust-position文档属性补充
+## 1.1.11(2024-01-29)
+- 补充 adjust-position属性传递值:(Boolean)当键盘弹起时,是否自动上推页面
+## 1.1.10(2024-01-22)
+- 去除 移除无用的log输出
+## 1.1.9(2023-04-11)
+- 修复 vue3 下 keyboardheightchange 事件报错的bug
+## 1.1.8(2023-03-29)
+- 优化 trim 属性默认值
+## 1.1.7(2023-03-29)
+- 新增 cursor-spacing 属性
+## 1.1.6(2023-01-28)
+- 新增 keyboardheightchange 事件,可监听键盘高度变化
+## 1.1.5(2022-11-29)
+- 优化 主题样式
+## 1.1.4(2022-10-27)
+- 修复 props 中背景颜色无默认值的bug
+## 1.1.0(2022-06-30)
+
+- 新增 在 uni-forms 1.4.0 中使用可以在 blur 时校验内容
+- 新增 clear 事件,点击右侧叉号图标触发
+- 新增 change 事件 ,仅在输入框失去焦点或用户按下回车时触发
+- 优化 组件样式,组件获取焦点时高亮显示,图标颜色调整等
+
+## 1.0.5(2022-06-07)
+
+- 优化 clearable 显示策略
+
+## 1.0.4(2022-06-07)
+
+- 优化 clearable 显示策略
+
+## 1.0.3(2022-05-20)
+
+- 修复 关闭图标某些情况下无法取消的 bug
+
+## 1.0.2(2022-04-12)
+
+- 修复 默认值不生效的 bug
+
+## 1.0.1(2022-04-02)
+
+- 修复 value 不能为 0 的 bug
+
+## 1.0.0(2021-11-19)
+
+- 优化 组件 UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-easyinput](https://uniapp.dcloud.io/component/uniui/uni-easyinput)
+
+## 0.1.4(2021-08-20)
+
+- 修复 在 uni-forms 的动态表单中默认值校验不通过的 bug
+
+## 0.1.3(2021-08-11)
+
+- 修复 在 uni-forms 中重置表单,错误信息无法清除的问题
+
+## 0.1.2(2021-07-30)
+
+- 优化 vue3 下事件警告的问题
+
+## 0.1.1
+
+- 优化 errorMessage 属性支持 Boolean 类型
+
+## 0.1.0(2021-07-13)
+
+- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+
+## 0.0.16(2021-06-29)
+
+- 修复 confirmType 属性(仅 type="text" 生效)导致多行文本框无法换行的 bug
+
+## 0.0.15(2021-06-21)
+
+- 修复 passwordIcon 属性拼写错误的 bug
+
+## 0.0.14(2021-06-18)
+
+- 新增 passwordIcon 属性,当 type=password 时是否显示小眼睛图标
+- 修复 confirmType 属性不生效的问题
+
+## 0.0.13(2021-06-04)
+
+- 修复 disabled 状态可清出内容的 bug
+
+## 0.0.12(2021-05-12)
+
+- 新增 组件示例地址
+
+## 0.0.11(2021-05-07)
+
+- 修复 input-border 属性不生效的问题
+
+## 0.0.10(2021-04-30)
+
+- 修复 ios 遮挡文字、显示一半的问题
+
+## 0.0.9(2021-02-05)
+
+- 调整为 uni_modules 目录规范
+- 优化 兼容 nvue 页面
diff --git a/uni_modules/uni-easyinput/components/uni-easyinput/common.js b/uni_modules/uni-easyinput/components/uni-easyinput/common.js
new file mode 100644
index 0000000..d2cf040
--- /dev/null
+++ b/uni_modules/uni-easyinput/components/uni-easyinput/common.js
@@ -0,0 +1,54 @@
+/**
+ * @desc 函数防抖
+ * @param func 目标函数
+ * @param wait 延迟执行毫秒数
+ * @param immediate true - 立即执行, false - 延迟执行
+ */
+export const debounce = function(func, wait = 1000, immediate = true) {
+ let timer;
+ return function() {
+ let context = this,
+ args = arguments;
+ if (timer) clearTimeout(timer);
+ if (immediate) {
+ let callNow = !timer;
+ timer = setTimeout(() => {
+ timer = null;
+ }, wait);
+ if (callNow) func.apply(context, args);
+ } else {
+ timer = setTimeout(() => {
+ func.apply(context, args);
+ }, wait)
+ }
+ }
+}
+/**
+ * @desc 函数节流
+ * @param func 函数
+ * @param wait 延迟执行毫秒数
+ * @param type 1 使用表时间戳,在时间段开始的时候触发 2 使用表定时器,在时间段结束的时候触发
+ */
+export const throttle = (func, wait = 1000, type = 1) => {
+ let previous = 0;
+ let timeout;
+ return function() {
+ let context = this;
+ let args = arguments;
+ if (type === 1) {
+ let now = Date.now();
+
+ if (now - previous > wait) {
+ func.apply(context, args);
+ previous = now;
+ }
+ } else if (type === 2) {
+ if (!timeout) {
+ timeout = setTimeout(() => {
+ timeout = null;
+ func.apply(context, args)
+ }, wait)
+ }
+ }
+ }
+}
diff --git a/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
new file mode 100644
index 0000000..08ad1d0
--- /dev/null
+++ b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
@@ -0,0 +1,676 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uni_modules/uni-easyinput/package.json b/uni_modules/uni-easyinput/package.json
new file mode 100644
index 0000000..2939256
--- /dev/null
+++ b/uni_modules/uni-easyinput/package.json
@@ -0,0 +1,88 @@
+{
+ "id": "uni-easyinput",
+ "displayName": "uni-easyinput 增强输入框",
+ "version": "1.1.19",
+ "description": "Easyinput 组件是对原生input组件的增强",
+ "keywords": [
+ "uni-ui",
+ "uniui",
+ "input",
+ "uni-easyinput",
+ "输入框"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+"dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+ "type": "component-vue"
+ },
+ "uni_modules": {
+ "dependencies": [
+ "uni-scss",
+ "uni-icons"
+ ],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y",
+ "alipay": "n"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/uni_modules/uni-easyinput/readme.md b/uni_modules/uni-easyinput/readme.md
new file mode 100644
index 0000000..f1faf8f
--- /dev/null
+++ b/uni_modules/uni-easyinput/readme.md
@@ -0,0 +1,11 @@
+
+
+### Easyinput 增强输入框
+> **组件名:uni-easyinput**
+> 代码块: `uEasyinput`
+
+
+easyinput 组件是对原生input组件的增强 ,是专门为配合表单组件[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)而设计的,easyinput 内置了边框,图标等,同时包含 input 所有功能
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-easyinput)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file
diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue b/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
index 8740559..ce307c1 100644
--- a/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
+++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
@@ -1,91 +1,91 @@
-
-
- {{unicode}}
-
-
-
-
-
-
diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue
index 7da5356..9634a9c 100644
--- a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue
+++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue
@@ -1,110 +1,110 @@
-
-
- {{unicode}}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts b/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
index 98e93aa..86318df 100644
--- a/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
+++ b/uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
@@ -1,19 +1,19 @@
-
-export type IconsData = {
- id : string
- name : string
- font_family : string
- css_prefix_text : string
- description : string
- glyphs : Array
-}
-
-export type IconsDataItem = {
- font_class : string
- unicode : string
-}
-
-
+
+export type IconsData = {
+ id : string
+ name : string
+ font_family : string
+ css_prefix_text : string
+ description : string
+ glyphs : Array
+}
+
+export type IconsDataItem = {
+ font_class : string
+ unicode : string
+}
+
+
export const fontData = [
{
"font_class": "arrow-down",
@@ -659,6 +659,6 @@ export const fontData = [
"font_class": "weixin",
"unicode": "\ue691"
}
-] as IconsDataItem[]
-
+] as IconsDataItem[]
+
// export const fontData = JSON.parse(fontDataJson)
diff --git a/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js b/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
index 1cd11e1..49e42cd 100644
--- a/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
+++ b/uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
@@ -1,4 +1,4 @@
-
+
export const fontData = [
{
"font_class": "arrow-down",
@@ -644,6 +644,6 @@ export const fontData = [
"font_class": "weixin",
"unicode": "\ue691"
}
-]
-
+]
+
// export const fontData = JSON.parse(fontDataJson)
From 46dc456861ca281ee70554185c6f8ef505c39118 Mon Sep 17 00:00:00 2001
From: limingtao <@ming_tao_li>
Date: Tue, 6 Aug 2024 21:29:18 +0800
Subject: [PATCH 13/13] =?UTF-8?q?=E5=BE=85=E5=8A=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/investigation/index.vue | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/pages/investigation/index.vue b/pages/investigation/index.vue
index 35395e5..689a844 100644
--- a/pages/investigation/index.vue
+++ b/pages/investigation/index.vue
@@ -108,7 +108,7 @@
Finished: 0,
Unconfirmed: 0,
},
- status: '10',
+ status: '1',
search: '',
tabbarShow: true,
queryType: '1',
@@ -155,6 +155,7 @@
queryTypeChange(e) {
this.queryType = e
this.page = 1;
+ this.$.setData('pageType', e)
this.list = [];
this.isMore = true
this.getList()
@@ -166,7 +167,7 @@
this.isMore = true
switch (tab) {
case 1:
- this.status = '10';
+ this.status = '1';
this.queryType = null
break;
// case 2:
@@ -177,7 +178,7 @@
this.queryType = '1'
}
- this.status = '20';
+ this.status = '2';
break;
}
this.getList()
@@ -205,12 +206,13 @@
getList() {
let datas = {
nuserid: this.$.getData('token'),
- status: this.status,
+ status: '10',
}
this.loadmorestatus = 'loading'
+ let query=this.status==2?`pageNum=${this.page}&pageSize=${10}&search=${this.search}&approve=${this.status}&classification=${this.queryType}`:`pageNum=${this.page}&pageSize=${10}&search=${this.search}&approve=${this.status}`
this.$request.globalRequest(
- `/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}&search=${this.search}&classificatio=${this.queryType}`,
+ `/hiddenDanger/highDanger/getHigDangerDealt?${query}`,
datas, 'POST')
.then(res => {
this.loadmorestatus = 'loadmore'
@@ -229,10 +231,10 @@
} else {
this.$.toast(res.message)
}
- if (this.status == 10) {
+ if (this.status == 1) {
this.$set(this.totalData, 'UnderInvestigation', res.result.total)
}
- if (this.status == 20) {
+ if (this.status == 2) {
this.$set(this.totalData, 'InGovernance', res.result.total)
}
}).catch((err) => {