0000
This commit is contained in:
137
pages/goodsDetails/goodsDetails.js
Normal file
137
pages/goodsDetails/goodsDetails.js
Normal file
@@ -0,0 +1,137 @@
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/slicedToArray"), a = require("../../@babel/runtime/helpers/asyncToGenerator"), r = require("../../@babel/runtime/helpers/defineProperty"), n = (getApp(),
|
||||
require("../../utils/login.js")), i = require("../../utils/common.js");
|
||||
|
||||
Page({
|
||||
data: r({
|
||||
showLoding: !0,
|
||||
tapid: "",
|
||||
scrollid: "",
|
||||
id: "",
|
||||
user: {},
|
||||
info: {},
|
||||
share: {},
|
||||
formData: [],
|
||||
merchantList: [],
|
||||
token: "",
|
||||
recommendedList: [],
|
||||
scrolltocontent: !1,
|
||||
height: {
|
||||
merchantList: "",
|
||||
needknow: "",
|
||||
infomes: ""
|
||||
}
|
||||
}, "formData", []),
|
||||
onLoad: function(e) {
|
||||
this.setData({
|
||||
id: e.id || "1"
|
||||
}), this.getData();
|
||||
},
|
||||
onShareAppMessage: function() {
|
||||
return {
|
||||
title: this.data.share.title || this.data.info.name,
|
||||
imageUrl: this.data.share.pic
|
||||
};
|
||||
},
|
||||
getData: function() {
|
||||
var s = this;
|
||||
return a(e.default.mark(function a() {
|
||||
var o, c;
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
return s, e.prev = 1, e.next = 4, n.request(n.baseUrl + "shop/details", {
|
||||
id: s.data.id
|
||||
}, !0);
|
||||
|
||||
case 4:
|
||||
o = e.sent, (c = o.data).recommendedList.forEach(function(e) {
|
||||
var a = e.price.split("."), r = t(a, 2);
|
||||
e.price_buck = r[0], e.price_cent = r[1];
|
||||
}), c.info.message && (c.info.message = i.replaceDetail(c.info.message)), s.setData(r({
|
||||
showLoding: !1,
|
||||
formData: c.formData,
|
||||
info: c.info,
|
||||
merchantList: c.merchantList,
|
||||
share: c.share,
|
||||
user: c.user,
|
||||
token: c.token,
|
||||
recommendedList: c.recommendedList
|
||||
}, "formData", c.formData)), s.watchView(), e.next = 15;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
e.prev = 12, e.t0 = e.catch(1), console.log(e.t0);
|
||||
|
||||
case 15:
|
||||
case "end":
|
||||
return e.stop();
|
||||
}
|
||||
}, a, null, [ [ 1, 12 ] ]);
|
||||
}))();
|
||||
},
|
||||
watchView: function() {
|
||||
var t = this;
|
||||
return a(e.default.mark(function a() {
|
||||
var r, n, i, s, o;
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
r = t, e.prev = 1, n = [ "header", "title", "merchantList", "needknow", "infomes" ],
|
||||
i = 0, s = 0;
|
||||
|
||||
case 5:
|
||||
if (!(i < n.length)) {
|
||||
e.next = 15;
|
||||
break;
|
||||
}
|
||||
return e.next = 8, r.getHeight(n[i]);
|
||||
|
||||
case 8:
|
||||
o = e.sent, console.log("height", o), i >= 2 && (r.data.height[n[i]] = s, r.setData({
|
||||
height: t.data.height
|
||||
})), s += o, i++, e.next = 5;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
e.next = 20;
|
||||
break;
|
||||
|
||||
case 17:
|
||||
e.prev = 17, e.t0 = e.catch(1), console.log(e.t0);
|
||||
|
||||
case 20:
|
||||
case "end":
|
||||
return e.stop();
|
||||
}
|
||||
}, a, null, [ [ 1, 17 ] ]);
|
||||
}))();
|
||||
},
|
||||
getHeight: function(e) {
|
||||
return new Promise(function(t, a) {
|
||||
var r = wx.createSelectorQuery();
|
||||
r.select("#".concat(e)).boundingClientRect(), r.exec(function(e) {
|
||||
t(e[0].height);
|
||||
});
|
||||
});
|
||||
},
|
||||
toId: function(e) {
|
||||
var t = e.currentTarget.dataset.id;
|
||||
this.setData({
|
||||
tapid: t,
|
||||
scrollid: t
|
||||
});
|
||||
},
|
||||
bindscroll: function(e) {
|
||||
var t = this, a = e.detail.scrollTop;
|
||||
[ "infomes", "needknow", "merchantList" ].every(function(e) {
|
||||
return !(a > t.data.height[e]) || (t.setData({
|
||||
tapid: e,
|
||||
scrolltocontent: !0
|
||||
}), !0, !1);
|
||||
}), a >= this.data.height.merchantList ? this.setData({
|
||||
scrolltocontent: !0
|
||||
}) : this.setData({
|
||||
scrolltocontent: !1
|
||||
});
|
||||
}
|
||||
});
|
||||
14
pages/goodsDetails/goodsDetails.json
Normal file
14
pages/goodsDetails/goodsDetails.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"page-header": "./pageHeader/pageHeader",
|
||||
"kefu-box": "./kefuBox/kefuBox",
|
||||
"match-wrap": "./matchWrap/matchWrap",
|
||||
"shop-add": "./shopAdd/shopAdd",
|
||||
"recomond-list": "./recomondList/recomondList",
|
||||
"page-bottom": "./pageBottom/pageBottom",
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
69
pages/goodsDetails/goodsDetails.wxml
Normal file
69
pages/goodsDetails/goodsDetails.wxml
Normal file
@@ -0,0 +1,69 @@
|
||||
<view>
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view class="position-top-tab" hidden="{{!scrolltocontent}}">
|
||||
<view bindtap="toId" class="tab {{tapid=='merchantList'?'active':''}}" data-id="merchantList">商家</view>
|
||||
<view bindtap="toId" class="tab {{tapid=='needknow'?'active':''}}" data-id="needknow">购买须知</view>
|
||||
<view bindtap="toId" class="tab {{tapid=='infomes'?'active':''}}" data-id="infomes">详情</view>
|
||||
</view>
|
||||
<scroll-view bindscroll="bindscroll" class="scrollview" scrollIntoView="{{scrollid}}" scrollWithAnimation="true" scrollY="true">
|
||||
<view id="header">
|
||||
<page-header formData="{{formData}}" info="{{info}}"></page-header>
|
||||
</view>
|
||||
<view class="info-main">
|
||||
<view class="info-content">
|
||||
<view id="title">
|
||||
<view class="info-wrap __nospace">
|
||||
<view class="info-title">
|
||||
<view>{{info.name}}</view>
|
||||
</view>
|
||||
<view class="info-inventory">
|
||||
<view class="sold">已售{{info.num_buy+info.unit_name}}</view>
|
||||
</view>
|
||||
<view class="goods-tags">
|
||||
<view class="tag" wx:for="{{info.tags}}" wx:key="index">{{item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view id="merchantList">
|
||||
<shop-add merchantList="{{merchantList}}"></shop-add>
|
||||
</view>
|
||||
<view class="info-wrap need-know" id="needknow">
|
||||
<view class="m-title">
|
||||
<view class="bd">购买须知 <view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="richbox">
|
||||
<rich-text nodes="{{info.purchasenotes}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-wrap info-mes" id="infomes">
|
||||
<view class="m-title">
|
||||
<view class="bd">商品详情 <view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="richbox">
|
||||
<rich-text nodes="{{info.message}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-wrap" wx:if="{{priceDescription}}">
|
||||
<view class="info-picrule">
|
||||
<view class="title">价格说明</view>
|
||||
<view>
|
||||
<view class="richbox">
|
||||
<rich-text nodes="{{priceDescription}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-wrap info-mes">
|
||||
<view class="m-title">
|
||||
<view class="bd">为您推荐 <view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<recomond-list list="{{recommendedList}}"></recomond-list>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<page-bottom info="{{info}}" token="{{token}}"></page-bottom>
|
||||
</view>
|
||||
216
pages/goodsDetails/goodsDetails.wxss
Normal file
216
pages/goodsDetails/goodsDetails.wxss
Normal file
@@ -0,0 +1,216 @@
|
||||
.info-main {
|
||||
padding-bottom: 12.8vw;
|
||||
}
|
||||
|
||||
.info-main .info-content {
|
||||
padding: 4vw 0 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.info-main .info-content .info-wrap.__nospace {
|
||||
border-top: 0;
|
||||
padding: 0 4vw 5.333vw;
|
||||
}
|
||||
|
||||
.info-main .info-content .info-title {
|
||||
color: #292929;
|
||||
font-size: 4.8vw;
|
||||
font-weight: 500;
|
||||
line-height: 6.133vw;
|
||||
}
|
||||
|
||||
.info-main .info-content .info-inventory {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
color: #969696;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.2vw;
|
||||
justify-content: space-between;
|
||||
margin-top: 2.133vw;
|
||||
}
|
||||
|
||||
.info-main .info-content .goods-tags {
|
||||
margin-left: -1.467vw;
|
||||
margin-top: 2.667vw;
|
||||
}
|
||||
|
||||
.info-main .info-content .goods-tags .tag {
|
||||
background: rgba(235,82,82,.1);
|
||||
border-radius: .667vw;
|
||||
color: #eb5252;
|
||||
display: inline-block;
|
||||
font-size: 2.933vw;
|
||||
height: 4.267vw;
|
||||
line-height: 4.267vw;
|
||||
margin-left: 1.467vw;
|
||||
margin-top: 1.333vw;
|
||||
padding: 0 1.333vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.step-box {
|
||||
border-top: 2.667vw solid #f8f8f8;
|
||||
}
|
||||
|
||||
.step-packs {
|
||||
background-color: #fff;
|
||||
padding: 0 5.333vw;
|
||||
}
|
||||
|
||||
.step-packs .item {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #eee;
|
||||
box-sizing: border-box;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 5.333vw 0;
|
||||
}
|
||||
|
||||
.item .left .desc {
|
||||
color: #969696;
|
||||
font-size: 3.2vw;
|
||||
}
|
||||
|
||||
.item .left .price {
|
||||
color: #eb5252;
|
||||
font-size: 4.267vw;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.item .content {
|
||||
color: #2a2a2a;
|
||||
font-size: 3.733vw;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.item .content .num view {
|
||||
color: #eb5252;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.item .progress-box {
|
||||
background: #eee;
|
||||
border-radius: .667vw;
|
||||
height: 1.333vw;
|
||||
margin-top: 1.333vw;
|
||||
overflow: hidden;
|
||||
width: 25.067vw;
|
||||
}
|
||||
|
||||
.item .progress-box .progress {
|
||||
background-color: #06a2b3;
|
||||
border-radius: .667vw;
|
||||
height: 1.333vw;
|
||||
}
|
||||
|
||||
.info-wrap {
|
||||
border-top: 2.667vw solid #f8f8f8;
|
||||
padding: 0 4vw 5.333vw;
|
||||
}
|
||||
|
||||
.m-title {
|
||||
padding: 4.267vw 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.m-title .bd {
|
||||
color: #2a2a2a;
|
||||
display: inline-block;
|
||||
font-size: 4.8vw;
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
padding: 0 1.333vw .533vw;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.m-title .line {
|
||||
background-color: rgba(6,162,179,.6);
|
||||
border-radius: 1.6vw;
|
||||
bottom: 0;
|
||||
height: 1.6vw;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.richbox {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.info-picrule {
|
||||
color: #787878;
|
||||
font-size: 3.2vw;
|
||||
line-height: 4.533vw;
|
||||
}
|
||||
|
||||
.info-picrule .title {
|
||||
font-size: 4vw;
|
||||
font-weight: 500;
|
||||
margin: 5.333vw 0 4vw;
|
||||
}
|
||||
|
||||
.info-picrule .section {
|
||||
margin-bottom: 2.667vw;
|
||||
}
|
||||
|
||||
.info-picrule .section .little {
|
||||
font-weight: 500;
|
||||
margin-bottom: 1.867vw;
|
||||
}
|
||||
|
||||
.scrollview {
|
||||
height: 100vh;
|
||||
padding-bottom: 12.8vw;
|
||||
}
|
||||
|
||||
.position-top-tab {
|
||||
background: #fff;
|
||||
display: flex;
|
||||
height: 40px;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.position-top-tab .tab {
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.position-top-tab .active {
|
||||
color: #eb5252;
|
||||
}
|
||||
|
||||
.position-top-tab .active:after {
|
||||
background: #eb5252;
|
||||
border-radius: 2px;
|
||||
bottom: 0;
|
||||
content: "";
|
||||
height: 2px;
|
||||
left: calc(50% - 10px);
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
.richbox image {
|
||||
max-width: 100%;
|
||||
}
|
||||
7
pages/goodsDetails/kefuBox/kefuBox.js
Normal file
7
pages/goodsDetails/kefuBox/kefuBox.js
Normal file
@@ -0,0 +1,7 @@
|
||||
Component({
|
||||
properties: {},
|
||||
data: {
|
||||
showDialog: !1
|
||||
},
|
||||
methods: {}
|
||||
});
|
||||
4
pages/goodsDetails/kefuBox/kefuBox.json
Normal file
4
pages/goodsDetails/kefuBox/kefuBox.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
37
pages/goodsDetails/kefuBox/kefuBox.wxml
Normal file
37
pages/goodsDetails/kefuBox/kefuBox.wxml
Normal file
@@ -0,0 +1,37 @@
|
||||
<view>
|
||||
<view class="keufubox">
|
||||
<view class="kebox">
|
||||
<view class="mykefu ">
|
||||
<view class="le">
|
||||
<image src="http://q990.img.aiyichuan.com/urm_huodong/20190416/1555414945804.jpg"></image>
|
||||
<view class="box">
|
||||
<view class="title">霸王餐福利</view>
|
||||
<view class="desc">加客服进「声色福利群」</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn">点我添加</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="modal-dialog" wx:if="{{showDialog}}">
|
||||
<view class="modal">
|
||||
<view class="infopop-wrap">
|
||||
<view class="infopop-content">
|
||||
<view class="info-buy_notice">
|
||||
<view class="top">
|
||||
<view class="_top"></view>
|
||||
<view class="title">购买须知</view>
|
||||
</view>
|
||||
<view style="max-height: 280px; overflow: auto;">
|
||||
<view class="txt">
|
||||
<view class="txt_p">此券属平台与商家补贴,一经售出无法退款,请确认后再下单。</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="btn">我知道了</button>
|
||||
</view>
|
||||
</view>
|
||||
<button class="infopop-close">×</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
189
pages/goodsDetails/kefuBox/kefuBox.wxss
Normal file
189
pages/goodsDetails/kefuBox/kefuBox.wxss
Normal file
@@ -0,0 +1,189 @@
|
||||
.keufubox:last-child {
|
||||
margin-bottom: -5.333vw;
|
||||
}
|
||||
|
||||
.kebox {
|
||||
border-radius: 1.6vw;
|
||||
width: 92vw;
|
||||
}
|
||||
|
||||
.kebox,.mykefu {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.mykefu {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
height: 17.067vw;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.mykefu .le {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.mykefu,.mykefu .le {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.mykefu .le image {
|
||||
border-radius: 50%;
|
||||
height: 9.6vw;
|
||||
margin-right: 3.467vw;
|
||||
max-width: 100%;
|
||||
width: 9.6vw;
|
||||
}
|
||||
|
||||
.mykefu .le .box {
|
||||
width: 57.333vw;
|
||||
}
|
||||
|
||||
.mykefu .le .title {
|
||||
color: #2a2a2a;
|
||||
font-size: 3.733vw;
|
||||
}
|
||||
|
||||
.mykefu .le .desc,.mykefu .le .title {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mykefu .le .desc {
|
||||
color: #969696;
|
||||
font-size: 3.2vw;
|
||||
line-height: 4.133vw;
|
||||
width: 57.333vw;
|
||||
}
|
||||
|
||||
.kebox .btn {
|
||||
border-radius: 6.667vw;
|
||||
color: #fff;
|
||||
font-size: 3.2vw;
|
||||
height: 8.667vw;
|
||||
line-height: 8.667vw;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mykefu .btn {
|
||||
background: #28c418;
|
||||
font-size: 3.2vw;
|
||||
width: 18.267vw;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
position: fixed;
|
||||
z-index: 20;
|
||||
}
|
||||
|
||||
.modal-dialog,.modal-dialog .modal {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.modal-dialog .modal {
|
||||
background: rgba(0,0,0,.5);
|
||||
position: absolute;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
.infopop-wrap {
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 45%;
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
|
||||
.infopop-content {
|
||||
background-color: #fff;
|
||||
border-radius: 2.133vw;
|
||||
color: #666;
|
||||
font-size: 4vw;
|
||||
line-height: 5.333vw;
|
||||
overflow: hidden;
|
||||
padding-bottom: 6.667vw;
|
||||
text-align: center;
|
||||
width: 69.867vw;
|
||||
}
|
||||
|
||||
.info-buy_notice .top {
|
||||
color: #fff;
|
||||
height: 21.867vw;
|
||||
margin-bottom: 3.467vw;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.info-buy_notice ._top {
|
||||
background: #06a2b3;
|
||||
border-radius: 0 0 50% 50%;
|
||||
height: 100%;
|
||||
left: 50%;
|
||||
margin-bottom: 4vw;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
transform: translateX(-50%);
|
||||
width: 120%;
|
||||
}
|
||||
|
||||
.info-buy_notice .top .title {
|
||||
color: #fff;
|
||||
font-size: 4.8vw;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.info-buy_notice .txt {
|
||||
font-size: 3.733vw;
|
||||
line-height: 5.333vw;
|
||||
padding: 0 4vw;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.info-buy_notice .btn {
|
||||
background-color: #06a2b3;
|
||||
border-radius: 10.667vw;
|
||||
color: #fff;
|
||||
font-size: 4vw;
|
||||
height: 10.667vw;
|
||||
line-height: 10.667vw;
|
||||
margin-bottom: -2.133vw;
|
||||
margin-top: 5.333vw;
|
||||
text-align: center;
|
||||
width: 34.667vw;
|
||||
}
|
||||
|
||||
.infopop-close {
|
||||
background-color: #fff;
|
||||
border-radius: 50%;
|
||||
color: rgba(0,0,0,.6);
|
||||
font-size: 8.267vw;
|
||||
height: 8.533vw;
|
||||
left: 50%;
|
||||
line-height: 8.033vw;
|
||||
margin: 4.267vw 0 0 -4.267vw;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
top: 100%;
|
||||
width: 8.533vw;
|
||||
}
|
||||
|
||||
.info-buy_notice .btn::after,.info-buy_notice .btn::before {
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
5
pages/goodsDetails/matchWrap/matchWrap.js
Normal file
5
pages/goodsDetails/matchWrap/matchWrap.js
Normal file
@@ -0,0 +1,5 @@
|
||||
Component({
|
||||
properties: {},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|
||||
4
pages/goodsDetails/matchWrap/matchWrap.json
Normal file
4
pages/goodsDetails/matchWrap/matchWrap.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
34
pages/goodsDetails/matchWrap/matchWrap.wxml
Normal file
34
pages/goodsDetails/matchWrap/matchWrap.wxml
Normal file
@@ -0,0 +1,34 @@
|
||||
<view>
|
||||
<view class="match-wrap">
|
||||
<navigator class="goods-match" href="/pages/goodsDetails/goodsDetails">
|
||||
<view class="til">
|
||||
<image class="hot" src="/img/hot.png"></image> 为您搭配更优惠 </view>
|
||||
<view class="item">
|
||||
<view class="hd">
|
||||
<view class="image-box __100">
|
||||
<image lazyLoad="true" src="http://q990.img.aiyichuan.com/urm_huodong/20200331/1585643794622.jpg?imageView2/1/w/400/h/400"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bd">
|
||||
<view class="bd_name">【新会】椰子鸡再次返场!9.9元起抢「骨汁恋·星汇店」100元代金券!</view>
|
||||
<view class="_btm">
|
||||
<view class="_btm_lt">
|
||||
<view class="bd_price">
|
||||
<view class="now-price __normal">
|
||||
<view class="symbol">¥</view>
|
||||
<view class="buck">9.</view>
|
||||
<view class="cent">90</view>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="old">¥100.00</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_btm_rt">
|
||||
<view class="bd_btn">立即抢购</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
171
pages/goodsDetails/matchWrap/matchWrap.wxss
Normal file
171
pages/goodsDetails/matchWrap/matchWrap.wxss
Normal file
@@ -0,0 +1,171 @@
|
||||
.match-wrap {
|
||||
border-top: 2.667vw solid #f8f8f8;
|
||||
}
|
||||
|
||||
.goods-match {
|
||||
background-color: #fff;
|
||||
border-radius: 2.133vw;
|
||||
display: block;
|
||||
padding: 12vw 3.6vw 3.6vw;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.goods-match .til {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
background-color: #06a2b3;
|
||||
border-radius: .533vw 2.933vw 2.933vw .533vw;
|
||||
color: #fff;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.2vw;
|
||||
height: 5.867vw;
|
||||
left: -.267vw;
|
||||
padding-left: 1.467vw;
|
||||
position: absolute;
|
||||
top: 2.667vw;
|
||||
width: 33.333vw;
|
||||
}
|
||||
|
||||
.goods-match .til view {
|
||||
margin-right: 1.333vw;
|
||||
}
|
||||
|
||||
.goods-match .item {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.goods-match .hd {
|
||||
-webkit-box-flex: 25.333vw;
|
||||
border-radius: 1.6vw;
|
||||
flex: 25.333vw 0 0;
|
||||
height: 25.333vw;
|
||||
overflow: hidden;
|
||||
width: 25.333vw;
|
||||
}
|
||||
|
||||
.image-box.__100 {
|
||||
padding-top: 100%;
|
||||
}
|
||||
|
||||
.image-box {
|
||||
background-color: #ebebeb;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image-box image {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.goods-match .bd {
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 0 0 0 2.667vw;
|
||||
}
|
||||
|
||||
.goods-match .bd_name {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
color: #2a2a2a;
|
||||
display: -webkit-box;
|
||||
font-size: 3.733vw;
|
||||
height: 16vw;
|
||||
line-height: 5.333vw;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.goods-match .bd ._btm {
|
||||
-webkit-box-align: end;
|
||||
-ms-flex-align: end;
|
||||
align-items: flex-end;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.goods-match .bd ._btm_lt {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.goods-match .bd_price {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.now-price {
|
||||
color: #eb5252;
|
||||
font-family: DIN;
|
||||
font-size: 3.2vw;
|
||||
line-height: 1.75em;
|
||||
}
|
||||
|
||||
.goods-match .bd_price .old {
|
||||
color: #9b9b9b;
|
||||
font-family: DIN;
|
||||
font-size: 3.2vw;
|
||||
margin-left: 1.333vw;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.goods-match .bd_btn {
|
||||
background-color: #06a2b3;
|
||||
border-radius: 3.333vw;
|
||||
color: #fff;
|
||||
font-size: 3.2vw;
|
||||
height: 6.667vw;
|
||||
line-height: 6.667vw;
|
||||
padding: 0 3.6vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.now-price .symbol {
|
||||
display: inline;
|
||||
margin: 0 .267vw 0 0;
|
||||
}
|
||||
|
||||
.now-price.__normal .buck {
|
||||
display: inline;
|
||||
font-size: 4.8vw;
|
||||
}
|
||||
|
||||
.cent {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.hot {
|
||||
display: inline-block;
|
||||
height: 13px;
|
||||
margin-right: 4px;
|
||||
width: 13px;
|
||||
}
|
||||
15
pages/goodsDetails/pageBottom/pageBottom.js
Normal file
15
pages/goodsDetails/pageBottom/pageBottom.js
Normal file
@@ -0,0 +1,15 @@
|
||||
Component({
|
||||
properties: {
|
||||
info: Object,
|
||||
token: String
|
||||
},
|
||||
data: {},
|
||||
methods: {
|
||||
order: function() {
|
||||
if (0 == this.properties.info.stock || 1 != this.properties.info.status) return !1;
|
||||
wx.navigateTo({
|
||||
url: "/pages/orderIndex/orderIndex?token=".concat(this.properties.token)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
4
pages/goodsDetails/pageBottom/pageBottom.json
Normal file
4
pages/goodsDetails/pageBottom/pageBottom.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
36
pages/goodsDetails/pageBottom/pageBottom.wxml
Normal file
36
pages/goodsDetails/pageBottom/pageBottom.wxml
Normal file
@@ -0,0 +1,36 @@
|
||||
<view class="bottom-bar">
|
||||
<view class="left thin-border_t">
|
||||
<navigator class="bottom-bar-btn " openType="reLaunch" url="/pages/mall/mall">
|
||||
<image class="icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAAAaVBMVEUAAAAlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiXioXAkAAAAInRSTlMACfP52xIoZ87sr6Y75L2Tjk5JM5l/x3JEG6CFel8Y1FYgEq6YZgAAAZ1JREFUSMftltuSgjAMhi20lEOB0nJGXeX9H3LT1aUqWFpudschN06Gfpj++Yfk8C8DNaGflsEmVuJRhU83sNQf75Ej15IToDyKWAi/GXFigy9gwuD3Ldjl4hcPiPJe7VHVUFiXzNXx05QX6lVHO7arVaHy8RJK98RGtjaCk/HzSZIpCbpVtvKhtc3sJjnQETOjJIZDKVts+5pfZKq6el58xqIfv5hNNbx7er35xWQqYWhhrP2yaKqrWc3JLwZTzcLoF5RrU83D7JeuNrnf7Jcz1qYyhS4S63b2ylRun4l+ykAFcXCIAqz6CBMXmIC4UxK5w/qf4Q7IBUag0ZSAfJaYBnZ4h3f4w+EGD8vTaMDNKpxCElbyCURtpQZZugpToCG8jNNWBoEUlNe3dS6lFncWvTfOwkuEpWBI8NB/IHFZoLeCRQufXsROVZkk5UBbYlQb9gW2eWJw2FRcYAENmRIGb+ocYNhNuM5gtmfImr3AtAl0yuyGu95L+tc1B5/OFlq1sTr63AA+OgR+XbioZ83GZF7QsbbgozCXh7+Pb3sQSPMdR14UAAAAAElFTkSuQmCC"></image>
|
||||
<view class="text">首页</view>
|
||||
</navigator>
|
||||
<button class="bottom-bar-btn " openType="share">
|
||||
<view>
|
||||
<image class="icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAAAZlBMVEUAAAAlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiVcd6OBAAAAIXRSTlMA7xDd9hwI2fri0iR16rlFFZTmrqFqNy3JxJxhUj2CWH5MxJO9AAABjUlEQVRIx+3W2Y6DMAwFUJMmYd+60b29//+TgwutAqqU4JfRjHqfkKWDURQZ07+IVbPQLGPZzOv57aAxD01SR3jl7NabLZc8OMM72inv02epXM0yxcePr93zB29q6zmS7rhapXrWWfV913sKyb3EM/G70vbWhFD7PpnsVTIJcA2xXTx0dXEBbELsWTPVRe7iCrgE2BacQ07GxStAeamqmCYPoinW0F5rMrbpcDQlsKUxQOSzecr22IzXYnNqwnG3ZntyL1Ewzku2BZEAm5TtjiRYZT1N7iTC1dBXhFu2NxLhM9stiXCn+UpaEbZxb0tDInxCn5pE+MK2JRFW697G9pOAFz+HzpVE+Mr2RBI8nHTUyPB+uJYynD/HsxBTkUS1GJMlkmP64i/+dayhl1kLJDQmBppFuAPS+U7iz3wDGp6rRTh2JozRQL2ssVbuj7DMg22dAA9nuMe95t6hq1xmnUIe8dZ7abyyuR8BpIbI1cNWqSNPhiXQ0DSqTRAWffswF01RrX0vSNJqp+iP5wfio0RY03mMqQAAAABJRU5ErkJggg=="></image>
|
||||
<view class="text">分享</view>
|
||||
</view>
|
||||
</button>
|
||||
<navigator class="bottom-bar-btn" url="/pages/user/user">
|
||||
<view>
|
||||
<image class="icon" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAMAAAANIilAAAAAWlBMVEUAAAAlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiUlJiV6c6IWAAAAHXRSTlMA9QVzPB8VuJ0N3M4k08ioalPsfC1mQ+HEjl6ENG6yr8QAAAIWSURBVEjHtVfZdqswDPQCDvsWQkJb/v837ziOr0rkxqQ+nZeUCjHSWJZl8QdQmS5uV7lt8tr1OlPHPc3lJLcd5OliDrnOBTw5ZDFHXfPevVsVw5KXQpT5MhSV+1+fv071fGdt9dNruW7v7OcXyTf1BpyykC07WVvd/OQ7Smv2rty9tuRj2DhYm1YvktL260PIdLYyfYmX+LLSncO8nYmWQBfiHq1SpYiitLqNTzpL8MI3jhLccqe5qpGvOVi8yLtWe7HkLA5iljvRcjxqcRgaVFSCvQskDkqy/68WBMzEG8jg4DUrsEriLWC9iof4khGP/Wq+6bv2I6OWbmE/sAd5xdSKUuR1gR364WJgUl/xtjO6jwNXJvg9U4Won/Z+twGf/unTPnVP3QFxKxs/i9pxTeaR8URxECqnk/bKESAhcDN33xv+9PIQCuTqKuQiPChSYFrHcQUv5UAYHGUXqJCy3XZo2YZbEJmTNuetEISEibc9KFbhB/mVghvbb7w5t5f4JH5gDXe76UEb7okQkZw51KLXVS8qbISzD/ttGITkBXsbDQSjpYqCLxUVSRy8SHx5xsHLkzZGHHxj0JaMg29JagZx8GYgLr+Iu/UqG3lgsXgDNOmtV8y/afpzynGTdNClHLFJh3vKWJEy0KSMUilDXPL4mD64po/M6cM6vyY0RinTsGtCygUl/WoUv5RVE86UKnwpS8c/fhNBy/dVYcEAAAAASUVORK5CYII="></image>
|
||||
<view class="text">我的</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view bindtap="order" class="right">
|
||||
<view class="menu-btns">
|
||||
<view class="btn btn-pri {{info.status!=1?'bg-grey':''}}">
|
||||
<view class="fmt-price" style="margin-bottom: 5px;">
|
||||
<view class="now" wx:if="{{info.status==1&&info.stock>0}}">
|
||||
<view class="dollar">¥</view>
|
||||
<view class="price">{{info.price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<block wx:if="{{info.status==1}}">立即购买</block>
|
||||
<block wx:if="{{info.status==-1}}">还未开售</block>
|
||||
<block wx:if="{{info.status==-2}}">抢购已结束</block>
|
||||
<block wx:if="{{info.status==-3}}">已售罄</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
121
pages/goodsDetails/pageBottom/pageBottom.wxss
Normal file
121
pages/goodsDetails/pageBottom/pageBottom.wxss
Normal file
@@ -0,0 +1,121 @@
|
||||
.bottom-bar {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
height: 12.8vw;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.thin-border_t {
|
||||
border-color: #f4f4f4;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.bottom-bar .left {
|
||||
color: #666;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 2.667vw;
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.thin-border_t:before {
|
||||
border-bottom: .267vw solid;
|
||||
border-color: inherit;
|
||||
content: "";
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
transform: scaleY(.5);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.bottom-bar .left .bottom-bar-btn {
|
||||
color: #666;
|
||||
font-size: 2.667vw;
|
||||
line-height: 2.667vw;
|
||||
text-align: center;
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
.bottom-bar .left button,.bottom-bar .left button::after,.bottom-bar .left button::before {
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.bottom-bar .left .icon {
|
||||
height: 5.067vw;
|
||||
margin-bottom: .8vw;
|
||||
margin-top: 1.867vw;
|
||||
max-width: 100%;
|
||||
width: 5.067vw;
|
||||
}
|
||||
|
||||
.bottom-bar .right {
|
||||
color: #fff;
|
||||
font-size: 4.533vw;
|
||||
height: 100%;
|
||||
line-height: 12.8vw;
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.menu-btns .btn {
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
background-color: initial;
|
||||
border-radius: 0;
|
||||
color: #fff;
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
font-size: 3.733vw;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
line-height: 4.8vw;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.menu-btns .btn-pri,.menu-btns .btn-yuyue {
|
||||
background-color: #06a2b3;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.menu-btns .btn:only-child {
|
||||
font-size: 4.267vw;
|
||||
}
|
||||
|
||||
.menu-btns {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
width: 50vw;
|
||||
}
|
||||
|
||||
.dollar,.price {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.bg-grey {
|
||||
background: #999!important;
|
||||
}
|
||||
53
pages/goodsDetails/pageHeader/pageHeader.js
Normal file
53
pages/goodsDetails/pageHeader/pageHeader.js
Normal file
@@ -0,0 +1,53 @@
|
||||
Component({
|
||||
properties: {
|
||||
info: Object,
|
||||
formData: Array
|
||||
},
|
||||
data: {
|
||||
day: "",
|
||||
hour: "",
|
||||
minute: "",
|
||||
second: "",
|
||||
swiperHeight: 240,
|
||||
sell_times: null,
|
||||
startTime: []
|
||||
},
|
||||
observers: {
|
||||
info: function(t) {
|
||||
1 == t.status ? this.setTime() : -1 == t.status ? this.setStartTime(t.sell_times[0]) : -2 == t.status && this.setStartTime(t.sell_times[1]);
|
||||
}
|
||||
},
|
||||
timer: null,
|
||||
methods: {
|
||||
setStartTime: function(t) {
|
||||
var e = new Date(1e3 * t), i = [ e.getFullYear(), this.changeNum(e.getMonth() + 1), this.changeNum(e.getDate()) ].join("/"), s = [ this.changeNum(e.getHours()), this.changeNum(e.getMinutes()), this.changeNum(e.getSeconds()) ].join(":");
|
||||
console.log(i), console.log(s), this.setData({
|
||||
startTime: [ i, s ]
|
||||
});
|
||||
},
|
||||
changeNum: function(t) {
|
||||
return t > 9 ? t : "0" + t;
|
||||
},
|
||||
setTime: function() {
|
||||
var t = 1e3 * this.properties.info.sell_times[1] - new Date().getTime();
|
||||
if (t <= 0) clearTimeout(this.timer); else {
|
||||
var e, i, s, a, o = t / 1e3 / 3600 / 24, n = 24 * (o - (e = Math.floor(o))), r = 60 * (n - (i = Math.floor(n))), h = 60 * (r - (s = Math.floor(r)));
|
||||
a = Math.floor(h), this.setData({
|
||||
day: (e + "").padStart(2, "0"),
|
||||
hour: (i + "").padStart(2, "0"),
|
||||
minute: (s + "").padStart(2, "0"),
|
||||
second: (a + "").padStart(2, "0")
|
||||
});
|
||||
}
|
||||
setTimeout(function() {
|
||||
this.setTime();
|
||||
}.bind(this), 1e3);
|
||||
},
|
||||
load: function(t) {
|
||||
var e = wx.getSystemInfoSync().windowWidth;
|
||||
this.setData({
|
||||
swiperHeight: Math.max(e * t.detail.height / t.detail.width, this.data.swiperHeight)
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
4
pages/goodsDetails/pageHeader/pageHeader.json
Normal file
4
pages/goodsDetails/pageHeader/pageHeader.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
55
pages/goodsDetails/pageHeader/pageHeader.wxml
Normal file
55
pages/goodsDetails/pageHeader/pageHeader.wxml
Normal file
@@ -0,0 +1,55 @@
|
||||
<view>
|
||||
<view class="header" style="position: relative;">
|
||||
<swiper circular="true" class="info-swiper" indicatorActiveColor="#ffffff" indicatorColor="rgba(235,237,240,0.3)" indicatorDots="true" style="height: {{swiperHeight}}px">
|
||||
<swiper-item wx:for="{{info.attachment}}" wx:for-index="i" wx:for-item="s" wx:key="i">
|
||||
<image bindload="load" class="swiper-item-img" mode="widthFix" src="{{s}}"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class=""></view>
|
||||
<swiper autoplay="true" circular="true" class="top-swiper" interval="5000" style="width:190px;" vertical="true" wx:if="{{formData.length>0}}">
|
||||
<swiper-item wx:for="{{formData}}" wx:for-index="i" wx:for-item="s" wx:key="i">
|
||||
<view>
|
||||
<view class="swperitem van-swipe-item" data-v-87e7c3a0="" style="width: 190px; height: 28px; transform: translateY(0px);">
|
||||
<image class="avatar" src="{{s.avatar}}"></image>
|
||||
<view class="txt" data-v-87e7c3a0="">{{s.nickname}} 刚刚购买了本商品</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="like" wx:if="{{info.num_views>0}}">{{info.num_views}}人喜欢</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="type-bar">
|
||||
<view class="lt">
|
||||
<view class="info-price">
|
||||
<view class="count">
|
||||
<view class="discount">
|
||||
<view class="doller">¥ </view>
|
||||
<view class="_price_free">{{info.price}}</view>
|
||||
</view>
|
||||
<view class="original">
|
||||
<view>¥{{info.marketprice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt" wx:if="{{info.status==1}}">
|
||||
<view> 距结束还剩 <view class="countdown">
|
||||
<view class="day">{{day}}</view>
|
||||
<view class="separator">天</view>
|
||||
<view class="time-item">{{hour}}</view>
|
||||
<view class="separator">:</view>
|
||||
<view class="time-item">{{minute}}</view>
|
||||
<view class="separator">:</view>
|
||||
<view class="time-item">{{second}}</view>
|
||||
<view class="separator"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt" wx:if="{{info.status==-1||info.status==-2}}">
|
||||
<view class="time"> {{info.status==-1?'开始':'结束'}}时间 {{startTime[0]}} <view> {{startTime[1]}} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
245
pages/goodsDetails/pageHeader/pageHeader.wxss
Normal file
245
pages/goodsDetails/pageHeader/pageHeader.wxss
Normal file
@@ -0,0 +1,245 @@
|
||||
.swiper-item-img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.top-swiper {
|
||||
animation: fadein 5s infinite;
|
||||
background-color: rgba(0,0,0,.6);
|
||||
border-radius: 3.733vw;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
font-size: 2.933vw;
|
||||
height: 7.467vw;
|
||||
left: 4vw;
|
||||
opacity: 0;
|
||||
padding: 0 .8vw;
|
||||
position: fixed;
|
||||
top: 10.667vw;
|
||||
width: 50.667vw;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
@-webkit-keyframes fadein {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
10% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
70% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
75% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fadein {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
10% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
70% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
75% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.swperitem {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.top-swiper swiper-item {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.top-swiper .avatar {
|
||||
border-radius: 50%;
|
||||
height: 6.4vw;
|
||||
margin-right: 2.667vw;
|
||||
width: 6.4vw;
|
||||
}
|
||||
|
||||
.top-swiper .txt {
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
display: -webkit-box;
|
||||
flex: 1;
|
||||
height: 4.533vw;
|
||||
line-height: 4.533vw;
|
||||
overflow: hidden;
|
||||
padding-right: 2.667vw;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.fade-in {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.header .like {
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
background-color: rgba(42,42,42,.7);
|
||||
border-radius: 3.333vw 0 0 3.333vw;
|
||||
font-size: 3.2vw;
|
||||
height: 6.667vw;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
top: 81%;
|
||||
width: 24vw;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.header .like,.type-bar {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.type-bar {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
background: rgba(6,162,179,.1);
|
||||
font-size: 3.733vw;
|
||||
height: 12.8vw;
|
||||
justify-content: space-between;
|
||||
line-height: 5.333vw;
|
||||
}
|
||||
|
||||
.type-bar .lt {
|
||||
background: #06a2b3;
|
||||
border-radius: 0 1.6vw 1.6vw 0;
|
||||
color: #fff;
|
||||
height: 100%;
|
||||
padding-left: 4vw;
|
||||
width: 70.4vw;
|
||||
}
|
||||
|
||||
.type-bar .lt .info-price {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
height: 100%;
|
||||
width: 60vw;
|
||||
}
|
||||
|
||||
.type-bar .lt .count {
|
||||
display: inline-block;
|
||||
font-family: DIN;
|
||||
}
|
||||
|
||||
.type-bar .lt .discount {
|
||||
display: inline-block;
|
||||
font-size: 3.467vw;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.type-bar .lt .discount .doller {
|
||||
display: inline-block;
|
||||
font-size: 4vw;
|
||||
}
|
||||
|
||||
.type-bar .lt .discount ._price_free,.type-bar .lt .discount .now {
|
||||
display: inline-block;
|
||||
font-size: 6.667vw;
|
||||
}
|
||||
|
||||
.type-bar .lt .discount .is-qi {
|
||||
display: inline-block;
|
||||
font-size: 2.667vw;
|
||||
}
|
||||
|
||||
.type-bar .lt .original {
|
||||
display: inline-block;
|
||||
font-size: 3.2vw;
|
||||
height: 4vw;
|
||||
margin-left: 1.867vw;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.type-bar .rt {
|
||||
color: #2a2a2a;
|
||||
font-size: 2.667vw;
|
||||
line-height: 4vw;
|
||||
text-align: center;
|
||||
width: 29.6vw;
|
||||
}
|
||||
|
||||
.type-bar .rt .time {
|
||||
font-size: 18rpx;
|
||||
}
|
||||
|
||||
.countdown {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.time-item {
|
||||
font-family: DIN;
|
||||
margin-left: .533vw;
|
||||
margin-right: .533vw;
|
||||
}
|
||||
|
||||
.type-bar .rt .time-item {
|
||||
background: #06a2b3;
|
||||
border-radius: .933vw;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
height: 4.8vw;
|
||||
line-height: 4.8vw;
|
||||
padding: 0 .8vw;
|
||||
width: 3vw;
|
||||
}
|
||||
|
||||
.type-bar .rt .day {
|
||||
display: inline-block;
|
||||
margin-right: .2rem;
|
||||
}
|
||||
|
||||
.separator {
|
||||
display: inline;
|
||||
}
|
||||
7
pages/goodsDetails/recomondList/recomondList.js
Normal file
7
pages/goodsDetails/recomondList/recomondList.js
Normal file
@@ -0,0 +1,7 @@
|
||||
Component({
|
||||
properties: {
|
||||
list: Array
|
||||
},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|
||||
4
pages/goodsDetails/recomondList/recomondList.json
Normal file
4
pages/goodsDetails/recomondList/recomondList.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
39
pages/goodsDetails/recomondList/recomondList.wxml
Normal file
39
pages/goodsDetails/recomondList/recomondList.wxml
Normal file
@@ -0,0 +1,39 @@
|
||||
<view class="small-list">
|
||||
<navigator class="item router-link-active" hoverClass="hover" url="/pages/goodsDetails/goodsDetails?id={{item.id}}" wx:for="{{list}}" wx:key="index">
|
||||
<view class="inner">
|
||||
<view class="hd">
|
||||
<view class="image-box __56">
|
||||
<image lazy="loaded" mode="widthFix" src="{{item.image}}"></image>
|
||||
</view>
|
||||
<view class="issaled" wx:if="{{item.stock==0}}">
|
||||
<image src="/img/issaled.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bd">
|
||||
<view style="margin: 0px 0px 4px;">
|
||||
<view style="overflow: hidden;">
|
||||
<view class="title __small" style="-webkit-line-clamp: 2; height: 2.6em;">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bd-btm">
|
||||
<view class="_btm_lt">
|
||||
<view style="margin: 0px 0px -3px;">
|
||||
<view class="now-price __normal">
|
||||
<view class="symbol">¥</view>
|
||||
<view class="buck">{{item.price_buck}}.</view>
|
||||
<view class="cent">{{item.price_cent}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin: 3px 0px 0px; font-size: 0px; line-height: 1.2;">
|
||||
<view class="old-price">¥{{item.marketprice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="text-align: right;">
|
||||
<view class="vip-price-wrap"></view>
|
||||
<view style="margin: 5px 0px 0px; font-size: 12px; line-height: 1.2; color: rgb(150, 150, 150);">{{item.num_buy}}已售</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
140
pages/goodsDetails/recomondList/recomondList.wxss
Normal file
140
pages/goodsDetails/recomondList/recomondList.wxss
Normal file
@@ -0,0 +1,140 @@
|
||||
.small-list {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: -5.333vw 0 0 -4vw;
|
||||
}
|
||||
|
||||
.small-list .item {
|
||||
-webkit-box-flex: 50%;
|
||||
box-sizing: border-box;
|
||||
flex: 50% 0 0;
|
||||
margin-top: 5.333vw;
|
||||
padding: 0 0 0 4vw;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.small-list .hd {
|
||||
border-radius: 1.067vw;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image-box.__56 {
|
||||
padding-top: 56.25%;
|
||||
}
|
||||
|
||||
.image-box image {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.small-list .bd {
|
||||
padding: 2.667vw 0 0;
|
||||
}
|
||||
|
||||
.small-list .title {
|
||||
-webkit-box-orient: vertical;
|
||||
color: #222;
|
||||
display: -webkit-box;
|
||||
line-height: 1.4em;
|
||||
margin: 0 0 .2em;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.small-list .title.__small {
|
||||
font-size: 3.733vw;
|
||||
}
|
||||
|
||||
.small-list .bd-btm {
|
||||
-webkit-box-align: end;
|
||||
-ms-flex-align: end;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
align-items: flex-end;
|
||||
height: 9.6vw;
|
||||
justify-content: space-between;
|
||||
margin: 0 0 .8vw;
|
||||
}
|
||||
|
||||
._btm_lt,.small-list .bd-btm {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
._btm_lt {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.now-price {
|
||||
color: #eb5252;
|
||||
font-family: DIN;
|
||||
line-height: 1.75em;
|
||||
}
|
||||
|
||||
.now-price,.now-price.__normal {
|
||||
font-size: 3.2vw;
|
||||
}
|
||||
|
||||
.now-price .symbol {
|
||||
display: inline;
|
||||
margin: 0 .267vw 0 0;
|
||||
}
|
||||
|
||||
.now-price.__normal .buck {
|
||||
display: inline;
|
||||
font-size: 4.8vw;
|
||||
}
|
||||
|
||||
.cent {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.now-price .qi {
|
||||
display: inline;
|
||||
margin: 0 0 0 .267vw;
|
||||
}
|
||||
|
||||
.old-price {
|
||||
color: #9b9b9b;
|
||||
font-family: DIN;
|
||||
font-size: 3.2vw;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.vip-price-wrap {
|
||||
height: 3.467vw;
|
||||
}
|
||||
|
||||
.issaled {
|
||||
align-items: center;
|
||||
background: rgba(0,0,0,.4);
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.issaled image {
|
||||
height: 120rpx;
|
||||
width: 120rpx;
|
||||
}
|
||||
|
||||
.hover {
|
||||
background: transparent;
|
||||
}
|
||||
21
pages/goodsDetails/shopAdd/shopAdd.js
Normal file
21
pages/goodsDetails/shopAdd/shopAdd.js
Normal file
@@ -0,0 +1,21 @@
|
||||
Component({
|
||||
properties: {
|
||||
merchantList: Array
|
||||
},
|
||||
data: {},
|
||||
methods: {
|
||||
call: function(t) {
|
||||
var e = t.currentTarget.dataset.tel;
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: e
|
||||
});
|
||||
},
|
||||
toMap: function(t) {
|
||||
var e = t.currentTarget.dataset, a = e.latitude, n = e.longitude;
|
||||
wx.openLocation({
|
||||
latitude: a,
|
||||
longitude: n
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
4
pages/goodsDetails/shopAdd/shopAdd.json
Normal file
4
pages/goodsDetails/shopAdd/shopAdd.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
24
pages/goodsDetails/shopAdd/shopAdd.wxml
Normal file
24
pages/goodsDetails/shopAdd/shopAdd.wxml
Normal file
@@ -0,0 +1,24 @@
|
||||
<view>
|
||||
<view :key="index" class="info-wrap" id="info-shop" wx:for="{{merchantList}}">
|
||||
<view class="info-shopinfo">
|
||||
<view>
|
||||
<view class="business-box">
|
||||
<view class="business-info">
|
||||
<view class="title" href="#/info/shop?id=41">{{item.name}}</view>
|
||||
<view class="business-info-time-range">营业时间:{{item.customerservice}}</view>
|
||||
<view class="shopinfo-item">
|
||||
<view>商家电话:{{item.tel}}</view>
|
||||
<view bindtap="call" class="btn" data-tel="{{item.tel}}" mycolor="">
|
||||
<image class="phone" src="/img/phone.png"></image>拨打</view>
|
||||
</view>
|
||||
<view class="shopinfo-item">
|
||||
<view class="shop-address">{{item.address}}</view>
|
||||
<view bindtap="toMap" class="btn" data-latitude="{{item.lat*1}}" data-longitude="{{item.lng*1}}" mycolor="">
|
||||
<image class="location" src="/img/location.png"></image>导航</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
73
pages/goodsDetails/shopAdd/shopAdd.wxss
Normal file
73
pages/goodsDetails/shopAdd/shopAdd.wxss
Normal file
@@ -0,0 +1,73 @@
|
||||
.info-wrap {
|
||||
border-top: 2.667vw solid #f8f8f8;
|
||||
padding: 0 4vw 5.333vw;
|
||||
}
|
||||
|
||||
.business-info {
|
||||
font-size: 4.267vw;
|
||||
}
|
||||
|
||||
.business-info .title {
|
||||
color: #2a2a2a;
|
||||
display: inline-block;
|
||||
font-size: 4.8vw;
|
||||
font-weight: 500;
|
||||
padding: 4.267vw 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.business-info .shopinfo-item,.business-info-time-range {
|
||||
color: #787878;
|
||||
font-size: 3.733vw;
|
||||
margin-top: 2.133vw;
|
||||
}
|
||||
|
||||
.business-info .shopinfo-item {
|
||||
-ms-flex-line-pack: center;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
align-content: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.business-info .shopinfo-item .btn {
|
||||
-ms-flex-negative: 0;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border: 1px solid #eb5252;
|
||||
border-radius: 2.667vw;
|
||||
color: #eb5252;
|
||||
display: inline-flex;
|
||||
flex-shrink: 0;
|
||||
font-size: 3.2vw;
|
||||
height: 5.333vw;
|
||||
justify-content: center;
|
||||
line-height: 5.333vw;
|
||||
text-align: center;
|
||||
width: 13.6vw;
|
||||
}
|
||||
|
||||
.business-info .shopinfo-item .shop-address {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
width: 68.133vw;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.location,.phone {
|
||||
height: 24rpx;
|
||||
margin-right: 6rpx;
|
||||
width: 24rpx;
|
||||
}
|
||||
|
||||
.location {
|
||||
height: 26rpx;
|
||||
width: 26rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user