Authored by 李奇
Committed by 李奇

删除废弃文件

1 -{  
2 - "wxpath": "/Applications/wechatwebdevtools.app/Contents/Resources/app.nw/bin",  
3 - "mode": "yoho"  
4 -}  
1 -  
2 -Component({  
3 - options: {  
4 -  
5 - },  
6 - properties: {  
7 - isShow:{  
8 - type: Boolean,  
9 - value: true  
10 - },  
11 - },  
12 -  
13 - data: {  
14 -  
15 - },  
16 -  
17 - methods: {  
18 - _backhome(e){  
19 - wx.switchTab({  
20 - url: '/pages/index/index',  
21 - })  
22 - },  
23 - },  
24 -  
25 -})  
1 -{  
2 - "component": true,  
3 - "usingComponents": {}  
4 -}  
1 -  
2 -<block wx:if="{{isShow}}">  
3 -<view class='homeContainer'>  
4 - <image class='homeIcon' src='images/yoho@3x.png' style='mode: aspectFit;' bindtap='_backhome'></image>  
5 -</view>  
6 -</block>  
1 -  
2 -.homeContainer {  
3 - position: fixed;  
4 - width: 90rpx;  
5 - height: 90rpx;  
6 - bottom: 140rpx;  
7 - right: 30rpx;  
8 - z-index: 1300;  
9 -}  
10 -  
11 -.homeIcon {  
12 - width: 100%;  
13 - height: 100%;  
14 -}  
1 -// component/productListCell.js  
2 -import { shouldDiscardTap} from '../utils/util';  
3 -  
4 -//获取应用实例  
5 -let app = getApp();  
6 -  
7 -const screenHeight = app.globalData.systemInfo.screenHeight;  
8 -const windowWidth = app.globalData.systemInfo.windowWidth;  
9 -const windowHeight = app.globalData.systemInfo.windowHeight;  
10 -  
11 -const DEVICE_WIDTH_RATIO = windowWidth / 320;  
12 -  
13 -let listWidth = Math.ceil(137.5 * DEVICE_WIDTH_RATIO);  
14 -let listHeight = Math.ceil(254 * DEVICE_WIDTH_RATIO);  
15 -  
16 -const IMAGE_WIDTH = 145;  
17 -const IMAGE_HEIGHT = 193;  
18 -const IMAGE_RATIO = IMAGE_HEIGHT / IMAGE_WIDTH;  
19 -let listImageTop = 31;  
20 -let listImageWidth = listWidth;  
21 -let listImageHeight = Math.ceil(listWidth * IMAGE_RATIO);  
22 -  
23 -let listMarginHorizontal = (windowWidth - listWidth * 2) / 3;  
24 -  
25 -let PV_ID = new Date().getTime() + '';  
26 -  
27 -Component({  
28 - /**  
29 - * 组件的属性列表  
30 - */  
31 - properties: {  
32 - item:{  
33 - type: Object  
34 - },  
35 - pageName: {  
36 - type: String,  
37 - value: ""  
38 - },  
39 - animationType: {  
40 - type: String,  
41 - value: ""  
42 - },  
43 - logEvenName: {  
44 - type: String,  
45 - value: ""  
46 - },  
47 - index: {  
48 - type: Number,  
49 - value: 0  
50 - },  
51 - fIndex: {  
52 - type: Number,  
53 - value: 0  
54 - },  
55 - fName: {  
56 - type: String,  
57 - value: ""  
58 - },  
59 - pageParam: {  
60 - type: String,  
61 - value: ""  
62 - }  
63 - },  
64 -  
65 - /**  
66 - * 组件的初始数据  
67 - */  
68 - data: {  
69 - lastTapTimeStamp: 0,  
70 -  
71 - screenHeight,  
72 - windowHeight,  
73 - listWidth,  
74 - listHeight,  
75 - listImageWidth,  
76 - listImageHeight,  
77 - listImageTop,  
78 - listMarginHorizontal,  
79 - },  
80 -  
81 - /**  
82 - * 组件的方法列表  
83 - */  
84 - methods: {  
85 - productCellTapped(event) {  
86 - if (shouldDiscardTap(event.timeStamp, this.data.lastTapTimeStamp)) {  
87 - return;  
88 - }  
89 - this.setData({ lastTapTimeStamp: event.timeStamp });  
90 - let data = event.currentTarget.dataset;  
91 - let productSkn = data.productSkn;  
92 -  
93 - // 根据动画类型来选择动画效果  
94 - if (this.properties.animationType && this.properties.animationType == "redirectTo") {  
95 - wx.redirectTo({  
96 - url: '/pages/goodsDetail/goodsDetail?productSkn=' + productSkn + '&page_name=' + this.properties.pageName + '&page_param=' + this.properties.pageParam  
97 - })  
98 - } else {  
99 - wx.navigateTo({  
100 - url: '/pages/goodsDetail/goodsDetail?productSkn=' + productSkn + '&page_name=' + this.properties.pageName + '&page_param=' + this.properties.pageParam  
101 - });  
102 - }  
103 - }  
104 - }  
105 -})  
1 -{  
2 - "component": true,  
3 - "usingComponents": {}  
4 -}  
1 -<!--component/productListCell.wxml-->  
2 -<view class="product" style="width:{{listWidth}}px;margin-left:{{listMarginHorizontal}}px" bindtap="productCellTapped" data-product-skn="{{item.product_skn}}">  
3 - <image class="productImage" mode="aspectFit" src="{{item.default_images}}" style="width:{{listImageWidth}}px;height:{{listImageHeight}}px;margin-top:{{listImageTop}}px;" />  
4 - <text class="productTitle">{{item.product_name}}</text>  
5 -  
6 - <view class='bottomContainerView'>  
7 - <view class="priceContainer">  
8 - <text class="price1" style="color:{{item.showOriginPrice ? '#d0021b' : '#444444'}}">{{item.salePriceStr}}</text>  
9 - <text class="price2">{{item.showOriginPrice ? item.originPriceStr : ''}}</text>  
10 - </view>  
11 - <!-- 加入购物车按钮需要上层传入是否展示 部分商品由于特殊性 在商品列表不展示购物车按钮 -->  
12 - <image wx:if="{{showAddShopCartBtn && (item.is_shop_cart_add == 'Y')}}" class='addToShopCartImage' src='images/jrgwc@2x.png' catchtap='addToShopCartAction' data-item='{{item}}'></image>  
13 - </view>  
14 -</view>  
1 -/* component/productListCell.wxss */  
2 -  
3 -.product {  
4 - display: flex;  
5 - flex-direction: column;  
6 - background-color: white;  
7 -}  
8 -  
9 -.productImage {  
10 - display: block;  
11 -  
12 -}  
13 -  
14 -.productTitle {  
15 - margin-top: 21rpx;  
16 - margin-bottom: 1rpx;  
17 - color: #444444;  
18 - font-family: PingFang SC;  
19 - font-size: 24rpx;  
20 - /*font-weight: bold;*/  
21 - line-height: 30rpx;  
22 - display: -webkit-box;  
23 - -webkit-box-orient: vertical;  
24 - -webkit-line-clamp: 2;  
25 - overflow: hidden;  
26 - height: 60rpx;  
27 -}  
28 -  
29 -.bottomContainerView {  
30 - display: flex;  
31 - flex-direction: row;  
32 - align-items: flex-end;  
33 - /* margin-bottom: 20rpx; */  
34 - justify-content: space-between;  
35 -}  
36 -  
37 -.priceContainer {  
38 - display: flex;  
39 - flex-direction: row;  
40 - width: 236rpx;  
41 - display:-webkit-box;  
42 - -webkit-line-clamp:1;  
43 - -webkit-box-orient:vertical;  
44 - overflow:hidden;  
45 -}  
46 -  
47 -.price1 {  
48 - font-size: 24rpx;  
49 - color: #d0021b;  
50 -}  
51 -  
52 -.price2 {  
53 - margin-left: 10rpx;  
54 - font-size: 24rpx;  
55 - color: #b0b0b0;  
56 - text-decoration: line-through;  
57 -}  
58 -  
59 -.addToShopCartImage {  
60 - width: 80rpx;  
61 - height: 46rpx;  
62 -}  
1 -import { jumpByUrl } from '../../libs/urlRoute';  
2 -import { postFormId } from '../../libs/formIdCollectRequest.js';  
3 -  
4 -import {  
5 - logEvent,  
6 - YB_MAIN_POP_UP_C,  
7 -} from '../../libs/analytics.js'  
8 -  
9 -Component({  
10 - options: {  
11 - multipleSlots: true  
12 - },  
13 -  
14 - properties: {  
15 - src: {  
16 - type: String,  
17 - value: ""  
18 - },  
19 - url: {  
20 - type: String,  
21 - value: ""  
22 - }  
23 - },  
24 -  
25 - data: {  
26 - isShow: false,  
27 - },  
28 -  
29 - methods: {  
30 - hideDialog(){  
31 - this.setData({  
32 - isShow: false,  
33 - });  
34 - },  
35 - showDialog(){  
36 - this.setData({  
37 - isShow: true,  
38 - });  
39 - },  
40 - jumpByRule(){  
41 - let that = this;  
42 - if (that.properties.url == null){  
43 - return;  
44 - }  
45 -  
46 - let params = {  
47 - TO_PATH: that.properties.url  
48 - };  
49 - logEvent(YB_MAIN_POP_UP_C, params);  
50 -  
51 - jumpByUrl(that.properties.url,'home');  
52 - that.hideDialog();  
53 - },  
54 - //formId上报  
55 - formSubmit(e) {  
56 - // console.log('----formSubmit---', e);  
57 - let formId = e.detail.formId;  
58 - postFormId(formId,'1');  
59 - }  
60 - } 1 +import { jumpByUrl } from '../../libs/urlRoute';
  2 +import { postFormId } from '../../libs/formIdCollectRequest.js';
  3 +
  4 +import {
  5 + logEvent,
  6 + YB_MAIN_POP_UP_C,
  7 +} from '../../libs/analytics.js'
  8 +
  9 +Component({
  10 + options: {
  11 + multipleSlots: true
  12 + },
  13 +
  14 + properties: {
  15 + src: {
  16 + type: String,
  17 + value: ""
  18 + },
  19 + url: {
  20 + type: String,
  21 + value: ""
  22 + }
  23 + },
  24 +
  25 + data: {
  26 + isShow: false,
  27 + },
  28 +
  29 + methods: {
  30 + hideDialog(){
  31 + this.setData({
  32 + isShow: false,
  33 + });
  34 + },
  35 + showDialog(){
  36 + this.setData({
  37 + isShow: true,
  38 + });
  39 + },
  40 + jumpByRule(){
  41 + let that = this;
  42 + if (that.properties.url == null){
  43 + return;
  44 + }
  45 +
  46 + let params = {
  47 + TO_PATH: that.properties.url
  48 + };
  49 + logEvent(YB_MAIN_POP_UP_C, params);
  50 +
  51 + jumpByUrl(that.properties.url,'home');
  52 + that.hideDialog();
  53 + },
  54 + //formId上报
  55 + formSubmit(e) {
  56 + // console.log('----formSubmit---', e);
  57 + let formId = e.detail.formId;
  58 + postFormId(formId,'1');
  59 + }
  60 + }
61 }) 61 })
1 -{  
2 - "component": true,  
3 - "usingComponents": {} 1 +{
  2 + "component": true,
  3 + "usingComponents": {}
4 } 4 }
1 -<view class='container' hidden="{{!isShow}}" catchtouchmove="true">  
2 - <view class='dialog-mask'>  
3 - <view class='dialog'>  
4 - <form bindsubmit='formSubmit' report-submit='true'>  
5 - <image src="{{src}}" class='dialog-image' mode='aspecdtFit' bindtap='jumpByRule'></image>  
6 - <button class='image-btn' form-type='submit' bindtap='jumpByRule'></button>  
7 - </form>  
8 - <form bindsubmit='formSubmit' report-submit='true'>  
9 - <view class='dialog-close' bindtap='hideDialog'>  
10 - <image class='close' src="./images/close.png" ></image>  
11 - <button class='dialog-btn' form-type='submit'></button>  
12 - </view>  
13 - </form>  
14 - </view>  
15 - </view> 1 +<view class='container' hidden="{{!isShow}}" catchtouchmove="true">
  2 + <view class='dialog-mask'>
  3 + <view class='dialog'>
  4 + <form bindsubmit='formSubmit' report-submit='true'>
  5 + <image src="{{src}}" class='dialog-image' mode='aspecdtFit' bindtap='jumpByRule'></image>
  6 + <button class='image-btn' form-type='submit' bindtap='jumpByRule'></button>
  7 + </form>
  8 + <form bindsubmit='formSubmit' report-submit='true'>
  9 + <view class='dialog-close' bindtap='hideDialog'>
  10 + <image class='close' src="./images/close.png" ></image>
  11 + <button class='dialog-btn' form-type='submit'></button>
  12 + </view>
  13 + </form>
  14 + </view>
  15 + </view>
16 </view> 16 </view>
1 -  
2 -.dialog-mask{  
3 - position: fixed;  
4 - z-index: 4999;  
5 - width: 100%;  
6 - height: 100%;  
7 - top: 0;  
8 - right: 0;  
9 - left: 0;  
10 - bottom: 0;  
11 - display: flex;  
12 - flex-direction: column;  
13 - align-items: center;  
14 - background: rgba(0, 0, 0, 0.6);  
15 -}  
16 -  
17 -.dialog{  
18 - position: fixed;  
19 - z-index: 5000;  
20 - top: 110rpx;  
21 - display: flex;  
22 - flex-direction: column;  
23 - align-items: center;  
24 - height: wrap;  
25 - width: 100%;  
26 -}  
27 -  
28 -.dialog-image{  
29 - height: 680rpx;  
30 - width: 680rpx;  
31 - display: flex;  
32 - flex-direction: column;  
33 - align-items: center;  
34 -}  
35 -  
36 -.dialog-close{  
37 - height: 110rpx;  
38 - width: 100rpx;  
39 - margin-top: 30rpx;  
40 - display: flex;  
41 - align-items: center;  
42 - justify-content: center;  
43 -}  
44 -  
45 -.close {  
46 - width: 80rpx;  
47 - height: 80rpx;  
48 -}  
49 -  
50 -.dialog-btn {  
51 - height: 110rpx;  
52 - width: 100rpx;  
53 - background-color: red;  
54 - position: absolute;  
55 - opacity: 0;  
56 -}  
57 -  
58 -.image-btn {  
59 - height: 680rpx;  
60 - width: 680rpx;  
61 - background-color: red;  
62 - position: absolute;  
63 - top: 0rpx;  
64 - opacity: 0;  
65 -} 1 +
  2 +.dialog-mask{
  3 + position: fixed;
  4 + z-index: 4999;
  5 + width: 100%;
  6 + height: 100%;
  7 + top: 0;
  8 + right: 0;
  9 + left: 0;
  10 + bottom: 0;
  11 + display: flex;
  12 + flex-direction: column;
  13 + align-items: center;
  14 + background: rgba(0, 0, 0, 0.6);
  15 +}
  16 +
  17 +.dialog{
  18 + position: fixed;
  19 + z-index: 5000;
  20 + top: 110rpx;
  21 + display: flex;
  22 + flex-direction: column;
  23 + align-items: center;
  24 + height: wrap;
  25 + width: 100%;
  26 +}
  27 +
  28 +.dialog-image{
  29 + height: 680rpx;
  30 + width: 680rpx;
  31 + display: flex;
  32 + flex-direction: column;
  33 + align-items: center;
  34 +}
  35 +
  36 +.dialog-close{
  37 + height: 110rpx;
  38 + width: 100rpx;
  39 + margin-top: 30rpx;
  40 + display: flex;
  41 + align-items: center;
  42 + justify-content: center;
  43 +}
  44 +
  45 +.close {
  46 + width: 80rpx;
  47 + height: 80rpx;
  48 +}
  49 +
  50 +.dialog-btn {
  51 + height: 110rpx;
  52 + width: 100rpx;
  53 + background-color: red;
  54 + position: absolute;
  55 + opacity: 0;
  56 +}
  57 +
  58 +.image-btn {
  59 + height: 680rpx;
  60 + width: 680rpx;
  61 + background-color: red;
  62 + position: absolute;
  63 + top: 0rpx;
  64 + opacity: 0;
  65 +}
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 "quickNavigation": "/pages/quickNavigation/quickNavigation", 8 "quickNavigation": "/pages/quickNavigation/quickNavigation",
9 "tabs": "./components/tabs", 9 "tabs": "./components/tabs",
10 "tabs-pane": "./components/tabs-pane", 10 "tabs-pane": "./components/tabs-pane",
11 - "dialog": "../../component/dialog/dialog", 11 + "dialog": "/components/dialog/dialog",
12 "prize-item": "./components/prize-item", 12 "prize-item": "./components/prize-item",
13 "login": "../../login/login/login" 13 "login": "../../login/login/login"
14 } 14 }