Merge branch 'master' of https://git.dayouqiantu.cn/uniapp/yshop-uniapp
This commit is contained in:
@ -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');
|
||||
|
@ -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) => {
|
||||
|
@ -517,5 +517,8 @@
|
||||
<style lang="less">
|
||||
.footer-h5 {
|
||||
bottom: 50px
|
||||
}
|
||||
.shoppingCart{
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
@ -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: "保存成功"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user