Authored by 李奇
Committed by 李奇

删除废弃文件

{
"wxpath": "/Applications/wechatwebdevtools.app/Contents/Resources/app.nw/bin",
"mode": "yoho"
}
\ No newline at end of file
Component({
options: {
},
properties: {
isShow:{
type: Boolean,
value: true
},
},
data: {
},
methods: {
_backhome(e){
wx.switchTab({
url: '/pages/index/index',
})
},
},
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<block wx:if="{{isShow}}">
<view class='homeContainer'>
<image class='homeIcon' src='images/yoho@3x.png' style='mode: aspectFit;' bindtap='_backhome'></image>
</view>
</block>
\ No newline at end of file
.homeContainer {
position: fixed;
width: 90rpx;
height: 90rpx;
bottom: 140rpx;
right: 30rpx;
z-index: 1300;
}
.homeIcon {
width: 100%;
height: 100%;
}
\ No newline at end of file
// component/productListCell.js
import { shouldDiscardTap} from '../utils/util';
//获取应用实例
let app = getApp();
const screenHeight = app.globalData.systemInfo.screenHeight;
const windowWidth = app.globalData.systemInfo.windowWidth;
const windowHeight = app.globalData.systemInfo.windowHeight;
const DEVICE_WIDTH_RATIO = windowWidth / 320;
let listWidth = Math.ceil(137.5 * DEVICE_WIDTH_RATIO);
let listHeight = Math.ceil(254 * DEVICE_WIDTH_RATIO);
const IMAGE_WIDTH = 145;
const IMAGE_HEIGHT = 193;
const IMAGE_RATIO = IMAGE_HEIGHT / IMAGE_WIDTH;
let listImageTop = 31;
let listImageWidth = listWidth;
let listImageHeight = Math.ceil(listWidth * IMAGE_RATIO);
let listMarginHorizontal = (windowWidth - listWidth * 2) / 3;
let PV_ID = new Date().getTime() + '';
Component({
/**
* 组件的属性列表
*/
properties: {
item:{
type: Object
},
pageName: {
type: String,
value: ""
},
animationType: {
type: String,
value: ""
},
logEvenName: {
type: String,
value: ""
},
index: {
type: Number,
value: 0
},
fIndex: {
type: Number,
value: 0
},
fName: {
type: String,
value: ""
},
pageParam: {
type: String,
value: ""
}
},
/**
* 组件的初始数据
*/
data: {
lastTapTimeStamp: 0,
screenHeight,
windowHeight,
listWidth,
listHeight,
listImageWidth,
listImageHeight,
listImageTop,
listMarginHorizontal,
},
/**
* 组件的方法列表
*/
methods: {
productCellTapped(event) {
if (shouldDiscardTap(event.timeStamp, this.data.lastTapTimeStamp)) {
return;
}
this.setData({ lastTapTimeStamp: event.timeStamp });
let data = event.currentTarget.dataset;
let productSkn = data.productSkn;
// 根据动画类型来选择动画效果
if (this.properties.animationType && this.properties.animationType == "redirectTo") {
wx.redirectTo({
url: '/pages/goodsDetail/goodsDetail?productSkn=' + productSkn + '&page_name=' + this.properties.pageName + '&page_param=' + this.properties.pageParam
})
} else {
wx.navigateTo({
url: '/pages/goodsDetail/goodsDetail?productSkn=' + productSkn + '&page_name=' + this.properties.pageName + '&page_param=' + this.properties.pageParam
});
}
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--component/productListCell.wxml-->
<view class="product" style="width:{{listWidth}}px;margin-left:{{listMarginHorizontal}}px" bindtap="productCellTapped" data-product-skn="{{item.product_skn}}">
<image class="productImage" mode="aspectFit" src="{{item.default_images}}" style="width:{{listImageWidth}}px;height:{{listImageHeight}}px;margin-top:{{listImageTop}}px;" />
<text class="productTitle">{{item.product_name}}</text>
<view class='bottomContainerView'>
<view class="priceContainer">
<text class="price1" style="color:{{item.showOriginPrice ? '#d0021b' : '#444444'}}">{{item.salePriceStr}}</text>
<text class="price2">{{item.showOriginPrice ? item.originPriceStr : ''}}</text>
</view>
<!-- 加入购物车按钮需要上层传入是否展示 部分商品由于特殊性 在商品列表不展示购物车按钮 -->
<image wx:if="{{showAddShopCartBtn && (item.is_shop_cart_add == 'Y')}}" class='addToShopCartImage' src='images/jrgwc@2x.png' catchtap='addToShopCartAction' data-item='{{item}}'></image>
</view>
</view>
\ No newline at end of file
/* component/productListCell.wxss */
.product {
display: flex;
flex-direction: column;
background-color: white;
}
.productImage {
display: block;
}
.productTitle {
margin-top: 21rpx;
margin-bottom: 1rpx;
color: #444444;
font-family: PingFang SC;
font-size: 24rpx;
/*font-weight: bold;*/
line-height: 30rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
height: 60rpx;
}
.bottomContainerView {
display: flex;
flex-direction: row;
align-items: flex-end;
/* margin-bottom: 20rpx; */
justify-content: space-between;
}
.priceContainer {
display: flex;
flex-direction: row;
width: 236rpx;
display:-webkit-box;
-webkit-line-clamp:1;
-webkit-box-orient:vertical;
overflow:hidden;
}
.price1 {
font-size: 24rpx;
color: #d0021b;
}
.price2 {
margin-left: 10rpx;
font-size: 24rpx;
color: #b0b0b0;
text-decoration: line-through;
}
.addToShopCartImage {
width: 80rpx;
height: 46rpx;
}
\ No newline at end of file
... ... @@ -8,7 +8,7 @@
"quickNavigation": "/pages/quickNavigation/quickNavigation",
"tabs": "./components/tabs",
"tabs-pane": "./components/tabs-pane",
"dialog": "../../component/dialog/dialog",
"dialog": "/components/dialog/dialog",
"prize-item": "./components/prize-item",
"login": "../../login/login/login"
}
... ...