Authored by TaoHuang

fix error

@@ -90,7 +90,7 @@ export default { @@ -90,7 +90,7 @@ export default {
90 90
91 .action-sheet-fade-enter-active, 91 .action-sheet-fade-enter-active,
92 .action-sheet-fade-leave-active { 92 .action-sheet-fade-leave-active {
93 - transition: all 0.2s ease-in-out; 93 + transition: all 0.7s ease-in-out;
94 } 94 }
95 95
96 .action-sheet-move-enter, 96 .action-sheet-move-enter,
@@ -100,7 +100,7 @@ export default { @@ -100,7 +100,7 @@ export default {
100 100
101 .action-sheet-move-enter-active, 101 .action-sheet-move-enter-active,
102 .action-sheet-move-leave-active { 102 .action-sheet-move-leave-active {
103 - transition: all 0.2s ease-in-out; 103 + transition: all 0.7s ease-in-out;
104 } 104 }
105 105
106 .yoho-popup { 106 .yoho-popup {
@@ -69,8 +69,13 @@ export default { @@ -69,8 +69,13 @@ export default {
69 this.prompt = this.$grassPrompt({ 69 this.prompt = this.$grassPrompt({
70 img: this.product.productImage, 70 img: this.product.productImage,
71 title: '收藏成功', 71 title: '收藏成功',
72 - desc: '可在 [我的-商品收藏] 页面查看'  
73 - }); 72 + desc: '可在 [我的-商品收藏] 页面查看',
  73 + onClick: () => {
  74 + this.$yoho.goPage('go.fav', {
  75 + favType: 0
  76 + });
  77 + }
  78 + }, 1000);
74 } else { 79 } else {
75 this.prompt && this.prompt.hide(); 80 this.prompt && this.prompt.hide();
76 this.$createToast({ 81 this.$createToast({
@@ -15,6 +15,8 @@ export default { @@ -15,6 +15,8 @@ export default {
15 15
16 <style :lang="scss" scoped> 16 <style :lang="scss" scoped>
17 .item { 17 .item {
18 - margin-bottom: 10px; 18 + margin-bottom: 20px;
  19 + margin-left: 20px;
19 } 20 }
  21 +
20 </style> 22 </style>
1 -import {isArray} from 'lodash'; 1 +import { isArray } from 'lodash';
2 2
3 export default { 3 export default {
4 install(Vue) { 4 install(Vue) {
@@ -6,57 +6,57 @@ export default { @@ -6,57 +6,57 @@ export default {
6 let promptEle = null; 6 let promptEle = null;
7 let timer = null; 7 let timer = null;
8 8
9 - function creatPromptVM(self) { 9 + function createPromptVM(self) {
10 let tpl = Vue.extend({ 10 let tpl = Vue.extend({
11 - data: function () {  
12 - return {  
13 - type: '',  
14 - img: '',  
15 - title: '',  
16 - desc: '',  
17 - onClick: null,  
18 - classNames: []  
19 - }  
20 - },  
21 - render: function(h) {  
22 - let classNames = ['yoho-grass-prompt-wrap', ...this.classNames]; 11 + data: function() {
  12 + return {
  13 + type: '',
  14 + img: '',
  15 + title: '',
  16 + desc: '',
  17 + onClick: null,
  18 + classNames: []
  19 + };
  20 + },
  21 + render: function(h) {
  22 + let classNames = ['yoho-grass-prompt-wrap', ...this.classNames];
23 23
24 - return h('div', {class: ['yoho-grass-prompt', `yoho-grass-prompt-${this.type}`]}, [  
25 - h(this.url ? 'router-link' : 'div', {  
26 - class: classNames,  
27 - on: {  
28 - click: () => {  
29 - this.onClick && this.onClick();  
30 - } 24 + return h('div', { class: ['yoho-grass-prompt', `yoho-grass-prompt-${this.type}`] }, [
  25 + h(this.url ? 'router-link' : 'div', {
  26 + class: classNames,
  27 + on: {
  28 + click: () => {
  29 + this.onClick && this.onClick();
31 } 30 }
32 - }, [  
33 - h('ImageFormat', {  
34 - class: ['prompt-thumb'],  
35 - props: {  
36 - src: this.img,  
37 - lazy: false,  
38 - width: 100,  
39 - height: 100 31 + }
  32 + }, [
  33 + h('ImageFormat', {
  34 + class: ['prompt-thumb'],
  35 + props: {
  36 + src: this.img,
  37 + lazy: false,
  38 + width: 100,
  39 + height: 100
  40 + }
  41 + }),
  42 + h('div', { class: ['prompt-info'] }, [
  43 + h('p', {
  44 + class: ['prompt-info-title'],
  45 + domProps: {
  46 + innerHTML: this.title
40 } 47 }
41 }), 48 }),
42 - h('div', {class: ['prompt-info']}, [  
43 - h('p', {  
44 - class: ['prompt-info-title'],  
45 - domProps: {  
46 - innerHTML: this.title  
47 - }  
48 - }),  
49 - h('p', {  
50 - class: ['prompt-info-desc'],  
51 - domProps: {  
52 - innerHTML: this.desc  
53 - }  
54 - })  
55 - ]),  
56 - h('span', {class: ['iconfont', 'icon-right', 'prompt-icon']})  
57 - ]) 49 + h('p', {
  50 + class: ['prompt-info-desc'],
  51 + domProps: {
  52 + innerHTML: this.desc
  53 + }
  54 + })
  55 + ]),
  56 + h('span', { class: ['iconfont', 'icon-right', 'prompt-icon'] })
58 ]) 57 ])
59 - } 58 + ]);
  59 + }
60 }); 60 });
61 61
62 promptVM = new tpl(); 62 promptVM = new tpl();
@@ -65,13 +65,13 @@ export default { @@ -65,13 +65,13 @@ export default {
65 } 65 }
66 66
67 Vue.prototype.$grassPrompt = function(data = {}, time) { 67 Vue.prototype.$grassPrompt = function(data = {}, time) {
68 - let {img, title, desc, type, className, onClick} = data; 68 + let { img, title, desc, type, className, onClick } = data;
69 69
70 if (!promptVM) { 70 if (!promptVM) {
71 - creatPromptVM(this); 71 + createPromptVM(this);
72 } 72 }
73 73
74 - promptVM.img = img || ''; 74 + promptVM.img = img || '';
75 promptVM.title = title; 75 promptVM.title = title;
76 promptVM.desc = desc; 76 promptVM.desc = desc;
77 promptVM.type = type || 'bottom'; 77 promptVM.type = type || 'bottom';
@@ -294,7 +294,7 @@ function processProductList(list, favsList) { @@ -294,7 +294,7 @@ function processProductList(list, favsList) {
294 } 294 }
295 295
296 // fav 296 // fav
297 - const fav = favsList.find(i => `${i.id}` === `${product.product_skn}`); 297 + const fav = favsList.find(i => `${i.id}` === `${product.product_id}`);
298 298
299 product.id = product.product_id; 299 product.id = product.product_id;
300 product.productType = 1; 300 product.productType = 1;