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,9 +6,9 @@ export default {
let promptEle = null;
let timer = null;
function creatPromptVM(self) {
function createPromptVM(self) {
let tpl = Vue.extend({
data: function () {
data: function() {
return {
type: '',
img: '',
... ... @@ -16,12 +16,12 @@ export default {
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}`]}, [
return h('div', { class: ['yoho-grass-prompt', `yoho-grass-prompt-${this.type}`] }, [
h(this.url ? 'router-link' : 'div', {
class: classNames,
on: {
... ... @@ -39,7 +39,7 @@ export default {
height: 100
}
}),
h('div', {class: ['prompt-info']}, [
h('div', { class: ['prompt-info'] }, [
h('p', {
class: ['prompt-info-title'],
domProps: {
... ... @@ -53,9 +53,9 @@ export default {
}
})
]),
h('span', {class: ['iconfont', 'icon-right', 'prompt-icon']})
])
h('span', { class: ['iconfont', 'icon-right', 'prompt-icon'] })
])
]);
}
});
... ... @@ -65,10 +65,10 @@ 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 || '';
... ...
... ... @@ -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;
... ...