调整/测试

This commit is contained in:
shikong 2024-10-18 15:46:57 +08:00
parent 26e3469b40
commit 4520040a17
Signed by: Shikong
GPG Key ID: BD85FF18B373C341
7 changed files with 35 additions and 8 deletions

View File

@ -2,8 +2,11 @@
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/dist" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="@types/qs" level="application" />
</component>
</module>

View File

@ -64,6 +64,7 @@
"moment": "^2.30.1",
"pinia": "^2.2.4",
"pinia-plugin-persistedstate": "^3.2.1",
"qs": "^6.7.0",
"vue": "^3.4.21",
"vue-i18n": "^9.1.9"
},

View File

@ -71,6 +71,9 @@ importers:
pinia-plugin-persistedstate:
specifier: ^3.2.1
version: 3.2.1(pinia@2.2.4(typescript@5.6.3)(vue@3.5.12(typescript@5.6.3)))
qs:
specifier: ^6.7.0
version: 6.7.0
vue:
specifier: ^3.4.21
version: 3.5.12(typescript@5.6.3)
@ -3681,6 +3684,10 @@ packages:
resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==}
engines: {node: '>=0.6'}
qs@6.7.0:
resolution: {integrity: sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==}
engines: {node: '>=0.6'}
querystringify@2.2.0:
resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
@ -9121,6 +9128,8 @@ snapshots:
dependencies:
side-channel: 1.0.6
qs@6.7.0: {}
querystringify@2.2.0: {}
queue-microtask@1.2.3: {}

View File

@ -55,7 +55,7 @@
{
"path": "pages/commodity/commodity",
"style": {
"navigationStyle": "custom",
"navigationStyle": "default",
"navigationBarTitleText": "商品页",
"enablePullDownRefresh": false
}

View File

@ -1,5 +1,6 @@
<script setup>
import {reactive} from "vue";
import qs from "qs";
import SideBarView from "@/components/sidebar-view/index.vue";
import Item from "./components/item.vue";
const ctx = reactive({
@ -44,8 +45,12 @@ const ctx = reactive({
]
})
function switchCategory(index) {
ctx.current = index
function toCommodity(){
uni.navigateTo({
url: '/pages/commodity/commodity?' + qs.stringify({
id: 1,
})
})
}
</script>
@ -58,7 +63,9 @@ function switchCategory(index) {
</template>
<scroll-view scroll-y class="flex-grow-0 min-h-0">
<Item v-for="i in 10" :key="i" img="https://www.httpbin.org/image/png"
<Item v-for="i in 10" :key="i"
@tap="toCommodity(i)"
img="https://www.httpbin.org/image/png"
title="测试商品测试商品测试商品测试商品测试商品测试商品测试商品" price="9999.99"/>
<Item v-for="i in 20" :key="i" img="https://www.httpbin.org/image/png" title="测试商品" price="9999.99"
oldPrice="8888.88"/>

View File

@ -1,11 +1,17 @@
<template>
<view>
<view class="w-full h-full">
<view class="text-center">
商品页
</view>
</view>
</template>
<script setup lang="ts">
import {onLoad} from "@dcloudio/uni-app";
onLoad((query)=>{
console.log(query)
})
</script>

View File

@ -15,7 +15,8 @@ module.exports = {
"./src/index.html",
"./pages/**/*.{html,js,ts,jsx,tsx,vue}",
"./src/pages/**/*.{html,js,ts,jsx,tsx,vue}",
"./components/**/*.{html,js,ts,jsx,tsx,vue}"
"./components/**/*.{html,js,ts,jsx,tsx,vue}",
"./src/components/**/*.{html,js,ts,jsx,tsx,vue}"
],
corePlugins: {
// 跨多端可以 h5 开启,小程序关闭