修改为你推荐显示旧价格的问题
This commit is contained in:
@ -19,8 +19,7 @@
|
||||
<view class="title more-t">{{ item.storeName }}</view>
|
||||
<view class="price-box">
|
||||
<view class="flex x-bc align-end">
|
||||
<view class="current">{{ item.activity_type === 'groupon' ? item.price : item.otPrice }}
|
||||
</view>
|
||||
<view class="current">{{ item.price }} </view>
|
||||
<view class="sales miso-font">仅剩:{{ item.stock }}{{ item.unitName }}</view>
|
||||
</view>
|
||||
<view class="x-f tag-box">
|
||||
@ -33,28 +32,26 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'PromotionGood',
|
||||
props: ['benefit'],
|
||||
data: function() {
|
||||
return {};
|
||||
return {}
|
||||
},
|
||||
methods: {
|
||||
routerGo(item) {
|
||||
this.$yrouter.push({
|
||||
path: '/pages/shop/GoodsCon/index',
|
||||
query: {
|
||||
id: item.id
|
||||
}
|
||||
});
|
||||
}
|
||||
id: item.id,
|
||||
},
|
||||
mounted() {
|
||||
})
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
@ -14,12 +14,10 @@
|
||||
</template>
|
||||
<script>
|
||||
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||
import {
|
||||
getSpreadImg
|
||||
} from "@/api/user";
|
||||
import { getSpreadImg } from '@/api/user'
|
||||
|
||||
export default {
|
||||
name: "Poster",
|
||||
name: 'Poster',
|
||||
components: {
|
||||
// swiper,
|
||||
// swiperSlide
|
||||
@ -29,26 +27,26 @@
|
||||
return {
|
||||
swiperPosters: {
|
||||
speed: 1000,
|
||||
effect: "coverflow",
|
||||
slidesPerView: "auto",
|
||||
effect: 'coverflow',
|
||||
slidesPerView: 'auto',
|
||||
centeredSlides: true,
|
||||
coverflowEffect: {
|
||||
rotate: 0, // 旋转的角度
|
||||
stretch: -20, // 拉伸 图片间左右的间距和密集度
|
||||
depth: 100, // 深度 切换图片间上下的间距和密集度
|
||||
modifier: 3, // 修正值 该值越大前面的效果越明显
|
||||
slideShadows: false // 页面阴影效果
|
||||
slideShadows: false, // 页面阴影效果
|
||||
},
|
||||
observer: true,
|
||||
observeParents: true
|
||||
observeParents: true,
|
||||
},
|
||||
info: [],
|
||||
activeIndex: 0
|
||||
};
|
||||
activeIndex: 0,
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
this.getIndex();
|
||||
let that = this;
|
||||
this.getIndex()
|
||||
let that = this
|
||||
// this.swiper.on("slideChange", function() {
|
||||
// that.activeIndex = that.swiper.activeIndex;
|
||||
// });
|
||||
@ -56,96 +54,95 @@
|
||||
computed: {
|
||||
swiper() {
|
||||
// return this.$refs.mySwiper.swiper;
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getIndex: function() {
|
||||
let that = this;
|
||||
let that = this
|
||||
getSpreadImg({
|
||||
from: this.$deviceType == 'weixin' || this.$deviceType == 'weixinh5' ? 'uniappH5' : this.$deviceType
|
||||
from: this.$deviceType == 'weixin' || this.$deviceType == 'weixinh5' ? 'uniappH5' : this.$deviceType,
|
||||
}).then(
|
||||
res => {
|
||||
that.info = res.data;
|
||||
that.info = res.data
|
||||
},
|
||||
err => {
|
||||
uni.showToast({
|
||||
title: err.msg || err.response.data.msg || err.response.data.message,
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
}
|
||||
);
|
||||
)
|
||||
},
|
||||
downloadIamge(imgsrc, name) {
|
||||
var that = this;
|
||||
this.isDown = true;
|
||||
var downloadUrl = imgsrc;
|
||||
var that = this
|
||||
this.isDown = true
|
||||
var downloadUrl = imgsrc
|
||||
|
||||
if (!wx.saveImageToPhotosAlbum) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。"
|
||||
});
|
||||
that.openDialogVisible = true;
|
||||
// if (!wx.saveImageToPhotosAlbum) {
|
||||
// uni.showModal({
|
||||
// title: '提示',
|
||||
// content: '当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。',
|
||||
// })
|
||||
// that.openDialogVisible = true
|
||||
|
||||
return;
|
||||
}
|
||||
// return
|
||||
// }
|
||||
|
||||
// 可以通过 wx.getSetting 先查询一下用户是否授权了 "scope.writePhotosAlbum" 这个 scope
|
||||
wx.getSetting({
|
||||
success(res) {
|
||||
if (!res.authSetting["scope.writePhotosAlbum"]) {
|
||||
that.openDialogVisible = true;
|
||||
that.downloadFile(downloadUrl)
|
||||
|
||||
// 接口调用询问
|
||||
wx.authorize({
|
||||
scope: "scope.writePhotosAlbum",
|
||||
success() {
|
||||
that.downloadFile(downloadUrl);
|
||||
},
|
||||
fail() {
|
||||
// 用户拒绝了授权
|
||||
// 打开设置页面
|
||||
wx.openSetting({
|
||||
success: function (data) {},
|
||||
fail: function (data) {}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
that.downloadFile(downloadUrl);
|
||||
}
|
||||
},
|
||||
fail(res) {
|
||||
that.openDialogVisible = true;
|
||||
}
|
||||
});
|
||||
// 可以通过 uni.getSetting 先查询一下用户是否授权了 "scope.writePhotosAlbum" 这个 scope
|
||||
// uni.getSetting({
|
||||
// success(res) {
|
||||
// if (!res.authSetting["scope.writePhotosAlbum"]) {
|
||||
// that.openDialogVisible = true;
|
||||
|
||||
// // 接口调用询问
|
||||
// uni.authorize({
|
||||
// scope: "scope.writePhotosAlbum",
|
||||
// success() {
|
||||
// that.downloadFile(downloadUrl);
|
||||
// },
|
||||
// fail() {
|
||||
// // 用户拒绝了授权
|
||||
// // 打开设置页面
|
||||
// uni.openSetting({
|
||||
// success: function (data) {},
|
||||
// fail: function (data) {}
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// } else {
|
||||
// that.downloadFile(downloadUrl);
|
||||
// }
|
||||
// },
|
||||
// fail(res) {
|
||||
// that.openDialogVisible = true;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
saveImg: function() {
|
||||
this.downloadIamge(
|
||||
this.info[this.activeIndex].wap_poster,
|
||||
"poster" + this.activeIndex
|
||||
);
|
||||
this.downloadIamge(this.info[this.activeIndex].wap_poster, 'poster' + this.activeIndex)
|
||||
},
|
||||
downloadFile(url) {
|
||||
uni.downloadFile({
|
||||
url,
|
||||
fail: function(res) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "保存失败"
|
||||
});
|
||||
title: '提示',
|
||||
content: '保存失败',
|
||||
})
|
||||
},
|
||||
success: function(res) {
|
||||
uni.showModal({
|
||||
title: "提示",
|
||||
content: "保存成功"
|
||||
});
|
||||
title: '提示',
|
||||
content: '保存成功',
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@ -169,4 +166,13 @@
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.distribution-posters {
|
||||
.keep {
|
||||
position: absolute;
|
||||
bottom: 60rpx;
|
||||
left: 60rpx;
|
||||
right: 60rpx;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user