fanfan 8 months ago
commit ca258f8684
  1. 87
      pages/activity/newGoods.vue
  2. 9
      pages/goods/detail.vue
  3. 51
      pages/index/index.vue

@ -14,18 +14,16 @@
<view class="item"> <view class="item">
<view class="goodsInfo"> <view class="goodsInfo">
<view class="goodsDetail"> <view class="goodsDetail">
<view class="infoRight">
<image :src="item.goods_image" mode="widthFix" class="infoImg"></image>
</view>
<view class="infoLeft"> <view class="infoLeft">
<view class="gName"> <view class="gName">
{{item.goods_name}} {{item.goods_name}}
</view> </view>
<view class="gd"> <!-- <view class="gd">
{{item.selling_point}} {{item.selling_point}}
</view> </view> -->
</view>
<view class="infoRight">
<image :src="item.goods_image" mode="widthFix" class="infoImg"></image>
</view>
</view>
<view class="price"> <view class="price">
<view class="lowPrice"> <view class="lowPrice">
{{item.goods_price_min?Number(item.goods_price_min):''}} {{item.goods_price_min?Number(item.goods_price_min):''}}
@ -35,6 +33,9 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</view>
</view> </view>
</view> </view>
<view class="lookBtn" @click="backtop"> <view class="lookBtn" @click="backtop">
@ -294,16 +295,16 @@
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
position: relative; position: relative;
align-items: flex-start;
.infoLeft { .infoLeft {
flex: 1;
margin-top: 20rpx;
.gName { .gName {
margin-bottom: 15rpx; margin-bottom: 15rpx;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; -webkit-line-clamp: 2;
white-space: nowrap;
-webkit-line-clamp: 1;
max-width: 300rpx; max-width: 300rpx;
height: 56rpx; height: 112rpx;
font-size: 40rpx; font-size: 40rpx;
font-weight: 600; font-weight: 600;
color: #3F3F3F; color: #3F3F3F;
@ -311,62 +312,54 @@
margin-top: 32rpx; margin-top: 32rpx;
} }
.gd { // .gd {
overflow: hidden; // overflow: hidden;
text-overflow: ellipsis; // -webkit-line-clamp: 2;
white-space: nowrap; // height: 88rpx;
-webkit-line-clamp: 2; // font-size: 32rpx;
max-width: 350rpx; // font-weight: 400;
height: 88rpx; // color: #9F9F9F;
font-size: 32rpx; // line-height: 44rpx;
font-family: PingFang SC, PingFang SC; // }
font-weight: 400;
color: #9F9F9F;
line-height: 44rpx;
}
.gp { // .gp {
height: 44rpx; // height: 44rpx;
font-size: 32rpx; // font-size: 32rpx;
font-family: PingFang SC, PingFang SC; // font-family: PingFang SC, PingFang SC;
font-weight: 400; // font-weight: 400;
color: #DE041C; // color: #DE041C;
line-height: 38rpx; // line-height: 38rpx;
} // }
} }
.infoRight { .infoRight {
width: 290rpx; width: 220rpx;
height: 290rpx; height: 220rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx; border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1; margin-right: 14rpx;
margin-left: 14rpx; display: flex;
justify-content: flex-start;
align-items: center;
margin-top: 40rpx;
.infoImg { .infoImg {
width: 290rpx; width: 200rpx;
height: 290rpx; height: 200rpx;
} }
position: absolute;
top: -68rpx;
right: 20rpx;
} }
} }
.price { .price {
display: flex; display: flex;
justify-content: flex-end; justify-content: space-between;
margin-top: 50rpx; margin-top: 50rpx;
margin-right: 30rpx; margin-right: 30rpx;
.lowPrice { .lowPrice {
height: 50rpx; height: 50rpx;
font-size: 36rpx; font-size: 36rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 600; font-weight: 600;
color: #DE041C; color: #DE041C;
line-height: 50rpx; line-height: 50rpx;
margin-right: 20rpx;
} }
.buyNow { .buyNow {

@ -383,7 +383,7 @@
</view> </view>
<view class="shareWechat" v-if="shareType=='share'"> <view class="shareWechat" v-if="shareType=='share'">
<view class="shareGoods"> <view class="shareGoods">
<image :src="goods.goods_image" mode="" class="shareImg"></image> <image :src="goods.goods_image" mode="heightFix" class="shareImg"></image>
</view> </view>
<view class="shareInfo"> <view class="shareInfo">
<view class="shareGoodsInfo"> <view class="shareGoodsInfo">
@ -1035,8 +1035,13 @@
toHaibao(index) { toHaibao(index) {
this.shareCancel(); this.shareCancel();
if (index == 2) { if (index == 2) {
let str = `${this.goods.goods_name}\n
前台价${this.goods.goods_price_max}\n
推广价${this.goods.goods_price_min}\n
SKU${this.goods.goods_no}
`
uni.setClipboardData({ uni.setClipboardData({
data: this.goods.goods_name, // value data: str, // value
success: function() { success: function() {
// //
uni.showToast({ uni.showToast({

@ -1118,6 +1118,25 @@
this.isTop = true this.isTop = true
} }
}, },
/**
* 分享当前页面
*/
onShareAppMessage() {
return {
}
},
/**
* 分享到朋友圈
* 本接口为 Beta 版本暂只在 Android 平台支持详见分享到朋友圈 (Beta)
* https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share-timeline.html
*/
onShareTimeline() {
return {
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -1194,7 +1213,7 @@
position: absolute; position: absolute;
z-index: 9; z-index: 9;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 29rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
@ -1226,7 +1245,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #F3202A; background-color: #F3202A;
font-size: 24rpx; font-size: 25rpx;
color: #fff; color: #fff;
top: -10rpx; top: -10rpx;
right: -10rpx; right: -10rpx;
@ -1248,7 +1267,7 @@
margin-right: 30rpx; margin-right: 30rpx;
position: relative; position: relative;
display: inline-block; display: inline-block;
font-size: 28rpx; font-size: 29rpx;
font-weight: 400; font-weight: 400;
padding: 0 20rpx; padding: 0 20rpx;
color: #282828; color: #282828;
@ -1315,7 +1334,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-top: 30rpx; margin-top: 30rpx;
font-size: 22rpx; font-size: 23rpx;
font-weight: 400; font-weight: 400;
color: #7D7D7D; color: #7D7D7D;
} }
@ -1340,7 +1359,7 @@
} }
text { text {
font-size: 24rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #5A5A5A; color: #5A5A5A;
margin-top: 10rpx; margin-top: 10rpx;
@ -1391,7 +1410,7 @@
text:nth-child(2) { text:nth-child(2) {
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
font-size: 24rpx; font-size: 25rpx;
color: #FFFFFF; color: #FFFFFF;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
@ -1423,7 +1442,7 @@
} }
text { text {
font-size: 24rpx; font-size: 25rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
@ -1491,7 +1510,7 @@
background: linear-gradient(180deg, #FF1C75 0%, #FF470D 100%); background: linear-gradient(180deg, #FF1C75 0%, #FF470D 100%);
border-radius: 28px 28px 28px 28px; border-radius: 28px 28px 28px 28px;
opacity: 1; opacity: 1;
font-size: 24rpx; font-size: 25rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
@ -1547,7 +1566,7 @@
position: absolute; position: absolute;
// width:100%; // width:100%;
text-align: center; text-align: center;
font-size: 24rpx; font-size: 25rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 500; font-weight: 500;
color: #8C4D00; color: #8C4D00;
@ -1600,19 +1619,19 @@
height: 34rpx; height: 34rpx;
line-height: 34rpx; line-height: 34rpx;
width: 90%; width: 90%;
font-size: 20rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
text-align: center; text-align: center;
text { text {
font-size: 16rpx; font-size: 24rpx;
} }
} }
} }
.name { .name {
font-size: 20rpx; font-size: 21rpx;
font-weight: 400; font-weight: 400;
line-height: 50rpx; line-height: 50rpx;
color: #505050; color: #505050;
@ -1620,7 +1639,7 @@
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
margin-top: 10rpx; margin-top: 10rpx;font-size: 24rpx;
} }
} }
@ -1638,7 +1657,7 @@
position: relative; position: relative;
.more { .more {
font-size: 20rpx; font-size: 21rpx;
font-weight: 400; font-weight: 400;
color: #8C4D00; color: #8C4D00;
position: absolute; position: absolute;
@ -1673,7 +1692,7 @@
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
background-color: #FF4D4D; background-color: #FF4D4D;
font-size: 24rpx; font-size: 25rpx;
color: #FFFFFF; color: #FFFFFF;
border-radius: 6rpx; border-radius: 6rpx;
} }
@ -1826,7 +1845,7 @@
height: 34rpx; height: 34rpx;
line-height: 34rpx; line-height: 34rpx;
width: 90%; width: 90%;
font-size: 20rpx; font-size: 24rpx;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
text-align: center; text-align: center;

Loading…
Cancel
Save