|
|
@@ -31,6 +31,7 @@
|
|
|
<script setup>
|
|
|
import { ref, getCurrentInstance, computed } from 'vue'
|
|
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
|
|
+import { promise } from '../../uni_modules/uview-plus/libs/function/test';
|
|
|
const { $Http } = getCurrentInstance().proxy;
|
|
|
const banner = ref([]);
|
|
|
const enterprisename = ref('');
|
|
|
@@ -105,13 +106,35 @@ onLoad(() => {
|
|
|
|
|
|
function uploadNumber() {
|
|
|
itemList.value.forEach((item) => {
|
|
|
- $Http.basic({ "id": "20230208140203", "content": { "pageNumber": 1, "pageSize": 0, "where": { "status": item.label == '抢单中心' ? '' : item.label, "condition": "", ispublic: item.label == '抢单中心' ? '1' : '' } } }).then(res => {
|
|
|
- if (res.code !== 0) {
|
|
|
- item.badge = res.total;
|
|
|
- } else {
|
|
|
- item.badge = 0;
|
|
|
- }
|
|
|
- })
|
|
|
+ if (item.label == '进行中') {
|
|
|
+ Promise.all(
|
|
|
+ ['待开始', '进行中', '已提交'].map(v =>
|
|
|
+ $Http.basic({
|
|
|
+ "id": "20230208140203", "content":
|
|
|
+ { "pageNumber": 1, "pageSize": 0, "where": { "status": v, "condition": "" } }
|
|
|
+ })
|
|
|
+ )
|
|
|
+ ).then(res => {
|
|
|
+ let total = 0;
|
|
|
+ res.forEach(r => {
|
|
|
+ if (r.code !== 0) {
|
|
|
+ total += r.total;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ item.badge = total;
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ $Http.basic({
|
|
|
+ "id": "20230208140203", "content":
|
|
|
+ { "pageNumber": 1, "pageSize": 0, isadmin: item.label == '抢单中心' ? '1' : '', "where": { "status": item.label == '抢单中心' ? '' : item.label, "condition": "", ispublic: item.label == '抢单中心' ? '1' : '' } }
|
|
|
+ }).then(res => {
|
|
|
+ if (res.code !== 0) {
|
|
|
+ item.badge = res.total;
|
|
|
+ } else {
|
|
|
+ item.badge = 0;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
});
|
|
|
welcomeText.getter()
|
|
|
}
|