Compare commits

..

No commits in common. "9792a3fb8d1fc3ef4329f30efb0b09a0342f75f4" and "547320e0c331880e164778a620b30ee45eee629d" have entirely different histories.

9 changed files with 89 additions and 251 deletions

81
package-lock.json generated
View File

@ -1,78 +1,17 @@
{ {
"name": "jiangchengfeiyi-xiaochengxu",
"lockfileVersion": 3,
"requires": true, "requires": true,
"lockfileVersion": 1, "packages": {
"dependencies": { "": {
"@babel/runtime": { "dependencies": {
"version": "7.26.0", "mitt": "^3.0.1"
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.26.0.tgz",
"integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==",
"requires": {
"regenerator-runtime": "^0.14.0"
} }
}, },
"complex.js": { "node_modules/mitt": {
"version": "2.4.2", "version": "3.0.1",
"resolved": "https://registry.npmmirror.com/complex.js/-/complex.js-2.4.2.tgz", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
"integrity": "sha512-qtx7HRhPGSCBtGiST4/WGHuW+zeaND/6Ld+db6PbrulIB1i2Ev/2UPiqcmpQNPSyfBKraC0EOvOKCB5dGZKt3g==" "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="
},
"decimal.js": {
"version": "10.4.3",
"resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz",
"integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA=="
},
"escape-latex": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/escape-latex/-/escape-latex-1.2.0.tgz",
"integrity": "sha512-nV5aVWW1K0wEiUIEdZ4erkGGH8mDxGyxSeqPzRNtWP7ataw+/olFObw7hujFWlVjNsaDFw5VZ5NzVSIqRgfTiw=="
},
"fraction.js": {
"version": "5.2.1",
"resolved": "https://registry.npmmirror.com/fraction.js/-/fraction.js-5.2.1.tgz",
"integrity": "sha512-Ah6t/7YCYjrPUFUFsOsRLMXAdnYM+aQwmojD2Ayb/Ezr82SwES0vuyQ8qZ3QO8n9j7W14VJuVZZet8U3bhSdQQ=="
},
"javascript-natural-sort": {
"version": "0.7.1",
"resolved": "https://registry.npmmirror.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz",
"integrity": "sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw=="
},
"mathjs": {
"version": "14.0.1",
"resolved": "https://registry.npmmirror.com/mathjs/-/mathjs-14.0.1.tgz",
"integrity": "sha512-yyJgLwC6UXuve724np8tHRMYaTtb5UqiOGQkjwbSXgH8y1C/LcJ0pvdNDZLI2LT7r+iExh2Y5HwfAY+oZFtGIQ==",
"requires": {
"@babel/runtime": "^7.25.7",
"complex.js": "^2.2.5",
"decimal.js": "^10.4.3",
"escape-latex": "^1.2.0",
"fraction.js": "^5.2.1",
"javascript-natural-sort": "^0.7.1",
"seedrandom": "^3.0.5",
"tiny-emitter": "^2.1.0",
"typed-function": "^4.2.1"
}
},
"mitt": {
"version": "3.0.1"
},
"regenerator-runtime": {
"version": "0.14.1",
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
},
"seedrandom": {
"version": "3.0.5",
"resolved": "https://registry.npmmirror.com/seedrandom/-/seedrandom-3.0.5.tgz",
"integrity": "sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg=="
},
"tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
},
"typed-function": {
"version": "4.2.1",
"resolved": "https://registry.npmmirror.com/typed-function/-/typed-function-4.2.1.tgz",
"integrity": "sha512-EGjWssW7Tsk4DGfE+5yluuljS1OGYWiI1J6e8puZz9nTMM51Oug8CD5Zo4gWMsOhq5BI+1bF+rWTm4Vbj3ivRA=="
} }
} }
} }

View File

@ -1,6 +1,5 @@
{ {
"dependencies": { "dependencies": {
"mathjs": "^14.0.1",
"mitt": "^3.0.1" "mitt": "^3.0.1"
} }
} }

View File

@ -96,7 +96,7 @@
console.log('失败原因-->', res.data); console.log('失败原因-->', res.data);
uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
title: res.data.message title: "请求失败"
}) })
return; return;
} }

View File

@ -14,11 +14,10 @@
<view class="flex-row items-center group_4"> <view class="flex-row items-center group_4">
<text class="font_2 text_5">所在地区</text> <text class="font_2 text_5">所在地区</text>
<view class="flex-col justify-start flex-1 relative group_5 ml-13"> <view class="flex-col justify-start flex-1 relative group_5 ml-13">
<!-- <input class="text-wrapper_3" v-model="addressParam.region" placeholder="请输入地区" /> --> <input class="text-wrapper_3" v-model="addressParam.region" placeholder="请输入地区" />
<view class="zujian"><addSelected></addSelected></view>
<image <image
class="image pos" class="image pos"
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FkYDyjpPh-dingwei.png" :src="dingwei"
/> />
</view> </view>
</view> </view>
@ -48,34 +47,24 @@
<script setup> <script setup>
import {ref , onMounted} from 'vue' import {ref , onMounted} from 'vue'
import { testUrl , baseUrl , suiUrl } from '../../../api/request'; import { testUrl , baseUrl , suiUrl } from '../../../api/request';
import { onLoad, onShow } from '@dcloudio/uni-app'; import { onLoad } from '@dcloudio/uni-app';
import addSelected from '../../../pages/order/component/addSelected.vue' const userInfo = ref({})
import emitter from '../../../utils/emitter';
const addressParam = ref({ const addressParam = ref({
userId: 0,
name: "", name: "",
phone: "", phone: "",
region: "", region: "",
detailAddress: "", detailAddress: "",
isDefault: 0 isDefault: 0
}) })
const isAdd = ref(false)
// //
onLoad((options)=>{ onLoad((options)=>{
if(JSON.stringify(options) != '{}') { addressParam.value = JSON.parse(options.editInfo) //addressParam
addressParam.value = JSON.parse(options.editInfo) //addressParam // console.log('--->',addressParam.value);
} else {
isAdd.value = true
}
// console.log(options);
})
onShow(()=>{
}) })
onMounted(()=>{ onMounted(()=>{
emitter.on('region',(val)=>{ // userInfo.value = uni.getStorageSync("userInfo")
addressParam.value.region = val // console.log('userInfo-->', userInfo.value.id);
// console.log('val--->',val);
})
if(!isAdd.value) emitter.emit('addRegion', addressParam.value.region)
}) })
// //
const defaultAddress =(event)=>{ const defaultAddress =(event)=>{
@ -83,8 +72,8 @@ const defaultAddress =(event)=>{
} }
// //
const newAddress = async () =>{ const newAddress = async () =>{
// console.log(addressParam.value); console.log(addressParam.value);
// addressParam.value.userId = userInfo.value.id addressParam.value.userId = userInfo.value.id
const values = Object.values(addressParam.value); const values = Object.values(addressParam.value);
// 使some() // 使some()
if (values.some(value => value === null || value === undefined || value === '')) { if (values.some(value => value === null || value === undefined || value === '')) {
@ -94,60 +83,34 @@ const newAddress = async () =>{
}) })
return; return;
} }
console.log(addressParam.value); const res = await uni.request({
if(addressParam.value.id != undefined) { url: baseUrl + '/address/add',
const res = await uni.request({ method: 'POST',
url: baseUrl + '/address/update', header: {
method: 'POST', 'cookie': wx.getStorageSync('cookie')
header: { },
'cookie': wx.getStorageSync('cookie') data: {...addressParam.value}
}, })
data: { ...addressParam.value } console.log('res==>',res.data);
}) if(res.data.code === 1) {
console.log('res1==>',res.data);
sucRes(res.data.code)
} else {
const res = await uni.request({
url: baseUrl + '/address/add',
method: 'POST',
header: {
'cookie': wx.getStorageSync('cookie')
},
data: {...addressParam.value}
})
console.log('res2==>',res.data);
sucRes(res.data.code)
}
// if(res.data.code === 1) {
// uni.navigateBack({ //
// })
// } else {
// uni.showToast({
// icon: 'error',
// title: ""
// })
// return;
// }
}
const sucRes =(res)=>{ //
if(res === 1) {
uni.navigateBack({ // uni.navigateBack({ //
}) })
} else { } else {
uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
title: '新增地址失败' title: "新增地址失败"
}) })
return; return;
} }
} }
// //
// const jump =()=> { const jump =()=> {
// uni.navigateTo({ uni.navigateTo({
// url: '../../../pages/Shopping-cart/address/address' url: '../../../pages/Shopping-cart/address/address'
// }) })
// } }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -275,11 +238,6 @@ const sucRes =(res)=>{ //请求成功执行的方法
font-size: 30rpx; font-size: 30rpx;
font-family: Open Sans; font-family: Open Sans;
line-height: 27.9rpx; line-height: 27.9rpx;
}
.zujian{ //
height: 100rpx;
width: 450rpx;
margin-left: 50rpx;
} }
@import url(../../../common/css/global.css); @import url(../../../common/css/global.css);
</style> </style>

View File

@ -21,16 +21,16 @@
<image <image
class="shrink-0 image" class="shrink-0 image"
:src="item.cartGoodVO.goodImg" :src="item.cartGoodVO.goodImg"
@click="jump_product(item.goodId)" @click="jump_product"
/> />
<view class="flex-col flex-1 group_3 ml-12"> <view class="flex-col flex-1 group_3 ml-12">
<view class="flex-row group_4"> <view class="flex-row group_4">
<text class="font_2" @click="jump_product(item.goodId)">{{ item.cartGoodVO.name }}</text> <text class="font_2" @click="jump_product">{{ item.cartGoodVO.name }}</text>
<text class="font_2 ml-4" @click="jump_product(item.goodId)">{{ item.cartGoodVO.type }}</text> <text class="font_2 ml-4" @click="jump_product">{{ item.cartGoodVO.type }}</text>
</view> </view>
<view class="flex-row items-center mt-47"> <view class="flex-row items-center mt-47">
<view class="flex-row items-center self-stretch group_5"> <view class="flex-row items-center self-stretch group_5">
<text class="font_3 text_3" @click="jump_product(item.goodId)"><text class="font_4"></text>{{ item.cartGoodVO.price }}</text> <text class="font_3 text_3" @click="jump_product"><text class="font_4"></text>{{ item.cartGoodVO.price }}</text>
<!-- <image <!-- <image
class="image_6" class="image_6"
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FJipaVPoQ-storeRmb.png" src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FJipaVPoQ-storeRmb.png"
@ -132,13 +132,12 @@
import { ref , onMounted , toRaw} from 'vue' import { ref , onMounted , toRaw} from 'vue'
import { onShow } from "@dcloudio/uni-app"; import { onShow } from "@dcloudio/uni-app";
import { baseUrl , testUrl ,suiUrl} from '../../../api/request'; import { baseUrl , testUrl ,suiUrl} from '../../../api/request';
import * as math from 'mathjs'
const products = ref([]) const products = ref([])
const current = ref(1) // const current = ref(1) //
const allCheck = ref(false) // const allCheck = ref(false) //
const checkedData = ref([]) // const checkedData = ref([]) //
const totalPrice = ref(0) const totalPrice = ref(0)
// const userInfo = wx.getStorageSync('userInfo') const userInfo = wx.getStorageSync('userInfo')
const stateText = ref({ const stateText = ref({
topBtn: '编辑', topBtn: '编辑',
bottomBtn: '去结算' bottomBtn: '去结算'
@ -164,21 +163,6 @@ const getProductCart = async ()=>{
} }
console.log('products-->',products.value); console.log('products-->',products.value);
} }
const deleteProduct = async (idArr) =>{ //
const res = await uni.request({
url: baseUrl + '/cart/delete',
method: 'POST',
data: idArr ,
header: {
'cookie': wx.getStorageSync('cookie')
}
})
console.log(res.data);
if(res.data.code === 1) {
getProductCart() //
totalPrice.value = 0
}
}
const getServiceCart =()=>{ const getServiceCart =()=>{
console.log('获取服务类商品方法被触发'); console.log('获取服务类商品方法被触发');
} }
@ -257,6 +241,10 @@ const allChecked = ()=>{
item.checked = true // item.checked = true //
computed(item.cartGoodVO.price , item.quantity) computed(item.cartGoodVO.price , item.quantity)
}) })
// checkedData.value = products.value.map((item)=>({
// goodId: item.goodId,
// quantity: item.quantity
// })) //checkedData
checkedData.value = products.value.map((item)=>( item.id )) checkedData.value = products.value.map((item)=>( item.id ))
console.log('checkedData--->',checkedData.value); console.log('checkedData--->',checkedData.value);
} else { } else {
@ -280,61 +268,43 @@ const decrease =(index , item)=>{ //item用于监测是否选中
const increase =(index , item) =>{ //item const increase =(index , item) =>{ //item
console.log('increase,index-->',index); console.log('increase,index-->',index);
console.log('increase,item-->',item); console.log('increase,item-->',item);
if(products.value[index].quantity < products.value[index].cartGoodVO.inventory) { if(products.value[index].quantity <= 99) {
if(item && products.value[index].quantity <= products.value[index].cartGoodVO.inventory) {
computed(products.value[index].cartGoodVO.price, 1)
}
products.value[index].quantity += 1 products.value[index].quantity += 1
} }
if(item) {
computed(products.value[index].cartGoodVO.price, 1)
}
} }
// //
const computed =( price , quantity )=>{ const computed =( price , quantity )=>{
totalPrice.value = math.round(totalPrice.value+price * quantity,2) totalPrice.value += price * quantity
return totalPrice.value return totalPrice.value
} }
const jump_product =(gid)=>{ const jump_product =()=>{
uni.navigateTo({ uni.navigateTo({
url:'../../../pages/store-home/ProductDetails/ProductDetails?gid=' + JSON.stringify(gid) url:'../../../pages/store-home/ProductDetails/ProductDetails'
}) })
} }
const editOrSettle = async ()=>{ // const editOrSettle = async ()=>{
// console.log('checked--->',checkedData.value); // console.log('checked--->',checkedData.value);
if(stateText.value.bottomBtn === '去结算') { if(stateText.value.bottomBtn === '去结算') {
uni.navigateTo({
url: '/pages/order/product-waitpay/product-waitpay?cartInfo=' + JSON.stringify(checkedData.value)
})
} else {
const res = await uni.request({ const res = await uni.request({
url: baseUrl + '/cart/cart/list/error', url: baseUrl + '/cart/delete',
method: 'POST', method: 'POST',
data: checkedData.value ,
header: { header: {
'cookie': wx.getStorageSync('cookie') 'cookie': wx.getStorageSync('cookie')
} }
}) })
console.log(res.data); console.log(res.data);
if(res.data.data.length != 0) { if(res.data.code === 1) {
uni.showModal({ getProductCart() //
title: '提示', totalPrice.value = 0
content: '购物车商品发生改变,点击移除变化商品',
showCancel: false,
success: (e)=>{
if(e.confirm) {
deleteProduct(res.data.data)
}
}
})
} else {
uni.navigateTo({
url: '/pages/order/product-waitpay/product-waitpay?cartInfo=' + JSON.stringify(checkedData.value)
})
} }
} else {
uni.showModal({
title: '提示',
content: '是否删除商品?',
success: (e) => {
if(e.confirm)
deleteProduct(checkedData.value)
else if(e.cancel)
return;
}
})
} }
} }
const changeState =()=>{ // const changeState =()=>{ //

View File

@ -94,15 +94,11 @@ const deleteAddress = async( id ) =>{
const res = await uni.request({ const res = await uni.request({
url: baseUrl + '/address/delete', url: baseUrl + '/address/delete',
method: 'POST', method: 'POST',
header: {
'cookie': wx.getStorageSync('cookie')
},
data: { id: id } data: { id: id }
}) })
// console.log(res.data);
if( res.data.code === 1 ) { if( res.data.code === 1 ) {
getAddressList() getAddressList()
// console.log(""); console.log("删除地址成功");
} }
} }
</script> </script>

View File

@ -167,7 +167,6 @@ import emitter from '../../../utils/emitter'
import { onLoad , onShow } from "@dcloudio/uni-app"; import { onLoad , onShow } from "@dcloudio/uni-app";
import { baseUrl } from '../../../api/request'; import { baseUrl } from '../../../api/request';
import addressComponentVue from '../component/addressComponent.vue'; // import addressComponentVue from '../component/addressComponent.vue'; //
import { stateMap } from '../../../common/global';
// //
const num = ref(1) const num = ref(1)
const price = ref(138) const price = ref(138)
@ -195,7 +194,6 @@ onMounted(() => {
emitter.on('addressInfo', (val) =>{ emitter.on('addressInfo', (val) =>{
addressRealInfo.value = val addressRealInfo.value = val
}) })
// console.log(stateMap.get('退'));
}) })
onLoad((options)=>{ onLoad((options)=>{
totalInfo.value = JSON.parse(options.cartInfo) totalInfo.value = JSON.parse(options.cartInfo)
@ -229,7 +227,8 @@ const getDefaultAddress = async () =>{
method: 'POST', method: 'POST',
header: { header: {
cookie: wx.getStorageSync('cookie') cookie: wx.getStorageSync('cookie')
} },
data: { id: userInfo.value.id }
}) })
//for //for
for(let key in res.data.data) { for(let key in res.data.data) {

View File

@ -1,15 +1,10 @@
<template> <template>
<view class="flex-col page"> <view class="flex-col page">
<!-- <image <image
mode="aspectFit" mode="aspectFit"
class="self-stretch image" class="self-stretch image"
:src="goodObject.goodImg" :src="goodObject.goodImg"
/> --> />
<swiper class="swiper-box">
<swiper-item v-for="(item,index) in imgArr" :key="index" >
<image mode="aspectFit" class="self-stretch image" :src="item" ></image>
</swiper-item>
</swiper>
<view class="flex-col self-stretch section_2"> <view class="flex-col self-stretch section_2">
<view class="self-start group"> <view class="self-start group">
<text class="font text_2"></text> <text class="font text_2"></text>
@ -88,13 +83,21 @@ import emitter from '../../../utils/emitter'
import addProduct from '../../Shopping-cart/component/addProduct.vue'; import addProduct from '../../Shopping-cart/component/addProduct.vue';
const popup = ref(null) // const popup = ref(null) //
const goodObject = ref({}) // const goodObject = ref({}) //
// const checkedData = ref([{}]) //
const idInfo = ref([]) // + id const idInfo = ref([]) // + id
const userInfo = ref({}) // const userInfo = ref({}) //
const labelList = ref([]) // const labelList = ref([]) //
const imgArr = ref([])
// //
onLoad((options) => { onLoad((options) => {
getProduct(JSON.parse(options.gid)) // goodObject.value = JSON.parse(options.info) //stringobjec
idInfo.value = [{
goodId: goodObject.value.id,
quantity: 1 //1
}]
labelList.value = goodObject.value.label.split(";") //
labelList.value = labelList.value.filter((s)=>{ //使filter
return s
})
}) })
onShow(()=>{ onShow(()=>{
userInfo.value = wx.getStorageSync('userInfo') // userInfo.value = wx.getStorageSync('userInfo') //
@ -106,30 +109,6 @@ onMounted(()=>{
}) })
getFonts() getFonts()
}) })
const getProduct = async (gid) =>{ //
const res = await uni.request({
url: baseUrl + '/goods/getById',
method: 'POST',
data: { id: gid },
header: {
cookie: wx.getStorageSync('cookie')
}
})
// console.log('--->',res.data);
if(res.data.code === 1) {
goodObject.value = res.data.data
imgArr.value = res.data.data.goodImg.split(';') //
// console.log(imgArr.value);
labelList.value = goodObject.value.label.split(';') //
labelList.value = labelList.value.filter((s)=>{ //使filter
return s
})
idInfo.value = [{
goodId: goodObject.value.id,
quantity: 1 //1
}]
}
}
const loadPop =()=>{ const loadPop =()=>{
popup.value.open('bottom') // popup.value.open('bottom') //
emitter.emit('product',goodObject.value) emitter.emit('product',goodObject.value)
@ -179,11 +158,11 @@ const getFonts =()=>{
overflow-x: hidden; overflow-x: hidden;
} }
.image { .image {
width: 100%; width: 100vw;
height: 100%; height: 72vw;
} }
.section_2 { .section_2 {
// margin-top: 20.63rpx; margin-top: 20.63rpx;
padding-left: 18.75rpx; padding-left: 18.75rpx;
padding-top: 19.2rpx; padding-top: 19.2rpx;
background-color: #ffffff; background-color: #ffffff;
@ -388,9 +367,5 @@ const getFonts =()=>{
.text_18 { .text_18 {
line-height: 27.77rpx; line-height: 27.77rpx;
} }
.swiper-box {
width: 100%;
height: calc(150vw * 9 / 16);
}
@import url(../../../common/css/global.css); @import url(../../../common/css/global.css);
</style> </style>

View File

@ -10,7 +10,7 @@
</view> </view>
<view class="flex-col justify-start items-center image-wrapper pos_1"> <view class="flex-col justify-start items-center image-wrapper pos_1">
<image class="shrink-0 image_2" <image class="shrink-0 image_2"
src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FloZarLZD-%E6%B5%8B%E8%AF%95%E6%8F%92%E5%85%A5.jpg" /> src="" />
</view> </view>
<!-- 类别列表 --> <!-- 类别列表 -->
<view class="flex-col justify-start section_3 pos_9"> <view class="flex-col justify-start section_3 pos_9">
@ -40,7 +40,7 @@
<scroll-view scroll-y class="scrollable-content"> <scroll-view scroll-y class="scrollable-content">
<view class="flex-row section_9 list-item_2 mt-5" v-for="(item, index) in productList" :key="index" @click="goToProduct(item)"> <view class="flex-row section_9 list-item_2 mt-5" v-for="(item, index) in productList" :key="index" @click="goToProduct(item)">
<image class="self-center image_4" <image class="self-center image_4"
:src="item.goodImg.split(';')[0]" /> :src="item.goodImg" />
<view style="width: 220rpx;" class="flex-col items-start self-center group_3"> <view style="width: 220rpx;" class="flex-col items-start self-center group_3">
<text class="font_2 text_5">{{ item.name }}</text> <text class="font_2 text_5">{{ item.name }}</text>
<text class="font_3 mt-13">{{ item.intro }}</text> <text class="font_3 mt-13">{{ item.intro }}</text>
@ -55,7 +55,9 @@
</template> </template>
<script setup> <script setup>
import { ref,onMounted, toRaw } from 'vue'; import {
ref,onMounted, toRaw
} from 'vue';
import { baseUrl, testUrl , suiUrl} from '@/api/request'; import { baseUrl, testUrl , suiUrl} from '@/api/request';
const currentColor = ref(0); const currentColor = ref(0);
const sort =ref([{}]) // const sort =ref([{}]) //
@ -133,7 +135,7 @@ const getBoxStyle = (index) => ({
const goToProduct = (item) => { const goToProduct = (item) => {
uni.navigateTo({ uni.navigateTo({
url: '../../../pages/store-home/ProductDetails/ProductDetails?gid=' + JSON.stringify(item.id) url: '../../../pages/store-home/ProductDetails/ProductDetails?info=' + JSON.stringify(item)
}) })
} }
</script> </script>