diff --git a/pages.json b/pages.json index 233092e..b986d6e 100644 --- a/pages.json +++ b/pages.json @@ -147,6 +147,9 @@ "navigationStyle": "custom" } + }, + { + "path" : "pages/Warehouse/procurement" } // { diff --git a/pages/Warehouse/Warehouse.vue b/pages/Warehouse/Warehouse.vue index 2e42645..d2c7e90 100644 --- a/pages/Warehouse/Warehouse.vue +++ b/pages/Warehouse/Warehouse.vue @@ -2,23 +2,21 @@ - + + + + + + + - - - - - - + - - - @@ -33,7 +31,7 @@ - + { if(index>5){return} - housedex.value = index; - console.log(index) + housedex.value = index; } + const navurl = ref(''); const movecard = (type : number) => { console.log(type) switch (type){ case 0: // 上 - housedex.value>0?housedex.value--:housedex.value = 5 + housedex.value>0?housedex.value--:housedex.value = 3 break; case 1: - housedex.value>4?housedex.value = 0:housedex.value++ + housedex.value>2?housedex.value = 0:housedex.value++ // → break; case 2: - housedex.value>4?housedex.value = 0:housedex.value++ + housedex.value>2?housedex.value = 0:housedex.value++ // 下 break; case 3: - housedex.value>0?housedex.value--:housedex.value = 5 + housedex.value>0?housedex.value--:housedex.value = 3 // ← break; case 4: // 确定 + console.log('选中'+housedex.value) + if(housedex.value==1){ + navurl.value = 'pages/Warehouse/procurement' + } + + uni.navigateTo({ + url:'/'+navurl.value + }) break; case 5: // 返回 @@ -109,6 +115,66 @@ } } + // 通用的生成函数 + function genPaths(base, prefix, count, ext = 'png', startIndex = 0, pad = false) { + return Array.from({ length: count }, (_, i) => { + const idx = pad + ? String(i + startIndex).padStart(2, '0') + : i + startIndex + return `${base}/${prefix}${idx}.${ext}` + }) + } + const animArray = ref([ + { + url: genPaths( + '/static/index/warehouse/animation', + 'remit0', + 5, // 张数 + 'png', + 1, // 起始索引为 1 + false // 不补零 + ), + width: '29vw', + height: '21vw' + } , + { + url: genPaths( + '/static/index/warehouse/animation', + 'buy0', + 5, // 张数 + 'png', + 1, // 起始索引为 1 + false // 不补零 + ), + width: '26vw', + height: '16vw' + } , + { + url: genPaths( + '/static/index/warehouse/animation', + 'checkout0', + 5, // 张数 + 'png', + 1, // 起始索引为 1 + false // 不补零 + ), + width: '24vw', + height: '16vw' + } , + { + url: genPaths( + '/static/index/warehouse/animation', + 'Pick0', + 4, // 张数 + 'png', + 1, // 起始索引为 1 + false // 不补零 + ), + width: '17vw', + height: '13vw' + } + ]) + + \ No newline at end of file diff --git a/pages/Warehousing/index.vue b/pages/Warehousing/index.vue index 8fbeef6..1c805be 100644 --- a/pages/Warehousing/index.vue +++ b/pages/Warehousing/index.vue @@ -1,6 +1,6 @@