diff --git a/App.vue b/App.vue
index 6428851..9f68728 100644
--- a/App.vue
+++ b/App.vue
@@ -28,7 +28,7 @@
@font-face {
font-family: 'FangZhengFonts';
- src: url('https://www.carboner.cn:8888/api/file/download/FangZhengFonts.ttf') format('truetype');
+ src: url('https://carboner.cn:8888/api/file/download/FangZhengFonts.ttf') format('truetype');
}
view {
diff --git a/pages/store-home/ProductDetails/ProductDetails.vue b/pages/store-home/ProductDetails/ProductDetails.vue
index 9a9c25c..6b16ded 100644
--- a/pages/store-home/ProductDetails/ProductDetails.vue
+++ b/pages/store-home/ProductDetails/ProductDetails.vue
@@ -7,7 +7,7 @@
/> -->
-
+
@@ -126,6 +126,7 @@ const closeHandler = () => {
}
onMounted(()=>{
+ limitedTimeOffer()
emitter.on('close', closeHandler)
})
@@ -149,6 +150,9 @@ const getProduct = async (gid) =>{ //根据商品获取商品信息
richTextcontent.value = goodObject.value.richText
console.log(richTextcontent.value)
imgArr.value = res.data.data.goodImg.split(';') //将后端传来的图片字符串转为图片数组
+ imgArr.value = imgArr.value.map((e)=>{
+ return publicPath + e
+ })
labelList.value = goodObject.value.label.split(';') //分割字符串,生成标签数组
labelList.value = labelList.value.filter((s)=>{ //使用filter将最后一个空值去掉
return s
@@ -183,13 +187,26 @@ const jump_buy = async ()=> {
//点击查看图片详情方法
const previewImage = (index) => {
- console.log(index);
+ // console.log(url);
uni.previewImage({
current: index,
- urls: imgArr.value
+ urls: imgArr.value
})
}
+const limitedTimeOffer = async () => { //查询限时优惠接口
+ const res = await uni.request({
+ url: baseUrl + '/global/query/coupon/price',
+ method: 'GET',
+ header: {
+ cookie
+ }
+ })
+ console.log('res--->',res.data);
+ if(res.data.code === 1) {
+ coupon.value = res.data.data
+ }
+}