提交 cb07e8e0 authored 作者: 刘旭's avatar 刘旭

更新产品线收藏功能

上级 34468543
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'; import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';
onLaunch(() => { // onLaunch(() => {
console.log('App Launch'); // console.log('App Launch');
}); // });
onShow(() => { // onShow(() => {
console.log('App Show'); // console.log('App Show');
}); // });
onHide(() => { // onHide(() => {
console.log('App Hide'); // console.log('App Hide');
}); // });
......
...@@ -1064,7 +1064,6 @@ export default { ...@@ -1064,7 +1064,6 @@ export default {
}, },
handClose() { handClose() {
let that = this; let that = this;
console.log(that.localdata, 'that.goodsInfo+++');
// that.selectShop = {}; // that.selectShop = {};
// that.init(); // that.init();
// that.open() // that.open()
...@@ -1072,7 +1071,6 @@ export default { ...@@ -1072,7 +1071,6 @@ export default {
// console.log(that.goodsInfo, 'that.goodsInfo----'); // console.log(that.goodsInfo, 'that.goodsInfo----');
// that.goodsInfo = {}; // that.goodsInfo = {};
// console.log(that.goodsInfo, 'that.goodsInfo+++'); // console.log(that.goodsInfo, 'that.goodsInfo+++');
// init(true) // init(true)
}, },
// 添加子字段 // 添加子字段
......
...@@ -179,6 +179,17 @@ let initProductLine = (lineId: number) => { ...@@ -179,6 +179,17 @@ let initProductLine = (lineId: number) => {
// 获取产品线详细数据 // 获取产品线详细数据
getProductLineIndex({ lineId }).then((res: any) => { getProductLineIndex({ lineId }).then((res: any) => {
if (res.data.code === 200) { if (res.data.code === 200) {
if (res.data.data.userHasCollect === 1) {
store.$patch({
star: true,
collectData: {
type: 2,
valueId: res.data.data.lineId
},
});
star.value = true;
options.value[0].icon = 'star-filled';
}
if (res.data.data.cartList.length > 20) { if (res.data.data.cartList.length > 20) {
uni.navigateTo({ uni.navigateTo({
url: './importProductLine', url: './importProductLine',
...@@ -281,9 +292,7 @@ let heightChange = () => { ...@@ -281,9 +292,7 @@ let heightChange = () => {
nextTick(() => { nextTick(() => {
getInfo() getInfo()
getImageInfo() getImageInfo()
// itemHeight.value = height
setTimeout(() => { setTimeout(() => {
// console.log(windowHeight.value - fromTop.value, windowHeight.value, fromTop.value);
if (windowHeight.value - fromTop.value < 100) { if (windowHeight.value - fromTop.value < 100) {
if (itemHeight.value === 25) return if (itemHeight.value === 25) return
itemHeight.value = itemHeight.value - 5 itemHeight.value = itemHeight.value - 5
...@@ -294,7 +303,6 @@ let heightChange = () => { ...@@ -294,7 +303,6 @@ let heightChange = () => {
// 获取图片尺寸 // 获取图片尺寸
let getImageInfo = () => { let getImageInfo = () => {
console.log('获取图片');
lineList.value.forEach((item: any) => { lineList.value.forEach((item: any) => {
uni.getImageInfo({ uni.getImageInfo({
src: baseUrl + item.url, src: baseUrl + item.url,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论