Authored by TaoHuang

fix error

... ... @@ -90,7 +90,7 @@ export default {
.action-sheet-fade-enter-active,
.action-sheet-fade-leave-active {
transition: all 0.2s ease-in-out;
transition: all 0.7s ease-in-out;
}
.action-sheet-move-enter,
... ... @@ -100,7 +100,7 @@ export default {
.action-sheet-move-enter-active,
.action-sheet-move-leave-active {
transition: all 0.2s ease-in-out;
transition: all 0.7s ease-in-out;
}
.yoho-popup {
... ...
... ... @@ -69,8 +69,13 @@ export default {
this.prompt = this.$grassPrompt({
img: this.product.productImage,
title: '收藏成功',
desc: '可在 [我的-商品收藏] 页面查看'
});
desc: '可在 [我的-商品收藏] 页面查看',
onClick: () => {
this.$yoho.goPage('go.fav', {
favType: 0
});
}
}, 1000);
} else {
this.prompt && this.prompt.hide();
this.$createToast({
... ...
... ... @@ -15,6 +15,8 @@ export default {
<style :lang="scss" scoped>
.item {
margin-bottom: 10px;
margin-bottom: 20px;
margin-left: 20px;
}
</style>
... ...
import {isArray} from 'lodash';
import { isArray } from 'lodash';
export default {
install(Vue) {
... ... @@ -6,57 +6,57 @@ export default {
let promptEle = null;
let timer = null;
function creatPromptVM(self) {
function createPromptVM(self) {
let tpl = Vue.extend({
data: function () {
return {
type: '',
img: '',
title: '',
desc: '',
onClick: null,
classNames: []
}
},
render: function(h) {
let classNames = ['yoho-grass-prompt-wrap', ...this.classNames];
data: function() {
return {
type: '',
img: '',
title: '',
desc: '',
onClick: null,
classNames: []
};
},
render: function(h) {
let classNames = ['yoho-grass-prompt-wrap', ...this.classNames];
return h('div', {class: ['yoho-grass-prompt', `yoho-grass-prompt-${this.type}`]}, [
h(this.url ? 'router-link' : 'div', {
class: classNames,
on: {
click: () => {
this.onClick && this.onClick();
}
return h('div', { class: ['yoho-grass-prompt', `yoho-grass-prompt-${this.type}`] }, [
h(this.url ? 'router-link' : 'div', {
class: classNames,
on: {
click: () => {
this.onClick && this.onClick();
}
}, [
h('ImageFormat', {
class: ['prompt-thumb'],
props: {
src: this.img,
lazy: false,
width: 100,
height: 100
}
}, [
h('ImageFormat', {
class: ['prompt-thumb'],
props: {
src: this.img,
lazy: false,
width: 100,
height: 100
}
}),
h('div', { class: ['prompt-info'] }, [
h('p', {
class: ['prompt-info-title'],
domProps: {
innerHTML: this.title
}
}),
h('div', {class: ['prompt-info']}, [
h('p', {
class: ['prompt-info-title'],
domProps: {
innerHTML: this.title
}
}),
h('p', {
class: ['prompt-info-desc'],
domProps: {
innerHTML: this.desc
}
})
]),
h('span', {class: ['iconfont', 'icon-right', 'prompt-icon']})
])
h('p', {
class: ['prompt-info-desc'],
domProps: {
innerHTML: this.desc
}
})
]),
h('span', { class: ['iconfont', 'icon-right', 'prompt-icon'] })
])
}
]);
}
});
promptVM = new tpl();
... ... @@ -65,13 +65,13 @@ export default {
}
Vue.prototype.$grassPrompt = function(data = {}, time) {
let {img, title, desc, type, className, onClick} = data;
let { img, title, desc, type, className, onClick } = data;
if (!promptVM) {
creatPromptVM(this);
createPromptVM(this);
}
promptVM.img = img || '';
promptVM.img = img || '';
promptVM.title = title;
promptVM.desc = desc;
promptVM.type = type || 'bottom';
... ...
... ... @@ -294,7 +294,7 @@ function processProductList(list, favsList) {
}
// fav
const fav = favsList.find(i => `${i.id}` === `${product.product_skn}`);
const fav = favsList.find(i => `${i.id}` === `${product.product_id}`);
product.id = product.product_id;
product.productType = 1;
... ...