创建
This commit is contained in:
175
pages/addAddress/addAddress.js
Normal file
175
pages/addAddress/addAddress.js
Normal file
@@ -0,0 +1,175 @@
|
||||
var t = getApp(), i = require("../../utils/login.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
loading: !1,
|
||||
isrefusedAuthLocation: 0,
|
||||
data: [],
|
||||
show: "index",
|
||||
isdefault: 0,
|
||||
region: [],
|
||||
info: {
|
||||
cityname: null,
|
||||
countryname: null,
|
||||
detailinfo: null,
|
||||
provincename: null,
|
||||
telnumber: null,
|
||||
username: null
|
||||
},
|
||||
issubmit: !1,
|
||||
show_comfirm: {
|
||||
show: !1,
|
||||
tips: ""
|
||||
},
|
||||
uniqid: "",
|
||||
selectAddressUniqid: "",
|
||||
id: ""
|
||||
},
|
||||
onLoad: function(t) {
|
||||
console.log(t), wx.showLoading({
|
||||
title: ""
|
||||
}), this.setData({
|
||||
id: t.id || "",
|
||||
show: t.id ? "edit" : "plus"
|
||||
}), this.getContent(), wx.setNavigationBarTitle({
|
||||
title: t.id ? "编辑地址" : "新增地址"
|
||||
});
|
||||
},
|
||||
getContent: function() {
|
||||
var e = this;
|
||||
i.request(t.globalData.config.address.plus, {
|
||||
id: this.data.id
|
||||
}).then(function(t) {
|
||||
if (wx.hideLoading(), 200 != t.code) return wx.showToast({
|
||||
title: t.message
|
||||
}), !1;
|
||||
e.setData({
|
||||
showLoding: !1,
|
||||
info: t.data,
|
||||
isdefault: t.isdefault || 0,
|
||||
token: t.token
|
||||
});
|
||||
}).catch(function(t) {
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
checkboxChange: function(t) {
|
||||
this.setData({
|
||||
isdefault: t.detail.value[0] || 0
|
||||
});
|
||||
},
|
||||
bindRegionChange: function(t) {
|
||||
this.data.info.provincename = t.detail.value[0], this.data.info.cityname = t.detail.value[1],
|
||||
this.data.info.countryname = t.detail.value[2], this.setData({
|
||||
info: this.data.info
|
||||
});
|
||||
},
|
||||
input: function(t) {
|
||||
var i = t.currentTarget.dataset.input;
|
||||
this.data.info[i] = t.detail.value, this.setData({
|
||||
info: this.data.info
|
||||
});
|
||||
},
|
||||
submit: function() {
|
||||
if (this.data.issubmit) return !1;
|
||||
this.setData({
|
||||
issubmit: !0
|
||||
});
|
||||
var e = this;
|
||||
i.request(t.globalData.config.address.submit, {
|
||||
session: wx.getStorageSync("session"),
|
||||
info: this.data.info,
|
||||
isdefault: this.data.isdefault,
|
||||
token: this.data.token,
|
||||
uniqid: this.data.uniqid
|
||||
}).then(function(t) {
|
||||
wx.hideLoading(), e.setData({
|
||||
issubmit: !1
|
||||
}), 200 == t.code ? wx.navigateBack() : wx.showToast({
|
||||
title: t.message,
|
||||
icon: "none"
|
||||
});
|
||||
}).catch(function(t) {
|
||||
wx.hideLoading(), e.setData({
|
||||
issubmit: !1
|
||||
});
|
||||
});
|
||||
},
|
||||
delAddress: function() {
|
||||
if (this.data.issubmit) return !1;
|
||||
var e = this;
|
||||
wx.showModal({
|
||||
title: "是否删除该地址?",
|
||||
content: "",
|
||||
confirmColor: "#EF8176",
|
||||
cancelColor: "#999999",
|
||||
success: function(a) {
|
||||
a.confirm && (e.setData({
|
||||
issubmit: !0
|
||||
}), i.request(t.globalData.config.address.delete, {
|
||||
id: e.data.id
|
||||
}).then(function(t) {
|
||||
200 == t.code ? (wx.showToast({
|
||||
title: "删除成功"
|
||||
}), wx.navigateBack()) : wx.showModal({
|
||||
title: "提示",
|
||||
content: t.message,
|
||||
confirmColor: "#EF8176",
|
||||
cancelColor: "#999999"
|
||||
});
|
||||
}).catch(function(t) {
|
||||
e.setData({
|
||||
issubmit: !1
|
||||
});
|
||||
}));
|
||||
},
|
||||
fail: function(t) {
|
||||
console.log("fail");
|
||||
}
|
||||
});
|
||||
},
|
||||
getSystemAddress: function() {
|
||||
var t = this;
|
||||
wx.chooseAddress({
|
||||
success: function(i) {
|
||||
console.log(i), t.data.info = {
|
||||
cityname: i.cityName,
|
||||
countryname: i.countyName,
|
||||
detailinfo: i.detailInfo,
|
||||
provincename: i.provinceName,
|
||||
telnumber: i.telNumber,
|
||||
username: i.userName
|
||||
}, t.setData({
|
||||
info: t.data.info
|
||||
});
|
||||
},
|
||||
fail: function(i) {
|
||||
console.log(i), t.setData({
|
||||
isrefusedAuthLocation: 1
|
||||
}), wx.showToast({
|
||||
title: "获取地址失败",
|
||||
icon: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
bindopensetting: function(t) {
|
||||
res.detail.authSetting["scope.address"] ? (wx.showToast({
|
||||
title: "授权成功,请再次点击导入微信地址"
|
||||
}), this.setData({
|
||||
isrefusedAuthLocation: 0
|
||||
})) : wx.showToast({
|
||||
title: "授权失败",
|
||||
icon: "none"
|
||||
});
|
||||
},
|
||||
select: function(i) {
|
||||
var e = i.currentTarget.dataset.index;
|
||||
"user" != this.data.selectAddressUniqid && (this.setData({
|
||||
selectAddressUniqid: i.currentTarget.dataset.uniqid
|
||||
}), t.globalData.selectAddress = this.data.data[e], setTimeout(function(i) {
|
||||
t.globalData.selectAddress = {};
|
||||
}, 2e3), wx.navigateBack({}));
|
||||
}
|
||||
});
|
||||
6
pages/addAddress/addAddress.json
Normal file
6
pages/addAddress/addAddress.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "地址",
|
||||
"usingComponents": {
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
42
pages/addAddress/addAddress.wxml
Normal file
42
pages/addAddress/addAddress.wxml
Normal file
@@ -0,0 +1,42 @@
|
||||
<view class="edit-box">
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view class="add-form">
|
||||
<picker bindchange="bindRegionChange" customItem="{{customItem}}" mode="region" value="{{region}}">
|
||||
<view class="item">
|
||||
<view class="name">所在地区</view>
|
||||
<view class="content">
|
||||
<view class="placeholder" wx:if="{{!info.provincename}}">所在地区</view>
|
||||
<view wx:if="{{info.provincename}}">{{info.provincename}} {{info.cityname}} {{info.countryname}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
<view class="item">
|
||||
<view class="name">详细地址</view>
|
||||
<view class="content">
|
||||
<input bindinput="input" data-input="detailinfo" placeholder="详细地址" placeholderClass="placeholder" value="{{info.detailinfo}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="name">姓名</view>
|
||||
<view class="content">
|
||||
<input bindinput="input" data-input="username" placeholder="姓名" placeholderClass="placeholder" value="{{info.username}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="name">手机号码</view>
|
||||
<view class="content">
|
||||
<input bindinput="input" data-input="telnumber" placeholder="手机号码" placeholderClass="placeholder" value="{{info.telnumber}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<button bindopensetting="bindopensetting" class="btn" openType="openSetting" wx:if="{{isrefusedAuthLocation==1}}"> 导入微信地址 </button>
|
||||
<view bindtap="getSystemAddress" class="btn" wx:if="{{isrefusedAuthLocation==0}}">导入微信地址</view>
|
||||
<view bindtap="submit" class="btn submit">立即保存</view>
|
||||
</view>
|
||||
</view>
|
||||
<view bindtap="close_alert" class="alert-comfirm-box" hidden="{{!show_comfirm.show}}">
|
||||
<view class="reminder_box">
|
||||
<view class="tips">{{show_comfirm.tips}}</view>
|
||||
</view>
|
||||
</view>
|
||||
134
pages/addAddress/addAddress.wxss
Normal file
134
pages/addAddress/addAddress.wxss
Normal file
@@ -0,0 +1,134 @@
|
||||
.edit-box {
|
||||
background: #fafafa;
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.edit-box .del {
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
margin: 20px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.add-form {
|
||||
background: #fff;
|
||||
border: 1px solid #f2f2f2;
|
||||
border-radius: 20rpx;
|
||||
font-size: 28rpx;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.add-form .item {
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
display: flex;
|
||||
padding: 44rpx 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.add-form .item .name {
|
||||
width: 150rpx;
|
||||
}
|
||||
|
||||
.add-form .item .content,.add-form .item .name {
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.add-form .item .content {
|
||||
flex: 1;
|
||||
height: 70rpx;
|
||||
}
|
||||
|
||||
.add-form .item input {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.add-form .item .right {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 49rpx;
|
||||
}
|
||||
|
||||
.add-form .item .right image {
|
||||
height: 40rpx;
|
||||
transform: rotateZ(-90deg);
|
||||
width: 40rpx;
|
||||
}
|
||||
|
||||
.add-form .checkbox {
|
||||
color: #999;
|
||||
font-size: 28rpx;
|
||||
margin: 20rpx 0;
|
||||
padding: 20rpx 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.add-form .btn {
|
||||
background-color: #4cadf1;
|
||||
border-radius: 90rpx;
|
||||
color: #fff;
|
||||
font-size: 44rpx;
|
||||
line-height: 90rpx;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
width: 372rpx;
|
||||
}
|
||||
|
||||
checkbox {
|
||||
transform: scale(.7);
|
||||
}
|
||||
|
||||
.add-form .btn.submit {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.edit-box .del {
|
||||
background: #fff;
|
||||
border: 1px solid #f2f2f2;
|
||||
border-radius: 20rpx;
|
||||
color: #333;
|
||||
font-size: 32rpx;
|
||||
margin: 20px auto;
|
||||
padding: 20rpx;
|
||||
text-align: center;
|
||||
width: 200rpx;
|
||||
}
|
||||
|
||||
.edit-box .del image {
|
||||
display: inline-block;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
position: relative;
|
||||
top: -2rpx;
|
||||
vertical-align: middle;
|
||||
width: 30rpx;
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.btn-box .btn {
|
||||
align-items: center;
|
||||
background: #f60;
|
||||
border-radius: 10rpx;
|
||||
color: #fff;
|
||||
display: inline-flex;
|
||||
font-size: 34rpx;
|
||||
height: 100rpx;
|
||||
justify-content: center;
|
||||
width: calc(50% - 10rpx);
|
||||
}
|
||||
|
||||
.btn-box .btn.submit {
|
||||
background: #4cadf1;
|
||||
}
|
||||
11
pages/common/common.wxml
Normal file
11
pages/common/common.wxml
Normal file
@@ -0,0 +1,11 @@
|
||||
<template name="pageList">
|
||||
<view class="index-href-box">
|
||||
<view bindtap="toPage" class="item" data-needlogin="{{item.needlogin}}" data-refresh="{{item.refresh}}" data-showimg="{{item.showimg}}" data-url="{{item.url}}" wx:for="{{urlList}}" wx:key="index">
|
||||
<view class="btn">
|
||||
<image class="video" src="../../img/video.png" wx:if="{{item.img=='video'}}"></image>
|
||||
<text class="iconfont icon-{{item.img}}" wx:else></text>
|
||||
</view>
|
||||
<view class="name">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
0
pages/common/common.wxss
Normal file
0
pages/common/common.wxss
Normal file
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;
|
||||
}
|
||||
112
pages/goodsSearch/goodsSearch.js
Normal file
112
pages/goodsSearch/goodsSearch.js
Normal file
@@ -0,0 +1,112 @@
|
||||
var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/slicedToArray"), i = require("../../@babel/runtime/helpers/asyncToGenerator"), s = (getApp(),
|
||||
require("../../utils/login.js"));
|
||||
|
||||
Page({
|
||||
data: {
|
||||
kw: "",
|
||||
historyList: [],
|
||||
data: []
|
||||
},
|
||||
onLoad: function(t) {
|
||||
var a = this;
|
||||
wx.getStorage({
|
||||
key: "historyList",
|
||||
success: function(t) {
|
||||
console.log(t), "getStorage:ok" == t.errMsg && a.setData({
|
||||
historyList: t.data
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
onReachBottom: function() {
|
||||
this.getData();
|
||||
},
|
||||
onShareAppMessage: function() {},
|
||||
onUnload: function() {
|
||||
this.data.historyList.length > 0 && wx.setStorage({
|
||||
key: "historyList",
|
||||
data: this.data.historyList
|
||||
});
|
||||
},
|
||||
input: function(t) {
|
||||
this.setData({
|
||||
kw: t.detail.value
|
||||
});
|
||||
},
|
||||
submit: function() {
|
||||
if ("" == this.data.kw.trim()) return wx.showToast({
|
||||
title: "请输入关键字",
|
||||
icon: "none"
|
||||
}), !1;
|
||||
this.setData({
|
||||
loading: !1,
|
||||
page: 1
|
||||
});
|
||||
var t = this.data.historyList.indexOf(this.data.kw);
|
||||
t > -1 && this.data.historyList.splice(t, 1), this.data.historyList.unshift(this.data.kw),
|
||||
this.setData({
|
||||
historyList: this.data.historyList
|
||||
}), this.getData();
|
||||
},
|
||||
getData: function() {
|
||||
var r = this;
|
||||
return i(t.default.mark(function i() {
|
||||
var n, o;
|
||||
return t.default.wrap(function(t) {
|
||||
for (;;) switch (t.prev = t.next) {
|
||||
case 0:
|
||||
if (!r.data.loading && r.data.page && "" != r.data.kw.trim()) {
|
||||
t.next = 2;
|
||||
break;
|
||||
}
|
||||
return t.abrupt("return", !1);
|
||||
|
||||
case 2:
|
||||
return r.setData({
|
||||
loading: !0
|
||||
}), r, t.prev = 4, t.next = 7, s.request(s.baseUrl + "shop/search", {
|
||||
keyword: r.data.kw
|
||||
}, !0);
|
||||
|
||||
case 7:
|
||||
n = t.sent, o = n.data, console.log("data,data", o), o.data.length < o.limit ? r.data.page = 0 : r.data.page += 1,
|
||||
o.data.forEach(function(t) {
|
||||
var a = t.price.split("."), i = e(a, 2);
|
||||
t.price_buck = i[0], t.price_cent = i[1];
|
||||
}), r.setData({
|
||||
loading: !1,
|
||||
page: r.data.page,
|
||||
data: [].concat(a(r.data.data), a(o.data))
|
||||
}), t.next = 18;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
t.prev = 15, t.t0 = t.catch(4), console.log(t.t0);
|
||||
|
||||
case 18:
|
||||
case "end":
|
||||
return t.stop();
|
||||
}
|
||||
}, i, null, [ [ 4, 15 ] ]);
|
||||
}))();
|
||||
},
|
||||
selectKw: function(t) {
|
||||
this.setData({
|
||||
kw: t.currentTarget.dataset.kw
|
||||
}), this.submit();
|
||||
},
|
||||
clearHistory: function() {
|
||||
var t = this;
|
||||
wx.showModal({
|
||||
title: "提示",
|
||||
content: "清空后不能恢复哦~",
|
||||
success: function(a) {
|
||||
1 == a.confirm && (t.setData({
|
||||
historyList: []
|
||||
}), wx.removeStorage({
|
||||
key: "historyList"
|
||||
}));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
6
pages/goodsSearch/goodsSearch.json
Normal file
6
pages/goodsSearch/goodsSearch.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"usingComponents": {
|
||||
"recomond-list": "../goodsDetails/recomondList/recomondList"
|
||||
}
|
||||
}
|
||||
24
pages/goodsSearch/goodsSearch.wxml
Normal file
24
pages/goodsSearch/goodsSearch.wxml
Normal file
@@ -0,0 +1,24 @@
|
||||
<view>
|
||||
<view class="fixed">
|
||||
<view class="top">
|
||||
<view class="search">
|
||||
<input bindconfirm="submit" bindinput="input" class="input-placeholder" placeholder="搜索你心仪的商品" placeholderClass="placeholder" value="{{kw}}"></input>
|
||||
<view class="icon-search iconfont icon-sousuo"></view>
|
||||
<view class="img-close iconfont icon-guanbi"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="message" wx:if="{{historyList.length>0&&data.length==0}}">
|
||||
<view class="title">历史记录 <view bindtap="clearHistory" class="delete">
|
||||
<image src="/img/delete.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tag-list">
|
||||
<view :key="index" bindtap="selectKw" class="tag" data-kw="{{item}}" wx:for="{{historyList}}"> {{item}} </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="goods-list">
|
||||
<recomond-list list="{{data}}"></recomond-list>
|
||||
</view>
|
||||
<view class="loading" wx:if="{{loading}}">正在加载...</view>
|
||||
</view>
|
||||
113
pages/goodsSearch/goodsSearch.wxss
Normal file
113
pages/goodsSearch/goodsSearch.wxss
Normal file
@@ -0,0 +1,113 @@
|
||||
.top {
|
||||
background-color: #06a2b3;
|
||||
padding: 4vw;
|
||||
}
|
||||
|
||||
.top .search {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
height: 10.667vw;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.top .search input {
|
||||
background: hsla(0,0%,96%,.3);
|
||||
border: none;
|
||||
border-radius: 5.333vw;
|
||||
color: #fff;
|
||||
font-size: 3.733vw;
|
||||
font-weight: 500;
|
||||
height: 100%;
|
||||
line-height: 10.667vw;
|
||||
padding-left: 12.8vw;
|
||||
padding-right: 12vw;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.top .search .icon-search {
|
||||
font-size: 4.267vw;
|
||||
left: 5.333vw;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.message {
|
||||
background-color: #fff;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 9.333vw 2.933vw 2.933vw;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 18.667vw;
|
||||
z-index: 106;
|
||||
}
|
||||
|
||||
.message .title {
|
||||
color: #787878;
|
||||
font-size: 3.467vw;
|
||||
font-weight: 500;
|
||||
line-height: 4vw;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tag-list {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 5.333vw;
|
||||
margin-top: 4vw;
|
||||
}
|
||||
|
||||
.tag-list .tag {
|
||||
background-color: #f6f6f6;
|
||||
border-radius: 3.733vw;
|
||||
color: #2a2a2a;
|
||||
font-size: 3.467vw;
|
||||
font-weight: 500;
|
||||
height: 7.467vw;
|
||||
line-height: 7.467vw;
|
||||
margin: 0 .933vw 3.2vw 1.067vw;
|
||||
padding-left: 3.2vw;
|
||||
padding-right: 3.2vw;
|
||||
}
|
||||
|
||||
.delete {
|
||||
height: 60rpx;
|
||||
position: absolute;
|
||||
right: -15rpx;
|
||||
top: -15rpx;
|
||||
width: 60rpx;
|
||||
}
|
||||
|
||||
.delete image {
|
||||
height: 40rpx;
|
||||
margin: 10rpx;
|
||||
width: 40rpx;
|
||||
}
|
||||
|
||||
.goods-list {
|
||||
border-top: 2.667vw solid #f8f8f8;
|
||||
padding: 0 4vw 5.333vw;
|
||||
}
|
||||
|
||||
.loading {
|
||||
background: #fafafa;
|
||||
color: #969799;
|
||||
font-size: 14px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
204
pages/index/index.js
Normal file
204
pages/index/index.js
Normal file
@@ -0,0 +1,204 @@
|
||||
var e = getApp(), t = require("../../utils/login.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
urlList: [ {
|
||||
img: "chongzhi",
|
||||
name: "充值赠送",
|
||||
url: "voucher/voucher",
|
||||
needlogin: !0
|
||||
}, {
|
||||
img: "video",
|
||||
name: "洗车教程",
|
||||
url: "webview/webview?url=https://jm.v0750.com/video",
|
||||
needlogin: !1
|
||||
}, {
|
||||
img: "xichequan",
|
||||
name: "网点分布",
|
||||
url: "map/map"
|
||||
}, {
|
||||
img: "huiyuanzhongxin",
|
||||
name: "会员中心",
|
||||
url: "user/user",
|
||||
needlogin: !0
|
||||
}, {
|
||||
img: "youhuiquan1",
|
||||
name: "洗车券",
|
||||
url: "washCodeList/washCodeList"
|
||||
}, {
|
||||
img: "shangjiajiameng",
|
||||
name: "招募合伙人",
|
||||
url: "",
|
||||
showimg: !0
|
||||
} ],
|
||||
servicetel: "",
|
||||
notice: "",
|
||||
noticeurl: null,
|
||||
banner: [],
|
||||
isScan: !1,
|
||||
user: {},
|
||||
tmplIds: [],
|
||||
joinUs: "",
|
||||
tabStatus: {
|
||||
coupon: !1,
|
||||
shop: !1
|
||||
}
|
||||
},
|
||||
bindViewTap: function() {
|
||||
wx.navigateTo({
|
||||
url: "../logs/logs"
|
||||
});
|
||||
},
|
||||
onLoad: function() {
|
||||
wx.showLoading({
|
||||
title: ""
|
||||
});
|
||||
var a = this;
|
||||
t.pageStart(e).then(function(t) {
|
||||
a.getData(), a.setData({
|
||||
servicetel: e.globalData.servicetel,
|
||||
isScan: !!e.globalData.devicecode
|
||||
});
|
||||
});
|
||||
},
|
||||
getData: function() {
|
||||
var a = this;
|
||||
t.request(e.globalData.config.home, {}, !0).then(function(e) {
|
||||
a.data.urlList[1].url = e.data.tabStatus.shop ? "mall/mall" : "", a.setData({
|
||||
banner: e.data.banner,
|
||||
user: e.data.user,
|
||||
tmplIds: e.data.tmplIds,
|
||||
joinUs: e.data.joinUs,
|
||||
notice: e.data.notice,
|
||||
noticeurl: e.data.noticeurl,
|
||||
tabStatus: e.data.tabStatus,
|
||||
urlList: e.data.urlList
|
||||
}, function() {
|
||||
wx.hideLoading(), 0 == e.data.banner.length ? a.setData({
|
||||
showLoding: !1
|
||||
}) : setTimeout(function() {
|
||||
a.setData({
|
||||
showLoding: !1
|
||||
});
|
||||
}, 50);
|
||||
});
|
||||
});
|
||||
},
|
||||
load: function(e) {
|
||||
console.log(e);
|
||||
var t = e.currentTarget.dataset.index, a = this.data.swiperWidth * e.detail.height / e.detail.width;
|
||||
this.data.banner[t].height = a, this.setData({
|
||||
swiperHeight: a
|
||||
});
|
||||
},
|
||||
onShow: function() {
|
||||
this.setData({
|
||||
isScan: !!e.globalData.devicecode || this.data.isScan
|
||||
}), e.globalData.config && e.globalData.config.home && (this.getData(), this.isneedUpload = !1);
|
||||
},
|
||||
toPage: function(t) {
|
||||
var a = t.currentTarget.dataset, i = a.url, o = a.needlogin, n = a.showimg;
|
||||
if (console.log("showImg", n), i) {
|
||||
this.isneedUpload = !0;
|
||||
if (o && !e.globalData.user.session) return this.isneedUpload = !0, wx.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
}), e.globalData.needJumpUrl = "/pages/".concat(i), !1;
|
||||
wx.navigateTo({
|
||||
url: "/pages/".concat(i)
|
||||
}), this.isneedUpload = !0;
|
||||
} else {
|
||||
if (!n) return !1;
|
||||
wx.previewImage({
|
||||
urls: [ this.data.joinUs ]
|
||||
});
|
||||
}
|
||||
},
|
||||
toScan: function() {
|
||||
e.globalData.needJumpUrl = !1;
|
||||
var a = this;
|
||||
wx.scanCode({
|
||||
success: function(i) {
|
||||
console.log(i), wx.showLoading({
|
||||
title: ""
|
||||
}), e.globalData.qrcode = i.result, t.request("https://jm.v0750.com/miniprogram/identify", i, !0).then(function(t) {
|
||||
console.log("data", t), wx.hideLoading(), e.globalData.devicecode = t.data.devicecode || e.globalData.devicecode,
|
||||
a.setData({
|
||||
isScan: !!t.data.devicecode
|
||||
});
|
||||
}).catch(function(e) {
|
||||
wx.hideLoading();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
isSubmit: !1,
|
||||
isneedUpload: !1,
|
||||
isshowModal: !1,
|
||||
needUpload: function() {
|
||||
this.isneedUpload = !0;
|
||||
},
|
||||
toStart: function() {
|
||||
e.globalData.needJumpUrl = !1, this.isneedUpload = !0;
|
||||
var t = this;
|
||||
if (console.log("this.isSubmit", this.isSubmit), this.isSubmit) return !1;
|
||||
if (t.data.user.money <= 0) return t.startup(), !1;
|
||||
if (t.data.user.money < 10) {
|
||||
if (this.isshowModal) return t.startup(), !1;
|
||||
this.isshowModal = !0, wx.showModal({
|
||||
title: "提示",
|
||||
content: "账户余额小于10元,是否立即充值?",
|
||||
confirmText: "去充值",
|
||||
cancelText: "立即启动",
|
||||
success: function(e) {
|
||||
e.confirm ? (wx.navigateTo({
|
||||
url: "/pages/voucher/voucher"
|
||||
}), t.isneedUpload = !0) : t.startup();
|
||||
},
|
||||
fail: function(e) {
|
||||
console.log("fail:", e);
|
||||
}
|
||||
});
|
||||
} else t.startup();
|
||||
},
|
||||
startup: function() {
|
||||
var a = this;
|
||||
wx.showModal({
|
||||
title: "提示",
|
||||
content: "你当前将要使用的机器编号是:".concat(e.globalData.devicecode, ",确认开机吗?"),
|
||||
success: function(i) {
|
||||
i.confirm && (a.isSubmit = !0, wx.showLoading({
|
||||
title: "正在启动"
|
||||
}), t.request(e.globalData.config.machine.startup, {
|
||||
washcode: a.data.selectID
|
||||
}, !0).then(function(e) {
|
||||
a.isSubmit = !1, wx.hideLoading(), 200 == e.code && (wx.showModal({
|
||||
title: "",
|
||||
content: e.message
|
||||
}), a.data.tmplIds.length > 0 && a.requestSubscribeMessage(), wx.redirectTo({
|
||||
url: "/pages/user/user"
|
||||
}), a.isneedUpload = !0), 888 == e.code && (wx.navigateTo({
|
||||
url: "/pages/voucher/voucher"
|
||||
}), a.isneedUpload = !0);
|
||||
}).catch(function(e) {
|
||||
a.isSubmit = !1, wx.hideLoading();
|
||||
}));
|
||||
},
|
||||
fail: function(e) {
|
||||
console.log("fail:", e);
|
||||
}
|
||||
});
|
||||
},
|
||||
requestSubscribeMessage: function() {
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: this.data.tmplIds,
|
||||
success: function(e) {
|
||||
console.log("requestSubscribeMessage", e), t.request("https://jm.v0750.com/miniprogram/index/newtmpl", e, !0).then(function(e) {}).catch(function(e) {});
|
||||
},
|
||||
fail: function(e) {
|
||||
console.log("requestSubscribeMessagefail", e);
|
||||
}
|
||||
});
|
||||
},
|
||||
onShareAppMessage: function() {}
|
||||
});
|
||||
9
pages/index/index.json
Normal file
9
pages/index/index.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"usingComponents": {
|
||||
"service-tel": "../../template/serviceTel/serviceTel",
|
||||
"my-money": "../../template/myMoney/myMoney",
|
||||
"head-swiper": "../../template/headSwiper/headSwiper",
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
15
pages/index/index.wxml
Normal file
15
pages/index/index.wxml
Normal file
@@ -0,0 +1,15 @@
|
||||
<import src="../common/common.wxml"></import>
|
||||
<view class="container">
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<head-swiper banner="{{banner}}"></head-swiper>
|
||||
<view class="money">
|
||||
<my-money user="{{user}}"></my-money>
|
||||
<view class="marquee-wrap" wx:if="{{notice}}">
|
||||
<view bindtap="toPage" class="marquee-content" data-refresh="1" data-url="{{noticeurl}}"> {{notice}} </view>
|
||||
</view>
|
||||
</view>
|
||||
<template is="pageList" data="{{urlList:urlList}}"></template>
|
||||
<service-tel></service-tel>
|
||||
<view bindtap="toScan" class="scan-btn" wx:if="{{!isScan}}">扫码启动</view>
|
||||
<view bindtap="toStart" class="scan-btn" wx:if="{{isScan}}">立即启动</view>
|
||||
</view>
|
||||
37
pages/index/index.wxss
Normal file
37
pages/index/index.wxss
Normal file
@@ -0,0 +1,37 @@
|
||||
.container {
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding: 0 0 170rpx;
|
||||
}
|
||||
|
||||
.money-box {
|
||||
margin: 0 27rpx;
|
||||
}
|
||||
|
||||
.money {
|
||||
padding: 34rpx 27rpx 0;
|
||||
}
|
||||
|
||||
.start-btn-box {
|
||||
bottom: 0;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
height: 106rpx;
|
||||
left: 0;
|
||||
padding: 0 10rpx;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.start-btn-box .scan-btn {
|
||||
align-items: center;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.start-btn-box .scan-subscribe {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
71
pages/listDetail/listDetail.js
Normal file
71
pages/listDetail/listDetail.js
Normal file
@@ -0,0 +1,71 @@
|
||||
var t = getApp(), e = require("../../utils/login.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
type: "",
|
||||
list: [],
|
||||
loading: !1,
|
||||
page: {
|
||||
next_page: 1
|
||||
}
|
||||
},
|
||||
onLoad: function(a) {
|
||||
var n = this;
|
||||
this.setData({
|
||||
type: a.type
|
||||
}), wx.setNavigationBarTitle({
|
||||
title: "invest" == a.type ? "充值记录" : "消费明细"
|
||||
}), e.pageStart(t).then(function(t) {
|
||||
n.getContent();
|
||||
});
|
||||
},
|
||||
onShow: function() {
|
||||
this.refresh && this.refreshPage();
|
||||
},
|
||||
refreshPage: function() {
|
||||
this.setData({
|
||||
list: [],
|
||||
page: {
|
||||
next_page: 1
|
||||
}
|
||||
}), this.getContent();
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
if (!t.globalData.canGetData) return !1;
|
||||
this.refreshPage(), wx.stopPullDownRefresh();
|
||||
},
|
||||
onReachBottom: function() {
|
||||
if (!t.globalData.canGetData) return !1;
|
||||
this.getContent();
|
||||
},
|
||||
onShareAppMessage: function() {},
|
||||
getContent: function() {
|
||||
if (!this.data.page.next_page || this.data.loading) return !1;
|
||||
wx.showLoading({
|
||||
title: ""
|
||||
});
|
||||
var a = this, n = "invest" == this.data.type ? t.globalData.config.recharge.log : t.globalData.config.consume.init;
|
||||
e.request(n, {
|
||||
page: this.data.page.next_page
|
||||
}, !0).then(function(t) {
|
||||
if (wx.hideLoading(), 200 != t.code) return wx.showModal({
|
||||
title: "提示",
|
||||
content: t.message
|
||||
}), !1;
|
||||
a.setData({
|
||||
showLoding: !1,
|
||||
list: a.data.list.concat(t.data.list),
|
||||
user: t.data.user,
|
||||
page: t.data.page
|
||||
}, function() {});
|
||||
}).catch(function(t) {
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
toPage: function() {
|
||||
this.refresh = 1, wx.navigateTo({
|
||||
url: "/pages/voucher/voucher"
|
||||
});
|
||||
}
|
||||
});
|
||||
9
pages/listDetail/listDetail.json
Normal file
9
pages/listDetail/listDetail.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"enablePullDownRefresh": true,
|
||||
"usingComponents": {
|
||||
"service-tel": "../../template/serviceTel/serviceTel",
|
||||
"my-money": "../../template/myMoney/myMoney",
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
21
pages/listDetail/listDetail.wxml
Normal file
21
pages/listDetail/listDetail.wxml
Normal file
@@ -0,0 +1,21 @@
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view class="{{types=='voucher'?'container voucher-container':'container'}}">
|
||||
<view class="money">
|
||||
<my-money user="{{user}}"></my-money>
|
||||
</view>
|
||||
<view class="list-box">
|
||||
<view class="item" wx:for="{{list}}" wx:key="index">
|
||||
<view class="name">{{item.message}}</view>
|
||||
<view class="footer">
|
||||
<view class="time">{{item.timestamp}}</view>
|
||||
<view class="num">{{item.symbol}}{{item.amount}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="no-content" wx:if="{{list.length==0&&!loading}}">
|
||||
<image src="/img/nocontent.png"></image>
|
||||
<view>暂无相关数据</view>
|
||||
</view>
|
||||
<service-tel></service-tel>
|
||||
<view bindtap="toPage" class="scan-btn" wx:if="{{type=='invest'}}"> 立即充值 </view>
|
||||
</view>
|
||||
46
pages/listDetail/listDetail.wxss
Normal file
46
pages/listDetail/listDetail.wxss
Normal file
@@ -0,0 +1,46 @@
|
||||
.container {
|
||||
background: #fafafa;
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding: 0rpx 0 40rpx;
|
||||
}
|
||||
|
||||
.voucher-container {
|
||||
padding-bottom: 170rpx;
|
||||
}
|
||||
|
||||
.money {
|
||||
margin: 36rpx 27rpx 0;
|
||||
}
|
||||
|
||||
.list-box {
|
||||
padding: 18rpx 27rpx 48rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 16rpx 20rpx 12rpx 18rpx;
|
||||
}
|
||||
|
||||
.item .name {
|
||||
color: #666;
|
||||
font-size: 26rpx;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.item .footer {
|
||||
align-items: flex-end;
|
||||
color: #999;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.item .footer .time {
|
||||
display: inline-flex;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.item .footer .num {
|
||||
font-size: 33rpx;
|
||||
}
|
||||
59
pages/login/login.js
Normal file
59
pages/login/login.js
Normal file
@@ -0,0 +1,59 @@
|
||||
var e = getApp(), o = require("../../utils/login.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
logs: [],
|
||||
isnotInfo: 1
|
||||
},
|
||||
fromPage: "",
|
||||
onLoad: function(e) {
|
||||
var o = this;
|
||||
this.fromPage = e.fromPage, wx.getUserInfo({
|
||||
success: function(e) {
|
||||
o.setData({
|
||||
isnotInfo: 2
|
||||
}), o.userInfo = e;
|
||||
}
|
||||
});
|
||||
},
|
||||
onGotUserInfo: function(e) {
|
||||
"getUserInfo:ok" == e.detail.errMsg ? (this.setData({
|
||||
isnotInfo: 2
|
||||
}), this.userInfo = e.detail) : wx.redirectTo({
|
||||
url: "/pages/register/register"
|
||||
});
|
||||
},
|
||||
userInfo: {},
|
||||
toAuthorization: function(t, a) {
|
||||
var n = Object.assign(this.userInfo, t, {
|
||||
code: a
|
||||
});
|
||||
o.request(e.globalData.config.authorization, n, !0).then(function(o) {
|
||||
if (wx.hideLoading(), console.log("toAuthorization", "app.globalData.needJumpUrl", e.globalData.needJumpUrl, o),
|
||||
200 != o.code) return wx.showModal({
|
||||
title: "提示",
|
||||
content: o.message
|
||||
}), !1;
|
||||
wx.setStorageSync("session", o.data.session), wx.showToast({
|
||||
title: o.message,
|
||||
icon: "none"
|
||||
}), e.globalData.user = o.data, e.globalData.isneedUpload = !0, e.globalData.needJumpUrl ? wx.redirectTo({
|
||||
url: e.globalData.needJumpUrl
|
||||
}) : wx.navigateBack({});
|
||||
}).catch(function(e) {
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
ongetPhoneNumber: function(o) {
|
||||
console.log("ongetPhoneNumber", o);
|
||||
var t = this;
|
||||
if ("getPhoneNumber:ok" == o.detail.errMsg) return wx.login({
|
||||
success: function(a) {
|
||||
e.globalData.code = a.code, t.toAuthorization(o.detail, a.code);
|
||||
}
|
||||
}), !1;
|
||||
wx.redirectTo({
|
||||
url: "/pages/register/register"
|
||||
});
|
||||
}
|
||||
});
|
||||
4
pages/login/login.json
Normal file
4
pages/login/login.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"usingComponents": {}
|
||||
}
|
||||
9
pages/login/login.wxml
Normal file
9
pages/login/login.wxml
Normal file
@@ -0,0 +1,9 @@
|
||||
<view class="container">
|
||||
<image class="login-bg" mode="widthFix" src="/img/login-bg.png"></image>
|
||||
<view class="logo"></view>
|
||||
<view class="yellow-bg"></view>
|
||||
<image class="car" src="/img/car.png"></image>
|
||||
<image class="logo" src="/img/logo.png"></image>
|
||||
<button bindgetuserinfo="onGotUserInfo" class="btn" lang="zh_CN" openType="getUserInfo" wx:if="{{isnotInfo==1}}">微信快捷登录</button>
|
||||
<button bindgetphonenumber="ongetPhoneNumber" class="btn" lang="zh_CN" openType="getPhoneNumber" wx:if="{{isnotInfo==2}}">授权手机号快速注册</button>
|
||||
</view>
|
||||
57
pages/login/login.wxss
Normal file
57
pages/login/login.wxss
Normal file
@@ -0,0 +1,57 @@
|
||||
.container {
|
||||
background: #fff;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.container,.login-bg {
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.yellow-bg {
|
||||
background: #f5c82e;
|
||||
height: 83vh;
|
||||
transform: rotateZ(-45deg);
|
||||
transform-origin: right top;
|
||||
width: 187vw;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.car,.yellow-bg {
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.car {
|
||||
height: 643rpx;
|
||||
width: 557rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 192rpx;
|
||||
top: 180rpx;
|
||||
width: 192rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.btn,.logo {
|
||||
left: 50%;
|
||||
position: fixed;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.btn {
|
||||
background-color: #1baa1c;
|
||||
border: 1px solid #218721;
|
||||
border-radius: 9rpx;
|
||||
bottom: 360rpx;
|
||||
color: #fff;
|
||||
font-size: 33rpx;
|
||||
height: 95rpx;
|
||||
line-height: 95rpx;
|
||||
text-align: center;
|
||||
width: 403rpx;
|
||||
z-index: 11;
|
||||
}
|
||||
7
pages/mall/activeWindow/activeWindow.js
Normal file
7
pages/mall/activeWindow/activeWindow.js
Normal file
@@ -0,0 +1,7 @@
|
||||
Component({
|
||||
properties: {
|
||||
hotsale: Boolean
|
||||
},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|
||||
4
pages/mall/activeWindow/activeWindow.json
Normal file
4
pages/mall/activeWindow/activeWindow.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
50
pages/mall/activeWindow/activeWindow.wxml
Normal file
50
pages/mall/activeWindow/activeWindow.wxml
Normal file
@@ -0,0 +1,50 @@
|
||||
<view>
|
||||
<view class="alert-active" wx:if="{{hotsale}}">
|
||||
<view class="inner">
|
||||
<view class="hotsale-popup">
|
||||
<image class="bg" mode="widthFix" src="/img/hotsale-bg.png"></image>
|
||||
<view class="countdowns"> 距结束剩余 <view class="countdown">
|
||||
<view class="time-item">82</view>
|
||||
<view class="separator">天</view>
|
||||
<view class="time-item">06</view>
|
||||
<view class="separator">:</view>
|
||||
<view class="time-item">17</view>
|
||||
<view class="separator">:</view>
|
||||
<view class="time-item">44</view>
|
||||
<view class="separator"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<navigator class="hotsale-goods" url="/pages/goodsDetails/goodsDetails?id=795">
|
||||
<view class="hd">
|
||||
<view class="image-box __100">
|
||||
<image mode="widthFix" src="http://q990.img.aiyichuan.com/urm_huodong/20200527/1590563222690.jpg?imageView2/1/w/400/h/400"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bd">
|
||||
<view class="_top">
|
||||
<view>
|
||||
<view class="title __small" style="-webkit-line-clamp: 2; height: 2.6em;">【蓬江】地道粤菜!138元起购「顺颐居酒家」3-4人套餐!盐焗鹅+生鱼捞起+生炒糯米饭.......</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_btm">
|
||||
<view class="price">
|
||||
<view class="now-price __normal">
|
||||
<view class="symbol">¥</view>
|
||||
<view class="buck">138</view>
|
||||
<view class="qi"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="likes">5586人喜欢</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<navigator class="btn" url="/pages/goodsDetails/goodsDetails?id=795">立即抢购</navigator>
|
||||
<view class="closebtn">
|
||||
<view class="iconfont icon-close2">×</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
250
pages/mall/activeWindow/activeWindow.wxss
Normal file
250
pages/mall/activeWindow/activeWindow.wxss
Normal file
@@ -0,0 +1,250 @@
|
||||
.alert-active {
|
||||
background: rgba(0,0,0,.5);
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.alert-active .inner {
|
||||
height: 74.667vw;
|
||||
left: 50%;
|
||||
margin: 0 auto;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
width: 82.4vw;
|
||||
}
|
||||
|
||||
.content-inner {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.bg {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hotsale-popup {
|
||||
height: 74.667vw;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
width: 82.4vw;
|
||||
}
|
||||
|
||||
.hotsale-popup .bg {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hotsale-popup .countdowns {
|
||||
color: #2a2a2a;
|
||||
font-family: DIN;
|
||||
font-size: 3.2vw;
|
||||
left: 0;
|
||||
line-height: 4.267vw;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
top: 18.667vw;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.countdown {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.hotsale-popup .countdowns .time-item {
|
||||
background-color: #cc5335;
|
||||
border-radius: .533vw;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
display: inline;
|
||||
font-family: DIN;
|
||||
font-size: 3.2vw;
|
||||
height: 8.533vw;
|
||||
line-height: 4.267vw;
|
||||
margin-left: .533vw;
|
||||
margin-right: .533vw;
|
||||
min-width: 8.533vw;
|
||||
padding: 0 .533vw;
|
||||
}
|
||||
|
||||
.separator {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.hotsale-popup .content {
|
||||
top: 27.2vw;
|
||||
width: 74.667vw;
|
||||
}
|
||||
|
||||
.hotsale-popup .btn,.hotsale-popup .content {
|
||||
left: 0;
|
||||
margin: 0 auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.hotsale-popup .btn {
|
||||
bottom: 0;
|
||||
color: #c8484c;
|
||||
font-size: 4vw;
|
||||
height: 12vw;
|
||||
line-height: 12vw;
|
||||
text-align: center;
|
||||
width: 54.133vw;
|
||||
}
|
||||
|
||||
.hotsale-goods {
|
||||
background-color: #fff;
|
||||
border: .533vw solid #c8484c;
|
||||
border-radius: 2.133vw;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
padding: 2.667vw;
|
||||
}
|
||||
|
||||
.hotsale-goods .hd {
|
||||
-webkit-box-flex: 21.333vw;
|
||||
border-radius: 1.067vw;
|
||||
flex: 21.333vw 0 0;
|
||||
margin: 0 2.667vw 0 0;
|
||||
overflow: hidden;
|
||||
width: 21.333vw;
|
||||
}
|
||||
|
||||
.image-box,.image-box.__100 {
|
||||
background-color: #ebebeb;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image-box.__100 {
|
||||
padding-top: 100%;
|
||||
}
|
||||
|
||||
.image-box image {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.hotsale-goods .bd {
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
margin: -.533vw 0 -.8vw;
|
||||
}
|
||||
|
||||
.hotsale-goods .bd,.hotsale-goods .bd ._btm {
|
||||
-webkit-box-pack: justify;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.hotsale-goods .bd,.hotsale-goods .bd ._btm {
|
||||
-ms-flex-pack: justify;
|
||||
}
|
||||
|
||||
.title {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
color: #222;
|
||||
display: -webkit-box;
|
||||
font-size: 3.733vw;
|
||||
height: 2.6em;
|
||||
line-height: 1.4em;
|
||||
margin: 0 0 .2em;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.hotsale-goods .bd ._btm {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.buck,.symbol {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.likes {
|
||||
color: #969696;
|
||||
font-size: 3.2vw;
|
||||
}
|
||||
|
||||
.hotsale-goods .tag {
|
||||
border-radius: .533vw;
|
||||
display: inline-block;
|
||||
font-size: 3.2vw;
|
||||
line-height: 4.8vw;
|
||||
padding: 0 1.333vw;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.hotsale-goods .tip {
|
||||
color: #969696;
|
||||
display: inline-block;
|
||||
font-size: 3.2vw;
|
||||
}
|
||||
|
||||
.hotsale-goods .price {
|
||||
color: #eb5252;
|
||||
display: inline-block;
|
||||
font-size: 3.2vw;
|
||||
}
|
||||
|
||||
.now-price.__normal .buck {
|
||||
display: inline-block;
|
||||
font-size: 4.8vw;
|
||||
}
|
||||
|
||||
.now-price .symbol {
|
||||
display: inline-block;
|
||||
margin: 0 .267vw 0 0;
|
||||
}
|
||||
|
||||
.hotsale-popup .closebtn {
|
||||
border: .4vw solid #f8f8f8;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
font-size: 4vw;
|
||||
height: 8vw;
|
||||
left: 50%;
|
||||
line-height: 8vw;
|
||||
margin: 5.333vw 0 0;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
top: 100%;
|
||||
transform: translateX(-50%);
|
||||
width: 8vw;
|
||||
}
|
||||
|
||||
.icon-close2 {
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
font-size: 7vw;
|
||||
justify-content: center;
|
||||
line-height: 7vw;
|
||||
}
|
||||
8
pages/mall/goodsList/goodsList.js
Normal file
8
pages/mall/goodsList/goodsList.js
Normal file
@@ -0,0 +1,8 @@
|
||||
Component({
|
||||
properties: {
|
||||
list: Array,
|
||||
isdistance: Boolean
|
||||
},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|
||||
4
pages/mall/goodsList/goodsList.json
Normal file
4
pages/mall/goodsList/goodsList.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
40
pages/mall/goodsList/goodsList.wxml
Normal file
40
pages/mall/goodsList/goodsList.wxml
Normal file
@@ -0,0 +1,40 @@
|
||||
<view>
|
||||
<view class="match-wrap">
|
||||
<view class="goods-match">
|
||||
<navigator class="item" hoverClass="hover" url="/pages/goodsDetails/goodsDetails?id={{item.id}}" wx:for="{{list}}" wx:key="index">
|
||||
<view class="hd">
|
||||
<view class="image-box __100">
|
||||
<image lazyLoad="true" 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 class="{{isdistance?'isdistance bd_name':'bd_name'}} ">{{item.name}}</view>
|
||||
<view class="bd_shop" wx:if="{{isdistance}}">
|
||||
<view>{{item.companyname}}</view>
|
||||
<view>{{item.distance}}km</view>
|
||||
</view>
|
||||
<view class="_btm">
|
||||
<view class="_btm_lt">
|
||||
<view class="bd_price">
|
||||
<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>
|
||||
<view class="old" wx:if="{{item.marketprice}}">¥{{item.marketprice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_btm_rt">
|
||||
<view class="bd_btn" wx:if="{{item.stock>0}}">立即抢购</view>
|
||||
<view class="bd_btn issele" wx:if="{{item.stock==0}}">已售罄</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
218
pages/mall/goodsList/goodsList.wxss
Normal file
218
pages/mall/goodsList/goodsList.wxss
Normal file
@@ -0,0 +1,218 @@
|
||||
.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;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.goods-match .hd {
|
||||
-webkit-box-flex: 25.333vw;
|
||||
border-radius: 1.6vw;
|
||||
flex: 25.333vw 0 0;
|
||||
height: 25.333vw;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
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_name.isdistance {
|
||||
-webkit-line-clamp: 2;
|
||||
height: 11vw;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.goods-match .issele {
|
||||
background: #9b9b9b;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.bd_shop {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
color: #9b9b9b;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.2vw;
|
||||
justify-content: space-between;
|
||||
line-height: 4.533vw;
|
||||
margin: 0 0 1.6vw;
|
||||
}
|
||||
235
pages/mall/mall.js
Normal file
235
pages/mall/mall.js
Normal file
@@ -0,0 +1,235 @@
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault"), t = require("../../@babel/runtime/helpers/toConsumableArray"), a = e(require("../../@babel/runtime/regenerator")), n = require("../../@babel/runtime/helpers/slicedToArray"), o = require("../../@babel/runtime/helpers/asyncToGenerator"), r = (getApp(),
|
||||
require("../../utils/login.js"));
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
hotsale: !1,
|
||||
banner: [],
|
||||
customerService: [],
|
||||
recommendedList: [],
|
||||
lists: [],
|
||||
share: {},
|
||||
user: {},
|
||||
tab: "new",
|
||||
tabList: [ {
|
||||
type: "new",
|
||||
name: "最新开抢"
|
||||
}, {
|
||||
type: "hot",
|
||||
name: "热门"
|
||||
}, {
|
||||
type: "shortrange",
|
||||
name: "离我最近"
|
||||
} ],
|
||||
point: {},
|
||||
loading: !1,
|
||||
count: 0,
|
||||
limit: 0,
|
||||
page: 1
|
||||
},
|
||||
onLoad: function(e) {
|
||||
this.pageStart();
|
||||
},
|
||||
onShow: function() {},
|
||||
onPullDownRefresh: function() {
|
||||
this.setData({
|
||||
lists: [],
|
||||
page: 1,
|
||||
loading: !1
|
||||
}), this.pageStart(), wx.stopPullDownRefresh();
|
||||
},
|
||||
onReachBottom: function() {
|
||||
if (this.data.loading) return !1;
|
||||
this.getgoodsList();
|
||||
},
|
||||
onShareAppMessage: function() {},
|
||||
pageStart: function() {
|
||||
this.getData(), this.getgoodsList();
|
||||
},
|
||||
getData: function() {
|
||||
var e = this;
|
||||
return o(a.default.mark(function t() {
|
||||
var o, s;
|
||||
return a.default.wrap(function(t) {
|
||||
for (;;) switch (t.prev = t.next) {
|
||||
case 0:
|
||||
return e, t.prev = 1, t.next = 4, r.request(r.baseUrl + "shop/home", {}, !0);
|
||||
|
||||
case 4:
|
||||
o = t.sent, (s = o.data).recommendedList.forEach(function(e) {
|
||||
var t = e.price.split("."), a = n(t, 2);
|
||||
e.price_buck = a[0], e.price_cent = a[1];
|
||||
}), e.setData({
|
||||
showLoding: !1,
|
||||
banner: s.banner,
|
||||
customerService: s.customerService,
|
||||
recommendedList: s.recommendedList,
|
||||
share: s.share,
|
||||
user: s.user,
|
||||
tabList: s.tab
|
||||
}), t.next = 14;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
t.prev = 10, t.t0 = t.catch(1), console.log(t.t0), e.setData({
|
||||
showLoding: !1
|
||||
});
|
||||
|
||||
case 14:
|
||||
case "end":
|
||||
return t.stop();
|
||||
}
|
||||
}, t, null, [ [ 1, 10 ] ]);
|
||||
}))();
|
||||
},
|
||||
getgoodsList: function(e) {
|
||||
var s = this;
|
||||
return o(a.default.mark(function e() {
|
||||
var o, i, c, u;
|
||||
return a.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
if (o = s, !s.data.loading && 0 != s.data.page) {
|
||||
e.next = 3;
|
||||
break;
|
||||
}
|
||||
return e.abrupt("return", !1);
|
||||
|
||||
case 3:
|
||||
return s.setData({
|
||||
loading: !0
|
||||
}), e.prev = 4, e.next = 7, r.request(r.baseUrl + "shop/home/shopList", {
|
||||
type: s.data.tab,
|
||||
point: {
|
||||
lng: s.longitude,
|
||||
lat: s.latitude
|
||||
},
|
||||
page: s.data.page
|
||||
}, !0);
|
||||
|
||||
case 7:
|
||||
i = e.sent, (c = i.data).data.forEach(function(e) {
|
||||
var t = e.price.split("."), a = n(t, 2);
|
||||
e.price_buck = a[0], e.price_cent = a[1];
|
||||
}), u = c.data.length < c.limit ? 0 : s.data.page + 1, s.setData({
|
||||
loading: !1,
|
||||
lists: [].concat(t(s.data.lists), t(c.data)),
|
||||
count: c.count,
|
||||
page: u,
|
||||
limit: c.limit
|
||||
}), e.next = 18;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
e.prev = 14, e.t0 = e.catch(4), console.log(e.t0), o.setData({
|
||||
loading: !1
|
||||
});
|
||||
|
||||
case 18:
|
||||
case "end":
|
||||
return e.stop();
|
||||
}
|
||||
}, e, null, [ [ 4, 14 ] ]);
|
||||
}))();
|
||||
},
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
changeTab: function(e) {
|
||||
var t = this;
|
||||
return o(a.default.mark(function n() {
|
||||
var o, r;
|
||||
return a.default.wrap(function(a) {
|
||||
for (;;) switch (a.prev = a.next) {
|
||||
case 0:
|
||||
if (o = e.currentTarget.dataset.tab, t, "shortrange" != o) {
|
||||
a.next = 20;
|
||||
break;
|
||||
}
|
||||
return a.prev = 3, a.next = 6, t.getlocation();
|
||||
|
||||
case 6:
|
||||
if (r = a.sent, console.log("result:", r), !r) {
|
||||
a.next = 14;
|
||||
break;
|
||||
}
|
||||
t.latitude = r.latitude, t.longitude = r.longitude, t.setData({
|
||||
tab: o
|
||||
}), a.next = 15;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
return a.abrupt("return", !1);
|
||||
|
||||
case 15:
|
||||
a.next = 20;
|
||||
break;
|
||||
|
||||
case 17:
|
||||
a.prev = 17, a.t0 = a.catch(3), console.log(a.t0);
|
||||
|
||||
case 20:
|
||||
t.setData({
|
||||
tab: o,
|
||||
lists: [],
|
||||
page: 1,
|
||||
loading: !1
|
||||
}), t.getgoodsList();
|
||||
|
||||
case 22:
|
||||
case "end":
|
||||
return a.stop();
|
||||
}
|
||||
}, n, null, [ [ 3, 17 ] ]);
|
||||
}))();
|
||||
},
|
||||
getlocation: function() {
|
||||
var e = this;
|
||||
return new Promise(function(t, a) {
|
||||
wx.getLocation({
|
||||
type: "wgs84",
|
||||
success: function(e) {
|
||||
e.latitude, e.longitude;
|
||||
t(e);
|
||||
},
|
||||
fail: function(a) {
|
||||
wx.showModal({
|
||||
title: "用户未授权",
|
||||
content: "请开启相关权限,以便更好使用小程序哦!",
|
||||
showCancel: !0,
|
||||
success: function(a) {
|
||||
a.confirm ? wx.openSetting({
|
||||
success: function(a) {
|
||||
console.log("authSetting", a), a.authSetting ? wx.chooseLocation({
|
||||
success: function(a) {
|
||||
e.setData({
|
||||
receiver_address: a.name
|
||||
}), "" == a.name ? wx.showToast({
|
||||
title: "未选择位置",
|
||||
icon: "none",
|
||||
duration: 2e3
|
||||
}) : (console.log("res ok ", a), t(a));
|
||||
},
|
||||
fail: function(a) {
|
||||
e.showLocationFail(), t(!1);
|
||||
}
|
||||
}) : (e.showLocationFail(), t(!1));
|
||||
}
|
||||
}) : a.cancel;
|
||||
},
|
||||
fail: function(a) {
|
||||
e.showLocationFail(), t(!1);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
showLocationFail: function() {
|
||||
wx.showToast({
|
||||
title: "位置失败",
|
||||
icon: "none",
|
||||
duration: 1e3
|
||||
});
|
||||
}
|
||||
});
|
||||
12
pages/mall/mall.json
Normal file
12
pages/mall/mall.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"navigationBarBackgroundColor": "#06acb3",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": true,
|
||||
"usingComponents": {
|
||||
"active-window": "./activeWindow/activeWindow",
|
||||
"popular-recommendation": "./popularRecommendation/popularRecommendation",
|
||||
"goods-list": "./goodsList/goodsList",
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
48
pages/mall/mall.wxml
Normal file
48
pages/mall/mall.wxml
Normal file
@@ -0,0 +1,48 @@
|
||||
<view class="mall-container">
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<active-window hotsale="{{hotsale}}"></active-window>
|
||||
<view class="search">
|
||||
<navigator class="hd-search" url="/pages/goodsSearch/goodsSearch">
|
||||
<image src="/img/search.png"></image> 搜索好物</navigator>
|
||||
</view>
|
||||
<view class="page-header">
|
||||
<view class="user-info">
|
||||
<navigator class="not-login" hoverClass="hover" url="/pages/login/login" wx:if="{{user.uid==0}}">
|
||||
<image class="avatar"></image>点击登录 </navigator>
|
||||
<view class="is-login" wx:if="{{user.uid>0}}">
|
||||
<navigator class="l" hoverClass="hover" url="/pages/user/user">
|
||||
<image class="avatar" src="{{user.avatar}}"></image>{{user.nickname||user.username}} </navigator>
|
||||
<navigator class="r" hoverClass="hover" url="/pages/orderList/orderList?tab=all">
|
||||
<view class="num">{{user.ordernum}}</view>
|
||||
<view>订单</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="module-wrap" wx:if="{{banner.length>0}}">
|
||||
<view class="ad-wrap">
|
||||
<view class="list">
|
||||
<swiper>
|
||||
<swiper-item wx:for="{{banner}}" wx:key="index">
|
||||
<view class="item">
|
||||
<navigator class="inner" url="/{{item.link}}">
|
||||
<image src="{{item.image}}"></image>
|
||||
</navigator>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<popular-recommendation list="{{recommendedList}}" wx:if="{{recommendedList.length>0}}"></popular-recommendation>
|
||||
<view class="module-wrap">
|
||||
<view class="recommend-tabs">
|
||||
<view class="item {{tab==item.type?'active':''}}" wx:for="{{tabList}}" wx:key="index">
|
||||
<view bindtap="changeTab" data-tab="{{item.type}}" style="position: relative;">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<goods-list isdistance="{{tab=='shortrange'?true:false}}" list="{{lists}}"></goods-list>
|
||||
<view class="loading" wx:if="{{loading}}">正在加载...</view>
|
||||
<view class="van-list__finished-text" wx:if="{{page==0&&!loading}}">没有更多了</view>
|
||||
</view>
|
||||
</view>
|
||||
198
pages/mall/mall.wxss
Normal file
198
pages/mall/mall.wxss
Normal file
@@ -0,0 +1,198 @@
|
||||
.mall-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
background: #06acb3;
|
||||
}
|
||||
|
||||
.search {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
background: #06acb3;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
left: 0;
|
||||
padding: 2.667vw 4vw;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.hd-search,.search {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.hd-search {
|
||||
-webkit-box-flex: 1;
|
||||
background-color: #fff;
|
||||
border-radius: 8vw;
|
||||
color: #787878;
|
||||
display: inline-flex;
|
||||
flex: 1;
|
||||
font-size: 3.2vw;
|
||||
height: 8vw;
|
||||
justify-content: center;
|
||||
line-height: 8vw;
|
||||
padding: 0 4vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hd-search image {
|
||||
height: 32rpx;
|
||||
margin: 0 1.333vw 0 0;
|
||||
width: 32rpx;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
padding: 4vw;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.user-info .not-login {
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
font-size: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.user-info .avatar {
|
||||
border: 1px solid #fff;
|
||||
border-radius: 50%;
|
||||
flex: 0 0 40px;
|
||||
height: 40px;
|
||||
margin-right: 8px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.user-info .is-login {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.user-info .is-login .l {
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
flex: 1;
|
||||
justify-content: flex-start;
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.user-info .is-login .r {
|
||||
align-items: flex-end;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
font-size: 10px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.user-info .is-login .r .num {
|
||||
font-family: Impact,Haettenschweiler,Arial Narrow Bold,sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.module-wrap {
|
||||
border-color: #f4f4f4;
|
||||
margin: 0 0 2.667vw;
|
||||
padding: 5.333vw 0 0;
|
||||
}
|
||||
|
||||
.ad-wrap {
|
||||
margin: -1.333vw 0 -2.667vw;
|
||||
padding: 0 4vw;
|
||||
}
|
||||
|
||||
.ad-wrap .list1 .item:not(:last-child) {
|
||||
margin: 0 0 2.667vw;
|
||||
}
|
||||
|
||||
.ad-wrap .inner {
|
||||
border-radius: .533vw;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ad-wrap .inner image {
|
||||
display: block;
|
||||
height: 43.49vw;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.recommend-tabs {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-box-align: end;
|
||||
-ms-flex-align: end;
|
||||
align-items: flex-end;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
height: 12.8vw;
|
||||
justify-content: space-between;
|
||||
left: 0;
|
||||
padding: 2.667vw 4vw;
|
||||
position: sticky;
|
||||
top: 13.333vw;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.recommend-tabs .item {
|
||||
color: #4a4a4a;
|
||||
font-size: 4vw;
|
||||
line-height: 6.133vw;
|
||||
padding: 0 2.667vw;
|
||||
position: relative;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
.recommend-tabs .item.active {
|
||||
color: #2a2a2a;
|
||||
font-size: 5.333vw;
|
||||
font-weight: 500;
|
||||
line-height: 7.467vw;
|
||||
}
|
||||
|
||||
.recommend-tabs .item.active:before {
|
||||
background: -webkit-gradient(linear,left top,left bottom,from(#efefef),to(#f8864a));
|
||||
background: linear-gradient(180deg,#efefef,#f8864a);
|
||||
border-radius: 1.067vw;
|
||||
bottom: 1.067vw;
|
||||
content: "";
|
||||
height: 1.067vw;
|
||||
left: 2.667vw;
|
||||
position: absolute;
|
||||
right: 2.667vw;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.loading,.van-list__error-text,.van-list__finished-text,.van-list__loading,.van-pull-refresh__head {
|
||||
background: #fafafa;
|
||||
color: #969799;
|
||||
font-size: 14px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
swiper {
|
||||
height: 43.49vw;
|
||||
width: 100%;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
Component({
|
||||
properties: {
|
||||
list: Array
|
||||
},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
53
pages/mall/popularRecommendation/popularRecommendation.wxml
Normal file
53
pages/mall/popularRecommendation/popularRecommendation.wxml
Normal file
@@ -0,0 +1,53 @@
|
||||
<view class="module-wrap">
|
||||
<view class="m-title">
|
||||
<view class="hd">
|
||||
<view class="hd_name">爆款推荐</view>
|
||||
</view>
|
||||
<view class="bd"></view>
|
||||
<view class="fd"></view>
|
||||
</view>
|
||||
<view class="big-list">
|
||||
<view class="item" wx:for="{{list}}" wx:key="index">
|
||||
<navigator class="big-item" hoverClass="hover" url="/pages/goodsDetails/goodsDetails?id={{item.id}}">
|
||||
<view class="hd">
|
||||
<view class="image-box __56">
|
||||
<image lazy="loaded" src="{{item.image}}"></image>
|
||||
</view>
|
||||
<view class="issaled" wx:if="{{item.stock==0}}">
|
||||
<image src="/img/issaled.png"></image>
|
||||
</view>
|
||||
<view class="hd_sale">已售 {{item.num_buy}}</view>
|
||||
</view>
|
||||
<view class="bd">
|
||||
<view style="overflow: hidden;">
|
||||
<view class="title __normal" style="-webkit-line-clamp: 2;">{{item.name}}</view>
|
||||
</view>
|
||||
<view class="__flex">
|
||||
<view class="bd_price">
|
||||
<view class="now-price __large">
|
||||
<view class="symbol">¥</view>
|
||||
<view class="buck">{{item.price_buck}}.</view>
|
||||
<view class="cent">{{item.price_cent}}</view>
|
||||
<view class="qi"></view>
|
||||
</view>
|
||||
<view class="old-price" style="margin: 0px 0px 0px 8px;" wx:if="{{item.marketprice}}">¥{{item.marketprice}}</view>
|
||||
<view style="margin: 0px 0px 0px 10px;" wx:if="{{item.discount}}">
|
||||
<view class="list-discount">
|
||||
<view class="hd">
|
||||
<view class="tri"></view>
|
||||
</view>
|
||||
<view class="bd">
|
||||
<view class="num">{{item.discount}}</view>折 </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<button class="button __large" wx:if="{{item.stock>0}}">立即购买</button>
|
||||
<button class="button __large issele" wx:if="{{item.stock==0}}">已售罄</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
306
pages/mall/popularRecommendation/popularRecommendation.wxss
Normal file
306
pages/mall/popularRecommendation/popularRecommendation.wxss
Normal file
@@ -0,0 +1,306 @@
|
||||
.module-wrap {
|
||||
border-color: #f4f4f4;
|
||||
margin: 0 0 2.667vw;
|
||||
padding: 5.333vw 0 0;
|
||||
}
|
||||
|
||||
.m-title {
|
||||
-webkit-box-align: end;
|
||||
-ms-flex-align: end;
|
||||
align-items: flex-end;
|
||||
color: #2a2a2a;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.2vw;
|
||||
line-height: 1;
|
||||
padding: 0 4vw 5.333vw;
|
||||
}
|
||||
|
||||
.m-title .hd_name {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
display: -webkit-box;
|
||||
font-size: 5.333vw;
|
||||
font-weight: 500;
|
||||
height: 1.2em;
|
||||
line-height: 1.2em;
|
||||
margin: -.1em 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.m-title .bd {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
padding: 0 2.667vw;
|
||||
}
|
||||
|
||||
.m-title .fd {
|
||||
-ms-flex-negative: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.m-title .fd_more {
|
||||
color: #aaa;
|
||||
margin: -2.667vw 0;
|
||||
padding: 2.667vw 0;
|
||||
}
|
||||
|
||||
.big-list {
|
||||
padding: 0 4vw;
|
||||
}
|
||||
|
||||
.big-list .item:not(:last-child) {
|
||||
margin: 0 0 4.8vw;
|
||||
}
|
||||
|
||||
.big-item {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.big-item .hd {
|
||||
border-radius: 1.333vw;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image-box.__56 {
|
||||
padding-top: 56.25%;
|
||||
}
|
||||
|
||||
.image-box {
|
||||
background-color: #ebebeb;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image-box image {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.big-item .hd_sale {
|
||||
background-color: rgba(0,0,0,.5);
|
||||
border-radius: 0 3.2vw 0 0;
|
||||
bottom: 0;
|
||||
color: #fff;
|
||||
font-size: 3.2vw;
|
||||
height: 5.867vw;
|
||||
left: 0;
|
||||
line-height: 5.867vw;
|
||||
padding: 0 2.133vw;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.big-item .bd {
|
||||
padding: 2.133vw 0 0;
|
||||
}
|
||||
|
||||
.big-item .bd_shop {
|
||||
color: #9b9b9b;
|
||||
font-size: 3.2vw;
|
||||
line-height: 4.533vw;
|
||||
margin: 0 0 1.6vw;
|
||||
}
|
||||
|
||||
.title.__normal {
|
||||
font-size: 4vw;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.big-item .bd .__flex,.big-item .bd_shop {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.big-item .bd .__flex {
|
||||
-webkit-box-align: end;
|
||||
-ms-flex-align: end;
|
||||
align-items: flex-end;
|
||||
line-height: 1;
|
||||
margin: .8vw 0 0;
|
||||
}
|
||||
|
||||
.vip-price-wrap {
|
||||
height: 3.467vw;
|
||||
}
|
||||
|
||||
.vip-price {
|
||||
align-items: center;
|
||||
background-color: #d7bc9f;
|
||||
border-radius: 3.467vw;
|
||||
color: #3d342d;
|
||||
display: flex;
|
||||
font-size: 2.667vw;
|
||||
height: inherit;
|
||||
line-height: 3.467vw;
|
||||
overflow: hidden;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.vip-price .hd {
|
||||
background-color: #40322f;
|
||||
border-radius: 0;
|
||||
color: #d7bc9f;
|
||||
display: inline-block;
|
||||
padding: 0 .8vw;
|
||||
}
|
||||
|
||||
.vip-price .bd {
|
||||
display: inline-block;
|
||||
padding: 0 1.867vw;
|
||||
}
|
||||
|
||||
.big-item .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.__large {
|
||||
display: inline;
|
||||
font-size: 3.467vw;
|
||||
}
|
||||
|
||||
.now-price {
|
||||
color: #eb5252;
|
||||
font-family: DIN;
|
||||
font-size: 3.2vw;
|
||||
line-height: 1.75em;
|
||||
}
|
||||
|
||||
.now-price>view {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.now-price.__large .buck {
|
||||
font-size: 5.333vw;
|
||||
}
|
||||
|
||||
.old-price {
|
||||
color: #9b9b9b;
|
||||
display: inline;
|
||||
font-family: DIN;
|
||||
font-size: 3.2vw;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.list-discount {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
font-size: 2.667vw;
|
||||
height: 4.267vw;
|
||||
line-height: 4.267vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.list-discount .hd {
|
||||
border-radius: 0;
|
||||
height: 4.267vw;
|
||||
width: 2.4vw;
|
||||
}
|
||||
|
||||
.list-discount .tri {
|
||||
background-color: #06acb3;
|
||||
height: 4.267vw;
|
||||
transform: translateY(50%) rotate(-45deg);
|
||||
transform-origin: 0 0;
|
||||
width: 4.267vw;
|
||||
}
|
||||
|
||||
.list-discount .bd {
|
||||
background-color: #06acb3;
|
||||
border-radius: 0 .533vw .533vw 0;
|
||||
color: #fff;
|
||||
padding: 0 .533vw 0 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.list-discount .num {
|
||||
display: inline;
|
||||
font-family: DIN;
|
||||
font-size: 2.933vw;
|
||||
}
|
||||
|
||||
.button.__large {
|
||||
height: 7.467vw;
|
||||
min-width: 18.667vw;
|
||||
}
|
||||
|
||||
.button {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
background-color: #06acb3;
|
||||
border-radius: 6.667vw;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
font-size: 3.2vw;
|
||||
padding: 0 1.6vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.button,.issaled {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.issaled {
|
||||
background: rgba(0,0,0,.4);
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.issaled image {
|
||||
height: 120px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.issele {
|
||||
background: #9b9b9b;
|
||||
}
|
||||
|
||||
.hover {
|
||||
background: transparent;
|
||||
}
|
||||
164
pages/map/map.js
Normal file
164
pages/map/map.js
Normal file
@@ -0,0 +1,164 @@
|
||||
var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), e = require("../../@babel/runtime/helpers/asyncToGenerator"), o = getApp(), a = require("../../utils/login.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
markers: [],
|
||||
longitude: null,
|
||||
latitude: null,
|
||||
weather: {},
|
||||
totop: !1,
|
||||
shop: {},
|
||||
showshop: !1,
|
||||
zoomsize: 14,
|
||||
showLocation: !0
|
||||
},
|
||||
onLoad: function(t) {
|
||||
var e = this;
|
||||
wx.showLoading({
|
||||
title: ""
|
||||
}), a.pageStart(o).then(function(t) {
|
||||
e.getuserLocation();
|
||||
});
|
||||
},
|
||||
getuserLocation: function() {
|
||||
var o = this;
|
||||
return e(t.default.mark(function e() {
|
||||
var a;
|
||||
return t.default.wrap(function(t) {
|
||||
for (;;) switch (t.prev = t.next) {
|
||||
case 0:
|
||||
return t.next = 2, o.getlocation();
|
||||
|
||||
case 2:
|
||||
a = t.sent, console.log("result:", a), a && (o.latitude = a.latitude, o.longitude = a.longitude),
|
||||
o.getData();
|
||||
|
||||
case 6:
|
||||
case "end":
|
||||
return t.stop();
|
||||
}
|
||||
}, e);
|
||||
}))();
|
||||
},
|
||||
latitude: null,
|
||||
longitude: null,
|
||||
onShareAppMessage: function() {},
|
||||
tolocation: function() {
|
||||
var t = wx.createMapContext("map");
|
||||
console.log("moveToLocation"), t.moveToLocation({
|
||||
success: function(t) {
|
||||
console.log(t);
|
||||
},
|
||||
fail: function(t) {
|
||||
wx.showModal({
|
||||
title: "用户未授权",
|
||||
content: "请开启相关权限,以便更好使用小程序哦!",
|
||||
showCancel: !0,
|
||||
success: function(t) {
|
||||
t.confirm ? wx.openSetting({
|
||||
success: function(t) {
|
||||
console.log("authSetting", t), t.authSetting || that.showLocationFail();
|
||||
}
|
||||
}) : t.cancel;
|
||||
},
|
||||
fail: function(t) {
|
||||
that.showLocationFail();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
clickMaker: function(t) {
|
||||
wx.openLocation({
|
||||
latitude: latitude,
|
||||
longitude: longitude,
|
||||
scale: 18
|
||||
});
|
||||
},
|
||||
callUs: function() {
|
||||
if (!o.globalData.servicetel) return !1;
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: "" + o.globalData.servicetel
|
||||
});
|
||||
},
|
||||
getData: function() {
|
||||
var t = this;
|
||||
a.request(o.globalData.config.map, {
|
||||
longitude: this.longitude,
|
||||
latitude: this.latitude
|
||||
}).then(function(e) {
|
||||
wx.hideLoading(), 200 == e.code ? (e.data.list.forEach(function(t, e) {
|
||||
t.id = e, t.width = 32, t.height = 32, t.latitude = 1 * t.latitude, t.longitude = 1 * t.longitude,
|
||||
t.iconPath = "/img/location-blue.png", t.callout = {
|
||||
content: t.t_name
|
||||
};
|
||||
}), t.setData({
|
||||
weather: e.data.weather,
|
||||
markers: e.data.list,
|
||||
longitude: 1 * e.data.longitude,
|
||||
latitude: 1 * e.data.latitude,
|
||||
zoomsize: e.data.zoomsize
|
||||
})) : wx.showModal({
|
||||
title: "提示",
|
||||
content: e.message,
|
||||
confirmColor: "#EF8176",
|
||||
cancelColor: "#999999"
|
||||
});
|
||||
}).catch(function(t) {
|
||||
wx.hideLoading();
|
||||
});
|
||||
},
|
||||
bindmarkertap: function(t) {
|
||||
console.log(t);
|
||||
this.data.markers.forEach(function(t) {
|
||||
t.iconPath = "/img/location-blue.png";
|
||||
});
|
||||
for (var e = 0; e < this.data.markers.length; e++) if (this.data.markers[e].id == t.detail.markerId) {
|
||||
console.log(e), this.data.markers[e].iconPath = "/img/location-red.png", this.data.markers[e].width = 50,
|
||||
this.data.markers[e].height = 50, this.setData({
|
||||
shop: Object.assign({}, this.data.markers[e]),
|
||||
showshop: !0
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
closeshop: function() {
|
||||
this.setData({
|
||||
showshop: !1
|
||||
});
|
||||
},
|
||||
changeTop: function() {
|
||||
this.setData({
|
||||
totop: !this.data.totop
|
||||
});
|
||||
},
|
||||
getlocation: function() {
|
||||
return new Promise(function(t, e) {
|
||||
wx.getLocation({
|
||||
type: "wgs84",
|
||||
success: function(e) {
|
||||
e.latitude, e.longitude;
|
||||
t(e);
|
||||
},
|
||||
fail: function(e) {
|
||||
t();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
showLocationFail: function() {
|
||||
wx.showToast({
|
||||
title: "位置失败",
|
||||
icon: "none",
|
||||
duration: 1e3
|
||||
});
|
||||
},
|
||||
toMap: function() {
|
||||
wx.openLocation({
|
||||
latitude: this.data.shop.latitude,
|
||||
longitude: this.data.shop.longitude,
|
||||
name: this.data.shop.t_name,
|
||||
address: this.data.shop.address
|
||||
});
|
||||
}
|
||||
});
|
||||
10
pages/map/map.json
Normal file
10
pages/map/map.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"navigationBarBackgroundColor": "#4cadf1",
|
||||
"navigationBarTextStyle": "white",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
50
pages/map/map.wxml
Normal file
50
pages/map/map.wxml
Normal file
@@ -0,0 +1,50 @@
|
||||
<view>
|
||||
<cover-view class="weather">
|
||||
<cover-view class="{{totop?'totop inner':'inner'}}">
|
||||
<cover-view class="blue-bg">
|
||||
<cover-image class="sun" mode="widthFix" src="/img/sun.jpeg"></cover-image>
|
||||
<cover-view class="inner-text">
|
||||
<cover-view class="air_tips">{{weather.air_tips}}</cover-view>
|
||||
<cover-view class="wea">
|
||||
<cover-view class="temp">{{weather.tem}}℃</cover-view>
|
||||
<cover-view class="text">{{weather.wea}}</cover-view>
|
||||
</cover-view>
|
||||
<cover-view class="intro">
|
||||
<cover-view class="l"> 天气:{{weather.tem2}}~{{weather.tem1}}℃ {{weather.wea}} </cover-view>
|
||||
<cover-view class="r">{{weather.city}}</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<cover-view class="bottom">
|
||||
<cover-view bindtap="changeTop" class="top">
|
||||
<cover-image src="/img/top.png"></cover-image>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<cover-view class="{{showshop?'showshop shop':'shop'}}">
|
||||
<cover-view class="name">{{shop.t_name}}</cover-view>
|
||||
<cover-view class="border"></cover-view>
|
||||
<cover-view class="add">
|
||||
<cover-view class="l">
|
||||
<cover-image class="location" src="/img/location-blue.png"></cover-image>
|
||||
<cover-view class="text">{{shop.address}}</cover-view>
|
||||
</cover-view>
|
||||
<cover-view bindtap="toMap" class="r" wx:if="{{shop.distance}}"> {{shop.distance}}kw<cover-image class="right" src="/img/right.png"></cover-image>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
<cover-view class="border"></cover-view>
|
||||
<cover-view bindtap="toMap" class="tomap">导航</cover-view>
|
||||
</cover-view>
|
||||
<view class="map">
|
||||
<map bindmarkertap="bindmarkertap" bindtap="closeshop" id="map" latitude="{{latitude}}" longitude="{{longitude}}" markers="{{markers}}" scale="{{zoomsize}}" showLocation="{{showLocation}}"></map>
|
||||
<cover-view class="custom-btn">
|
||||
<cover-view bindtap="callUs" class="btn">
|
||||
<cover-image class="img" src="/img/service.png"></cover-image>
|
||||
</cover-view>
|
||||
<cover-view bindtap="tolocation" class="btn">
|
||||
<cover-image class="img" src="/img/local.png"></cover-image>
|
||||
</cover-view>
|
||||
</cover-view>
|
||||
</view>
|
||||
</view>
|
||||
235
pages/map/map.wxss
Normal file
235
pages/map/map.wxss
Normal file
@@ -0,0 +1,235 @@
|
||||
.map {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.custom-btn {
|
||||
bottom: 200rpx;
|
||||
left: 20rpx;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.custom-btn .btn {
|
||||
background: #fff;
|
||||
border: 2rpx solid #e4e4e4;
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
font-size: 44rpx;
|
||||
height: 88rpx;
|
||||
line-height: 84rpx;
|
||||
margin-bottom: 28rpx;
|
||||
text-align: center;
|
||||
width: 88rpx;
|
||||
z-index: 130;
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
color: #333;
|
||||
font-size: 48rpx;
|
||||
}
|
||||
|
||||
.circle {
|
||||
border: 2rpx solid #333;
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
height: 40rpx;
|
||||
margin: 22rpx;
|
||||
width: 40rpx;
|
||||
}
|
||||
|
||||
.circle-s {
|
||||
height: 16rpx;
|
||||
margin: 10rpx;
|
||||
width: 16rpx;
|
||||
}
|
||||
|
||||
.btn .img {
|
||||
display: block;
|
||||
height: 40rpx;
|
||||
margin: 22rpx;
|
||||
width: 40rpx;
|
||||
}
|
||||
|
||||
map {
|
||||
height: 100vh;
|
||||
width: 100vw;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.weather {
|
||||
left: 0;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.blue-bg,.weather {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.blue-bg {
|
||||
background: #4cadf1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.inner-text {
|
||||
padding: 70px 20px 10px;
|
||||
position: relative;
|
||||
z-index: 8;
|
||||
}
|
||||
|
||||
.sun {
|
||||
height: 174px;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.air_tips {
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
overflow: hidden;
|
||||
padding: 0 20px;
|
||||
text-align: center;
|
||||
text-overflow: ellipsis;
|
||||
white-space: pre-wrap;
|
||||
white-space: nowrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.wea {
|
||||
color: #333;
|
||||
padding: 10px 0 4px;
|
||||
}
|
||||
|
||||
.wea .temp {
|
||||
display: inline-block;
|
||||
font-size: 44px;
|
||||
font-weight: 200;
|
||||
line-height: 44px;
|
||||
margin-right: 4px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.wea .text {
|
||||
display: inline;
|
||||
font-size: 14px;
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.intro {
|
||||
align-items: center;
|
||||
color: #333;
|
||||
display: flex;
|
||||
font-size: 13px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
position: relative;
|
||||
top: -24px;
|
||||
}
|
||||
|
||||
.top {
|
||||
background: #a2cefb;
|
||||
border-radius: 50%;
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.top,.top image {
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
}
|
||||
|
||||
.inner {
|
||||
position: relative;
|
||||
transition: all .3s;
|
||||
}
|
||||
|
||||
.inner.totop {
|
||||
top: -144px;
|
||||
}
|
||||
|
||||
.inner.totop .bottom {
|
||||
top: 0;
|
||||
transform: rotateZ(180deg);
|
||||
}
|
||||
|
||||
.shop {
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
left: 5vw;
|
||||
position: fixed;
|
||||
top: -900px;
|
||||
width: 90vw;
|
||||
z-index: 102;
|
||||
}
|
||||
|
||||
.shop.showshop {
|
||||
top: 90px;
|
||||
}
|
||||
|
||||
.shop .name {
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.border {
|
||||
background: #f2f2f2;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.shop .add {
|
||||
color: #666;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
justify-content: space-between;
|
||||
line-height: 1.5;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.shop .add,.shop .add .l {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.shop .add .l {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.shop .add .text {
|
||||
line-height: 1.5;
|
||||
max-width: 50vw;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.shop .add .location {
|
||||
display: inline-block;
|
||||
height: 14px;
|
||||
margin-right: 3px;
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
.shop .add .r {
|
||||
align-items: center;
|
||||
color: #4cadf1;
|
||||
}
|
||||
|
||||
.shop .add .right {
|
||||
display: inline-block;
|
||||
height: 12px;
|
||||
margin-left: 3px;
|
||||
width: 12px;
|
||||
}
|
||||
|
||||
.shop .tomap {
|
||||
color: #4cadf1;
|
||||
padding: 20px 0;
|
||||
text-align: center;
|
||||
}
|
||||
132
pages/myAddress/myAddress.js
Normal file
132
pages/myAddress/myAddress.js
Normal file
@@ -0,0 +1,132 @@
|
||||
var t = getApp(), a = require("../../utils/login.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
loading: !1,
|
||||
data: [],
|
||||
show: "index",
|
||||
isdefault: 0,
|
||||
region: [],
|
||||
info: {
|
||||
cityname: null,
|
||||
countryname: null,
|
||||
detailinfo: null,
|
||||
provincename: null,
|
||||
telnumber: null,
|
||||
username: null
|
||||
},
|
||||
issubmit: !1,
|
||||
show_comfirm: {
|
||||
show: !1,
|
||||
tips: ""
|
||||
},
|
||||
uniqid: "",
|
||||
selectAddressUniqid: ""
|
||||
},
|
||||
onLoad: function(i) {
|
||||
var e = this;
|
||||
wx.showLoading({
|
||||
title: ""
|
||||
}), this.setData({
|
||||
selectAddressUniqid: i.selectAddressUniqid || ""
|
||||
}), a.pageStart(t).then(function(t) {
|
||||
e.getData();
|
||||
});
|
||||
},
|
||||
onShow: function() {
|
||||
this.istoEdit && (this.istoEdit = !1, this.getData());
|
||||
},
|
||||
onShareAppMessage: function() {},
|
||||
istoEdit: !1,
|
||||
getData: function() {
|
||||
var i = this;
|
||||
if (this.data.loading) return !1;
|
||||
this.setData({
|
||||
loading: !0
|
||||
}), a.request(t.globalData.config.address.init, {}).then(function(t) {
|
||||
wx.hideLoading(), i.setData({
|
||||
data: t.data,
|
||||
loading: !1,
|
||||
showLoding: !1
|
||||
});
|
||||
}).catch(function(t) {
|
||||
wx.hideLoading(), i.setData({
|
||||
loading: !1
|
||||
});
|
||||
});
|
||||
},
|
||||
openEdit: function(t) {
|
||||
var a = t.currentTarget.dataset.uniqid || "";
|
||||
return t.currentTarget.dataset.index || 0, this.data.show = a ? "edit" : "add",
|
||||
wx.navigateTo({
|
||||
url: "/pages/addAddress/addAddress?id=" + a
|
||||
}), this.istoEdit = !0, !1;
|
||||
},
|
||||
select: function(t) {
|
||||
return console.log("select"), !1;
|
||||
},
|
||||
delAddress: function(i) {
|
||||
if (this.data.issubmit) return !1;
|
||||
var e = i.currentTarget.dataset, n = e.id, s = e.index, o = this;
|
||||
wx.showModal({
|
||||
title: "是否删除该地址?",
|
||||
content: "",
|
||||
confirmColor: "#EF8176",
|
||||
cancelColor: "#999999",
|
||||
success: function(i) {
|
||||
i.confirm && a.request(t.globalData.config.address.delete, {
|
||||
id: n
|
||||
}).then(function(t) {
|
||||
o.setData({
|
||||
issubmit: !1
|
||||
}), 200 == t.code ? (wx.showToast({
|
||||
title: "删除成功"
|
||||
}), o.data.data.splice(s, 1), o.setData({
|
||||
data: o.data.data
|
||||
})) : wx.showModal({
|
||||
title: "提示",
|
||||
content: t.message,
|
||||
confirmColor: "#EF8176",
|
||||
cancelColor: "#999999"
|
||||
});
|
||||
}).catch(function(t) {
|
||||
o.setData({
|
||||
issubmit: !1
|
||||
});
|
||||
});
|
||||
},
|
||||
fail: function(t) {
|
||||
console.log("fail"), o.setData({
|
||||
issubmit: !0
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
setDefault: function(i) {
|
||||
var e = i.currentTarget.dataset, n = e.id, s = e.index;
|
||||
if (e.isdefault) return !1;
|
||||
wx.showLoading({
|
||||
title: ""
|
||||
});
|
||||
var o = this;
|
||||
a.request(t.globalData.config.address.default, {
|
||||
id: n
|
||||
}).then(function(t) {
|
||||
200 == t.code ? (wx.hideLoading(), o.data.data.map(function(t) {
|
||||
t.isdefault = 0;
|
||||
}), o.data.data[s].isdefault = 1, o.setData({
|
||||
data: o.data.data
|
||||
}), wx.showToast({
|
||||
title: t.message
|
||||
})) : wx.showModal({
|
||||
title: "提示",
|
||||
content: t.message,
|
||||
confirmColor: "#EF8176",
|
||||
cancelColor: "#999999"
|
||||
});
|
||||
}).catch(function(t) {
|
||||
wx.hideLoading();
|
||||
});
|
||||
}
|
||||
});
|
||||
9
pages/myAddress/myAddress.json
Normal file
9
pages/myAddress/myAddress.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"service-tel": "../../template/serviceTel/serviceTel",
|
||||
"my-money": "../../template/myMoney/myMoney",
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
27
pages/myAddress/myAddress.wxml
Normal file
27
pages/myAddress/myAddress.wxml
Normal file
@@ -0,0 +1,27 @@
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view class="{{types=='voucher'?'container voucher-container':'container'}}">
|
||||
<view class="list-box">
|
||||
<view catchtap="select" class="item" data-id="{{item.id}}" data-index="{{index}}" wx:for="{{data}}" wx:key="index">
|
||||
<view class="text">
|
||||
<view class="name">{{item.username}},{{item.telnumber}}</view>
|
||||
<view class="address"> {{item.provincename+item.cityname+item.countryname+' '+item.detailinfo}} </view>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<view catchtap="setDefault" class="btn" data-id="{{item.id}}" data-index="{{index}}" data-isdefault="{{item.isdefault}}">
|
||||
<icon color="#ff6600" size="18" type="success" wx:if="{{item.isdefault}}"></icon>
|
||||
<view class="icon" wx:if="{{!item.isdefault}}"></view> 设为默认 </view>
|
||||
<view class="r">
|
||||
<view catchtap="openEdit" class="btn" data-uniqid="{{item.id}}">
|
||||
<image src="/img/edit.png"></image> 编辑 </view>
|
||||
<view catchtap="delAddress" class="btn" data-id="{{item.id}}" data-index="{{index}}">
|
||||
<image src="/img/delete.png"></image> 删除 </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="no-content" wx:if="{{data.length==0&&!loading}}">
|
||||
<image src="/img/nocontent.png"></image>
|
||||
<view>赶紧新增地址吧</view>
|
||||
</view>
|
||||
<view bindtap="openEdit" class="scan-btn"> 新增地址 </view>
|
||||
</view>
|
||||
82
pages/myAddress/myAddress.wxss
Normal file
82
pages/myAddress/myAddress.wxss
Normal file
@@ -0,0 +1,82 @@
|
||||
.container {
|
||||
background: #fafafa;
|
||||
box-sizing: border-box;
|
||||
min-height: 100vh;
|
||||
padding: 0rpx 0 170rpx;
|
||||
}
|
||||
|
||||
.list-box {
|
||||
padding: 40rpx 27rpx 0rpx;
|
||||
}
|
||||
|
||||
.item {
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #eee;
|
||||
display: block;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10rpx;
|
||||
padding: 18rpx 18rpx 0;
|
||||
}
|
||||
|
||||
.item .name {
|
||||
color: #666;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.item .address {
|
||||
color: #999;
|
||||
font-size: 22rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.item .text {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.item .btn {
|
||||
align-items: center;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.item .btn image {
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
border-top: 1px solid #eee;
|
||||
display: flex;
|
||||
font-size: 26rpx;
|
||||
justify-content: space-between;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.footer .icon,.footer icon,.footer image {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.footer .icon {
|
||||
border: 1px solid #999;
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
flex: 0 0 18px;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
.footer .icon,.footer .r {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.footer .r {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.footer .r .btn {
|
||||
padding: 20rpx 0 20rpx 40rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
15
pages/myDiscount/myDiscount.js
Normal file
15
pages/myDiscount/myDiscount.js
Normal file
@@ -0,0 +1,15 @@
|
||||
Page({
|
||||
data: {},
|
||||
onLoad: function(n) {
|
||||
wx.showModal({
|
||||
title: "开发中~"
|
||||
});
|
||||
},
|
||||
onReady: function() {},
|
||||
onShow: function() {},
|
||||
onHide: function() {},
|
||||
onUnload: function() {},
|
||||
onPullDownRefresh: function() {},
|
||||
onReachBottom: function() {},
|
||||
onShareAppMessage: function() {}
|
||||
});
|
||||
6
pages/myDiscount/myDiscount.json
Normal file
6
pages/myDiscount/myDiscount.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
},
|
||||
"navigationBarTitleText": "聚美汽服"
|
||||
}
|
||||
1
pages/myDiscount/myDiscount.wxml
Normal file
1
pages/myDiscount/myDiscount.wxml
Normal file
@@ -0,0 +1 @@
|
||||
<view></view>
|
||||
0
pages/myDiscount/myDiscount.wxss
Normal file
0
pages/myDiscount/myDiscount.wxss
Normal file
83
pages/orderDetails/orderDetails.js
Normal file
83
pages/orderDetails/orderDetails.js
Normal file
@@ -0,0 +1,83 @@
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/asyncToGenerator"), t = (getApp(),
|
||||
require("../../utils/login.js")), a = require("../../utils/common.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
orderid: "",
|
||||
verificationQrcode: {},
|
||||
orderData: {},
|
||||
ordercart: [],
|
||||
token: "",
|
||||
orderValidity: [],
|
||||
purchasenotes: "",
|
||||
contentHidden: !0,
|
||||
orderVerification: []
|
||||
},
|
||||
onLoad: function(e) {
|
||||
this.setData({
|
||||
orderid: e.orderid || ""
|
||||
}), this.getOrderDetail();
|
||||
},
|
||||
getOrderDetail: function() {
|
||||
var i = this;
|
||||
return r(e.default.mark(function r() {
|
||||
var o, n, d, c;
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
return i, o = i.data.orderid, e.prev = 2, e.next = 5, t.request(t.baseUrl + "shop/order/detail", {
|
||||
orderid: o
|
||||
}, !0);
|
||||
|
||||
case 5:
|
||||
if (n = e.sent, (d = n.data).orderData.updatetime = a.changeTime(new Date(1e3 * d.orderData.updatetime)),
|
||||
d.orderValidity && d.orderValidity.length > 0) for (c = 0; c < d.orderValidity.length; c++) i.data.orderValidity[c] = a.changeTime(new Date(1e3 * d.orderValidity[c]));
|
||||
i.setData({
|
||||
showLoding: !1,
|
||||
companyList: d.companyList,
|
||||
orderData: d.orderData,
|
||||
token: d.token,
|
||||
ordercart: d.ordercart,
|
||||
verificationQrcode: d.verificationQrcode,
|
||||
orderValidity: i.data.orderValidity,
|
||||
purchasenotes: d.purchasenotes,
|
||||
orderVerification: d.orderVerification
|
||||
}), e.next = 15;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
e.prev = 12, e.t0 = e.catch(2), console.log(e.t0);
|
||||
|
||||
case 15:
|
||||
case "end":
|
||||
return e.stop();
|
||||
}
|
||||
}, r, null, [ [ 2, 12 ] ]);
|
||||
}))();
|
||||
},
|
||||
call: function(e) {
|
||||
var r = e.currentTarget.dataset.tel;
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: r
|
||||
});
|
||||
},
|
||||
toMap: function(e) {
|
||||
var r = e.currentTarget.dataset, t = r.latitude, a = r.longitude;
|
||||
wx.openLocation({
|
||||
latitude: t,
|
||||
longitude: a
|
||||
});
|
||||
},
|
||||
showcontentHidden: function() {
|
||||
this.setData({
|
||||
contentHidden: !1
|
||||
});
|
||||
},
|
||||
copy: function(e) {
|
||||
var r = e.currentTarget.dataset.code;
|
||||
wx.setClipboardData({
|
||||
data: r
|
||||
});
|
||||
}
|
||||
});
|
||||
6
pages/orderDetails/orderDetails.json
Normal file
6
pages/orderDetails/orderDetails.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"usingComponents": {
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
88
pages/orderDetails/orderDetails.wxml
Normal file
88
pages/orderDetails/orderDetails.wxml
Normal file
@@ -0,0 +1,88 @@
|
||||
<view class="charge-off">
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view class="coupon__box">
|
||||
<navigator class="coupon__box__title" url="/pages/goodsDetails/goodsDetails?id={{ordercart[0].id}}">{{ordercart[0].shop.name}}</navigator>
|
||||
<view class="coupon__box__split"></view>
|
||||
<view class="coupon__box__qrcode">
|
||||
<view class="qrcode-area">
|
||||
<view class="{{verificationQrcode.status==1?'img':'img gray'}}" id="qrcode">
|
||||
<image alt="Scan me!" mode="widthFix" src="{{verificationQrcode.image}}"></image>
|
||||
</view>
|
||||
<view class="txt" wx:if="{{verificationQrcode.status!=1}}">不可使用</view>
|
||||
</view>
|
||||
<view class="tips">请将此二维码展示给商家核销</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box">
|
||||
<view class="tips">
|
||||
<view>核销码 <view class="til">点击核销码可复制</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view bindtap="copy" class="box-items" data-code="{{item.code}}" wx:for="{{orderVerification}}">
|
||||
<view class="item__bd">
|
||||
<view class="line"></view>
|
||||
<view class="code">{{item.code}}</view>
|
||||
<view class="name">{{item.name}}</view>
|
||||
<view class="merchant">
|
||||
<image class="shop" src="/img/shop.png"></image>{{item.merchantname}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box">
|
||||
<view class="tips">
|
||||
<view>订单总价:</view>
|
||||
<view class="right">¥{{orderData.total_price}} </view>
|
||||
</view>
|
||||
<view class="box-items">
|
||||
<view class="item__bd">
|
||||
<view class="line">
|
||||
<view class="info">姓名:{{orderData.recipient_name}}</view>
|
||||
</view>
|
||||
<view class="line">
|
||||
<view class="info">支付时间:{{orderData.updatetime}}</view>
|
||||
</view>
|
||||
<view class="line">
|
||||
<view class="info">订单号:{{orderData.orderid}}</view>
|
||||
</view>
|
||||
<view class="line">
|
||||
<view class="info">有效期:{{orderValidity[0]}} 至 {{orderValidity[1]}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box">
|
||||
<view class="tips">
|
||||
<view>商家信息:</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="box-items" wx:for="{{companyList}}" wx:key="index">
|
||||
<view class="item__tips">{{item.name}}</view>
|
||||
<view class="item__bd">
|
||||
<view class="line">
|
||||
<view class="info">营业时间:{{item.businesshours}}</view>
|
||||
</view>
|
||||
<view class="line">
|
||||
<view class="info">商家电话:{{item.tel}}</view>
|
||||
<view bindtap="call" class="btn" data-tel="{{item.tel}}">拨号</view>
|
||||
</view>
|
||||
<view class="line">
|
||||
<view class="info">商家地址:{{item.address}}</view>
|
||||
<view bindtap="toMap" class="btn" data-latitude="{{item.lat*1}}" data-longitude="{{item.lng*1}}">导航</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box" wx:if="{{purchasenotes}}">
|
||||
<view class="tips">
|
||||
<view>注意事项:</view>
|
||||
</view>
|
||||
<view class="list_body">
|
||||
<view class="content">
|
||||
<rich-text nodes="{{purchasenotes}}"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
279
pages/orderDetails/orderDetails.wxss
Normal file
279
pages/orderDetails/orderDetails.wxss
Normal file
@@ -0,0 +1,279 @@
|
||||
.charge-off {
|
||||
background: #f8f8f8;
|
||||
min-height: 100vh;
|
||||
padding: 3.333vw 4vw;
|
||||
}
|
||||
|
||||
.charge-off .coupon__box {
|
||||
background: #fff;
|
||||
border-radius: 1.6vw;
|
||||
box-shadow: 0 0 2.667vw 0 rgba(11,2,5,.05);
|
||||
}
|
||||
|
||||
.charge-off .coupon__box__title {
|
||||
color: #2a2a2a;
|
||||
font-size: 4.8vw;
|
||||
font-weight: 700;
|
||||
line-height: 6.4vw;
|
||||
padding: 6.667vw 4.667vw;
|
||||
}
|
||||
|
||||
.charge-off .coupon__box__split {
|
||||
background: #eee;
|
||||
height: 1px;
|
||||
margin: 0 4.667vw;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.charge-off .coupon__box__split:before {
|
||||
left: -6vw;
|
||||
}
|
||||
|
||||
.charge-off .coupon__box__split:after,.charge-off .coupon__box__split:before {
|
||||
background: #f8f8f8;
|
||||
border-radius: 50%;
|
||||
content: "";
|
||||
height: 2.667vw;
|
||||
position: absolute;
|
||||
top: -1.333vw;
|
||||
width: 2.667vw;
|
||||
}
|
||||
|
||||
.charge-off .coupon__box__split:after {
|
||||
right: -6vw;
|
||||
}
|
||||
|
||||
.charge-off .coupon__box__qrcode {
|
||||
color: #787878;
|
||||
font-size: 3.2vw;
|
||||
font-weight: 500;
|
||||
line-height: 4.8vw;
|
||||
line-height: 3.2vw;
|
||||
padding: 11.333vw 0 10.667vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.charge-off .coupon__box__qrcode .tips {
|
||||
margin-top: 5.333vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.charge-off .components {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.charge-off .box {
|
||||
background: #fff;
|
||||
border-radius: 1.6vw;
|
||||
box-shadow: 0 0 2.667vw 0 rgba(11,2,5,.05);
|
||||
margin-top: 4vw;
|
||||
padding: 5.333vw 4vw 0;
|
||||
}
|
||||
|
||||
.charge-off .box .tips {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #eee;
|
||||
color: #2a2a2a;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 4vw;
|
||||
font-weight: 700;
|
||||
justify-content: space-between;
|
||||
line-height: 4vw;
|
||||
padding-bottom: 4vw;
|
||||
}
|
||||
|
||||
.charge-off .box .tips .right {
|
||||
color: #f60;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items {
|
||||
border-bottom: 1px dashed #eee;
|
||||
padding: 3.733vw 0;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items .item__tips {
|
||||
font-size: 4vw;
|
||||
font-weight: 700;
|
||||
margin-bottom: 4.667vw;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items .item__bd {
|
||||
color: #2a2a2a;
|
||||
font-size: 3.467vw;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items .item__bd .line {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
line-height: 6.667vw;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items .item__bd .line .info {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items .item__bd .name {
|
||||
display: block;
|
||||
font-size: 3.6vw;
|
||||
margin: 8px 0 10px;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items .item__bd .merchant {
|
||||
display: block;
|
||||
font-size: 3vw;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items .item__bd .merchant .shop {
|
||||
display: inline-block;
|
||||
height: 14px;
|
||||
margin-right: 4px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
vertical-align: middle;
|
||||
width: 14px;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items .item__bd .code {
|
||||
color: #333;
|
||||
font-size: 4.3vw;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items .item__bd .line .btn {
|
||||
background: #06a2b3;
|
||||
border-radius: .667vw;
|
||||
color: #fff;
|
||||
font-size: 3.2vw;
|
||||
font-weight: 500;
|
||||
line-height: 3.2vw;
|
||||
margin-left: 8vw;
|
||||
padding: 1.333vw 2vw;
|
||||
}
|
||||
|
||||
.charge-off .box .box-items:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 5.333vw;
|
||||
}
|
||||
|
||||
.charge-off .box .list_body {
|
||||
color: #2a2a2a;
|
||||
font-size: 3.733vw;
|
||||
font-weight: 500;
|
||||
line-height: 6.667vw;
|
||||
margin-top: 2.667vw;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.charge-off .box .list_body .content {
|
||||
padding-bottom: 4vw;
|
||||
}
|
||||
|
||||
.charge-off .box .list_body .content-hidden {
|
||||
height: 106.667vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.charge-off .box .list_body .list_body__shade {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.charge-off .box .list_body .list_body__shade .up {
|
||||
background: -webkit-gradient(linear,left bottom,left top,from(#fff),to(hsla(0,0%,97%,0)));
|
||||
background: linear-gradient(0deg,#fff,hsla(0,0%,97%,0));
|
||||
height: 12vw;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.charge-off .box .list_body .list_body__shade .down {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
color: #2a2a2a;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.733vw;
|
||||
font-weight: 500;
|
||||
height: 13.333vw;
|
||||
justify-content: center;
|
||||
line-height: 3.733vw;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.charge-off .box .list_body .list_body__shade .down .icon {
|
||||
border-bottom: .4vw solid #1b1b1b;
|
||||
border-left: .4vw solid #1b1b1b;
|
||||
height: 2vw;
|
||||
margin-left: 1.6vw;
|
||||
margin-top: -1.333vw;
|
||||
transform: rotate(-45deg);
|
||||
width: 2vw;
|
||||
}
|
||||
|
||||
.charge-off .box .list_body .list_body__shade .down .icon--active {
|
||||
margin-top: 1.333vw;
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
|
||||
.charge-off .qrcode-area {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.charge-off .qrcode-area .txt {
|
||||
background-color: hsla(0,0%,92%,.6);
|
||||
color: #989898;
|
||||
font-size: 4vw;
|
||||
font-weight: 500;
|
||||
left: 50%;
|
||||
line-height: 8vw;
|
||||
padding: 0 2.667vw;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateX(-50%) translateY(-50%);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.charge-off .coupon__box .gray {
|
||||
filter: blur(2px);
|
||||
opacity: .3;
|
||||
}
|
||||
|
||||
.coupon__box__qrcode {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.coupon__box__title {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.box .tips .til {
|
||||
color: #787878;
|
||||
display: inline;
|
||||
font-size: 3.2vw;
|
||||
font-weight: 400;
|
||||
margin-left: 1.333vw;
|
||||
}
|
||||
154
pages/orderIndex/orderIndex.js
Normal file
154
pages/orderIndex/orderIndex.js
Normal file
@@ -0,0 +1,154 @@
|
||||
var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), e = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(),
|
||||
require("../../utils/login.js"));
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
num: 1,
|
||||
token: "",
|
||||
name: "",
|
||||
mobile: "",
|
||||
totalprice: "",
|
||||
price: "",
|
||||
info: {},
|
||||
currency: "",
|
||||
useMoney: 0,
|
||||
allowMaxNum: 0
|
||||
},
|
||||
onLoad: function(t) {
|
||||
this.setData({
|
||||
token: t.token
|
||||
}), this.getOrder();
|
||||
},
|
||||
changeNum: function(t) {
|
||||
var e = t.currentTarget.dataset.types;
|
||||
if ("money" == t.currentTarget.dataset.name) {
|
||||
if ("plus" == e) this.data.useMoney < this.data.allow_useintegralmax && this.data.useMoney++; else {
|
||||
if (this.data.useMoney <= 0) return !1;
|
||||
this.data.useMoney--;
|
||||
}
|
||||
this.setData({
|
||||
useMoney: this.data.useMoney
|
||||
});
|
||||
} else {
|
||||
if ("plus" == e) {
|
||||
if (this.data.num >= this.data.allowMaxNum) return wx.showToast({
|
||||
title: "不能再加了啦~",
|
||||
icon: "none"
|
||||
}), !1;
|
||||
this.data.num++;
|
||||
} else {
|
||||
if (this.data.num <= 1) return wx.showToast({
|
||||
title: "不能再少了哟~",
|
||||
icon: "none"
|
||||
}), !1;
|
||||
this.data.num--;
|
||||
}
|
||||
this.setData({
|
||||
num: this.data.num
|
||||
}), this.getPrice();
|
||||
}
|
||||
},
|
||||
input: function(t) {
|
||||
"money" == t.currentTarget.dataset.name ? this.setData({
|
||||
useMoney: t.detail.value
|
||||
}) : (this.setData({
|
||||
num: t.detail.value
|
||||
}), this.getPrice());
|
||||
},
|
||||
setMoney: function() {
|
||||
var t = this.data.num * this.data.info.price, e = (t + "").split(".");
|
||||
e[1] = e[1].padEnd(2, "0").slice(0, 2), t = e.join("."), this.setData({
|
||||
totalMoney: t
|
||||
});
|
||||
},
|
||||
blur: function() {
|
||||
this.data.num <= 1 && this.setData({
|
||||
num: 1
|
||||
});
|
||||
},
|
||||
inputtext: function(t) {
|
||||
var e = t.detail.value;
|
||||
"name" == t.currentTarget.dataset.text ? this.setData({
|
||||
name: e
|
||||
}) : this.setData({
|
||||
mobile: e
|
||||
});
|
||||
},
|
||||
getOrder: function() {
|
||||
var n = this;
|
||||
return e(t.default.mark(function e() {
|
||||
var s, r;
|
||||
return t.default.wrap(function(t) {
|
||||
for (;;) switch (t.prev = t.next) {
|
||||
case 0:
|
||||
return t.prev = 0, t.next = 3, a.request(a.baseUrl + "shop/order/create", {
|
||||
token: n.data.token
|
||||
}, !0);
|
||||
|
||||
case 3:
|
||||
s = t.sent, r = s.data, n.setData({
|
||||
showLoding: !1,
|
||||
totalprice: r.totalprice,
|
||||
allow_useintegral: r.allow_useintegral,
|
||||
allow_useintegralmax: r.allow_useintegralmax,
|
||||
currency: r.currency,
|
||||
money: r.money,
|
||||
shoppingCartList: r.shoppingCartList,
|
||||
address: r.address,
|
||||
name: r.address.username || "",
|
||||
mobile: r.address.telnumber ? r.address.telnumber + "" : "",
|
||||
allowMaxNum: Math.min(r.shoppingCartList.shop.stock, r.shoppingCartList.shop.purchase_num)
|
||||
}), t.next = 11;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
t.prev = 8, t.t0 = t.catch(0), console.log(t.t0);
|
||||
|
||||
case 11:
|
||||
case "end":
|
||||
return t.stop();
|
||||
}
|
||||
}, e, null, [ [ 0, 8 ] ]);
|
||||
}))();
|
||||
},
|
||||
getPrice: function() {
|
||||
var n = this;
|
||||
return e(t.default.mark(function e() {
|
||||
var s, r;
|
||||
return t.default.wrap(function(t) {
|
||||
for (;;) switch (t.prev = t.next) {
|
||||
case 0:
|
||||
return t.prev = 0, t.next = 3, a.request(a.baseUrl + "shop/order/num", {
|
||||
uniqid: n.data.shoppingCartList.uniqid,
|
||||
cartnum: n.data.num
|
||||
}, !0);
|
||||
|
||||
case 3:
|
||||
s = t.sent, r = s.data, 200 == s.code && n.setData({
|
||||
totalprice: r.totalprice
|
||||
}), t.next = 11;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
t.prev = 8, t.t0 = t.catch(0), console.log(t.t0);
|
||||
|
||||
case 11:
|
||||
case "end":
|
||||
return t.stop();
|
||||
}
|
||||
}, e, null, [ [ 0, 8 ] ]);
|
||||
}))();
|
||||
},
|
||||
pay: function() {
|
||||
return "" == this.data.name.trim() ? (wx.showModal({
|
||||
title: "提示",
|
||||
content: "请输入姓名"
|
||||
}), !1) : "" == this.data.mobile.trim() ? (wx.showModal({
|
||||
title: "提示",
|
||||
content: "请输入手机号码"
|
||||
}), !1) : (wx.setStorageSync("goodsInfo", this.data.info), void wx.redirectTo({
|
||||
url: "/pages/orderPay/orderPay?uniqid=".concat(this.data.shoppingCartList.uniqid, "&name=").concat(this.data.name, "&mobile=").concat(this.data.mobile, "&amount=").concat(this.data.useMoney)
|
||||
}));
|
||||
}
|
||||
});
|
||||
8
pages/orderIndex/orderIndex.json
Normal file
8
pages/orderIndex/orderIndex.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"navigationBarBackgroundColor": "#06acb3",
|
||||
"navigationBarTextStyle": "white",
|
||||
"usingComponents": {
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
84
pages/orderIndex/orderIndex.wxml
Normal file
84
pages/orderIndex/orderIndex.wxml
Normal file
@@ -0,0 +1,84 @@
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view>
|
||||
<view class="page-container order" style="background-color: rgb(255, 255, 255);">
|
||||
<view class="page-content" style="padding-bottom: 48px;">
|
||||
<view class="section">
|
||||
<view class="wp">
|
||||
<view class="goods-info">
|
||||
<view class="lt">
|
||||
<view class="lt_pic">
|
||||
<image mode="aspectFit" src="{{shoppingCartList.shop.image}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<view class="rt_tit">{{shoppingCartList.shop.name}}</view>
|
||||
<view class="rt_price">
|
||||
<view class="now">
|
||||
<view>¥</view>{{shoppingCartList.shop.price}}</view>
|
||||
<view class="old">¥{{shoppingCartList.shop.marketprice}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wp"></view>
|
||||
<view class="wp">
|
||||
<view class="attr-wrap thin-border_t">
|
||||
<view class="label">购买数量</view>
|
||||
<view class="van-stepper-container">
|
||||
<view class="van-stepper">
|
||||
<view bindtap="changeNum" class="van-stepper__minus {{num<=1?'van-stepper__minus--disabled':''}}" data-types="minus" type="button">-</view>
|
||||
<input bindblur="blur" bindinput="input" class="van-stepper__input" placeholderClass="placehoder" type="number" value="{{num}}"></input>
|
||||
<view bindtap="changeNum" class="van-stepper__plus {{num>=allowMaxNum?'van-stepper__minus--disabled':''}}" data-types="plus" type="button">+</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="wp" wx:if="{{allow_useintegral==1}}">
|
||||
<view class="attr-wrap thin-border_t">
|
||||
<view class="label">使用{{currency}}(最多可用{{allow_useintegralmax}}元)</view>
|
||||
<view class="van-stepper-container">
|
||||
<view class="van-stepper">
|
||||
<view bindtap="changeNum" class="van-stepper__minus {{useMoney<=0?'van-stepper__minus--disabled':''}}" data-name="money" data-types="minus" type="button">-</view>
|
||||
<input bindblur="blur" bindinput="input" class="van-stepper__input" data-name="money" placeholderClass="placehoder" type="number" value="{{useMoney}}"></input>
|
||||
<view bindtap="changeNum" class="van-stepper__plus {{useMoney==allow_useintegralmax?'van-stepper__minus--disabled':''}}" data-name="money" data-types="plus" type="button">+</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="section">
|
||||
<view class="order-form van-cell-group van-hairline--top-bottom" style="position: relative;">
|
||||
<view class="van-cell van-cell--required van-field">
|
||||
<view class="van-cell__title van-field__label">
|
||||
<view>姓名</view>
|
||||
</view>
|
||||
<view class="van-cell__value van-field__value">
|
||||
<view class="van-field__body">
|
||||
<input bindinput="inputtext" class="van-field__control" data-text="name" placeholder="请输入姓名" placeholderClass="placehoder" type="text" value="{{name}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="van-cell van-cell--required van-field">
|
||||
<view class="van-cell__title van-field__label">
|
||||
<view>手机</view>
|
||||
</view>
|
||||
<view class="van-cell__value van-field__value">
|
||||
<view class="van-field__body">
|
||||
<input bindinput="inputtext" class="van-field__control" data-text="mobile" placeholder="请输入你的手机号码" placeholderClass="placehoder" type="number" value="{{mobile}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-footer">
|
||||
<view class="order-menu thin-border_t">
|
||||
<view class="order_price wp"> 合计: <view class="num">¥ {{totalprice}}</view>
|
||||
</view>
|
||||
<view bindtap="pay" class="order_btn">
|
||||
<button class="btn btn-confirm"> 立即支付 </button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
638
pages/orderIndex/orderIndex.wxss
Normal file
638
pages/orderIndex/orderIndex.wxss
Normal file
@@ -0,0 +1,638 @@
|
||||
.order .section {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.order .section:not(:first-child) {
|
||||
border-top: 3.2vw solid #f8f8f8;
|
||||
}
|
||||
|
||||
.order .section .section-title {
|
||||
color: #2a2a2a;
|
||||
font-size: 3.733vw;
|
||||
font-weight: 400;
|
||||
padding: 3.2vw 4vw;
|
||||
}
|
||||
|
||||
.order .section .section-title view {
|
||||
color: #787878;
|
||||
font-size: 3.2vw;
|
||||
padding-left: 4.267vw;
|
||||
}
|
||||
|
||||
.order .attr-wrap {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
color: #2a2a2a;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.733vw;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 4vw;
|
||||
padding-top: 4vw;
|
||||
}
|
||||
|
||||
.van-stepper-container {
|
||||
display: inline-flex;
|
||||
flex: 1;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.order .attr-wrap .label {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
-webkit-box-flex: 0;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.van-cell__value,.van-field__label {
|
||||
box-sizing: border-box;
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.van-cell__value {
|
||||
word-wrap: break-word;
|
||||
color: #969799;
|
||||
display: inline-flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.van-field__body,.van-field__control {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-field__control {
|
||||
background-color: initial;
|
||||
border: 0;
|
||||
box-sizing: border-box;
|
||||
color: #323233;
|
||||
line-height: inherit;
|
||||
margin: 0;
|
||||
min-width: 0;
|
||||
padding: 0;
|
||||
resize: none;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.order .order-form .van-field__control:disabled {
|
||||
color: #323232;
|
||||
}
|
||||
|
||||
.order .order-form .ems-radio+.ems-radio {
|
||||
margin-left: 5.333vw;
|
||||
}
|
||||
|
||||
.order .order-form .van-field__error-message {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.order .order-menu-wrap {
|
||||
background-color: #fff;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.order .order-menu .order_btn .btn-cancel {
|
||||
background-color: #434343;
|
||||
}
|
||||
|
||||
.order .order-menu .order_btn .btn-confirm {
|
||||
background-color: #eb5252;
|
||||
}
|
||||
|
||||
.order .order-menu .only_btn .btn:last-child {
|
||||
-webkit-box-flex: 1.5;
|
||||
flex: 1.5;
|
||||
}
|
||||
|
||||
.order .order-viptip {
|
||||
background-color: #eb5252;
|
||||
border-radius: 4vw;
|
||||
color: #fff;
|
||||
font-size: 3.2vw;
|
||||
padding: .667vw 2vw;
|
||||
position: absolute;
|
||||
right: 2.667vw;
|
||||
top: 3.333vw;
|
||||
}
|
||||
|
||||
.order .viptip-arrow {
|
||||
border-left: 2vw solid transparent;
|
||||
border-right: 2vw solid transparent;
|
||||
border-top: 2vw solid #eb5252;
|
||||
bottom: -1.467vw;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
right: 2.267vw;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
.order .van-cell {
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
.order .van-cell:not(:last-child):after {
|
||||
border-bottom: 1px solid #f4f4f4;
|
||||
}
|
||||
|
||||
.goods-info {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
padding-bottom: 4vw;
|
||||
padding-top: 3.2vw;
|
||||
}
|
||||
|
||||
.goods-info .lt {
|
||||
-webkit-box-flex: 16vw;
|
||||
flex: 16vw 0 0;
|
||||
width: 16vw;
|
||||
}
|
||||
|
||||
.goods-info .lt_pic {
|
||||
border-radius: 1.067vw;
|
||||
overflow: hidden;
|
||||
padding-top: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.goods-info .lt_pic image {
|
||||
border-radius: 1.067vw;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.goods-info .rt {
|
||||
-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-left: 4vw;
|
||||
}
|
||||
|
||||
.goods-info .rt_tit {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
color: #2a2a2a;
|
||||
display: -webkit-box;
|
||||
font-size: 3.733vw;
|
||||
height: 9.6vw;
|
||||
line-height: 4.8vw;
|
||||
margin-top: -.533vw;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.goods-info .rt_price {
|
||||
font-family: DIN;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.goods-info .rt_price .now {
|
||||
color: #eb5252;
|
||||
display: inline;
|
||||
font-size: 4vw;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.goods-info .rt_price .now view {
|
||||
display: inline;
|
||||
font-size: 3.2vw;
|
||||
}
|
||||
|
||||
.goods-info .rt_price .old {
|
||||
color: #969696;
|
||||
display: inline;
|
||||
font-size: 3.467vw;
|
||||
margin-left: 4vw;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.popup-wrap {
|
||||
box-sizing: border-box;
|
||||
font-family: DIN;
|
||||
height: 70vh;
|
||||
padding-bottom: 12.8vw;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.popup-scroll {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
color: #9b9b9b;
|
||||
font-size: 3.2vw;
|
||||
padding: 2.667vw 4vw;
|
||||
}
|
||||
|
||||
.popup-header .title {
|
||||
color: #2a2a2a;
|
||||
font-size: 3.733vw;
|
||||
margin: 1.6vw 0 0;
|
||||
padding: 0 0 0 3.733vw;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.popup-header .title:before {
|
||||
background-color: currentColor;
|
||||
content: "";
|
||||
height: 3.2vw;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
width: 1.067vw;
|
||||
}
|
||||
|
||||
.popup-btn {
|
||||
background-color: #eb5252;
|
||||
border-radius: 1.333vw;
|
||||
bottom: 0;
|
||||
color: #fff;
|
||||
font-size: 4vw;
|
||||
height: 12.8vw;
|
||||
left: 4vw;
|
||||
line-height: 12.8vw;
|
||||
position: absolute;
|
||||
right: 4vw;
|
||||
text-align: center;
|
||||
z-index: 6;
|
||||
}
|
||||
|
||||
.calendar-header {
|
||||
background-color: #fafafa;
|
||||
border: 1px solid #e4e4e4;
|
||||
border-width: 1px 0;
|
||||
box-sizing: border-box;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.733vw;
|
||||
height: 10.667vw;
|
||||
left: 0;
|
||||
line-height: 10.667vw;
|
||||
padding: 0 4vw;
|
||||
position: sticky;
|
||||
text-align: center;
|
||||
top: 0;
|
||||
z-index: 6;
|
||||
}
|
||||
|
||||
.calendar-header .item {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.calendar-body {
|
||||
padding: 0 4vw;
|
||||
}
|
||||
|
||||
.calendar-mouth {
|
||||
background-color: #fff;
|
||||
font-size: 4.267vw;
|
||||
left: 0;
|
||||
line-height: 6.667vw;
|
||||
position: sticky;
|
||||
top: 10.667vw;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.calendar-day {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.calendar-day .item {
|
||||
-webkit-box-flex: 14.285714%;
|
||||
border-radius: .8vw;
|
||||
color: #ff411e;
|
||||
flex: 14.285714% 0 0;
|
||||
font-size: 4vw;
|
||||
line-height: 5.333vw;
|
||||
overflow: hidden;
|
||||
padding: 14.285714% 0 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
width: 14.285714%;
|
||||
}
|
||||
|
||||
.calendar-day .item.disabled,.calendar-day .item.disabled .day {
|
||||
color: #9b9b9b!important;
|
||||
}
|
||||
|
||||
.calendar-day .item.active {
|
||||
background-color: #eb5252;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.calendar-day .inner {
|
||||
-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;
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.calendar-day .day {
|
||||
color: #2a2a2a;
|
||||
}
|
||||
|
||||
.calendar-day .item.active .day {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.calendar-day .price {
|
||||
font-size: 3.2vw;
|
||||
}
|
||||
|
||||
.calendar-day .price .s {
|
||||
font-size: 2.933vw;
|
||||
}
|
||||
|
||||
.back-protocol {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.467vw;
|
||||
line-height: 4.8vw;
|
||||
padding: 2.667vw 0;
|
||||
}
|
||||
|
||||
.back-protocol .txt {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
padding: 0 2.667vw;
|
||||
}
|
||||
|
||||
.back-protocol .iconfont {
|
||||
color: #bebebe;
|
||||
font-size: .8em;
|
||||
}
|
||||
|
||||
.protocol-modal {
|
||||
background-color: #fff;
|
||||
border-radius: 2.133vw;
|
||||
padding: 5.867vw 5.067vw 4vw;
|
||||
top: 45%;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.protocol-modal .title {
|
||||
font-size: 4.8vw;
|
||||
line-height: 6.667vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.protocol-modal .content {
|
||||
font-size: 3.467vw;
|
||||
height: 72vw;
|
||||
line-height: 4.8vw;
|
||||
margin: 4vw 0;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.protocol-modal .btn {
|
||||
background-color: #fcdf21;
|
||||
border-radius: 9.333vw;
|
||||
display: block;
|
||||
font-size: 4vw;
|
||||
height: 9.333vw;
|
||||
line-height: 9.333vw;
|
||||
margin: 0 auto;
|
||||
width: 53.333vw;
|
||||
}
|
||||
|
||||
.van-stepper {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 14px;
|
||||
font-size: 0;
|
||||
overflow: hidden;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.van-stepper__minus,.van-stepper__plus {
|
||||
align-items: center;
|
||||
border: 0;
|
||||
box-sizing: border-box;
|
||||
color: #323233;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-size: 6vw;
|
||||
height: 28px;
|
||||
justify-content: center;
|
||||
line-height: 26px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
width: 28px;
|
||||
}
|
||||
|
||||
.van-stepper__minus--disabled,.van-stepper__plus--disabled {
|
||||
color: #c8c9cc;
|
||||
cursor: not-allowed;
|
||||
display: inline-block;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.van-stepper__plus {
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.van-stepper__minus {
|
||||
border-radius: 4px 0 0 4px;
|
||||
}
|
||||
|
||||
.van-stepper__input {
|
||||
-webkit-appearance: none;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
border-width: 1px 0;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #ccc;
|
||||
box-sizing: border-box;
|
||||
color: #323233;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
width: 32px;
|
||||
}
|
||||
|
||||
.van-cell--required:before {
|
||||
color: #ee0a24;
|
||||
content: "*";
|
||||
font-size: 14px;
|
||||
left: 8px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
color: #323233;
|
||||
display: flex;
|
||||
font-size: 15px;
|
||||
line-height: 24px;
|
||||
overflow: hidden;
|
||||
padding: 10px 16px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.placehoder {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
[class*=van-hairline]:after {
|
||||
border: 0 solid #ebedf0;
|
||||
bottom: -50%;
|
||||
box-sizing: border-box;
|
||||
content: " ";
|
||||
left: -50%;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
right: -50%;
|
||||
top: -50%;
|
||||
transform: scale(.5);
|
||||
}
|
||||
|
||||
.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after {
|
||||
border-width: 1px 0;
|
||||
}
|
||||
|
||||
.page-footer {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.thin-border_t {
|
||||
border-color: #f4f4f4;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.order .order-menu {
|
||||
background-color: #fff;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.733vw;
|
||||
height: 12.8vw;
|
||||
line-height: 12.8vw;
|
||||
}
|
||||
|
||||
.thin-border_t:before {
|
||||
border-bottom: .267vw solid;
|
||||
border-color: inherit;
|
||||
content: "";
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
transform: scaleY(.5);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.order .wp {
|
||||
padding: 0 4vw;
|
||||
}
|
||||
|
||||
.order .order-menu .order_price {
|
||||
-webkit-box-flex: 46.667vw;
|
||||
border-color: #dedede;
|
||||
box-sizing: border-box;
|
||||
flex: 46.667vw 0 0;
|
||||
padding-right: 0;
|
||||
width: 46.667vw;
|
||||
}
|
||||
|
||||
.order .order-menu .order_price .num {
|
||||
color: #eb5252;
|
||||
display: inline;
|
||||
font-size: 5.067vw;
|
||||
}
|
||||
|
||||
.order .order-menu .order_btn {
|
||||
-webkit-box-flex: 1;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.order .order-menu .order_btn .btn {
|
||||
-webkit-box-flex: 1;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
color: #fff;
|
||||
flex: 1;
|
||||
font-size: 3.733vw;
|
||||
height: 12.8vw;
|
||||
line-height: 12.8vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.order .order-menu .order_btn .btn-confirm {
|
||||
background-color: #06a2b3;
|
||||
}
|
||||
133
pages/orderList/orderList.js
Normal file
133
pages/orderList/orderList.js
Normal file
@@ -0,0 +1,133 @@
|
||||
var t = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), a = require("../../@babel/runtime/helpers/toConsumableArray"), e = require("../../@babel/runtime/helpers/asyncToGenerator"), n = (getApp(),
|
||||
require("../../utils/login.js"));
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
navList: [ {
|
||||
name: "全部",
|
||||
tab: "all"
|
||||
}, {
|
||||
name: "待付款",
|
||||
tab: "0"
|
||||
}, {
|
||||
name: "待使用",
|
||||
tab: "1"
|
||||
}, {
|
||||
name: "已完成",
|
||||
tab: "4"
|
||||
} ],
|
||||
tab: "all",
|
||||
loading: !1,
|
||||
next_page: 1,
|
||||
data: [],
|
||||
status: {
|
||||
0: "待付款",
|
||||
1: "待使用",
|
||||
2: "待收货",
|
||||
3: "待收货",
|
||||
4: "已完成"
|
||||
}
|
||||
},
|
||||
onLoad: function(t) {
|
||||
this.setData({
|
||||
tab: t.tab || "all"
|
||||
}), this.getList();
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
this.clearData();
|
||||
},
|
||||
onReachBottom: function() {
|
||||
this.getList();
|
||||
},
|
||||
clearData: function() {
|
||||
this.setData({
|
||||
next_page: 1,
|
||||
loading: !1,
|
||||
data: []
|
||||
}), this.getList();
|
||||
},
|
||||
changeTab: function(t) {
|
||||
var a = t.currentTarget.dataset.tab;
|
||||
if (a == this.data.tab) return !1;
|
||||
this.setData({
|
||||
tab: a
|
||||
}), this.clearData();
|
||||
},
|
||||
getList: function() {
|
||||
var r = this;
|
||||
return e(t.default.mark(function e() {
|
||||
var s, i;
|
||||
return t.default.wrap(function(t) {
|
||||
for (;;) switch (t.prev = t.next) {
|
||||
case 0:
|
||||
if (r.data.next_page && !r.data.loading) {
|
||||
t.next = 2;
|
||||
break;
|
||||
}
|
||||
return t.abrupt("return", !1);
|
||||
|
||||
case 2:
|
||||
return r.setData({
|
||||
loading: !0
|
||||
}), t.prev = 3, t.next = 6, n.request(n.baseUrl + "shop/order/lists", {
|
||||
page: r.data.next_page,
|
||||
typeid: r.data.tab
|
||||
}, !0);
|
||||
|
||||
case 6:
|
||||
s = t.sent, i = s.data, r.setData({
|
||||
loading: !1,
|
||||
showLoding: !1
|
||||
}), 200 == s.code && (i.data.length < i.limit ? r.data.next_page = 0 : r.data.next_page += 1,
|
||||
r.setData({
|
||||
type: i.type,
|
||||
count: i.count,
|
||||
limit: i.limit,
|
||||
next_page: r.data.next_page,
|
||||
data: [].concat(a(r.data.data), a(i.data))
|
||||
})), t.next = 15;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
t.prev = 12, t.t0 = t.catch(3), console.log(t.t0);
|
||||
|
||||
case 15:
|
||||
case "end":
|
||||
return t.stop();
|
||||
}
|
||||
}, e, null, [ [ 3, 12 ] ]);
|
||||
}))();
|
||||
},
|
||||
deleteItem: function(a) {
|
||||
var r = this;
|
||||
return e(t.default.mark(function e() {
|
||||
var s, i, o, d;
|
||||
return t.default.wrap(function(t) {
|
||||
for (;;) switch (t.prev = t.next) {
|
||||
case 0:
|
||||
return s = a.currentTarget.dataset, i = s.orderid, o = s.index, wx.showLoading({
|
||||
title: "正在删除"
|
||||
}), t.prev = 2, t.next = 5, n.request(n.baseUrl + "shop/order/delete", {
|
||||
orderid: i
|
||||
}, !0);
|
||||
|
||||
case 5:
|
||||
d = t.sent, wx.hideLoading(), 200 == d.code && (r.data.data.splice(o, 1), r.setData({
|
||||
data: r.data.data
|
||||
}), wx.showToast({
|
||||
title: d.message
|
||||
})), t.next = 14;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
t.prev = 10, t.t0 = t.catch(2), console.log(t.t0), wx.hideLoading();
|
||||
|
||||
case 14:
|
||||
case "end":
|
||||
return t.stop();
|
||||
}
|
||||
}, e, null, [ [ 2, 10 ] ]);
|
||||
}))();
|
||||
}
|
||||
});
|
||||
7
pages/orderList/orderList.json
Normal file
7
pages/orderList/orderList.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"enablePullDownRefresh": true,
|
||||
"usingComponents": {
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
42
pages/orderList/orderList.wxml
Normal file
42
pages/orderList/orderList.wxml
Normal file
@@ -0,0 +1,42 @@
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view class="main-container">
|
||||
<view class="nav-list">
|
||||
<view bindtap="changeTab" class="nav-item" data-tab="{{item.tab}}" wx:for="{{navList}}" wx:key="index">
|
||||
<view class="{{item.tab==tab?'text--active':''}}">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-list">
|
||||
<navigator class="order-item" url="{{item.pay_status==0?'/pages/orderPay/orderPay?orderid='+item.orderid:'/pages/orderDetails/orderDetails?orderid='+item.orderid}}" wx:for="{{data}}" wx:key="index">
|
||||
<view class="order-item__hd thin-border_b">
|
||||
<view class="time">订单编号:{{item.orderid}}</view>
|
||||
<view class="state" wx:if="{{item.pay_status!=-1}}">{{status[item.status]}}</view>
|
||||
<view class="state" wx:if="{{item.pay_status==-1}}">付款超时</view>
|
||||
</view>
|
||||
<view :key="i" class="order-item__bd " wx:for="{{item.shop}}" wx:for-item="s">
|
||||
<view class="order-mes">
|
||||
<image class="img-shop" mode="widthFix" src="{{s.image}}"></image>
|
||||
<view class="mes">
|
||||
<view class="mes-name overflow-2-row">{{s.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-money">
|
||||
<view class="date">下单日期:{{item.timestamp}}</view>
|
||||
<view>{{item.total_num}}件商品共:¥{{item.pay_money}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-item__ft thin-border_t">
|
||||
<view class="btn-box">
|
||||
<view class="btn" wx:if="{{item.pay_status!=-1&&item.status==0}}">确认付款</view>
|
||||
<view class="btn" wx:if="{{item.pay_status!=-1&&item.status!=0}}">查看订单</view>
|
||||
<view catchtap="deleteItem" class="btn btn-grey" data-index="{{index}}" data-orderid="{{item.orderid}}" wx:if="{{item.pay_status==-1}}">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class="van-list__finished-text" wx:if="{{loading}}">正在加载...</view>
|
||||
<view class="van-list__finished-text" wx:if="{{!loading&&!next_page&&data.length>0}}">没有更多了</view>
|
||||
<view class="no-content" wx:if="{{data.length==0&&!loading}}">
|
||||
<image src="/img/nocontent.png"></image>
|
||||
<view>没有内容哦~</view>
|
||||
</view>
|
||||
</view>
|
||||
271
pages/orderList/orderList.wxss
Normal file
271
pages/orderList/orderList.wxss
Normal file
@@ -0,0 +1,271 @@
|
||||
.main-container {
|
||||
background: #f5f5f5;
|
||||
font-size: 3.2vw;
|
||||
min-height: 100vh;
|
||||
padding-top: 10.667vw;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.nav-list {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #e4e4e4;
|
||||
box-shadow: 0 0 .267vw 0 rgba(0,0,0,.2);
|
||||
box-sizing: border-box;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
height: 10.667vw;
|
||||
justify-content: space-between;
|
||||
left: 0;
|
||||
padding: 0 1.333vw;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.nav-list .nav-item {
|
||||
box-sizing: border-box;
|
||||
color: #343434;
|
||||
font-size: 3.467vw;
|
||||
font-weight: 500;
|
||||
line-height: 5.333vw;
|
||||
padding: 3.467vw 2.667vw;
|
||||
}
|
||||
|
||||
.nav-list .nav-item .text--active {
|
||||
color: #06a2b3;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-list .nav-item .text--active:after {
|
||||
background: #06a2b3;
|
||||
content: "";
|
||||
display: block;
|
||||
height: .533vw;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 6.667vw;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.order-list {
|
||||
box-sizing: border-box;
|
||||
padding: 2.267vw 4vw 0;
|
||||
}
|
||||
|
||||
.order-list .order-item {
|
||||
background-color: #fff;
|
||||
border-radius: 2.133vw;
|
||||
margin-bottom: 2.667vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.thin-border_b {
|
||||
border-color: #f4f4f4;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__hd {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
height: 10.267vw;
|
||||
justify-content: space-between;
|
||||
padding-left: 2.667vw;
|
||||
padding-right: 2.667vw;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__hd .state {
|
||||
color: #06a2b3;
|
||||
font-size: 3.2vw;
|
||||
font-weight: 500;
|
||||
line-height: 3.2vw;
|
||||
}
|
||||
|
||||
.thin-border_b:after {
|
||||
border-bottom: .267vw solid;
|
||||
border-color: inherit;
|
||||
bottom: 0;
|
||||
content: "";
|
||||
left: 0;
|
||||
position: absolute;
|
||||
transform: scaleY(.5);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__bd {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 3.2vw 2.667vw;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__bd .order-mes {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 2.667vw;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__bd .order-mes .img-shop {
|
||||
height: 18.4vw;
|
||||
width: 18.667vw;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__bd .order-mes .mes {
|
||||
-webkit-box-align: start;
|
||||
-ms-flex-align: start;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
align-items: flex-start;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.overflow-1-row,.overflow-2-row {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.overflow-2-row {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__bd .order-mes .mes .mes-name {
|
||||
box-sizing: border-box;
|
||||
color: #343434;
|
||||
font-size: 3.733vw;
|
||||
font-weight: 500;
|
||||
line-height: 5.333vw;
|
||||
margin-bottom: 1.333vw;
|
||||
padding-left: 2vw;
|
||||
width: 64vw;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__bd .order-money {
|
||||
-webkit-box-orient: horizontal;
|
||||
align-content: center;
|
||||
color: #3a3a3a;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
justify-content: space-between;
|
||||
line-height: 3.733vw;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__bd .date {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__bd .order-money span {
|
||||
color: #3a3a3a;
|
||||
display: inline;
|
||||
font-size: 4.533vw;
|
||||
font-weight: 500;
|
||||
line-height: 4.267vw;
|
||||
}
|
||||
|
||||
.thin-border_t {
|
||||
border-color: #f4f4f4;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__ft {
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
height: 12.533vw;
|
||||
justify-content: flex-end;
|
||||
padding-left: 2.667vw;
|
||||
padding-right: 2.667vw;
|
||||
}
|
||||
|
||||
.thin-border_t:before {
|
||||
border-bottom: .267vw solid;
|
||||
border-color: inherit;
|
||||
content: "";
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
transform: scaleY(.5);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__ft .btn-box {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__ft .btn-box .btn {
|
||||
background-color: #06a2b3;
|
||||
border-radius: 3.6vw;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
font-size: 3.2vw;
|
||||
font-weight: 500;
|
||||
height: 7.2vw;
|
||||
line-height: 7.2vw;
|
||||
margin-left: 2.667vw;
|
||||
min-width: 18vw;
|
||||
padding: 0 1.333vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.order-list .order-item .order-item__ft .btn-box .btn-grey {
|
||||
background-color: #fff;
|
||||
border: .267vw solid #222;
|
||||
color: #222;
|
||||
line-height: 6.933vw;
|
||||
}
|
||||
|
||||
.van-list__error-text,.van-list__finished-text,.van-list__loading,.van-pull-refresh__head {
|
||||
color: #969799;
|
||||
font-size: 14px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
192
pages/orderPay/orderPay.js
Normal file
192
pages/orderPay/orderPay.js
Normal file
@@ -0,0 +1,192 @@
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), t = require("../../@babel/runtime/helpers/asyncToGenerator"), a = (getApp(),
|
||||
require("../../utils/login.js")), r = require("../../utils/common.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
num: "",
|
||||
name: "",
|
||||
mobile: "",
|
||||
uniqid: "",
|
||||
tips: "",
|
||||
info: {},
|
||||
totalprice: "",
|
||||
amount: 0,
|
||||
data: {},
|
||||
ordercart: [],
|
||||
orderData: {},
|
||||
token: "",
|
||||
restTime: "",
|
||||
orderid: ""
|
||||
},
|
||||
onLoad: function(e) {
|
||||
this.setData({
|
||||
num: e.num,
|
||||
name: e.name,
|
||||
mobile: e.mobile,
|
||||
amount: e.amount,
|
||||
uniqid: e.uniqid,
|
||||
orderid: e.orderid
|
||||
}), e.orderid ? this.getOrderDetail() : this.payCreate();
|
||||
},
|
||||
input: function(e) {
|
||||
this.setData({
|
||||
tips: e.detail.value
|
||||
});
|
||||
},
|
||||
payCreate: function() {
|
||||
var r = this;
|
||||
return t(e.default.mark(function t() {
|
||||
var n, s;
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
return r, e.prev = 1, e.next = 4, a.request(a.baseUrl + "shop/order/submit", {
|
||||
uniqid: r.data.uniqid,
|
||||
name: r.data.name,
|
||||
mobile: r.data.mobile,
|
||||
amount: r.data.amount,
|
||||
orderid: r.data.orderid
|
||||
}, !0);
|
||||
|
||||
case 4:
|
||||
n = e.sent, s = n.data, r.setData({
|
||||
message: n.message,
|
||||
status: s.status,
|
||||
data: s
|
||||
}), r.getOrderDetail(), e.next = 13;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
e.prev = 10, e.t0 = e.catch(1), console.log(e.t0);
|
||||
|
||||
case 13:
|
||||
case "end":
|
||||
return e.stop();
|
||||
}
|
||||
}, t, null, [ [ 1, 10 ] ]);
|
||||
}))();
|
||||
},
|
||||
getOrderDetail: function() {
|
||||
var n = this;
|
||||
return t(e.default.mark(function t() {
|
||||
var s, i, o;
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
return n, s = n.data.orderid || n.data.data.orderid, e.prev = 2, e.next = 5, a.request(a.baseUrl + "shop/order/detail", {
|
||||
orderid: s
|
||||
}, !0);
|
||||
|
||||
case 5:
|
||||
i = e.sent, o = i.data, console.log("(data.orderData.status", o.orderData.status),
|
||||
1 == o.orderData.status && wx.redirectTo({
|
||||
url: "/pages/orderPaySuccess/orderPaySuccess?orderid=" + o.orderData.orderid
|
||||
}), o.orderData.updatetime = r.changeTime(new Date(1e3 * o.orderData.updatetime)),
|
||||
n.setData({
|
||||
showLoding: !1,
|
||||
ordercart: o.ordercart,
|
||||
orderData: o.orderData,
|
||||
token: o.token
|
||||
}), n.calculateResttime(), e.next = 17;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
e.prev = 14, e.t0 = e.catch(2), console.log(e.t0);
|
||||
|
||||
case 17:
|
||||
case "end":
|
||||
return e.stop();
|
||||
}
|
||||
}, t, null, [ [ 2, 14 ] ]);
|
||||
}))();
|
||||
},
|
||||
calculateResttime: function() {
|
||||
var e = this;
|
||||
if (0 == this.data.orderData.status) {
|
||||
var t = r.restTime(this.data.orderData.payexpiredtime);
|
||||
t ? (this.setData({
|
||||
restTime: t.minute + ":" + t.second
|
||||
}), setTimeout(function() {
|
||||
e.calculateResttime();
|
||||
})) : (this.data.orderData.status = -1, this.setData({
|
||||
orderData: this.data.orderData
|
||||
}));
|
||||
}
|
||||
},
|
||||
ispay: !1,
|
||||
topay: function() {
|
||||
var r = this;
|
||||
return t(e.default.mark(function t() {
|
||||
var n, s, i;
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
if (n = r, -1 != r.data.orderData.status) {
|
||||
e.next = 3;
|
||||
break;
|
||||
}
|
||||
return e.abrupt("return", !1);
|
||||
|
||||
case 3:
|
||||
if (r.data.token) {
|
||||
e.next = 5;
|
||||
break;
|
||||
}
|
||||
return e.abrupt("return", !1);
|
||||
|
||||
case 5:
|
||||
if (!r.ispay) {
|
||||
e.next = 7;
|
||||
break;
|
||||
}
|
||||
return e.abrupt("return", !1);
|
||||
|
||||
case 7:
|
||||
return r.ispay = !0, n = r, e.prev = 9, e.next = 12, a.request(a.baseUrl + "shop/order/pay", {
|
||||
token: r.data.token,
|
||||
mark: r.data.tips
|
||||
}, !0);
|
||||
|
||||
case 12:
|
||||
if (s = e.sent, i = s.data.result) {
|
||||
e.next = 17;
|
||||
break;
|
||||
}
|
||||
return n.ispay = !1, e.abrupt("return", !1);
|
||||
|
||||
case 17:
|
||||
wx.showLoading({
|
||||
title: "正在发起支付..."
|
||||
}), wx.requestPayment({
|
||||
timeStamp: i.timestamp,
|
||||
nonceStr: i.nonceStr,
|
||||
package: i.package,
|
||||
signType: i.signType,
|
||||
paySign: i.paySign,
|
||||
success: function(e) {
|
||||
var t = n.data.orderid || n.data.data.orderid;
|
||||
wx.redirectTo({
|
||||
url: "/pages/orderPaySuccess/orderPaySuccess?orderid=" + t
|
||||
});
|
||||
},
|
||||
fail: function(e) {
|
||||
console.log(e);
|
||||
},
|
||||
complete: function(e) {
|
||||
n.ispay = !1, wx.hideLoading(), console.log("complate", e);
|
||||
}
|
||||
}), e.next = 25;
|
||||
break;
|
||||
|
||||
case 21:
|
||||
e.prev = 21, e.t0 = e.catch(9), console.log(e.t0), n.ispay = !1;
|
||||
|
||||
case 25:
|
||||
case "end":
|
||||
return e.stop();
|
||||
}
|
||||
}, t, null, [ [ 9, 21 ] ]);
|
||||
}))();
|
||||
}
|
||||
});
|
||||
8
pages/orderPay/orderPay.json
Normal file
8
pages/orderPay/orderPay.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"navigationBarTitleText": "聚美汽服",
|
||||
"navigationBarBackgroundColor": "#06acb3",
|
||||
"navigationBarTextStyle": "white",
|
||||
"usingComponents": {
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
75
pages/orderPay/orderPay.wxml
Normal file
75
pages/orderPay/orderPay.wxml
Normal file
@@ -0,0 +1,75 @@
|
||||
<page-loding wx:if="{{showLoding}}"></page-loding>
|
||||
<view class="payorder">
|
||||
<view class="container">
|
||||
<view class="order-time" wx:if="{{orderData.status==0}}">
|
||||
<view>支付剩余时间</view>
|
||||
<view class="time">{{restTime}}</view>
|
||||
</view>
|
||||
<view class="order-time" wx:if="{{orderData.status==-1}}">
|
||||
<view>订单已过期,请重新下单</view>
|
||||
</view>
|
||||
<view class="section">
|
||||
<view class="user-info">
|
||||
<view class="top">
|
||||
<view class="name">{{name}}</view>
|
||||
<view class="tel">{{mobile}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="section">
|
||||
<view class="goods-info thin-border_b" wx:for="{{ordercart}}" wx:key="index">
|
||||
<view class="lt">
|
||||
<view class="lt_pic">
|
||||
<image mode="widthFix" src="{{item.image}}"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="rt">
|
||||
<view class="rt_tit">{{item.shop.name}}</view>
|
||||
<view class="_btm">
|
||||
<view></view>
|
||||
<view class="rt_num">×{{item.shop_num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-area thin-border_b">
|
||||
<view class="order-item">
|
||||
<view class="hd">订单编号:</view>
|
||||
<view class="bd">{{data.orderid||orderid}}</view>
|
||||
</view>
|
||||
<view class="order-item">
|
||||
<view class="hd">下单时间:</view>
|
||||
<view class="bd">{{orderData.updatetime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-area thin-border_b">
|
||||
<view class="order-item">
|
||||
<view class="van-cell van-field" style="padding: 0px;">
|
||||
<view class="van-cell__title van-field__label">
|
||||
<view>订单备注:</view>
|
||||
</view>
|
||||
<view class="van-cell__value van-field__value">
|
||||
<view class="van-field__body">
|
||||
<input bindinput="input" class="van-field__control" placeholder="订单备注" placeholderClass="placehoder" type="text" value="{{tips}}"></input>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<input hidden="hidden" name="order_id" type="text"></input>
|
||||
</view>
|
||||
<view class="section-money">
|
||||
<view class="money__row">
|
||||
<view class="title title--big">商品总额</view>
|
||||
<view class="money money--black">¥{{orderData.total_price}}</view>
|
||||
</view>
|
||||
<view class="money__total"> 共{{orderData.total_num}}件商品,实付: <view>¥ </view>
|
||||
<view class="money"> {{orderData.pay_money}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view bindtap="topay" class="pay-btn">
|
||||
<view class="area">
|
||||
<view class="btn" url="/pages/orderList/orderList">立即支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
486
pages/orderPay/orderPay.wxss
Normal file
486
pages/orderPay/orderPay.wxss
Normal file
@@ -0,0 +1,486 @@
|
||||
.payorder .container {
|
||||
border: 0;
|
||||
display: block;
|
||||
min-height: 100vh;
|
||||
padding-bottom: 17.6vw;
|
||||
}
|
||||
|
||||
.payorder .section {
|
||||
background-color: #fff;
|
||||
margin-bottom: 2.667vw;
|
||||
padding: 0 4vw;
|
||||
}
|
||||
|
||||
.payorder .order-time {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
background-color: #06acb3;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 3.733vw;
|
||||
height: 26.4vw;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.payorder .order-time .time {
|
||||
font-size: 8vw;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.payorder .user-info {
|
||||
color: #2a2a2a;
|
||||
font-size: 3.467vw;
|
||||
line-height: 4.533vw;
|
||||
padding: 4vw 0;
|
||||
}
|
||||
|
||||
.payorder .user-info .top {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 4vw;
|
||||
}
|
||||
|
||||
.payorder .user-info .top+view {
|
||||
margin-top: 2.133vw;
|
||||
}
|
||||
|
||||
.payorder .user-info .name {
|
||||
padding-right: 6.667vw;
|
||||
}
|
||||
|
||||
.payorder .user-info .tel {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.payorder .goods-info {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
padding: 3.733vw 0;
|
||||
}
|
||||
|
||||
.payorder .goods-info .lt {
|
||||
-webkit-box-flex: 16vw;
|
||||
border-radius: 1.067vw;
|
||||
flex: 16vw 0 0;
|
||||
margin-right: 3.2vw;
|
||||
width: 16vw;
|
||||
}
|
||||
|
||||
.payorder .goods-info .lt_pic {
|
||||
overflow: hidden;
|
||||
padding-top: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.payorder .goods-info .lt_pic image {
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.payorder .goods-info .rt {
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.payorder .goods-info .rt,.payorder .goods-info .rt ._btm {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.payorder .goods-info .rt ._btm {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.payorder .goods-info .rt_tit {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
color: #2a2a2a;
|
||||
display: -webkit-box;
|
||||
font-size: 3.733vw;
|
||||
line-height: 5.067vw;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.payorder .goods-info .rt_price {
|
||||
font-size: 3.733vw;
|
||||
}
|
||||
|
||||
.payorder .goods-info .rt_num {
|
||||
font-size: 3.2vw;
|
||||
}
|
||||
|
||||
.payorder .goods-attr {
|
||||
padding: 2.667vw 0;
|
||||
}
|
||||
|
||||
.payorder .goods-attr .title {
|
||||
color: #2a2a2a;
|
||||
font-size: 3.733vw;
|
||||
margin-bottom: 2.133vw;
|
||||
}
|
||||
|
||||
.payorder .goods-attr .item {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.467vw;
|
||||
justify-content: space-between;
|
||||
line-height: 6.4vw;
|
||||
}
|
||||
|
||||
.payorder .goods-attr .it_name {
|
||||
color: #787878;
|
||||
}
|
||||
|
||||
.payorder .goods-attr .it_name .text {
|
||||
color: #2a2a2a;
|
||||
margin-left: 2.667vw;
|
||||
}
|
||||
|
||||
.payorder .goods-attr .it_price {
|
||||
color: #787878;
|
||||
}
|
||||
|
||||
.payorder .order-area {
|
||||
border-top: 1px solid #eee;
|
||||
padding: 2.667vw 0;
|
||||
}
|
||||
|
||||
.payorder .order-item {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.733vw;
|
||||
line-height: 7.467vw;
|
||||
}
|
||||
|
||||
.payorder .order-item .van-field__label {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.payorder .order-item .hd,.payorder .order-item .van-field__label {
|
||||
-webkit-box-flex: 21.333vw;
|
||||
flex: 21.333vw 0 0;
|
||||
width: 21.333vw;
|
||||
}
|
||||
|
||||
.payorder .order-item .bd {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.van-cell {
|
||||
align-items: flex-start;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
color: #323233;
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
overflow: hidden;
|
||||
padding: 10px 16px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell__value {
|
||||
word-wrap: break-word;
|
||||
color: #969799;
|
||||
display: inline-flex;
|
||||
flex: 1;
|
||||
overflow: visible;
|
||||
position: relative;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.van-field__body {
|
||||
-webkit-box-align: center;
|
||||
align-items: center;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-field__control {
|
||||
background-color: initial;
|
||||
border: 0;
|
||||
box-sizing: border-box;
|
||||
color: #323233;
|
||||
display: block;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
margin: 0;
|
||||
min-width: 0;
|
||||
resize: none;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.van-cell__title {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.payorder .order-item .item_input {
|
||||
height: 7.467vw;
|
||||
line-height: 7.467vw;
|
||||
}
|
||||
|
||||
.payorder .jifen-area {
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: reverse;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
height: 8vw;
|
||||
}
|
||||
|
||||
.payorder .jifen-area .van-checkbox__label {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.payorder .jifen-area .hd {
|
||||
color: #06a2b3;
|
||||
font-size: 3.733vw;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.payorder .jifen-area .bd {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.payorder .section-money {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
background-color: #fff;
|
||||
flex-direction: column;
|
||||
padding-left: 4vw;
|
||||
padding-top: 4.8vw;
|
||||
}
|
||||
|
||||
.payorder .section-money,.payorder .section-money>.money__row {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.payorder .section-money>.money__row {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 4vw;
|
||||
padding-right: 4vw;
|
||||
}
|
||||
|
||||
.payorder .money__row>.title {
|
||||
color: #2a2a2a;
|
||||
font-size: 3.733vw;
|
||||
}
|
||||
|
||||
.payorder .money__row>.title--big {
|
||||
font-size: 3.733vw;
|
||||
}
|
||||
|
||||
.payorder .money__row>.money {
|
||||
color: #eb5252;
|
||||
font-family: DIN;
|
||||
font-size: 3.733vw;
|
||||
}
|
||||
|
||||
.payorder .money__row>.money--black {
|
||||
color: #2a2a2a;
|
||||
}
|
||||
|
||||
.payorder .section-money>.money__total {
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border-top: 1px solid #eee;
|
||||
color: #2a2a2a;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 3.733vw;
|
||||
font-weight: 500;
|
||||
height: 14.4vw;
|
||||
justify-content: flex-end;
|
||||
padding-right: 4vw;
|
||||
}
|
||||
|
||||
.payorder .section-money>.money__total>span {
|
||||
color: #eb5252;
|
||||
font-size: 3.467vw;
|
||||
line-height: 3.467vw;
|
||||
}
|
||||
|
||||
.payorder .section-money>.money__total>.money {
|
||||
color: #eb5252;
|
||||
font-size: 4.8vw;
|
||||
line-height: 4vw;
|
||||
margin-left: .533vw;
|
||||
}
|
||||
|
||||
.payorder .pay-btn {
|
||||
background-color: #fff;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.payorder .pay-btn .area {
|
||||
padding: 2.667vw 4vw;
|
||||
}
|
||||
|
||||
.payorder .pay-btn .btn {
|
||||
background-color: #06acb3;
|
||||
border-radius: 4.8vw;
|
||||
color: #fff;
|
||||
font-size: 4vw;
|
||||
height: 100%;
|
||||
line-height: 9.6vw;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.payorder .section-block {
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: reverse;
|
||||
background-color: #fff;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
font-size: 4vw;
|
||||
margin-top: 2.667vw;
|
||||
padding: 4vw;
|
||||
}
|
||||
|
||||
.payorder .section-block .van-checkbox__label {
|
||||
-webkit-box-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.payorder .checkbox .wx-checkbox-input {
|
||||
background-color: #ddd;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
height: 4vw;
|
||||
overflow: hidden;
|
||||
width: 4vw;
|
||||
}
|
||||
|
||||
.payorder .checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
background: #ddd!important;
|
||||
}
|
||||
|
||||
.payorder .checkbox .wx-checkbox-input.wx-checkbox-input-checked:before {
|
||||
background-color: #7fc167;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
content: "";
|
||||
height: 100%;
|
||||
transform: translate(-51%,-51%) scale(.6);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.payorder .popbox {
|
||||
background: #fff;
|
||||
border-radius: 4vw;
|
||||
height: 65.467vw;
|
||||
left: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%,-70%);
|
||||
width: 72vw;
|
||||
}
|
||||
|
||||
.payorder .popbox .title {
|
||||
color: #2a2a2a;
|
||||
font-size: 4.8vw;
|
||||
font-weight: 600;
|
||||
height: 17.333vw;
|
||||
line-height: 17.333vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.payorder .popbox .mesbox {
|
||||
color: #2a2a2a;
|
||||
font-size: 4vw;
|
||||
line-height: 6.4vw;
|
||||
padding: 7.6vw 0 12.267vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.payorder .popbox .btnbox {
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 0 5.6vw;
|
||||
}
|
||||
|
||||
.payorder .popbox .btnbox .btn {
|
||||
border-color: #2a2a2a;
|
||||
border-radius: 12vw;
|
||||
color: #2a2a2a;
|
||||
font-size: 3.733vw;
|
||||
height: 9.333vw;
|
||||
line-height: 9.333vw;
|
||||
text-align: center;
|
||||
width: 28vw;
|
||||
}
|
||||
|
||||
.placeholder {
|
||||
line-height: 24px;
|
||||
}
|
||||
5
pages/orderPaySuccess/matchList/matchList.js
Normal file
5
pages/orderPaySuccess/matchList/matchList.js
Normal file
@@ -0,0 +1,5 @@
|
||||
Component({
|
||||
properties: {},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|
||||
4
pages/orderPaySuccess/matchList/matchList.json
Normal file
4
pages/orderPaySuccess/matchList/matchList.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
23
pages/orderPaySuccess/matchList/matchList.wxml
Normal file
23
pages/orderPaySuccess/matchList/matchList.wxml
Normal file
@@ -0,0 +1,23 @@
|
||||
<view class="info-wrap">
|
||||
<view class="module-title">
|
||||
<view class="tit">搭配更优惠 <view class="line"></view>
|
||||
</view>
|
||||
</view>
|
||||
<navigator class="tuijian-goods" href="#/info/index?id=764&cid=99999991" wx:for="{{2}}">
|
||||
<view class="lt">
|
||||
<image mode="widthFix" src="http://q990.img.aiyichuan.com/urm_huodong/20200331/1585643794622.jpg?imageView2/1/w/400/h/400"></image>
|
||||
</view>
|
||||
<view class="tuijian-rt">
|
||||
<view class="goods-name">【新会】椰子鸡再次返场!9.9元起抢「骨汁恋·星汇店」100元代金券!</view>
|
||||
<view class="goods-info">
|
||||
<view class="price">
|
||||
<view class="lt">
|
||||
<view class="now-price">¥9.90</view>
|
||||
<view class="old-price">¥100.00</view>
|
||||
</view>
|
||||
<view class="btn">立即抢购</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</view>
|
||||
137
pages/orderPaySuccess/matchList/matchList.wxss
Normal file
137
pages/orderPaySuccess/matchList/matchList.wxss
Normal file
@@ -0,0 +1,137 @@
|
||||
.info-wrap {
|
||||
background-color: #fff;
|
||||
border-top: 3.2vw solid #f8f8f8;
|
||||
padding: 0 4vw 5.333vw;
|
||||
}
|
||||
|
||||
.module-title {
|
||||
color: #2a2a2a;
|
||||
font-size: 4.267vw;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
margin: 5.333vw 0 8.533vw;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.module-title .tit {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.module-title .line {
|
||||
background-color: #06a2b3;
|
||||
border-radius: .8vw;
|
||||
height: .8vw;
|
||||
left: 35%;
|
||||
margin-top: 2.133vw;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.tuijian-goods {
|
||||
border-radius: 1.6vw;
|
||||
box-shadow: 0 1.067vw 2.667vw 0 rgba(0,0,0,.08);
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
padding: 3.6vw;
|
||||
}
|
||||
|
||||
.tuijian-goods .lt {
|
||||
-ms-flex-negative: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tuijian-goods .lt image {
|
||||
display: block;
|
||||
height: 26vw;
|
||||
width: 26vw;
|
||||
}
|
||||
|
||||
.tuijian-goods .tuijian-rt {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-box-direction: normal;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-box-flex: 1;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
margin-left: 3.2vw;
|
||||
}
|
||||
|
||||
.tuijian-goods .vip-price {
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
.tuijian-goods .goods-name {
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
color: #2a2a2a;
|
||||
display: -webkit-box;
|
||||
font-size: 3.733vw;
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.tuijian-goods .goods-info .price {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
-webkit-box-pack: justify;
|
||||
-ms-flex-pack: justify;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.tuijian-goods .goods-info .now-price {
|
||||
color: #eb5252;
|
||||
font-size: 3.467vw;
|
||||
font-weight: 500;
|
||||
margin-right: 3.2vw;
|
||||
}
|
||||
|
||||
.tuijian-goods .goods-info .old-price {
|
||||
color: #9b9b9b;
|
||||
font-size: 3.2vw;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.tuijian-goods .goods-info .btn {
|
||||
-ms-flex-negative: 0;
|
||||
background-color: #06a2b3;
|
||||
border-radius: .933vw;
|
||||
color: #fff;
|
||||
flex-shrink: 0;
|
||||
font-size: 3.2vw;
|
||||
height: 6.667vw;
|
||||
line-height: 6.667vw;
|
||||
text-align: center;
|
||||
width: 18.667vw;
|
||||
}
|
||||
|
||||
.vip-price {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
background-color: #2a2a2a;
|
||||
border-radius: .8vw;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
font-size: 2.933vw;
|
||||
margin-right: 2.667vw;
|
||||
}
|
||||
50
pages/orderPaySuccess/orderPaySuccess.js
Normal file
50
pages/orderPaySuccess/orderPaySuccess.js
Normal file
@@ -0,0 +1,50 @@
|
||||
var e = require("../../@babel/runtime/helpers/interopRequireDefault")(require("../../@babel/runtime/regenerator")), r = require("../../@babel/runtime/helpers/slicedToArray"), t = require("../../@babel/runtime/helpers/asyncToGenerator"), i = (getApp(),
|
||||
require("../../utils/login.js"));
|
||||
|
||||
require("../../utils/common.js");
|
||||
|
||||
Page({
|
||||
data: {
|
||||
showLoding: !0,
|
||||
orderid: "",
|
||||
recommendedList: [],
|
||||
info: {}
|
||||
},
|
||||
onLoad: function(e) {
|
||||
this.setData({
|
||||
orderid: e.orderid || ""
|
||||
}), this.getOrderDetail();
|
||||
},
|
||||
getOrderDetail: function() {
|
||||
var n = this;
|
||||
return t(e.default.mark(function t() {
|
||||
var a, o, s;
|
||||
return e.default.wrap(function(e) {
|
||||
for (;;) switch (e.prev = e.next) {
|
||||
case 0:
|
||||
return n, e.prev = 1, a = n.data.orderid, e.next = 5, i.request(i.baseUrl + "shop/notify/paymentSuccessful", {
|
||||
orderid: a
|
||||
}, !0);
|
||||
|
||||
case 5:
|
||||
o = e.sent, console.log("getOrderDetail", o), (s = o.data).recommendedList.forEach(function(e) {
|
||||
var t = e.price.split("."), i = r(t, 2);
|
||||
e.price_buck = i[0], e.price_cent = i[1];
|
||||
}), n.setData({
|
||||
showLoding: !1,
|
||||
info: s,
|
||||
recommendedList: s.recommendedList
|
||||
}), 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();
|
||||
}
|
||||
}, t, null, [ [ 1, 12 ] ]);
|
||||
}))();
|
||||
}
|
||||
});
|
||||
7
pages/orderPaySuccess/orderPaySuccess.json
Normal file
7
pages/orderPaySuccess/orderPaySuccess.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"match-list": "./matchList/matchList",
|
||||
"recomond-list": "../goodsDetails/recomondList/recomondList",
|
||||
"page-loding": "../../template/pageLoding/pageLoding"
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user