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
import { jumpByUrl } from '../../libs/urlRoute';
import { postFormId } from '../../libs/formIdCollectRequest.js';
import {
logEvent,
YB_MAIN_POP_UP_C,
} from '../../libs/analytics.js'
Component({
options: {
multipleSlots: true
},
properties: {
src: {
type: String,
value: ""
},
url: {
type: String,
value: ""
}
},
data: {
isShow: false,
},
methods: {
hideDialog(){
this.setData({
isShow: false,
});
},
showDialog(){
this.setData({
isShow: true,
});
},
jumpByRule(){
let that = this;
if (that.properties.url == null){
return;
}
let params = {
TO_PATH: that.properties.url
};
logEvent(YB_MAIN_POP_UP_C, params);
jumpByUrl(that.properties.url,'home');
that.hideDialog();
},
//formId上报
formSubmit(e) {
// console.log('----formSubmit---', e);
let formId = e.detail.formId;
postFormId(formId,'1');
}
}
import { jumpByUrl } from '../../libs/urlRoute';
import { postFormId } from '../../libs/formIdCollectRequest.js';
import {
logEvent,
YB_MAIN_POP_UP_C,
} from '../../libs/analytics.js'
Component({
options: {
multipleSlots: true
},
properties: {
src: {
type: String,
value: ""
},
url: {
type: String,
value: ""
}
},
data: {
isShow: false,
},
methods: {
hideDialog(){
this.setData({
isShow: false,
});
},
showDialog(){
this.setData({
isShow: true,
});
},
jumpByRule(){
let that = this;
if (that.properties.url == null){
return;
}
let params = {
TO_PATH: that.properties.url
};
logEvent(YB_MAIN_POP_UP_C, params);
jumpByUrl(that.properties.url,'home');
that.hideDialog();
},
//formId上报
formSubmit(e) {
// console.log('----formSubmit---', e);
let formId = e.detail.formId;
postFormId(formId,'1');
}
}
})
\ No newline at end of file
... ...
{
"component": true,
"usingComponents": {}
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
... ...
<view class='container' hidden="{{!isShow}}" catchtouchmove="true">
<view class='dialog-mask'>
<view class='dialog'>
<form bindsubmit='formSubmit' report-submit='true'>
<image src="{{src}}" class='dialog-image' mode='aspecdtFit' bindtap='jumpByRule'></image>
<button class='image-btn' form-type='submit' bindtap='jumpByRule'></button>
</form>
<form bindsubmit='formSubmit' report-submit='true'>
<view class='dialog-close' bindtap='hideDialog'>
<image class='close' src="./images/close.png" ></image>
<button class='dialog-btn' form-type='submit'></button>
</view>
</form>
</view>
</view>
<view class='container' hidden="{{!isShow}}" catchtouchmove="true">
<view class='dialog-mask'>
<view class='dialog'>
<form bindsubmit='formSubmit' report-submit='true'>
<image src="{{src}}" class='dialog-image' mode='aspecdtFit' bindtap='jumpByRule'></image>
<button class='image-btn' form-type='submit' bindtap='jumpByRule'></button>
</form>
<form bindsubmit='formSubmit' report-submit='true'>
<view class='dialog-close' bindtap='hideDialog'>
<image class='close' src="./images/close.png" ></image>
<button class='dialog-btn' form-type='submit'></button>
</view>
</form>
</view>
</view>
</view>
\ No newline at end of file
... ...
.dialog-mask{
position: fixed;
z-index: 4999;
width: 100%;
height: 100%;
top: 0;
right: 0;
left: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
background: rgba(0, 0, 0, 0.6);
}
.dialog{
position: fixed;
z-index: 5000;
top: 110rpx;
display: flex;
flex-direction: column;
align-items: center;
height: wrap;
width: 100%;
}
.dialog-image{
height: 680rpx;
width: 680rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.dialog-close{
height: 110rpx;
width: 100rpx;
margin-top: 30rpx;
display: flex;
align-items: center;
justify-content: center;
}
.close {
width: 80rpx;
height: 80rpx;
}
.dialog-btn {
height: 110rpx;
width: 100rpx;
background-color: red;
position: absolute;
opacity: 0;
}
.image-btn {
height: 680rpx;
width: 680rpx;
background-color: red;
position: absolute;
top: 0rpx;
opacity: 0;
}
.dialog-mask{
position: fixed;
z-index: 4999;
width: 100%;
height: 100%;
top: 0;
right: 0;
left: 0;
bottom: 0;
display: flex;
flex-direction: column;
align-items: center;
background: rgba(0, 0, 0, 0.6);
}
.dialog{
position: fixed;
z-index: 5000;
top: 110rpx;
display: flex;
flex-direction: column;
align-items: center;
height: wrap;
width: 100%;
}
.dialog-image{
height: 680rpx;
width: 680rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.dialog-close{
height: 110rpx;
width: 100rpx;
margin-top: 30rpx;
display: flex;
align-items: center;
justify-content: center;
}
.close {
width: 80rpx;
height: 80rpx;
}
.dialog-btn {
height: 110rpx;
width: 100rpx;
background-color: red;
position: absolute;
opacity: 0;
}
.image-btn {
height: 680rpx;
width: 680rpx;
background-color: red;
position: absolute;
top: 0rpx;
opacity: 0;
}
... ...
... ... @@ -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"
}
... ...