This commit is contained in:
Gao xiaosong
2020-12-05 18:43:10 +08:00
188 changed files with 48 additions and 90 deletions

View File

@ -40,7 +40,7 @@
// 获取轮播图
let item = this.detail[this.swiperCurrent];
// 获取轮播图颜色
let bgcolor = item.bgcolor;
let bgcolor = item.color;
// 颜色不存在
if (bgcolor === '') {
that.$set(item, 'bgcolor', '#c40414');

View File

@ -636,7 +636,7 @@
setCollect: function () {
let that = this,
id = that.storeInfo.id,
category = "product";
category = "collect";
if (that.storeInfo.userCollect) {
getCollectDel(id, category).then(function () {
that.storeInfo.userCollect = !that.storeInfo.userCollect;
@ -753,7 +753,7 @@
},
setOpenShare: function () {
var data = this.storeInfo;
var href = location.href;
var href = this.location.href;
if (this.$deviceType == "weixin") {
if (this.isLogin) {
getUserInfo().then((res) => {

View File

@ -517,5 +517,8 @@
<style lang="less">
.footer-h5 {
bottom: 50px
}
.shoppingCart{
position: relative;
}
</style>

View File

@ -76,7 +76,7 @@
}
);
},
downloadIamge: function (imgsrc, name) {
downloadIamge (imgsrc, name) {
var that = this;
this.isDown = true;
var downloadUrl = imgsrc;
@ -101,7 +101,7 @@
wx.authorize({
scope: "scope.writePhotosAlbum",
success() {
that.downloadImage(downloadUrl);
that.downloadFile(downloadUrl);
},
fail() {
// 用户拒绝了授权
@ -113,7 +113,7 @@
}
});
} else {
that.downloadImage(downloadUrl);
that.downloadFile(downloadUrl);
}
},
fail(res) {
@ -126,6 +126,23 @@
this.info[this.activeIndex].wap_poster,
"poster" + this.activeIndex
);
},
downloadFile(url){
uni.downloadFile({
url,
fail: function(res) {
uni.showModal({
title: "提示",
content: "保存失败"
});
},
success: function(res) {
uni.showModal({
title: "提示",
content: "保存成功"
});
}
});
}
}
};