This commit is contained in:
2024-08-22 12:53:28 +08:00
commit 1d65a849fd
360 changed files with 41757 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
var e = getApp();
Page({
data: {
disabled: !1,
nav_select: !1,
name: "",
region: "",
phone: "",
detail: "",
error: ""
},
onLoad: function(e) {},
saveData: function(a) {
var t = this, n = a.detail.value;
if (n.region = t.data.region, !t.validation(n)) return e.showError(t.data.error),
!1;
t.setData({
disabled: !0
}), e._post_form("address/add", n, function(a) {
e.showSuccess(a.msg, function() {
wx.navigateBack();
});
}, !1, function() {
t.setData({
disabled: !1
});
});
},
webvue1: function() {
console.log(111), wx.navigateTo({
url: "webvue?id=1"
});
},
webvue2: function() {
console.log(111), wx.navigateTo({
url: "webvue?id=2"
});
},
validation: function(e) {
if ("" === e.name) return this.data.error = "收件人不能为空", !1;
if (e.phone.length < 1) return this.data.error = "手机号不能为空", !1;
return /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/.test(e.phone) ? this.data.region ? "" !== e.detail || (this.data.error = "详细地址不能为空",
!1) : (this.data.error = "省市区不能空", !1) : (this.data.error = "手机号不符合要求", !1);
},
bindRegionChange: function(e) {
this.setData({
region: e.detail.value
});
}
});

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "新增收货地址",
"usingComponents": {
"shortcut": "/components/shortcut/shortcut"
}
}

View File

@@ -0,0 +1,52 @@
<view class="container">
<view class="common-header-xian"></view>
<form bindsubmit="saveData">
<view class="address-cont-title b-f b-b">
<view class="list address-box dis-flex b-b">
<view class="left-name">
<text class="f-30">收货人</text>
</view>
<view class="right-cont flex-box">
<input name="name" placeholder="请输入收货人姓名" value="{{name}}"></input>
</view>
</view>
<view class="list address-box dis-flex">
<view class="left-name">
<text class="f-30">手机号</text>
</view>
<view class="right-cont flex-box">
<input name="phone" placeholder="请输入收货人联系电话" type="number" value="{{phone}}"></input>
</view>
</view>
</view>
<view class="address-cont-title b-f b-b">
<view class="dis-flex list address-box m-top20 b-b">
<view class="left-name">
<text class="f-30">所在地区</text>
</view>
<view class="address-cont-box flex-box">
<picker bindchange="bindRegionChange" mode="region">
<text class="f-30" wx:if="{{region}}">{{region}}</text>
<text class="f-30 col-7" wx:else>选择省、市、区</text>
</picker>
</view>
</view>
<view class="dis-flex list address-box">
<view class="left-name">
<text class="f-30">详细地址</text>
</view>
<view class="right-cont flex-box">
<input name="detail" placeholder="请输入街道小区楼层" type="text" value="{{detail}}"></input>
</view>
</view>
</view>
<view class="padding-box m-top20 profile-btn">
<button disabled="{{disabled}}" formType="submit">保存</button>
</view>
</form>
<view>
<view bindtap="webvue1" style="color: blue;"> 《用户服务协议》 </view>
<view bindtap="webvue2" style="color: blue;"> 《隐私政策》 </view>
</view>
</view>
<shortcut></shortcut>

View File

@@ -0,0 +1,172 @@
.profile-list .admin {
color: #333;
font-size: 30rpx;
padding-left: 15px;
}
.address-box .left-name {
width: 85px;
}
.address-cont-title .list {
padding: 24rpx;
width: auto;
}
.tui-picker-detail text {
padding: 0 10rpx;
}
.infoText {
display: block;
line-height: 56rpx;
}
picker-view {
background-color: #fff;
bottom: 0;
height: 480rpx;
padding: 0;
position: fixed;
width: 100%;
}
picker-view-column view {
align-items: center;
display: flex;
font-size: 28rpx;
height: 100%;
justify-content: center;
line-height: 28rpx;
vertical-align: middle;
}
.animation-element-wrapper {
height: 100%;
left: 0;
top: 0;
z-index: 21;
}
.animation-element,.animation-element-wrapper {
display: flex;
position: fixed;
width: 100%;
}
.animation-element {
background-color: #fff;
bottom: 0;
height: 570rpx;
}
.animation-button {
align-items: center;
height: 100rpx;
line-height: 100rpx;
margin-top: 20rpx;
top: 20rpx;
width: 400rpx;
}
.address-text {
color: #999;
display: inline-flex;
font-family: Arial,Helvetica,sans-serif;
font-size: 30rpx;
height: 50rpx;
line-height: 50rpx;
margin-top: 20rpx;
position: fixed;
text-align: center;
}
.left-bt {
left: 30rpx;
}
.right-bt {
color: #ec5151;
right: 30rpx;
}
.line {
background-color: #eee;
display: block;
height: 1rpx;
margin-top: 89rpx;
position: fixed;
width: 100%;
}
.address-box .right-cont input {
color: #444;
font-size: 30rpx;
width: 100%;
}
.bargain-commont-bg {
background: rgba(0,0,0,.6);
bottom: 0;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 20;
}
.f-34 {
font-size: 34rpx;
}
.f-32 {
font-size: 32rpx;
}
.f-31 {
font-size: 31rpx;
}
.f-28 {
font-size: 28rpx;
}
.f-26 {
font-size: 26rpx;
}
.f-24 {
font-size: 24rpx;
}
.f-22 {
font-size: 22rpx;
}
.b-r {
border-right: 1rpx solid #eee;
}
.b-b {
border-bottom: 1rpx solid #eee;
}
.b-t {
border-top: 1rpx solid #eee;
}
.m-top4 {
margin-top: 4rpx;
}
.m-top10 {
margin-top: 10rpx;
}
.m-top20 {
margin-top: 25rpx;
}
.m-top35 {
margin-top: 35rpx;
}

View File

@@ -0,0 +1,49 @@
var a = getApp();
Page({
data: {
disabled: !1,
nav_select: !1,
region: "",
detail: {},
error: ""
},
onLoad: function(a) {
this.getAddressDetail(a.address_id);
},
getAddressDetail: function(t) {
var e = this;
a._get("address/detail", {
address_id: t
}, function(a) {
e.setData(a.data);
});
},
saveData: function(t) {
var e = this, d = t.detail.value;
if (d.region = e.data.region, !e.validation(d)) return a.showError(e.data.error),
!1;
e.setData({
disabled: !0
}), d.address_id = e.data.detail.address_id, a._post_form("address/edit", d, function(t) {
a.showSuccess(t.msg, function() {
wx.navigateBack();
});
}, !1, function() {
e.setData({
disabled: !1
});
});
},
validation: function(a) {
if ("" === a.name) return this.data.error = "收件人不能为空", !1;
if (a.phone.length < 1) return this.data.error = "手机号不能为空", !1;
return /^((0\d{2,3}-\d{7,8})|(1[3456789]\d{9}))$/.test(a.phone) ? this.data.region ? "" !== a.detail || (this.data.error = "详细地址不能为空",
!1) : (this.data.error = "省市区不能空", !1) : (this.data.error = "手机号不符合要求", !1);
},
bindRegionChange: function(a) {
this.setData({
region: a.detail.value
});
}
});

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "编辑收货地址",
"usingComponents": {
"shortcut": "/components/shortcut/shortcut"
}
}

View File

@@ -0,0 +1,48 @@
<view class="container">
<view class="common-header-xian"></view>
<form bindsubmit="saveData">
<view class="address-cont-title b-f b-b">
<view class="list address-box dis-flex b-b">
<view class="left-name">
<text class="f-30">收货人</text>
</view>
<view class="right-cont flex-box">
<input name="name" placeholder="请输入收货人姓名" value="{{detail.name}}"></input>
</view>
</view>
<view class="list address-box dis-flex">
<view class="left-name">
<text class="f-30">手机号</text>
</view>
<view class="right-cont flex-box">
<input name="phone" placeholder="请输入收货人联系电话" type="number" value="{{detail.phone}}"></input>
</view>
</view>
</view>
<view class="address-cont-title b-f b-b">
<view class="dis-flex list address-box m-top20 b-b">
<view class="left-name">
<text class="f-30">所在地区</text>
</view>
<view class="address-cont-box flex-box">
<picker bindchange="bindRegionChange" mode="region" value="{{region}}">
<text class="f-30" wx:if="{{region.length}}">{{region}}</text>
<text class="f-30 col-7" wx:else>选择省、市、区</text>
</picker>
</view>
</view>
<view class="dis-flex list address-box">
<view class="left-name">
<text class="f-30">详细地址</text>
</view>
<view class="right-cont flex-box">
<input name="detail" placeholder="请输入街道小区楼层" type="text" value="{{detail.detail}}"></input>
</view>
</view>
</view>
<view class="padding-box m-top20 profile-btn">
<button disabled="{{disabled}}" formType="submit">保存</button>
</view>
</form>
</view>
<shortcut></shortcut>

View File

@@ -0,0 +1,172 @@
.profile-list .admin {
color: #333;
font-size: 30rpx;
padding-left: 15px;
}
.address-box .left-name {
width: 85px;
}
.address-cont-title .list {
padding: 24rpx;
width: auto;
}
.tui-picker-detail text {
padding: 0 10rpx;
}
.infoText {
display: block;
line-height: 56rpx;
}
picker-view {
background-color: #fff;
bottom: 0;
height: 480rpx;
padding: 0;
position: fixed;
width: 100%;
}
picker-view-column view {
align-items: center;
display: flex;
font-size: 28rpx;
height: 100%;
justify-content: center;
line-height: 28rpx;
vertical-align: middle;
}
.animation-element-wrapper {
height: 100%;
left: 0;
top: 0;
z-index: 21;
}
.animation-element,.animation-element-wrapper {
display: flex;
position: fixed;
width: 100%;
}
.animation-element {
background-color: #fff;
bottom: 0;
height: 570rpx;
}
.animation-button {
align-items: center;
height: 100rpx;
line-height: 100rpx;
margin-top: 20rpx;
top: 20rpx;
width: 400rpx;
}
.address-text {
color: #999;
display: inline-flex;
font-family: Arial,Helvetica,sans-serif;
font-size: 30rpx;
height: 50rpx;
line-height: 50rpx;
margin-top: 20rpx;
position: fixed;
text-align: center;
}
.left-bt {
left: 30rpx;
}
.right-bt {
color: #ec5151;
right: 30rpx;
}
.line {
background-color: #eee;
display: block;
height: 1rpx;
margin-top: 89rpx;
position: fixed;
width: 100%;
}
.address-box .right-cont input {
color: #444;
font-size: 30rpx;
width: 100%;
}
.bargain-commont-bg {
background: rgba(0,0,0,.6);
bottom: 0;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 20;
}
.f-34 {
font-size: 34rpx;
}
.f-32 {
font-size: 32rpx;
}
.f-31 {
font-size: 31rpx;
}
.f-28 {
font-size: 28rpx;
}
.f-26 {
font-size: 26rpx;
}
.f-24 {
font-size: 24rpx;
}
.f-22 {
font-size: 22rpx;
}
.b-r {
border-right: 1rpx solid #eee;
}
.b-b {
border-bottom: 1rpx solid #eee;
}
.b-t {
border-top: 1rpx solid #eee;
}
.m-top4 {
margin-top: 4rpx;
}
.m-top10 {
margin-top: 10rpx;
}
.m-top20 {
margin-top: 25rpx;
}
.m-top35 {
margin-top: 35rpx;
}

View File

@@ -0,0 +1,54 @@
var t = getApp();
Page({
data: {
list: [],
default_id: null
},
onLoad: function(t) {
this.data.options = t;
},
onShow: function() {
this.getAddressList();
},
getAddressList: function() {
var e = this;
t._get("address/lists", {}, function(t) {
e.setData(t.data);
});
},
createAddress: function() {
wx.navigateTo({
url: "./createa"
});
},
editAddress: function(t) {
wx.navigateTo({
url: "./detail?address_id=" + t.currentTarget.dataset.id
});
},
removeAddress: function(e) {
var s = this, a = e.currentTarget.dataset.id;
wx.showModal({
title: "提示",
content: "您确定要移除当前收货地址吗?",
success: function(e) {
e.confirm && t._post_form("address/delete", {
address_id: a
}, function(t) {
s.getAddressList();
});
}
});
},
setDefault: function(e) {
var s = this, a = e.detail.value;
return s.setData({
default_id: parseInt(a)
}), t._post_form("address/setDefault", {
address_id: a
}, function(t) {
"flow" === s.data.options.from && wx.navigateBack();
}), !1;
}
});

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "收货地址",
"usingComponents": {
"shortcut": "/components/shortcut/shortcut"
}
}

View File

@@ -0,0 +1,45 @@
<view class="container m-b6 p-bottom">
<view class="common-header-xian"></view>
<custom-ul class="addres-list" wx:if="{{list.length}}">
<custom-li wx:for="{{list}}" wx:key="this">
<view class="address-header b-f m-top18">
<view class="flow-header-left pl-12">
<view class="flow-checkout-admin">{{item.name}} <text>{{item.phone}}</text>
</view>
<view class="flow-checkout-address"> {{item.region.province}} {{item.region.city}} {{item.region.region}} {{item.detail}} </view>
</view>
</view>
<view class="address-list dis-flex b-f">
<view class="list address-left">
<radio-group bindchange="setDefault" class="radio-group">
<label class="radio">
<radio checked="{{item.address_id==default_id}}" color="#ff495e" value="{{item.address_id}}"></radio>
<text class="cont" wx:if="{{item.address_id==default_id}}">默认</text>
<text class="cont" wx:else>选择</text>
</label>
</radio-group>
</view>
<view class="list address-right dis-flex">
<view bindtap="editAddress" data-id="{{item.address_id}}">
<text class="iconfont icon-edit"></text>
<text class="title">编辑</text>
</view>
<view bindtap="removeAddress" data-id="{{item.address_id}}">
<text class="iconfont icon-lajixiang"></text>
<text class="title">删除</text>
</view>
</view>
</view>
</custom-li>
</custom-ul>
<view wx:else>
<view class="yoshop-notcont">
<text class="iconfont icon-ziyuan"></text>
<text class="cont">亲,您还没有收货列表</text>
</view>
</view>
<view class="footer-fixed f-32">
<view bindtap="createAddress" class="order-bt" style="width:100%">添加新地址</view>
</view>
</view>
<shortcut></shortcut>

View File

@@ -0,0 +1,100 @@
.address-list {
border-bottom: 1px solid #f6f6f9;
}
.address-list .list {
padding: 15rpx;
}
.address-list .list .title {
color: #666;
font-size: 30rpx;
padding: 0 24rpx 0 6rpx;
}
.address-list .list .cont {
color: #333;
font-size: 30rpx;
}
.address-list .list navigator {
display: inline-block;
}
.address-list .list image {
height: 28rpx;
width: 28rpx;
}
.address-left {
flex: 6;
}
.address-right {
flex: 3.2;
}
.address-right .iconfont {
color: #777;
font-size: 30rpx;
}
.flow-fixed-footer {
background: #f42424;
bottom: 0;
position: fixed;
width: 100%;
z-index: 4999;
}
.flow-fixed-footer .chackout-left {
color: #777;
font-size: 32rpx;
line-height: 44px;
}
.flow-fixed-footer .chackout-right {
font-size: 34rpx;
}
.address-header {
background-size: 120rpx auto;
border-bottom: 1px solid #f6f6f9;
font-size: 1.7rem;
padding: 28rpx 0;
}
.flow-header-left {
flex: 14;
padding: 0rpx 20rpx;
}
.flow-header-right {
flex: 1;
}
.flow-header-right image {
float: right;
height: 34rpx;
margin-top: 20rpx;
width: 34rpx;
}
.address-header .flow-checkout-admin {
color: #444;
font-size: 34rpx;
}
.address-header .flow-checkout-admin text {
padding: 0 10rpx;
}
.address-header .flow-checkout-address {
color: #777;
font-size: 26rpx;
margin-top: 6rpx;
}
.radio-group raido {
color: #f42424;
}

View File

@@ -0,0 +1,14 @@
Page({
data: {
url2: "https://wxminiapp.19year.cn/2.html",
url1: "https://wxminiapp.19year.cn/1.html",
url: ""
},
onLoad: function(t) {
console.log("id", t.id), "1" == t.id ? (console.log(1), this.setData({
url: "https://wxminiapp.19year.cn/1.html?dat=" + Date.now()
})) : (console.log(2), this.setData({
url: "https://wxminiapp.19year.cn/2.html?dat=" + Date.now()
})), console.log(this.url);
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "说明",
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<web-view src="{{url}}"></web-view>

View File

@@ -0,0 +1,68 @@
var e = getApp();
Page({
data: {
disabled: !1,
nav_select: !1,
name: "",
region: "",
phone: "",
detail: "",
error: "",
order_goods_id: 0,
info: {}
},
onLoad: function(e) {
this.data.order_goods_id = e.order_goods_id, this.getOrderDetail(e.order_goods_id);
},
goodsDetail: function(e) {
var t = e.currentTarget.dataset.id;
wx.navigateTo({
url: "../goods/index?goods_id=" + t
});
},
getOrderDetail: function(t) {
var a = this;
e._get("user.order_goods/getOrderGoods", {
order_goods_id: t
}, function(e) {
e.data.info.aftermarket_apply_date = a.formatDate(1e3 * e.data.info.aftermarket_apply_time),
e.data.info.aftermarket_dispose_date = a.formatDate(1e3 * e.data.info.aftermarket_dispose_time),
a.setData(e.data);
});
},
formatDate: function(e) {
var t = new Date(e), a = t.getFullYear(), r = t.getMonth() + 1;
r = r < 10 ? "0" + r : r;
var o = t.getDate();
o = o < 10 ? "0" + o : o;
var d = t.getHours();
d = d < 10 ? "0" + d : d;
var i = t.getMinutes(), n = t.getSeconds();
return a + "-" + r + "-" + o + " " + d + ":" + (i = i < 10 ? "0" + i : i) + ":" + (n = n < 10 ? "0" + n : n);
},
saveData: function(t) {
var a = this, r = t.detail.value;
if (r.order_goods_id = a.data.order_goods_id, !a.validation(r)) return e.showError(a.data.error),
!1;
a.setData({
disabled: !0
}), e._post_form("user.order_goods/submitAftermarket", r, function(t) {
if (console.log(t), 1 != t.code) return e.showError(t.msg), !1;
a.getOrderDetail(a.data.order_goods_id);
}, !1, function() {
a.setData({
disabled: !1
});
});
},
validation: function(e) {
return "" === e.refund_reason ? (this.data.error = "退款原因不能为空", !1) : 20 != this.data.info.order.delivery_status || "" !== e.deliver_no || (this.data.error = "快递单号不能为空",
!1);
},
bindRegionChange: function(e) {
this.setData({
region: e.detail.value
});
}
});

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "售后详情",
"usingComponents": {
"shortcut": "/components/shortcut/shortcut"
}
}

View File

@@ -0,0 +1,85 @@
<view class="container">
<view class="common-header-xian"></view>
<view class="order-cont b-f m-top20">
<view class="padding-box b-f">
<view class="order-header dis-flex">
<view class="flex-box t-l">
<text class="title">商品详情</text>
</view>
</view>
</view>
<view class="padding-box b-f">
<view class="order-cont dis-flex">
<view class="order-num"></view>
<view class="order-time">
<text>{{order.create_time}}</text>
</view>
</view>
</view>
</view>
<view class="padding-box b-f">
<view bindtap="goodsDetail" class="dis-flex flow-shopList b-f" data-id="{{info.goods_id}}">
<view class="flow-list-left">
<image mode="scaleToFill" src="{{info.image.file_path}}"></image>
</view>
<view class="flow-list-right">
<text class="h4 twolist-hidden">{{info.goods_name}}</text>
<text class="p f-22 col-7">{{info.goods_attr}}</text>
<view class="flow-list-cont">
<text class="flow-cont">¥{{info.goods_price}}</text>
<text class="small">×{{info.total_num}}</text>
</view>
<view></view>
</view>
</view>
</view>
<form bindsubmit="saveData" wx:if="{{info.refund_status==0}}">
<view class="address-cont-title b-f b-b">
<view class="list address-box dis-flex b-b">
<view class="left-name">
<text class="f-30">退款原因</text>
</view>
<view class="right-cont flex-box">
<input name="refund_reason" placeholder="请输入退款原因" value=""></input>
</view>
</view>
<view class="list address-box dis-flex" wx:if="{{info.order.delivery_status.value==20}}">
<view class="left-name">
<text class="f-30">快递单号</text>
</view>
<view class="right-cont flex-box">
<input name="deliver_no" placeholder="请输入快递单号" value=""></input>
</view>
</view>
</view>
<view class="address-cont-title b-f b-b"></view>
<view class="padding-box m-top20 profile-btn">
<button disabled="{{disabled}}" formType="submit">提交</button>
</view>
</form>
<view class="flow-all-money b-f padding-box m-top20" wx:if="{{info.refund_status>0}}">
<view class="dis-flex flow-all-list-cont1">
<text class="col-16">退款单号: {{info.refund_no}}</text>
</view>
<view class="dis-flex flow-all-list-cont1">
<text class="col-16">退款原因: {{info.refund_reason}}</text>
</view>
<view class="dis-flex flow-all-list-cont1" wx:if="{{info.deliver_no.length>0}}">
<text class="col-16" selectable="{{true}}">快递单号: {{info.deliver_no}}</text>
</view>
<view class="dis-flex flow-all-list-cont1">
<text class="col-16" selectable="{{true}}" wx:if="{{info.refund_status==1}}">退款状态: 已申请</text>
<text class="col-16" selectable="{{true}}" wx:if="{{info.refund_status==2}}">退款状态: 已退款 </text>
</view>
<view class="dis-flex flow-all-list-cont1">
<text class="col-16" selectable="{{true}}">申请时间: {{info.aftermarket_apply_date}}</text>
</view>
<view class="dis-flex flow-all-list-cont1" wx:if="{{info.refund_status==2}}">
<text class="col-16" selectable="{{true}}">完成时间: {{info.aftermarket_dispose_date}} </text>
</view>
<view class="dis-flex flow-all-list-cont1" wx:if="{{info.refund_status==2}}">
<text class="col-16" selectable="{{true}}">退款金额: ¥{{info.refund_price}} </text>
</view>
</view>
</view>
<shortcut></shortcut>

View File

@@ -0,0 +1,224 @@
.profile-list .admin {
color: #333;
font-size: 30rpx;
padding-left: 15px;
}
.address-box .left-name {
width: 85px;
}
.address-cont-title .list {
padding: 24rpx;
width: auto;
}
.tui-picker-detail text {
padding: 0 10rpx;
}
.infoText {
display: block;
line-height: 56rpx;
}
picker-view {
background-color: #fff;
bottom: 0;
height: 480rpx;
padding: 0;
position: fixed;
width: 100%;
}
picker-view-column view {
align-items: center;
display: flex;
font-size: 28rpx;
height: 100%;
justify-content: center;
line-height: 28rpx;
vertical-align: middle;
}
.animation-element-wrapper {
height: 100%;
left: 0;
top: 0;
z-index: 21;
}
.animation-element,.animation-element-wrapper {
display: flex;
position: fixed;
width: 100%;
}
.animation-element {
background-color: #fff;
bottom: 0;
height: 570rpx;
}
.animation-button {
align-items: center;
height: 100rpx;
line-height: 100rpx;
margin-top: 20rpx;
top: 20rpx;
width: 400rpx;
}
.address-text {
color: #999;
display: inline-flex;
font-family: Arial,Helvetica,sans-serif;
font-size: 30rpx;
height: 50rpx;
line-height: 50rpx;
margin-top: 20rpx;
position: fixed;
text-align: center;
}
.left-bt {
left: 30rpx;
}
.right-bt {
color: #ec5151;
right: 30rpx;
}
.line {
background-color: #eee;
display: block;
height: 1rpx;
margin-top: 89rpx;
position: fixed;
width: 100%;
}
.address-box .right-cont input {
color: #444;
font-size: 30rpx;
width: 100%;
}
.bargain-commont-bg {
background: rgba(0,0,0,.6);
bottom: 0;
left: 0;
position: fixed;
right: 0;
top: 0;
z-index: 20;
}
.f-34 {
font-size: 34rpx;
}
.f-32 {
font-size: 32rpx;
}
.f-31 {
font-size: 31rpx;
}
.f-28 {
font-size: 28rpx;
}
.f-26 {
font-size: 26rpx;
}
.f-24 {
font-size: 24rpx;
}
.f-22 {
font-size: 22rpx;
}
.b-r {
border-right: 1rpx solid #eee;
}
.b-b {
border-bottom: 1rpx solid #eee;
}
.b-t {
border-top: 1rpx solid #eee;
}
.m-top4 {
margin-top: 4rpx;
}
.m-top10 {
margin-top: 10rpx;
}
.m-top20 {
margin-top: 25rpx;
}
.m-top35 {
margin-top: 35rpx;
}
.flow-list .header {
background: #fff;
border-bottom: 1rpx solid #f1f1f1;
padding: 15rpx 0;
position: relative;
}
.flow-list .header text {
font-size: 32rpx;
padding-left: 80rpx;
}
.flow-list .header image {
height: 37rpx;
left: 15px;
margin-top: -18rpx;
position: absolute;
top: 50%;
width: 34rpx;
}
.order-header {
border-bottom: 1rpx solid #f1f1f1;
padding: 15rpx 0;
}
.order-header text {
font-size: 28rpx;
}
.order-header text.title {
color: #333;
}
.order-cont {
justify-content: space-between;
}
.order-cont .order-num text,.order-cont .time {
color: #888;
}
.order-cont .order-num text,.order-cont .order-time text {
color: #777;
font-size: 26rpx;
}
.flow-all-list-cont1 {
font-size: 32rpx;
padding: 10rpx 0;
}

View File

@@ -0,0 +1,86 @@
var t = getApp();
Page({
data: {
dataType: "all",
data: []
},
onLoad: function(t) {
this.data.dataType = t.type || "all", this.setData({
dataType: this.data.dataType
});
},
onShow: function() {
this.getOrderList(this.data.dataType);
},
formatDate: function(t) {
var e = new Date(t), a = e.getFullYear(), r = e.getMonth() + 1;
r = r < 10 ? "0" + r : r;
var d = e.getDate();
d = d < 10 ? "0" + d : d;
var o = e.getHours();
o = o < 10 ? "0" + o : o;
var n = e.getMinutes(), i = e.getSeconds();
return a + "-" + r + "-" + d + " " + o + ":" + (n = n < 10 ? "0" + n : n) + ":" + (i = i < 10 ? "0" + i : i);
},
getOrderList: function(e) {
var a = this;
t._get("user.order_goods/getOrderGoodsList", {
dataType: e
}, function(t) {
t.data.length && wx.pageScrollTo({
scrollTop: 0
});
for (var e = 0; e < t.data.length; e++) t.data[e].aftermarket_apply_date = a.formatDate(1e3 * t.data[e].aftermarket_apply_time);
a.setData(t);
});
},
bindHeaderTap: function(t) {
this.setData({
dataType: t.target.dataset.type
}), this.getOrderList(t.target.dataset.type);
},
cancelOrder: function(e) {
var a = this, r = e.currentTarget.dataset.id;
wx.showModal({
title: "提示",
content: "确认取消订单?",
success: function(e) {
e.confirm && t._post_form("user.order/cancel", {
order_id: r
}, function(t) {
a.getOrderList(a.data.dataType);
});
}
});
},
receipt: function(e) {
var a = this, r = e.currentTarget.dataset.id;
wx.showModal({
title: "提示",
content: "确认收到商品?",
success: function(e) {
e.confirm && t._post_form("user.order/receipt", {
order_id: r
}, function(t) {
a.getOrderList(a.data.dataType);
});
}
});
},
detail: function(t) {
var e = t.currentTarget.dataset.id;
wx.navigateTo({
url: "../aftermarket/create?order_goods_id=" + e
});
},
orderDetail: function(t) {
var e = t.currentTarget.dataset.id;
wx.navigateTo({
url: "../order/detail?order_id=" + e
});
},
onPullDownRefresh: function() {
wx.stopPullDownRefresh();
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "售后订单",
"usingComponents": {}
}

View File

@@ -0,0 +1,78 @@
<view class="container m-b5">
<view class="goods-detail-box">
<view class="header f-28 col-3">
<view catchtap="bindHeaderTap" class="{{dataType==='all'?'active':''}}" data-type="all">全部售后</view>
<view bindtap="bindHeaderTap" class="{{dataType==='apply'?'active':''}}" data-type="apply">已申请</view>
<view bindtap="bindHeaderTap" class="{{dataType==='complete'?'active':''}}" data-type="complete">已完成</view>
</view>
<scroll-view scrollY="{{true}}">
<view class="wrapper">
<view wx:if="{{data.length}}">
<view class="m-top20 " wx:for="{{data}}" wx:key="this">
<view class="order-box b-f">
<view class="order-header dis-flex">
<view class="flex-box t-l">
<text class="title">商品信息</text>
</view>
<view class="flex-box t-r">
<text class="cont" wx:if="{{item.refund_status==2}}">已完成</text>
<text class="cont" wx:if="{{item.refund_status==1}}">已申请</text>
</view>
</view>
</view>
<view class="order-box b-f">
<view class="order-cont dis-flex">
<view class="order-num">
<text>退款单号:{{item.refund_no}}</text>
</view>
<view class="order-time">
<text>{{item.create_time}}</text>
</view>
</view>
</view>
<view class="order-box order-img_list">
<view class="order-shop">
<view bindtap="detail" class="order-list-box dis-flex" data-id="{{item.order_goods_id}}">
<view class="left">
<view class="dis-flex">
<view class="order-shop-left">
<image src="{{item.image.file_path}}"></image>
</view>
</view>
</view>
<view class="right p-r">
<text class="goods-number">共1件</text>
<text class="iconfont icon-xiangyoujiantou user-orderJtou"></text>
</view>
</view>
</view>
</view>
<view class="order-box b-f">
<view class="order-btn dis-flex">
<view class="order-left">
<view class="text">
<text>申请时间:</text>
<text class="">{{item.aftermarket_apply_date}}</text>
</view>
</view>
<view class="order-right">
<view class="dis-flex">
<view class="flex-box">
<view bindtap="orderDetail" class="btn-main" data-id="{{item.order_id}}">订单详情</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view wx:else>
<view class="yoshop-notcont">
<text class="iconfont icon-ziyuan"></text>
<text class="cont">亲,您还没有售后信息哦!</text>
</view>
</view>
</view>
</scroll-view>
</view>
</view>

View File

@@ -0,0 +1,151 @@
.header {
background: #fff;
border-bottom: 1rpx solid #e4e4e4;
display: flex;
height: 44px;
line-height: 44px;
position: fixed;
top: 0;
width: 100%;
z-index: 100;
}
.header view {
flex: 1;
text-align: center;
}
.header .active {
color: #fd4a5f;
}
.wrapper {
margin-top: 54px;
}
.order-box {
padding: 0 15px;
}
.order-header {
padding-top: 10rpx;
}
.order-header .title {
color: #333;
font-size: 30rpx;
}
.order-header .cont {
color: #fd4a5f;
font-size: 30rpx;
}
.order-cont {
justify-content: space-between;
padding: 15rpx 0;
}
.order-cont .order-num text,.order-cont .order-time text {
color: #777;
font-size: 26rpx;
}
.order-shop {
padding: 16rpx 0;
}
.order-shop-left,.order-shop-left image {
background: #fff;
display: inline-block;
height: 160rpx;
margin-right: 15rpx;
width: 160rpx;
}
.order-shop .num {
float: right;
}
.order-btn {
padding: 18rpx 0;
}
.order-btn .order-left {
flex: 3;
}
.order-btn .order-left .text,.order-btn .order-left text {
font-size: 30rpx;
}
.order-btn .order-left .text {
color: #777;
}
.order-btn .order-right {
flex: 1.5;
}
.order-list-box .left {
flex: 4;
overflow: hidden;
position: relative;
}
.order-list-box .right {
flex: 1;
}
.goods-number {
color: #777;
font-size: 28rpx;
position: absolute;
right: 12px;
top: 35%;
}
.btn-default {
border: 1rpx solid #ccc;
border-radius: 4px;
color: #555;
}
.btn-default,.btn-main {
float: right;
font-size: 28rpx;
padding: 6rpx 20rpx;
}
.btn-main {
border: 1rpx solid #fd4a5f;
border-radius: 4px;
color: #fd4a5f;
margin-left: 10rpx;
}
.user-orderJtou {
color: #888;
font-size: 24rpx;
margin-top: -20rpx;
position: absolute;
right: 0;
top: 50%;
}
.order-img_list {
background: #fff;
border-bottom: 1rpx solid #f1f1f1;
border-top: 1rpx solid #f1f1f1;
}
.order-right-name {
color: #555;
font-size: 30rpx;
left: 180rpx;
line-height: 1.6;
margin-top: -46rpx;
position: absolute;
top: 50%;
width: 100%;
}

View File

@@ -0,0 +1,85 @@
var t = getApp();
Page({
data: {
searchColor: "rgba(0,0,0,0.4)",
searchSize: "15",
searchName: "搜索商品",
scrollHeight: 0,
curIndex: -1,
curCateId: 0,
categoryList: [],
goodsList: [],
noMore: !1,
isLoading: !0,
page: 1
},
onLoad: function() {
this.setListHeight(), this.getCategoryList();
},
onShow: function() {},
setListHeight: function() {
var t = this;
wx.getSystemInfo({
success: function(a) {
t.setData({
scrollHeight: a.windowHeight - 47
});
}
});
},
getCategoryList: function() {
var a = this;
t._get("category/index", {}, function(t) {
var o = t.data;
a.setData({
categoryList: o.categoryList,
goodsList: o.goodsList
});
});
},
getGoodsList: function(a, o) {
var s = this;
t._get("goods/lists", {
page: o || 1,
category_id: s.data.curCateId
}, function(t) {
var o = t.data.list, e = s.data.goodsList;
1 == a ? s.setData({
"goodsList.data": e.data.concat(o.data),
isLoading: !1
}) : s.setData({
goodsList: o,
isLoading: !1
});
});
},
onTargetGoods: function(t) {
wx.navigateTo({
url: "../goods/index?goods_id=" + t.detail.target.dataset.id
});
},
onSelectNav: function(t) {
var a = t.currentTarget.dataset.index;
this.setData({
curIndex: a,
curCateId: a > -1 ? this.data.categoryList[a].category_id : 0,
goodsList: [],
page: 1,
noMore: !1,
isLoading: !0
}), this.getGoodsList();
},
onDownLoad: function() {
if (this.data.page >= this.data.goodsList.last_page) return this.setData({
noMore: !0
}), !1;
this.getGoodsList(!0, ++this.data.page);
},
onShareAppMessage: function() {
return {
title: "全部商品",
path: "/pages/category/index"
};
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "全部商品",
"usingComponents": {}
}

View File

@@ -0,0 +1,53 @@
<view class="container">
<view class="index-search-box">
<navigator class="index-search" hoverClass="none" openType="navigate" url="../search/index">
<view class="index-cont-search t-c">
<icon class="text-center" color="{{searchColor}}" size="{{searchSize}}" type="search"></icon>
<text>{{searchName}}</text>
</view>
</navigator>
</view>
<view class="cate-content dis-flex">
<scroll-view class="cate-left f-28" scrollY="{{true}}" style="height: {{scrollHeight}}px; ">
<text catchtap="onSelectNav" class="type-nav {{curIndex==-1?'selected':''}}" data-index="-1">全部</text>
<text catchtap="onSelectNav" class="type-nav {{curIndex==index?'selected':''}} onelist-hidden" data-index="{{index}}" wx:for="{{categoryList}}" wx:key="cateLeft">{{item.name}}</text>
</scroll-view>
<scroll-view bindscrolltolower="onDownLoad" class="cate-right b-f" scrollTop="{{scrollTop}}" scrollY="true" style="height: {{scrollHeight}}px; ">
<view class="goods-item" wx:for="{{goodsList.data}}" wx:key="this">
<form bindsubmit="onTargetGoods" reportSubmit="true">
<button class="btn-normal" data-id="{{item.goods_id}}" formType="submit">
<view class="goods-item_detail dis-flex">
<view class="goods-item_left">
<image src="{{item.goods_image}}"></image>
</view>
<view class="goods-item_right">
<view class="goods-item_title twolist-hidden">
<text>{{item.goods_name}}</text>
</view>
<view class="goods-item_desc">
<view class="desc-selling_point dis-flex">
<text class="onelist-hidden">{{item.selling_point}}</text>
</view>
<view class="desc-goods_sales onelist-hidden dis-flex">
<text>已售{{item.goods_sales}}件</text>
</view>
<view class="desc_footer">
<text class="price_x">¥{{item.goods_sku.goods_price}}</text>
<text class="price_y col-9">¥{{item.goods_sku.line_price}}</text>
</view>
</view>
</view>
</view>
</button>
</form>
</view>
<view class="no-more f-30" wx:if="{{noMore}}">亲, 没有更多了</view>
<view wx:if="{{!isLoading&&!goodsList.data.length}}">
<view class="yoshop-notcont">
<text class="iconfont icon-ziyuan"></text>
<text class="cont">亲,此处暂无商品哦</text>
</view>
</view>
</scroll-view>
</view>
</view>

View File

@@ -0,0 +1,132 @@
.index-search-box {
background: #fff;
padding: 13rpx 13rpx 18rpx;
}
.index-search {
border-bottom: 0;
border-radius: 50rpx;
box-sizing: border-box;
color: #999;
font-size: 28rpx;
height: 64rpx;
line-height: 64rpx;
overflow: hidden;
position: relative;
}
.index-search,page {
background: #fff;
}
.no-more {
font-size: 28rpx;
padding-top: 0;
}
.cate-content {
background: #fff;
width: 100%;
}
.cate-left {
background: #f8f8f8;
color: #444;
display: flex;
flex-direction: column;
height: 100%;
width: 22.2222%;
}
.cate-left .type-nav {
display: block;
font-size: 26rpx;
height: 90rpx;
line-height: 90rpx;
position: relative;
text-align: center;
z-index: 10;
}
.cate-left .type-nav.selected {
background: #fff;
border-right: none;
color: #ff495e;
font-size: 28rpx;
}
.cate-right {
width: 77.7778%;
}
.goods-item {
background: #fff;
box-sizing: border-box;
margin-bottom: 10rpx;
padding: 16rpx;
width: 100%;
}
.goods-item text {
line-height: 1.6;
}
.goods-item:last-child {
margin-bottom: 0;
}
.goods-item_left {
align-items: center;
background: #fff;
display: flex;
width: 36%;
}
.goods-item_left image {
display: block;
height: 190rpx;
width: 190rpx;
}
.goods-item_right {
padding-left: 20rpx;
position: relative;
width: 60%;
}
.goods-item_right .goods-item_title {
color: #333;
font-size: 26rpx;
height: 72rpx;
margin-top: 20rpx;
}
.goods-item_right .goods-item_title text {
line-height: 1.3;
}
.goods-item_desc {
margin-top: 8rpx;
}
.desc-selling_point {
color: #ff495e;
font-size: 24rpx;
width: 100%;
}
.desc-goods_sales {
color: #999;
font-size: 24rpx;
}
.desc_footer .price_x {
color: #f03c3c;
font-size: 27rpx;
margin-right: 16rpx;
}
.desc_footer .price_y {
font-size: 24rpx;
text-decoration: line-through;
}

View File

@@ -0,0 +1,90 @@
var t = getApp();
Page({
data: {
searchColor: "rgba(0,0,0,0.4)",
searchSize: "15",
searchName: "搜索商品",
scrollHeight: null,
showView: !1,
arrange: "",
sortType: "all",
sortPrice: !1,
option: {},
list: {},
noList: !0,
no_more: !1,
page: 1
},
onLoad: function(t) {
var a = this;
a.setListHeight(), a.setData({
option: t
}, function() {
a.getGoodsList(!0);
});
},
getGoodsList: function(a, e) {
var s = this;
t._get("goods/lists", {
page: e || 1,
sortType: s.data.sortType,
sortPrice: s.data.sortPrice ? 1 : 0,
category_id: s.data.option.category_id || 0,
search: s.data.option.search || ""
}, function(t) {
var e = t.data.list, i = s.data.list;
!0 === a || void 0 === i.data ? s.setData({
list: e,
noList: !1
}) : s.setData({
"list.data": i.data.concat(e.data)
});
});
},
setListHeight: function() {
var t = this;
wx.getSystemInfo({
success: function(a) {
t.setData({
scrollHeight: a.windowHeight - 90
});
}
});
},
switchSortType: function(t) {
var a = this, e = t.currentTarget.dataset.type, s = "price" !== e || !a.data.sortPrice;
a.setData({
list: {},
page: 1,
sortType: e,
sortPrice: s
}, function() {
a.getGoodsList(!0);
});
},
toSynthesize: function(t) {
wx.navigateTo({
url: "../category/screen?objectId="
});
},
onChangeShowState: function() {
this.setData({
showView: !this.data.showView,
arrange: this.data.arrange ? "" : "arrange"
});
},
bindDownLoad: function() {
if (this.data.page >= this.data.list.last_page) return this.setData({
no_more: !0
}), !1;
this.getGoodsList(!1, ++this.data.page);
},
onShareAppMessage: function() {
return {
title: "全部分类",
desc: "",
path: "/pages/category/index"
};
}
});

View File

@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "商品列表",
"enablePullDownRefresh": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,56 @@
<view class="container">
<view class="list-header">
<view class="index-search-box dis-flex" style="position:static">
<navigator class="index-search flex-box" hoverClass="none" openType="navigate" url="../search/index">
<view class="index-cont-search">
<icon class="text-center" color="rgba(0,0,0,0.4)" size="15" type="search"></icon>
<text>搜索商品</text>
</view>
</navigator>
<view bindtap="onChangeShowState" class="list-right f-28">
<text class="iconfont icon-tubiao_kuaizhuangpailie" wx:if="{{showView}}"></text>
<text class="iconfont icon-tubiao_liebiaopailie" wx:else></text>
</view>
</view>
<view class="store_nav_cont dis-flex b-f b-b">
<view bindtap="switchSortType" class="flex-box t-c p-r" data-index="0 " data-type="all" id="list-{{sortType==='all'?true:0}}">
<text>综合</text>
</view>
<view bindtap="switchSortType" class="flex-box t-c p-r" data-index="1" data-type="sales" id="list-{{sortType==='sales'?true:0}}">
<text> 销量</text>
</view>
<view bindtap="switchSortType" class="flex-box t-c p-r" data-index="2" data-type="price" id="list-{{sortType==='price'?true:0}}">
<text class="price"> 价格</text>
<text class="iconfont icon-jiantou-copy tf-180 top_jiantou {{sortPrice?'':'active'}}"></text>
<text class="iconfont icon-jiantou-copy bot_jiantou {{sortPrice?'active':''}}"></text>
</view>
</view>
<scroll-view bindscrolltolower="bindDownLoad" class="weui-panel weui-panel_access" scrollY="true" style="height: {{scrollHeight}}px; width: 750rpx;" wx:if="{{list.data.length>0}}">
<view class="new">
<view class="category-list {{arrange}}">
<navigator class="list b-f" hoverClass="none" url="../goods/index?goods_id={{item.goods_id}}" wx:for="{{list.data}}" wx:key="list">
<view class="left">
<view class="img">
<image class="goodsImg" mode="scaleToFill" src="{{item.image[0].file_path}}"></image>
</view>
</view>
<view class="right">
<view class="cont">
<text class="f-28 title twolist-hidden m-top10">{{item.goods_name}}</text>
<view class="price f-30 col-m"> ¥{{item.goods_min_price}} <text class="del f-22" wx:if="{{item.goods_sku.line_price>0}}">{{item.goods_sku.line_price}}</text>
</view>
</view>
</view>
</navigator>
</view>
</view>
<view class="no-more f-30" hidden="{{!no_more}}">亲, 没有更多了</view>
</scroll-view>
</view>
<view class="yoshop-notcont" style="margin-top:130px;" wx:if="{{!noList&&!list.data.length}}">
<view class="img">
<image mode="aspectFit" src="../../images/no_content.png"></image>
</view>
<text class="cont">亲, 没有相关内容</text>
</view>
</view>

View File

@@ -0,0 +1,159 @@
.store_nav_cont {
padding: 10px 0;
}
.store_nav_cont #list-true {
color: #ff495e;
font-size: 28rpx;
}
.store_nav_cont #list-0 {
color: #333;
font-size: 28rpx;
}
.store_nav_cont #list-0 .icon-fenlei {
color: #777;
font-size: 28rpx;
padding-left: 8rpx;
}
.store_nav_cont #list-true .icon-fenlei {
color: #ff495e;
font-size: 28rpx;
padding-left: 8rpx;
}
.store_nav_cont .price {
padding-right: 30rpx;
}
.store_nav_cont #list-0 .top_jiantou,.store_nav_cont #list-true .top_jiantou {
color: #777;
font-size: 18rpx;
margin-top: -16rpx;
position: absolute;
right: 52rpx;
top: 50%;
}
.store_nav_cont #list-0 .bot_jiantou,.store_nav_cont #list-true .bot_jiantou {
color: #777;
font-size: 18rpx;
margin-top: -2rpx;
position: absolute;
right: 52rpx;
top: 50%;
}
.store_nav_cont #list-true .bot_jiantou.active,.store_nav_cont #list-true .top_jiantou.active {
color: #ff495e;
}
.container {
position: relative;
}
.cate-btn {
background: #ff495e;
bottom: 18rpx;
color: #fff;
font-size: 20rpx;
padding: 4px 18rpx;
right: 18rpx;
}
.index-cont-search icon {
left: 0;
margin-left: 20rpx;
}
.index-search-box {
background: #fff;
border-bottom: 1px solid #eee;
left: 0rpx;
padding: 18rpx 13rpx;
position: fixed;
right: 0rpx;
top: 1rpx;
z-index: 999;
}
.index-search {
background: #fff;
border-bottom: 0;
border-radius: 50rpx;
box-sizing: border-box;
color: #999;
font-size: 32rpx;
height: 64rpx;
line-height: 64rpx;
margin: 0 10rpx;
overflow: hidden;
position: relative;
}
.list-right {
width: 60rpx;
}
.list-right text {
font-size: 40rpx;
height: 60rpx;
line-height: 60rpx;
}
.list-header {
left: 0;
position: fixed;
right: 0;
top: 1rpx;
}
.no-more {
color: #737373;
margin: 10px 0;
text-align: center;
}
.category-list {
overflow: hidden;
}
.category-list .list {
box-sizing: border-box;
float: left;
width: 50%;
}
.category-list .list:nth-child(2n) {
border-bottom: 4px solid #f7f7f7;
border-left: 2px solid #f7f7f7;
}
.category-list .list:nth-child(2n-1) {
border-bottom: 4px solid #f7f7f7;
border-right: 2px solid #f7f7f7;
}
.category-list.arrange .list {
border-bottom: 1rpx solid #f7f7f7;
overflow: hidden;
padding: 15rpx;
width: 100%;
}
.category-list.arrange .list .left {
float: left;
width: 35%;
}
.category-list.arrange .list .right {
float: left;
width: 65%;
}
.category-list.arrange .list .left .img image {
height: 220rpx;
width: 220rpx;
}

View File

@@ -0,0 +1,75 @@
var o = getApp();
Page({
data: {
nav_select: !1,
options: {},
address: null,
exist_address: !1,
goods: {},
disabled: !1,
hasError: !1,
error: ""
},
onLoad: function(o) {
this.data.options = o, console.log(o);
},
onShow: function() {
this.getOrderData();
},
getOrderData: function() {
var r = this, t = r.data.options, s = function(t) {
if (1 !== t.code) return o.showError(t.msg), !1;
t.data.has_error ? (r.data.hasError = !0, r.data.error = t.data.error_msg, o.showError(r.data.error)) : (r.data.hasError = !1,
r.data.error = ""), r.setData(t.data);
};
"buyNow" === t.order_type ? o._get("order/buyNow", {
goods_id: t.goods_id,
goods_num: t.goods_num,
goods_sku_id: t.goods_sku_id
}, function(o) {
s(o);
}) : "cart" === t.order_type && o._get("order/cart", {}, function(o) {
s(o);
});
},
selectAddress: function() {
wx.navigateTo({
url: "../address/" + (this.data.exist_address ? "index?from=flow" : "createa")
});
},
submitOrder: function() {
var r = this, t = r.data.options;
if (r.data.disabled) return !1;
if (r.data.hasError) return o.showError(r.data.error), !1;
var s = function(r) {
if (-10 === r.code) return o.showError(r.msg, function() {
wx.redirectTo({
url: "../pays/pays"
});
}), !1;
wx.redirectTo({
url: "../pays/pays"
});
};
r.data.disabled = !0, wx.showLoading({
title: "正在处理..."
}), "buyNow" === t.order_type ? o._post_form("order/buyNow", {
goods_id: t.goods_id,
goods_num: t.goods_num,
goods_sku_id: t.goods_sku_id
}, function(o) {
console.log("success"), s(o);
}, function(o) {
console.log("fail");
}, function() {
console.log("complete"), r.data.disabled = !1;
}) : "cart" === t.order_type && o._post_form("order/cart", {}, function(o) {
console.log("success"), s(o);
}, function(o) {
console.log("fail");
}, function() {
console.log("complete"), r.data.disabled = !1;
});
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "订单确认",
"usingComponents": {}
}

View File

@@ -0,0 +1,74 @@
<view class="container p-bottom">
<view catchtap="selectAddress">
<view wx:if="{{address.address_id}}">
<view class="b-f">
<view class="flow-checkout-header">
<text class="iconfont icon-dingwei1"></text>
<view class="flow-header-left">
<view class="flow-checkout-admin f-30 col-3">
<text>{{address.name}}</text>
<text>{{address.phone}}</text>
<text class="col-m"></text>
</view>
<view class="flow-checkout-address"> {{address.region.province}} {{address.region.city}} {{address.region.region}} {{address.detail}} </view>
</view>
<view class="flow-header-right pr-12">
<text class="iconfont icon-xiangyoujiantou user-orderJtou"></text>
</view>
</view>
</view>
</view>
<view wx:else>
<view class="flow-checkout-header">
<text class="iconfont icon-dingwei1"></text>
<view class="flow-header-left">
<view class="f-28 col-6">去选择配送地址 </view>
</view>
<view class="flow-header-right p-r15">
<text class="iconfont icon-xiangyoujiantou user-orderJtou"></text>
</view>
</view>
</view>
</view>
<view class="m-top20">
<view class="checkout_list " wx:for="{{goods_list}}" wx:key="this">
<navigator url="../goods/index?goods_id={{item.goods_id}}">
<view class="dis-flex flow-shopList" data-index="{{index}}">
<view class="flow-list-left">
<image mode="scaleToFill" src="{{item.image[0].file_path}}"></image>
</view>
<view class="flow-list-right">
<text class="f-30 col-3 twolist-hidden">{{item.goods_name}}</text>
<text class="f-26 col-7">{{item.goods_sku.goods_attr}}</text>
<view class="flow-list-cont">
<text class="flow-cont">¥{{item.goods_price}}</text>
<text class="small">×{{item.total_num}}</text>
</view>
</view>
</view>
</navigator>
</view>
<view class="flow-num-box b-f padding-box">
<text>共{{order_total_num}}件商品,合计:</text>
<text class="flow-money col-m">¥{{order_total_price}}</text>
</view>
</view>
<view class="flow-all-money b-f padding-box m-top20">
<view class="dis-flex flow-all-list">
<text class="flex-five">商品总金额:</text>
<view class="flex-five t-r">
<text class="col-m">¥{{order_total_price}}</text>
</view>
</view>
</view>
<view class="flow-fixed-footer b-f m-top10">
<view class="dis-flex chackout-box">
<view class=" chackout-left pl-12 ">实付款: <text class="col-m">¥{{order_pay_price}}</text>
</view>
<view bindtap="submitOrder" class="chackout-right">
<text class="flow-btn">提交订单</text>
</view>
</view>
</view>
<shortcut></shortcut>
</view>

View File

@@ -0,0 +1,18 @@
.checkout_list {
background: #fff;
border-bottom: 1rpx solid #eee;
padding: 10px 15px 2px;
}
.checkout_list .flow-shopList {
border-bottom: 1rpx solid #eee;
padding: 5rpx 0 10rpx;
}
.checkout_list .flow-shopList:last-child {
border-bottom: 0;
}
.flow-header-left {
padding-left: 90rpx;
}

View File

@@ -0,0 +1,119 @@
var t = require("../../@babel/runtime/helpers/defineProperty"), o = getApp();
Page({
data: {
goods_list: [],
order_total_num: 0,
order_total_price: 0,
colourList: [],
colour_id: 0,
hideNotice: !1,
storeInfo: {}
},
onLoad: function(t) {
this.pays(), this.getColourList(), this.getStoreInfo();
},
onShow: function() {
this.setData({
isLogin: o.checkIsLogin()
}), this.data.isLogin && this.getCartList();
},
pays: function() {
var t = this;
o._get("index/payList", {}, function(o) {
var a = o.data;
t.setData({
payList: a
});
});
},
getStoreInfo: function() {
var t = this;
o._get("index/getStoreInfo", {}, function(o) {
var a = o.data;
console.log(a), t.setData({
storeInfo: a.store
});
});
},
switchNotice: function() {
this.setData({
hideNotice: !0
});
},
getCartList: function() {
var t = this;
o._get("cart/lists", {}, function(o) {
t.setData(o.data);
});
},
getColourList: function() {
var t = this;
o._get("goods/getColourList", {}, function(o) {
var a = o.data;
t.setData({
colourList: a.list
});
});
},
addCount: function(a) {
var e = this, i = a.currentTarget.dataset.index, s = a.currentTarget.dataset.skuId, r = e.data.goods_list[i], n = e.data.order_total_price;
wx.showLoading({
title: "加载中",
mask: !0
}), o._post_form("cart/add", {
goods_id: r.goods_id,
goods_num: 1,
goods_sku_id: s
}, function() {
var o;
r.total_num++, e.setData((t(o = {}, "goods_list[" + i + "]", r), t(o, "order_total_price", e.mathadd(n, r.goods_price)),
o));
});
},
minusCount: function(a) {
var e = this, i = a.currentTarget.dataset.index, s = a.currentTarget.dataset.skuId, r = e.data.goods_list[i], n = e.data.order_total_price;
r.total_num > 1 && (wx.showLoading({
title: "加载中",
mask: !0
}), o._post_form("cart/sub", {
goods_id: r.goods_id,
goods_sku_id: s
}, function() {
var o;
r.total_num--, r.total_num > 0 && e.setData((t(o = {}, "goods_list[" + i + "]", r),
t(o, "order_total_price", e.mathsub(n, r.goods_price)), o));
}));
},
del: function(t) {
var a = this, e = t.currentTarget.dataset.goodsId, i = t.currentTarget.dataset.skuId;
wx.showModal({
title: "提示",
content: "您确定要移除当前商品吗?",
success: function(t) {
t.confirm && o._post_form("cart/delete", {
goods_id: e,
goods_sku_id: i
}, function(t) {
a.getCartList();
});
}
});
},
submit: function(t) {
wx.navigateTo({
url: "../flow/checkout?order_type=cart"
});
},
mathadd: function(t, o) {
return (Number(t) + Number(o)).toFixed(2);
},
mathsub: function(t, o) {
return (Number(t) - Number(o)).toFixed(2);
},
goShopping: function() {
wx.switchTab({
url: "../index/index"
});
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "购物车",
"usingComponents": {}
}

View File

@@ -0,0 +1,57 @@
<view class="container p-bottom">
<view class="notice-wrap" hidden="{{hideNotice}}" wx:if="{{storeInfo.cart_notice.length>0}}">
<view class="tongzhitext">
<text class="tongzhi-text">{{storeInfo.cart_notice}}</text>
</view>   <view bindtap="switchNotice" class="closeView">x</view>
</view>
<view class="flow-list">
<view wx:if="{{goods_list.length}}">
<view wx:for="{{goods_list}}" wx:key="this">
<view class="dish-item" data-index="{{index}}" style="{{item.txtStyle}}">
<view class="dish-item-wrp">
<navigator hoverClass="none" url="../goods/index?goods_id={{item.goods_id}}">
<view class="dish-item-pic">
<image class="image" src="{{item.image[0].file_path}}"></image>
</view>
</navigator>
<view class="dish-item-info">
<navigator hoverClass="none" url="../goods/index?goods_id={{item.goods_id}}">
<view class="goods-name">
<text class="twolist-hidden f-30 col-3">
<text class="colour-box f-20" wx:if="{{item.colour>0}}">{{colourList[item.colour]}}</text>{{item.goods_name}}</text>
<view class="f-26" style="color: #555;"> {{item.goods_title.length>0?item.goods_title:' '}} </view>
</view>
<view class="goods-attr">
<text class="col-7 f-24">{{item.goods_sku.goods_attr}}</text>
</view>
<view class="price f-30 col-m"> ¥{{item.goods_price}} <text class="del f-22" wx:if="{{item.goods_sku.line_price>0}}">{{item.goods_sku.line_price}}</text>
</view>
<view class="goods-attr">
<text class="col-7 f-24" style="color: red;">请30分钟内提交结算否则商品将自动移除</text>
</view>
</navigator>
<view catchtap="del" class="flow-dete" data-goods-id="{{item.goods_id}}" data-sku-id="{{item.goods_sku_id}}">
<text class="iconfont icon-lajixiang"></text>
</view>
</view>
</view>
</view>
</view>
<view class="cart-tab-wrp" wx:if="{{payList.res.st}}">
<view class="cart-item-total cart-tab-item">
<text class="cart-item-total-price h4">合计:¥{{order_total_price}}</text>
</view>
<view class="cart-tab-item">
<view bindtap="submit" class="cart-tab-item-btn h4">去结算</view>
</view>
</view>
</view>
<view wx:else>
<view class="yoshop-notcont">
<text class="iconfont icon-ziyuan"></text>
<text class="cont">亲,购物车还没有商品哦</text>
<view bindtap="goShopping" class="flow-btn-min">去逛逛</view>
</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,457 @@
.wxParse {
color: #666;
font-family: Helvetica,sans-serif;
font-size: 28rpx;
line-height: 1.8;
margin: 0 5px;
}
view {
overflow: auto;
word-break: break-all;
}
.wxParse-inline {
display: inline;
}
.wxParse-div,.wxParse-inline {
margin: 0;
padding: 0;
}
.wxParse-h1 {
font-size: 2em;
margin: .67em 0;
}
.wxParse-h2 {
font-size: 1.5em;
margin: .75em 0;
}
.wxParse-h3 {
font-size: 1.17em;
margin: .83em 0;
}
.wxParse-h4 {
margin: 1.12em 0;
}
.wxParse-h5 {
font-size: .83em;
margin: 1.5em 0;
}
.wxParse-h6 {
font-size: .75em;
margin: 1.67em 0;
}
.wxParse-h1 {
font-size: 18px;
font-weight: 400;
margin-bottom: .9em;
}
.wxParse-h2 {
font-size: 16px;
}
.wxParse-h2,.wxParse-h3 {
font-weight: 400;
margin-bottom: .34em;
}
.wxParse-h3 {
font-size: 15px;
}
.wxParse-h4 {
font-size: 14px;
font-weight: 400;
margin-bottom: .24em;
}
.wxParse-h5 {
font-size: 13px;
font-weight: 400;
margin-bottom: .14em;
}
.wxParse-h6 {
font-size: 12px;
font-weight: 400;
margin-bottom: .04em;
}
.wxParse-b,.wxParse-h1,.wxParse-h2,.wxParse-h3,.wxParse-h4,.wxParse-h5,.wxParse-h6,.wxParse-strong {
font-weight: bolder;
}
.wxParse-address,.wxParse-cite,.wxParse-em,.wxParse-i,.wxParse-var {
font-style: italic;
}
.wxParse-code,.wxParse-kbd,.wxParse-pre,.wxParse-samp,.wxParse-tt {
font-family: monospace;
}
.wxParse-pre {
white-space: pre;
}
.wxParse-big {
font-size: 1.17em;
}
.wxParse-small,.wxParse-sub,.wxParse-sup {
font-size: .83em;
}
.wxParse-sub {
vertical-align: sub;
}
.wxParse-sup {
vertical-align: super;
}
.wxParse-del,.wxParse-s,.wxParse-strike {
text-decoration: line-through;
}
.wxParse-s,.wxParse-strong {
display: inline;
}
.wxParse-a {
color: #00bfff;
overflow: auto;
word-break: break-all;
}
.wxParse-video {
margin: 10px 0;
text-align: center;
}
.wxParse-video-video {
width: 100%;
}
.wxParse-img {
background-color: #efefef;
overflow: hidden;
}
.wxParse-blockquote {
background: #f5f5f5;
border-left: 3px solid #dbdbdb;
font-family: Courier,Calibri,宋体;
margin: 0;
padding: 10px 0 10px 5px;
}
.wxParse-code,.wxParse-wxxxcode-style {
background: #f5f5f5;
display: inline;
}
.wxParse-ul {
margin: 20rpx 10rpx;
}
.wxParse-li,.wxParse-li-inner {
align-items: baseline;
display: flex;
margin: 10rpx 0;
}
.wxParse-li-text {
align-items: center;
line-height: 20px;
}
.wxParse-li-circle {
background-color: #333;
display: inline-flex;
height: 5px;
margin-right: 5px;
width: 5px;
}
.wxParse-li-square {
background-color: #333;
}
.wxParse-li-ring,.wxParse-li-square {
display: inline-flex;
height: 10rpx;
margin-right: 5px;
width: 10rpx;
}
.wxParse-li-ring {
background-color: #fff;
border: 2rpx solid #333;
border-radius: 50%;
}
.wxParse-u {
text-decoration: underline;
}
.wxParse-hide {
display: none;
}
.WxEmojiView {
align-items: center;
}
.wxEmoji {
height: 16px;
width: 16px;
}
.wxParse-tr {
border-bottom: 1px solid #e0e0e0;
border-right: 1px solid #e0e0e0;
border-top: 1px solid #e0e0e0;
display: flex;
}
.wxParse-td,.wxParse-th {
border-left: 1px solid #e0e0e0;
flex: 1;
font-size: 28rpx;
padding: 5px;
word-break: break-all;
}
.wxParse-td:last {
border-top: 1px solid #e0e0e0;
}
.wxParse-th {
background: #f0f0f0;
border-top: 1px solid #e0e0e0;
}
.image {
height: 100%;
width: 100%;
}
.cart-tab-item-btn {
background: #ff495e;
color: #fff;
display: block;
float: right;
font-size: 32rpx;
height: 100rpx;
line-height: 100rpx;
text-align: center;
width: 160rpx;
}
.price {
margin-top: 10rpx;
}
.colour-box {
background: #e64340;
color: #fff;
font-size: 26rpx;
line-height: 26rpx;
margin-right: 10rpx;
padding: 4rpx 8rpx;
text-align: center;
}
.cart-tab-item {
width: 375rpx;
}
.cart-tab-wrp {
background: #fff;
border-top: 1rpx solid #ddd;
bottom: 0rpx;
color: #000;
display: flex;
flex-direction: row;
height: 100rpx;
position: fixed;
width: 100%;
z-index: 10;
}
.cart-tab-item {
line-height: 100rpx;
overflow: hidden;
}
.cart-tab-item .cart-item-total-price {
float: left;
}
.cart-item-total {
padding-left: 30rpx;
}
.cart-item-total-price {
color: #ff495e;
font-size: 32rpx;
text-align: center;
}
.cart-item-total-price em {
display: block;
}
.cart-item-icon-wrp {
height: 90rpx;
position: absolute;
top: -4rpx;
width: 110rpx;
}
.cart-item-icon {
height: 90rpx;
width: 90rpx;
}
.dish-item {
background: #fff;
border-bottom: 1rpx solid #eee;
padding: 26rpx 0;
position: relative;
width: 100%;
}
.dish-item-wrp {
display: flex;
flex-direction: row;
width: 100%;
}
.dish-item-pic {
margin-left: 15px;
width: 100%;
}
.dish-item-pic image {
background: #fff;
border: 1rpx solid #eee;
height: 200rpx;
margin: 0 auto;
width: 200rpx;
}
.dish-item-info {
margin-right: 15px;
padding-left: 16rpx;
width: 68%;
}
.dish-item-sales {
color: #ccc;
font-size: 20rpx;
line-height: 50rpx;
}
.dish-item-money {
color: #ff495e;
font-size: 32rpx;
padding: 0 0 10rpx;
}
.wx-goods_price .dish-item-money {
float: left;
}
.wx-goods_price {
overflow: hidden;
}
.flow-dete {
bottom: 25rpx;
position: absolute;
right: 30rpx;
}
.flow-dete .icon-lajixiang {
color: #777;
font-size: 34rpx;
}
.flow-btn-min {
background: #fff;
border: 1rpx solid #ccc;
border-radius: 5px;
color: #777;
font-size: 28rpx;
height: 30px;
line-height: 30px;
margin: 25rpx auto 0;
text-align: center;
width: 200rpx;
}
@-webkit-keyframes remindMessage {
0% {
-webkit-transform: translateX(90%);
}
100% {
-webkit-transform: translateX(-180%);
}
}
@keyframes remindMessage {
0% {
-webkit-transform: translateX(90%);
}
100% {
-webkit-transform: translateX(-180%);
}
}
.tongzhitext {
margin-left: 10rpx;
margin-right: 80rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tongzhi-text {
animation: remindMessage 14s linear infinite;
display: block;
}
.notice-wrap,.tongzhi-text {
color: #d09868;
font-size: 28rpx;
width: 100%;
}
.notice-wrap {
background: #ffebda;
height: 60rpx;
line-height: 60rpx;
}
.closeView {
font-size: 35rpx;
height: 45rpx;
line-height: 45rpx;
position: absolute;
right: 20rpx;
text-align: center;
top: 5rpx;
width: 45rpx;
}

View File

@@ -0,0 +1,196 @@
var a = getApp(), t = require("../../wxParse/wxParse.js");
Page({
data: {
imgList: [],
goodsNo: null,
fromData: null,
isShangJia: !1,
searchValue: "",
searchGoodsNoArray: [],
imageObjArray: [],
imageUrlArray: [],
cateObjArray: [],
indexCate: null,
colourObjList: [],
indexColour: null
},
bindPickerChangeCate: function(a) {
var t = this.data.fromData;
t.category_id = this.data.cateObjArray[a.detail.value].category_id, this.setData({
fromData: t,
indexCate: a.detail.value
});
},
bindPickerChangeColour: function(a) {
var t = this.data.fromData;
t.colour = this.data.colourObjList[a.detail.value].id, this.setData({
fromData: t,
indexColour: a.detail.value
});
},
onLoad: function(a) {
var t = this;
wx.getStorage({
key: "user_id",
success: function(a) {
10984 != a.data && 10003 != a.data && 10004 != a.data && 10011 != a.data && wx.showModal({
title: "提示",
content: "无权访问",
success: function(a) {
a.confirm, wx.navigateBack({
delta: 1
});
}
}), t.CategoryList(), t.ColourList();
}
});
},
onShow: function() {},
bindFormSubmit: function(t) {
var o = t.detail.value.jieshao, e = t.detail.value.goods_price, s = this.data.fromData;
if (s.content = o, s.goods_price = e, s.goods_status = this.data.shangjiastatus,
null != s.colour && null != s.category_id) {
var i = {}, r = {};
i.goods_id = s.goods_id, i.images = s.imageIdList, i.content = o, r.goods_no = this.data.goodsNo,
r.goods_price = e, i.spec = r, i.colour = s.colour, i.goods_status = s.goods_status,
i.category_id = s.category_id, console.log(i), wx.request({
url: "https://wxminiapp.19year.cn/index.php?s=/api/goods/editGoods&wxapp_id=10001",
header: {
"content-type": "application/json"
},
data: i,
method: "POST",
success: function(t) {
console.log(t.data), 1 == t.data.code ? a.showError("保存成功") : a.showError("保存失败");
}
});
} else a.showError("请选择分类与成色");
},
getSearchContent: function(t) {
var o = this, e = t.detail.value;
console.log(e), a._get("goods/likeGoodsNo", {
goods_no: e
}, function(a) {
console.log(a.data.list), o.setData({
searchGoodsNoArray: a.data.list
});
}), o.setData({
searchValue: e
});
},
clearNo: function() {
this.setData({
searchValue: "",
searchGoodsNoArray: []
});
},
xuanze: function(t) {
var o = t.currentTarget.dataset.goodsId;
if (console.log(t.currentTarget.dataset.goodsId), o.length <= 0) return a.showError("没有选中数据"),
!1;
this.setData({
searchValue: "",
searchGoodsNoArray: []
}), this.getGoodsDetail(o);
},
CategoryList: function() {
var t = this;
a._get("category/lists", {}, function(a) {
var o = a.data;
t.setData({
cateObjArray: o.list
});
});
},
ColourList: function() {
var t = this;
a._get("goods/getColourListV2", {}, function(a) {
var o = a.data;
t.setData({
colourObjList: o.data
});
});
},
onSaoMa: function() {
var t = this;
wx.scanCode({
onlyFromCamera: !0,
scanType: [ "barCode" ],
success: function(a) {
t.getGoodsDetail(a.result);
},
fail: function(t) {
a.showError(t.result + "扫码错误");
}
});
},
getGoodsDetail: function(t) {
var o = this;
a._get("goods/infos", {
goods_no: t
}, function(a) {
var e = o.initGoodsDetailData(a.data);
o.setData(e), o.setData({
goodsNo: t
});
var s = [], i = [];
e.detail.image.forEach(function(a) {
s.push(a.file_path), i.push(a);
}), o.setData({
imageUrlArray: s,
imageObjArray: i
});
var r = {
imageIdList: []
};
r.goods_price = e.goods_price, r.content = o.delHtmlTag(e.detail.content), r.goods_id = e.detail.goods_id,
console.log(e.detail.category_id), o.setData({
indexCate: null
}), o.data.cateObjArray.forEach(function(a, t) {
a.category_id == e.detail.category_id && (o.setData({
indexCate: t
}), r.category_id = a.category_id);
}), console.log(e.detail.colour), o.setData({
indexColour: null
}), o.data.colourObjList.forEach(function(a, t) {
a.id == parseInt(e.detail.colour) && (o.setData({
indexColour: t
}), r.colour = a.id);
}), 10 == e.detail.goods_status.value ? (r.goods_status = 10, o.setData({
isShangJia: !0,
fromData: r,
shangjiastatus: 10
})) : (r.goods_status = 20, o.setData({
isShangJia: !1,
fromData: r,
shangjiastatus: 20
}));
});
},
initGoodsDetailData: function(a) {
return a.detail.content.length > 0 && t.wxParse("content", "html", a.detail.content, this, 0),
a.goods_sku_id = a.detail.spec[0].spec_sku_id, a.goods_price = a.detail.spec[0].goods_price,
a.line_price = a.detail.spec[0].line_price, a.stock_num = a.detail.spec[0].stock_num,
a;
},
updateImageList: function(a) {
console.log("update", a);
var t = a.detail.list.map(function(a) {
return a.image_id;
}), o = this.data.fromData;
o.imageIdList = t, console.log(), this.setData({
fromData: o
});
},
delHtmlTag: function(a) {
return a.replace(/<[^>]+>/g, "");
},
shangJiaSwitch: function(a) {
a.detail.value ? this.setData({
shangjiastatus: 10
}) : this.setData({
shangjiastatus: 20
});
}
});

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "工作台",
"usingComponents": {
"wxDragImg": "/components/imgDrag/imgDrag"
}
}

View File

@@ -0,0 +1,76 @@
<view class="container">
<view class="cont-box b-f">
<button bindtap="onSaoMa" class="saoma">扫码</button>
</view>
<view class="dis-flex search-input-box flex-box">
<view class="search-input">
<view class="dis-flex search-box">
<view class="left">
<icon color="rgba(180,180,180,1)" size="15" type="search"></icon>
</view>
<view class="right">
<input bindinput="getSearchContent" class="input" placeholder="输入串号搜索" placeholderStyle="color:#aba9a9" type="number" value="{{searchValue}}"></input>
</view>
</view>
</view>
<view class="serch-button">
<button bindtap="clearNo" type="warn"> 清空 </button>
</view>
</view>
<view wx:for="{{searchGoodsNoArray}}" wx:key="this">
<view bindtap="xuanze" data-goods-id="{{item.goods_no}}" style="background: rgb(248, 136, 136); border: 1rpx solid white; padding:10rpx; text-align: center;">
<text style="text-align: center;">{{item.goods_no}}</text>
</view>
</view>
<view class="cont-box b-f" wx:if="{{goodsNo!==null}}">
<view class="goods-title">
<text>名称:{{detail.goods_name}}</text>
</view>
<view class="goods-title">
<text class="title f-26" style="color: red;">价 格:{{goods_price}}</text>
</view>
<view class="goods-title">
<text class="title f-26 twolist-hidden" style="color: #555;">标 题:{{detail.goods_title.length>0?detail.goods_title:' '}}</text>
</view>
<view class="goods-title">
<text class="title f-26 twolist-hidden" style="color: red;">状 态:{{detail.goods_status.text}}</text>
</view>
<wxDragImg bind:updateImageList="updateImageList" columns="{{3}}" defaultGoodsId="{{fromData.goods_id}}" defaultImgList="{{imageObjArray}}" defaultImgUrlList="{{imageUrlArray}}" gap="{{9}}" maxCount="{{9}}" previewSize="{{100}}" style="margin:5rpx;"></wxDragImg>
<form bindsubmit="bindFormSubmit">
<view class="ipt-wrap" style="display: flex;align-items: center; padding-bottom: 10rpx; border-bottom: 1px solid red; ">
<label class="f-30" for="" style="color: #555;">价格:</label>
<input name="goods_price" placeholder="请输入姓名" type="number" value="{{goods_price}}"></input>
</view>
<view class="ipt-wrap" style=" padding-bottom: 10rpx; border-bottom: 1px solid red;">
<label class="f-30" for="" style="color: #555;">商品介绍:</label>
<textarea autoHeight class="f-30" name="jieshao" placeholder="此处填写商品介绍" style=" width: auto; margin-bottom: 10rpx; line-height: 10rpx;" value="{{fromData.content}}"></textarea>
</view>
<view class="ipt-wrap" style=" padding-bottom: 10rpx; border-bottom: 1px solid red;">
<picker bindchange="bindPickerChangeCate" range="{{cateObjArray}}" rangeKey="name" value="{{indexCate}}">
<view class="f-30" style="color: #555;"> 分类:<text style="color: black;">{{cateObjArray[indexCate].name}}</text>
</view>
</picker>
</view>
<view class="ipt-wrap" style=" padding-bottom: 10rpx; border-bottom: 1px solid red;">
<picker bindchange="bindPickerChangeColour" range="{{colourObjList}}" rangeKey="name" value="{{indexColour}}">
<view class="f-30" style="color: #555;"> 成色:<text style="color: black;">{{colourObjList[indexColour].name}}</text>
</view>
</picker>
</view>
<view style="display: flex; align-items: center;justify-content: space-between; padding-bottom: 10rpx; margin-top: 10rpx; border-bottom: 1px solid red;">
<view style="display: flex; align-items: center;">
<label class="f-30" for="" style="color: #555;">是否上架:</label>
</view>
<view class="flex" style="display: flex;">
<switch bindchange="shangJiaSwitch" checked="{{isShangJia}}" class="switch"></switch>
</view>
</view>
<view class="cont-box b-f">
<button class="sub" formType="submit"> 保存 </button>
</view>
</form>
</view>
<view wx:else>
<view class="center-text">请先扫码或根据串号查询商品</view>
</view>
</view>

View File

@@ -0,0 +1,142 @@
.saoma {
align-items: center;
background-color: #f70000;
border-radius: 98rpx;
color: #fff;
display: flex;
flex-direction: row;
justify-content: center;
margin-top: 10rpx;
width: 80%;
}
.search-input-box {
background: #f7f7f7;
height: 64rpx;
margin-right: 10rpx;
width: auto;
}
.search-input {
background: #fff;
border-radius: 5px 0 0 5px;
box-sizing: border-box;
overflow: hidden;
padding-left: 10rpx;
width: 100%;
}
.search-input input {
font-size: 30rpx;
height: 64rpx;
line-height: 64rpx;
}
.serch-button {
box-sizing: border-box;
width: 20%;
}
.serch-button button {
border-radius: 0 5px 5px 0;
font-size: 28rpx;
height: 64rpx;
line-height: 64rpx;
}
.search-cate-box {
height: 70rpx;
}
.search-cate {
position: relative;
top: 30%;
}
.sub {
align-items: center;
background-color: #50f85e;
border-radius: 98rpx;
color: #fff;
display: flex;
flex-direction: row;
justify-content: center;
margin-top: 10rpx;
width: 80%;
}
.ipt-wrap {
line-height: 100rpx;
min-height: 100rpx;
}
.ipt-wrap label {
min-width: 120rpx;
}
.goods-title {
color: #333;
overflow: hidden;
padding: 0 0rpx 0 0;
}
.money-box,.money-box .num {
margin-top: 10rpx;
}
.money-box .num {
color: #ff495e;
font-size: 40rpx;
}
.money-box .del {
TEXT-DECORATION: line-through;
color: #999;
font-size: 24rpx;
margin-left: 6rpx;
}
.center-text {
align-items: center;
justify-content: center;
padding-top: 25rpx;
}
.center-text,.img_box {
display: flex;
}
.img_box {
flex-wrap: wrap;
margin: 20rpx;
width: 100%;
}
.img_item_i {
display: block;
height: 100%;
width: 100%;
}
.add_icon {
display: block;
height: 50%;
width: 50%;
}
.img_item {
border: 1px solid #c0ccda;
height: 210rpx;
margin-bottom: 2%;
margin-right: 2%;
position: relative;
width: 30%;
}
.closeImv {
height: 50rpx;
position: absolute;
right: 0rpx;
top: 0rpx;
width: 50rpx;
}

View File

@@ -0,0 +1,175 @@
var t = require("../../@babel/runtime/helpers/typeof"), o = getApp(), e = require("../../wxParse/wxParse.js");
Page({
data: {
nav_select: !1,
indicatorDots: !0,
autoplay: !0,
interval: 3e3,
duration: 800,
currentIndex: 1,
floorstatus: !1,
showView: !0,
detail: {},
goods_price: 0,
line_price: 0,
stock_num: 0,
goods_num: 1,
goods_sku_id: 0,
cart_total_num: 0,
specData: {},
colourList: [],
colour_id: 0,
storeInfo: {},
notice_image: ""
},
goods_spec_arr: [],
onLoad: function(t) {
this.data.goods_id = t.goods_id, this.getGoodsDetail(), this.getColourList(), this.getStoreInfo();
},
imgYu: function(t) {
var o = t.currentTarget.dataset.src, e = t.currentTarget.dataset.list;
console.log(e);
var s = [], a = e.length;
if (a > 0) for (var i = 0; i < a; i++) s.push(e[i].file_path);
console.log(o), console.log(s), wx.previewImage({
current: o,
urls: s
});
},
getColourList: function() {
var t = this;
o._get("goods/getColourList", {}, function(o) {
var e = o.data;
t.setData({
colourList: e.list
});
});
},
getStoreInfo: function() {
var t = this;
o._get("index/getStoreInfo", {}, function(o) {
var e = o.data;
console.log(e), t.setData({
storeInfo: e.store,
notice_image: e.notice_image
});
});
},
getGoodsDetail: function() {
var t = this;
o._get("goods/detail", {
goods_id: t.data.goods_id
}, function(o) {
var e = t.initGoodsDetailData(o.data);
t.setData(e);
});
},
initGoodsDetailData: function(t) {
return t.detail.content.length > 0 && e.wxParse("content", "html", t.detail.content, this, 0),
t.goods_sku_id = t.detail.spec[0].spec_sku_id, t.goods_price = t.detail.spec[0].goods_price,
t.line_price = t.detail.spec[0].line_price, t.stock_num = t.detail.spec[0].stock_num,
20 == t.detail.spec_type && (t.specData = this.initManySpecData(t.specData)), t;
},
initManySpecData: function(t) {
for (var o in t.spec_attr) for (var e in t.spec_attr[o].spec_items) e < 1 && (t.spec_attr[o].spec_items[0].checked = !0,
this.goods_spec_arr[o] = t.spec_attr[o].spec_items[0].item_id);
return t;
},
modelTap: function(t) {
var o = t.currentTarget.dataset.attrIdx, e = t.currentTarget.dataset.itemIdx, s = this.data.specData;
for (var a in s.spec_attr) for (var i in s.spec_attr[a].spec_items) o == a && (s.spec_attr[a].spec_items[i].checked = !1,
e == i && (s.spec_attr[a].spec_items[e].checked = !0, this.goods_spec_arr[a] = s.spec_attr[a].spec_items[e].item_id));
this.setData({
specData: s
}), this.updateSpecGoods();
},
updateSpecGoods: function() {
var o = this.goods_spec_arr.join("_"), e = this.data.specData.spec_list.find(function(t) {
return t.spec_sku_id == o;
});
"object" === t(e) && this.setData({
goods_sku_id: e.spec_sku_id,
goods_price: e.form.goods_price,
line_price: e.form.line_price,
stock_num: e.form.stock_num
});
},
setCurrent: function(t) {
this.setData({
currentIndex: t.detail.current + 1
});
},
onChangeShowState: function() {
this.setData({
showView: !this.data.showView
});
},
goTop: function(t) {
this.setData({
scrollTop: 0
});
},
scroll: function(t) {
this.setData({
floorstatus: t.detail.scrollTop > 200
});
},
up: function() {
this.setData({
goods_num: ++this.data.goods_num
});
},
down: function() {
this.data.goods_num > 1 && this.setData({
goods_num: --this.data.goods_num
});
},
flowCart: function() {
wx.switchTab({
url: "../flow/index"
});
},
toIndex: function() {
wx.switchTab({
url: "../index/index"
});
},
submit: function(t) {
var e = this, s = t.currentTarget.dataset.type;
o._post_form("cart/check", {
goods_id: e.data.goods_id,
goods_num: e.data.goods_num,
goods_sku_id: e.data.goods_sku_id
}, function(t) {
if (1 != t.code) return o.showSuccess(t.msg), !1;
"buyNow" === s ? wx.navigateTo({
url: "../flow/checkout?" + o.urlEncode({
order_type: "buyNow",
goods_id: e.data.goods_id,
goods_num: e.data.goods_num,
goods_sku_id: e.data.goods_sku_id
})
}) : "addCart" === s && o._post_form("cart/add", {
goods_id: e.data.goods_id,
goods_num: e.data.goods_num,
goods_sku_id: e.data.goods_sku_id
}, function(t) {
o.showSuccess(t.msg), e.setData(t.data);
});
});
},
onShareAppMessage: function() {
return {
title: this.data.detail.goods_name + " " + this.data.detail.goods_title,
path: "/pages/goods/index?goods_id=" + this.data.goods_id
};
},
onShareTimeline: function(t) {
return {
title: this.data.detail.goods_name + " " + this.data.detail.goods_title,
path: "/pages/goods/index?goods_id=" + this.data.goods_id,
imageUrl: this.data.detail.image[0].file_path
};
}
});

View File

@@ -0,0 +1,6 @@
{
"navigationBarTitleText": "商品详情",
"usingComponents": {
"shortcut": "/components/shortcut/shortcut"
}
}

View File

@@ -0,0 +1,82 @@
<import src="../../wxParse/wxParse.wxml"></import>
<scroll-view bindscroll="scroll" scrollTop="{{scrollTop}}" scrollY="true" style="position:absolute; top:0; left:0; right:0; bottom:0;">
<view class="container" wx:if="{{detail.goods_id}}">
<view bindtap="imgPreview">
<swiper autoplay="{{autoplay}}" bindchange="setCurrent" circular="{{true}}" class="banner-box swiper-box" duration="{{duration}}" indicatorDots="{{indicatorDots}}" interval="{{interval}}">
<swiper-item wx:for="{{detail.image}}" wx:key="this">
<image bindtap="imgYu" class="slide-image" data-list="{{detail.image}}" data-src="{{item.file_path}}" mode="aspectFill" src="{{item.file_path}}"></image>
</swiper-item>
</swiper>
<view class="number-banner">
<text>{{currentIndex}}</text>
<text>/{{detail.image.length}}</text>
</view>
</view>
<view class="cont-box b-f">
<view class="goods-title ">
<text class="title f-32 twolist-hidden">
<text class="colour-box f-20" wx:if="{{detail.colour>0}}">{{colourList[detail.colour]}}</text>
<text>{{detail.goods_name}}</text>
</text>
</view>
<view class="goods-title ">
<text class="title f-26 twolist-hidden" style="color: #555;">{{detail.goods_title.length>0?detail.goods_title:' '}}</text>
</view>
<view class="money-box">
<text class="num">¥{{goods_price}}</text>
<text class="del" wx:if="{{line_price>0}}">¥{{line_price}}</text>
</view>
</view>
<view class="cont-box b-f goods-property-box m-top20" wx:if="{{storeInfo.notice.length>0}}">
<text class="col-3 f-30">{{storeInfo.notice}}</text>
</view>
<view class="cont-box b-f goods-property-box m-top20" wx:if="{{notice_image.length>0}}">
<image src="{{notice_image}}" style="width: 100%;"></image>
</view>
<view class="p-bottom">
<view class="top-nav m-top20 b-f b-b">
<view class="top-nav-bar">
<view bindtap="toOrder" id="top-nav-bar-true">
<span>商品描述</span>
</view>
</view>
</view>
<view class="order" hidden="{{hiddenOrder}}">
<view wx:if="{{detail.content!=''}}">
<view class="b-f goods-detail-box">
<view class="goods-cont-li">
<template is="wxParse" data="{{wxParseData:content.nodes}}"></template>
</view>
</view>
</view>
<view wx:else>
<view class="yoshop-notcont">
<text class="iconfont icon-ziyuan"></text>
<text class="cont">亲,此处暂无详情数据</text>
</view>
</view>
</view>
</view>
<view class="footer-fixed f-30" style="padding-bottom: 20px;">
<view bindtap="toIndex" class="goods-fixed-icon dis-flex flex-x-center flex-y-center">
<text class="iconfont icon-home"></text>
</view>
<view class="goods-fixed-icon dis-flex flex-x-center flex-y-center">
<button openType="contact" sessionFrom="weapp" size="27" style="opacity: 0;position:absolute;top:0px;left:0px;display:block;width:100%;height:100%;" type="default-light"></button>
<text class="iconfont icon-icon_service"></text>
</view>
<view bindtap="flowCart" class="goods-fixed-icon dis-flex flex-x-center flex-y-center">
<text class="iconfont icon-cart_b"></text>
<view class="flow_num" wx:if="{{cart_total_num>0}}">
<text class="">{{cart_total_num}}</text>
</view>
</view>
<view bindtap="submit" class="order-number" data-type="addCart" style="padding-bottom: 3px;">加入购物车</view>
<view bindtap="submit" class="order-bt" data-type="buyNow" style="padding-bottom: 3px;"> 立即购买</view>
</view>
</view>
</scroll-view>
<view bindtap="goTop" class="widget-goTop" wx:if="{{floorstatus}}">
<text class="iconfont icon-fanhuidingbu"></text>
</view>
<shortcut></shortcut>

View File

@@ -0,0 +1,330 @@
.slide-image {
background: #fff;
}
.banner-box {
border-bottom: 1rpx solid #e4e4e4;
height: 900rpx;
}
.user-orderJtou {
color: #999;
font-size: 26rpx;
margin-top: -9rpx;
position: absolute;
top: 50%;
}
.goods-title {
color: #333;
overflow: hidden;
padding: 0 0rpx 0 0;
}
.money-box,.money-box .num {
margin-top: 10rpx;
}
.money-box .num {
color: #ff495e;
font-size: 40rpx;
}
.money-box .del {
TEXT-DECORATION: line-through;
color: #999;
font-size: 24rpx;
margin-left: 6rpx;
}
.goods-sales-box {
color: #888;
}
.goods-sales-box .stock {
display: block;
text-align: right;
}
.goods-property-box {
padding: 12px;
position: relative;
}
.goods-property-jianTou {
margin-top: -13rpx;
position: absolute;
right: 0;
top: 50%;
width: 52rpx;
}
.goods-property-jianTou image {
height: 100%;
width: 100%;
}
.modal_cont_box {
border-top: 1rpx solid #eee;
padding: 20rpx 12px;
}
.buy_number {
justify-content: space-between;
}
.buyNumber {
background: #fff;
border-radius: 10rpx;
color: #888;
margin-bottom: 10rpx;
}
.tmall-types.mb20 {
margin-bottom: 20rpx;
}
.tipstxt {
color: #888;
font-size: 28rpx;
margin-bottom: 10rpx;
}
.cartypeitem,.cartypelist {
display: inline-block;
}
.cartypeitem {
background: #f3f2f8;
border: 1rpx solid #f3f2f8;
border-radius: 10rpx;
color: #444;
font-size: 31rpx;
height: 60rpx;
line-height: 60rpx;
margin: 0 20rpx 20rpx 0;
overflow: hidden;
padding: 0 30rpx;
position: relative;
}
.cartypeitem.cur {
background: #ff495e;
border: 1rpx solid #ff495e;
color: #fff;
}
.cartypeitem.cur:after {
bottom: 0;
content: "";
display: inline-block;
height: 16rpx;
position: absolute;
right: 0;
width: 16rpx;
}
.cartypeitem.disabled {
background: #eee;
border: 2rpx dashed #dedede;
color: #dedede;
cursor: not-allowed;
}
.number-banner {
background: rgba(0,0,0,.3);
border-radius: 50rpx;
color: #fff;
font-size: 32rpx;
margin-top: -70rpx;
padding: 0 18rpx;
position: absolute;
right: 30rpx;
}
.number-banner text:last-child {
color: hsla(0,0%,100%,.6);
font-size: 26rpx;
}
.cart {
background-color: #fff;
}
.order-number {
background-color: #f4a213;
color: #fff;
line-height: 46px;
text-align: center;
width: 50%;
}
.order-number button {
background: none;
border: 0;
border-radius: 0;
color: #fff;
font-size: 34rpx;
line-height: inherit;
padding: 0;
}
.order-number button::after {
border: none;
border-radius: 0;
box-sizing: border-box;
content: " ";
height: 0;
left: 0;
position: absolute;
top: 0;
transform: scale(0);
transform-origin: 0 0;
width: 0;
}
.default-btn {
background-color: #ccc;
color: #fff;
line-height: 46px;
text-align: center;
width: 50%;
}
.user-orderJtou-1 {
color: #999;
font-size: 26rpx;
position: absolute;
transform: rotate(-90deg);
}
.user-orderJtou-1,.user-orderJtou-2 {
transition: all .2s;
}
.user-orderJtou-2 {
transform: rotate(90deg);
}
.flow_num {
background: #ff495e;
border-radius: 30rpx;
height: 30rpx;
min-width: 30rpx;
position: absolute;
right: 20rpx;
top: 10rpx;
}
.goods-cont-li .wxParse-inline {
padding: 20rpx 10rpx;
}
.goods-cont-li image {
display: block;
margin: 0 auto;
width: 100%;
}
.goods-cont-li .wxParse-inline {
font-size: 30rpx;
}
.comment-num {
color: #333;
font-size: 28rpx;
margin-top: -20rpx;
position: absolute;
right: 34px;
top: 50%;
}
.top-nav-bar {
display: flex;
flex-wrap: wrap;
font-size: 31rpx;
padding: 12px;
}
#top-nav-bar-true text {
border: 1rpx solid #ff495e;
color: #ff495e;
}
#top-nav-bar-0 span {
color: #444;
}
.footer-fixed .goods-fixed-icon {
background: #fff;
border-left: 1rpx solid #eee;
height: 92rpx;
margin: 0 auto;
padding: 0 6rpx;
position: relative;
width: 150rpx;
}
.footer-fixed .goods-fixed-icon:first-child {
border-left: none;
}
.footer-fixed .goods-fixed-icon image {
display: block;
height: 56rpx;
left: 0;
margin-left: 30rpx;
margin-top: 17rpx;
position: absolute;
top: 0;
width: 56rpx;
}
.footer-fixed .goods-fixed-icon text {
color: #7a7e83;
font-size: 48rpx;
}
.footer-fixed .goods-fixed-icon .bargain-icon {
height: 50rpx;
}
.footer-fixed .goods-fixed-icon .bargain-icon image {
height: 50rpx;
margin-top: -40rpx;
width: 50rpx;
}
.footer-fixed .goods-fixed-icon .bargain-home {
margin-top: 6rpx;
text-align: center;
}
.footer-fixed .goods-fixed-icon .flow_num text {
color: #fff;
display: block;
font-size: 22rpx;
text-align: center;
}
.footer-fixed .goods-fixed-icon .icon-shoucang {
font-size: 40rpx;
}
.footer-fixed .goods-fixed-icon .s_cont {
color: #ff495e;
}
.colour-box {
background: #e64340;
color: #fff;
font-size: 26rpx;
line-height: 26rpx;
margin-right: 10rpx;
padding: 4rpx 8rpx;
text-align: center;
}
.goods-title {
margin-top: 8rpx;
}

View File

@@ -0,0 +1,176 @@
var t = require("../../@babel/runtime/helpers/defineProperty"), a = getApp();
Page({
data: t({
searchColor: "rgba(0,0,0,0.4)",
searchSize: "15",
searchName: "搜索商品",
scrollHeight: null,
showView: !1,
arrange: "arrange",
sortType: "all",
sortPrice: !1,
sortColour: !1,
option: {},
list: {},
noList: !0,
no_more: !1,
page: 1,
searchValue: "",
cateList: [],
cate_id: 0,
colourList: [],
colour_id: 0,
hideNotice: !1,
storeInfo: {},
tabTxt: "成色",
tab: !0
}, "colour_id", 0),
onLoad: function(t) {
a.setTitle();
var e = this;
e.setListHeight(), e.getCategoryList(), e.getColourList(), e.getStoreInfo(), e.setData({
option: t
}, function() {
e.getGoodsList(!0);
});
},
filterTab: function(t) {
this.setData({
tab: !this.data.tab
});
},
filter: function(t) {
var a = t.currentTarget.dataset.id, e = t.currentTarget.dataset.txt, o = this.data.tabTxt;
o = e, this.setData({
tab: !0,
tabTxt: o,
colour_id: a,
jiage_txt: e
}), this.getGoodsList(!0);
},
getCategoryList: function() {
var t = this;
a._get("category/lists", {}, function(a) {
var e = a.data;
e.list.unshift({
category_id: 0,
name: "全部"
}), t.setData({
cateList: e.list
});
});
},
getStoreInfo: function() {
var t = this;
a._get("index/getStoreInfo", {}, function(a) {
var e = a.data;
console.log(e), t.setData({
storeInfo: e.store
});
});
},
switchNotice: function() {
this.setData({
hideNotice: !0
});
},
getColourList: function() {
var t = this;
a._get("goods/getColourList", {}, function(a) {
var e = a.data;
t.setData({
colourList: e.list
});
});
},
getSearchContent: function(t) {
this.data.searchValue = t.detail.value;
},
search: function() {
this.getGoodsList(!0);
},
searchCate: function(t) {
console.log(t.currentTarget.dataset.category_id);
var a = this;
a.setData({
list: {},
page: 1,
cate_id: t.currentTarget.dataset.category_id,
tab: !0
}, function() {
a.getGoodsList(!0);
});
},
getGoodsList: function(t, e) {
wx.showLoading({
title: "刷新中..."
}), console.log(this.data.searchValue);
var o = this;
a._get("goods/lists", {
page: e || 1,
sortType: o.data.sortType,
sortPrice: o.data.sortPrice ? 1 : 0,
sortColour: o.data.sortColour ? 1 : 0,
category_id: o.data.cate_id || 0,
colour_id: o.data.colour_id || 0,
search: o.data.searchValue || ""
}, function(a) {
wx.hideLoading();
var e = a.data.list, i = o.data.list;
!0 === t || void 0 === i.data ? o.setData({
list: e,
noList: !1
}) : o.setData({
"list.data": i.data.concat(e.data)
});
});
},
setListHeight: function() {
var t = this;
wx.getSystemInfo({
success: function(a) {
t.setData({
scrollHeight: a.windowHeight - 160
});
}
});
},
switchSortType: function(t) {
var a = this, e = t.currentTarget.dataset.type, o = "price" !== e || !a.data.sortPrice, i = "colour" !== e || !a.data.sortColour;
a.setData({
list: {},
page: 1,
sortType: e,
sortPrice: o,
sortColour: i,
tab: !0
}, function() {
a.getGoodsList(!0);
});
},
toSynthesize: function(t) {
wx.navigateTo({
url: "../category/screen?objectId="
});
},
onChangeShowState: function() {
this.setData({
showView: !this.data.showView,
arrange: this.data.arrange ? "" : "arrange"
});
},
bindDownLoad: function() {
if (this.data.page >= this.data.list.last_page) return this.setData({
no_more: !0
}), !1;
this.getGoodsList(!1, ++this.data.page);
},
onShareAppMessage: function() {
return {
title: "小程序首页",
desc: "",
path: "/pages/index/index"
};
}
});

View File

@@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@@ -0,0 +1,89 @@
<view class="container">
<view class="list-header">
<view class="notice-wrap" hidden="{{hideNotice}}" wx:if="{{storeInfo.notice.length>0}}">
<view class="tongzhitext">
<text class="tongzhi-text">{{storeInfo.notice}}</text>
</view>   <view bindtap="switchNotice" class="closeView">x</view>
</view>
<view class="index-search-box dis-flex" style="position:static">
<view class="dis-flex search-input-box flex-box">
<view class="search-input">
<view class="dis-flex search-box">
<view class="left">
<icon color="rgba(180,180,180,1)" size="15" type="search"></icon>
</view>
<view class="right">
<input bindinput="getSearchContent" class="input" placeholder="请输入您搜索的商品" placeholderStyle="color:#aba9a9" type="text"></input>
</view>
</view>
</view>
<view class="serch-button">
<button bindtap="search" type="warn"> 搜索 </button>
</view>
</view>
</view>
<view class="index_sale search-cate-box ">
<scroll-view class="search-cate" scrollX="true">
<view hoverClass="none" style="display: inline-block;" wx:for="{{cateList}}" wx:key="this">
<view bindtap="searchCate" class="page-column {{cate_id==item.category_id?'search-cate-activity':''}}" data-category_id="{{item.category_id}}">
<view class="content ">
<text>{{item.name}}</text>
</view>
</view>
</view>
</scroll-view>
</view>
<view></view>
<view class="store_nav_cont dis-flex b-f b-b">
<view bindtap="switchSortType" class="flex-box t-c p-r" data-index="0 " data-type="all" id="list-{{sortType==='all'?true:0}}">
<text>发布时间</text>
</view>
<view bindtap="switchSortType" class="flex-box t-c p-r" data-index="2" data-type="price" id="list-{{sortType==='price'?true:0}}">
<text class="price"> 价格</text>
<text class="iconfont icon-jiantou-copy tf-180 top_jiantou {{sortPrice?'':'active'}}"></text>
<text class="iconfont icon-jiantou-copy bot_jiantou {{sortPrice?'active':''}}"></text>
</view>
<view bindtap="filterTab" class="flex-box t-c p-r" data-index="1" id="list-{{tab===false?true:0}}">
<text>{{tabTxt}}</text>
</view>
</view>
<view class="tabLayer" hidden="{{tab}}">
<text bindtap="filter" class="{{colour_id==0?'active':''}}" data-id="0" data-index="1" data-txt="成色">全部</text>
<text bindtap="filter" class="{{colour_id==85?'active':''}}" data-id="85" data-index="1" data-txt="85新">85新</text>
<text bindtap="filter" class="{{colour_id==90?'active':''}}" data-id="90" data-index="1" data-txt="9成新">9成新</text>
<text bindtap="filter" class="{{colour_id==95?'active':''}}" data-id="95" data-index="1" data-txt="95新">95新</text>
<text bindtap="filter" class="{{colour_id==99?'active':''}}" data-id="99" data-index="1" data-txt="99新">99新</text>
</view>
<scroll-view bindscrolltolower="bindDownLoad" class="weui-panel weui-panel_access" scrollY="true" style="height: {{scrollHeight}}px; width: 750rpx; " throttle="{{false}}" wx:if="{{list.data.length>0}}">
<view class="new">
<view class="category-list {{arrange}}">
<navigator class="list b-f" hoverClass="none" url="../goods/index?goods_id={{item.goods_id}}" wx:for="{{list.data}}" wx:key="list">
<view class="left">
<view class="img">
<image class="goodsImg" mode="scaleToFill" src="{{item.image[0].file_path}}"></image>
</view>
</view>
<view class="right">
<view class="cont">
<text class="f-28 title twolist-hidden m-top10">
<text class="colour-box f-20" wx:if="{{item.colour>0}}">{{colourList[item.colour]}}</text>
<text>{{item.goods_name}}</text>
</text>
<view class="f-26" style="color: #555;"> {{item.goods_title.length>0?item.goods_title:' '}} </view>
<view class="price f-30 col-m"> ¥{{item.goods_min_price}} <text class="del f-22" wx:if="{{item.goods_sku.line_price>0}}">{{item.goods_sku.line_price}}</text>
</view>
</view>
</view>
</navigator>
</view>
</view>
<view class="no-more f-30" hidden="{{!no_more}}">亲, 没有更多了</view>
</scroll-view>
</view>
<view class="yoshop-notcont" style="margin-top:260px;" wx:if="{{!noList&&!list.data.length}}">
<view class="img">
<image mode="aspectFit" src="../../images/no_content.png"></image>
</view>
<text class="cont">亲, 没有相关内容</text>
</view>
</view>

View File

@@ -0,0 +1,358 @@
.store_nav_cont {
padding: 10px 0;
}
.store_nav_cont #list-true {
color: #ff495e;
font-size: 28rpx;
}
.store_nav_cont #list-0 {
color: #333;
font-size: 28rpx;
}
.store_nav_cont #list-0 .icon-fenlei {
color: #777;
font-size: 28rpx;
padding-left: 8rpx;
}
.store_nav_cont #list-true .icon-fenlei {
color: #ff495e;
font-size: 28rpx;
padding-left: 8rpx;
}
.price {
margin-top: 10rpx;
}
.title {
height: 50rpx!important;
}
.store_nav_cont #list-0 .top_jiantou,.store_nav_cont #list-true .top_jiantou {
color: #777;
font-size: 18rpx;
margin-top: -16rpx;
position: absolute;
right: 52rpx;
top: 50%;
}
.store_nav_cont #list-0 .bot_jiantou,.store_nav_cont #list-true .bot_jiantou {
color: #777;
font-size: 18rpx;
margin-top: -2rpx;
position: absolute;
right: 52rpx;
top: 50%;
}
.store_nav_cont #list-true .bot_jiantou.active,.store_nav_cont #list-true .top_jiantou.active {
color: #ff495e;
}
.container {
position: relative;
}
.cate-btn {
background: #ff495e;
bottom: 18rpx;
color: #fff;
font-size: 20rpx;
padding: 4px 18rpx;
right: 18rpx;
}
.index-cont-search icon {
left: 0;
margin-left: 20rpx;
}
.index-search-box {
background: #fff;
border-bottom: 1px solid #eee;
left: 0rpx;
padding: 18rpx 13rpx;
position: fixed;
right: 0rpx;
top: 1rpx;
z-index: 999;
}
.index-search {
background: #fff;
border-bottom: 0;
border-radius: 50rpx;
box-sizing: border-box;
color: #999;
font-size: 32rpx;
height: 64rpx;
line-height: 64rpx;
margin: 0 10rpx;
overflow: hidden;
position: relative;
}
.list-right {
width: 60rpx;
}
.list-right text {
font-size: 40rpx;
height: 64rpx;
line-height: 64rpx;
}
.list-header {
left: 0;
position: fixed;
right: 0;
top: 1rpx;
}
.no-more {
color: #737373;
margin: 10px 0;
text-align: center;
}
.category-list {
overflow: hidden;
}
.category-list .list {
box-sizing: border-box;
float: left;
width: 50%;
}
.category-list .list:nth-child(2n) {
border-bottom: 4px solid #f7f7f7;
border-left: 2px solid #f7f7f7;
}
.category-list .list:nth-child(2n-1) {
border-bottom: 4px solid #f7f7f7;
border-right: 2px solid #f7f7f7;
}
.category-list.arrange .list {
border-bottom: 1rpx solid #f7f7f7;
overflow: hidden;
padding: 15rpx;
width: 100%;
}
.category-list.arrange .list .left {
float: left;
width: 35%;
}
.category-list.arrange .list .right {
float: left;
width: 65%;
}
.category-list.arrange .list .left .img image {
height: 220rpx;
width: 220rpx;
}
.search-input-box {
background: #f7f7f7;
height: 64rpx;
margin-right: 10rpx;
width: auto;
}
.search-input {
border-radius: 5px 0 0 5px;
box-sizing: border-box;
overflow: hidden;
padding-left: 10rpx;
width: 80%;
}
.search-input input {
font-size: 30rpx;
height: 64rpx;
line-height: 64rpx;
}
.serch-button {
box-sizing: border-box;
width: 20%;
}
.serch-button button {
border-radius: 0 5px 5px 0;
font-size: 28rpx;
height: 64rpx;
line-height: 64rpx;
}
.search-cate-box {
height: 70rpx;
}
.search-cate {
position: relative;
top: 30%;
}
.page-column {
background-color: #f7f7f7;
border-radius: 6rpx;
margin: 0 5rpx;
padding: 10rpx 0rpx!important;
text-align: center;
}
.search-cate-activity {
background-color: #e64340;
color: #fff;
}
.colour-box {
background: #e64340;
color: #fff;
font-size: 26rpx;
line-height: 26rpx;
margin-right: 10rpx;
padding: 4rpx 8rpx;
text-align: center;
}
@-webkit-keyframes remindMessage {
0% {
-webkit-transform: translateX(90%);
}
100% {
-webkit-transform: translateX(-180%);
}
}
@keyframes remindMessage {
0% {
-webkit-transform: translateX(90%);
}
100% {
-webkit-transform: translateX(-180%);
}
}
.tongzhitext {
margin-left: 10rpx;
margin-right: 80rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tongzhi-text {
animation: remindMessage 14s linear infinite;
display: block;
}
.notice-wrap,.tongzhi-text {
color: #d09868;
font-size: 28rpx;
width: 100%;
}
.notice-wrap {
background: #ffebda;
height: 60rpx;
line-height: 60rpx;
}
.closeView {
font-size: 35rpx;
height: 45rpx;
line-height: 45rpx;
position: absolute;
right: 20rpx;
text-align: center;
top: 5rpx;
width: 45rpx;
}
.clear {
clear: both;
overflow: hidden;
}
.tabTit {
background: #fff;
border-bottom: 1px solid #eee;
font-size: 15px;
height: 90rpx;
line-height: 90rpx;
position: fixed;
text-align: center;
top: 0;
width: 750rpx;
z-index: 1;
}
.tabTit .active {
background: #fff;
color: #e64340;
}
.tabTit .active image {
background: none;
transform: rotate(180deg);
}
.tabTit image {
height: 26rpx;
margin-left: 5px;
vertical-align: middle;
width: 26rpx;
}
.tabLayer {
background: #fff;
border-bottom: 1px solid #eee;
box-shadow: 0 5px 5px rgba(0,0,0,.15);
overflow: hidden;
padding-bottom: 40rpx;
position: fixed;
text-align: center;
top: 340rpx;
width: 750rpx;
z-index: 1;
}
.tabLayer text {
border: 1px solid #eee;
float: left;
font-size: 15px;
height: 60rpx;
line-height: 60rpx;
margin: 20rpx 0 0 26rpx;
width: 210rpx;
}
.tabLayer .active {
border-color: #e64340;
color: #e64340;
}
.flex1 {
display: block;
flex: 1;
overflow: hidden;
}
.box {
display: -ms-flexbox;
display: flex;
}

View File

@@ -0,0 +1,9 @@
<view class="diy-banner">
<swiper autoplay="{{autoplay}}" bindchange="bindChange" circular="{{true}}" class="banner-box swiper-box dot-{{item.style.btnShape}}" data-item-key="{{item_key}}" duration="{{duration}}" indicatorActiveColor="#000" indicatorColor="{{item.style.btnColor}}" indicatorDots="{{indicatorDots}}" interval="{{interval}}" style="height:{{imgHeights[item_key][ imgCurrent[item_key] ]}}rpx">
<navigator hoverClass="none" url="/{{banner.linkUrl}}" wx:for="{{item.data}}" wx:for-item="banner" wx:key="this">
<swiper-item itemId="{{index}}">
<image bindload="imagesHeight" class="slide-image" data-id="{{index}}" data-item-key="{{item_key}}" src="{{banner.imgUrl}}"></image>
</swiper-item>
</navigator>
</swiper>
</view>

View File

@@ -0,0 +1,32 @@
.diy-banner {
position: relative;
}
.diy-banner .linear {
background: linear-gradient(#111,transparent);
height: 3.4rem;
left: 0;
opacity: .6;
position: absolute;
top: 0;
width: 100%;
z-index: 9;
}
.swiper-box .wx-swiper-dots.wx-swiper-dots-horizontal {
margin-bottom: 2rpx;
}
.swiper-box .wx-swiper-dot {
height: 20rpx;
width: 20rpx;
}
.swiper-box.dot-rectangle .wx-swiper-dot {
border-radius: unset;
width: 30rpx;
}
.swiper-box.dot-square .wx-swiper-dot {
border-radius: unset;
}

View File

@@ -0,0 +1,10 @@
<view class="diy-search-box col-f ts-3">
<view class="dis-flex">
<view class="diy-search flex-box angle-{{item.style.searchStyle}} text-{{item.style.textAlign}}">
<navigator class="cont" hoverClass="none" openType="navigate" url="../search/index">
<text class="iconfont icon-sousuo f-30"></text>
<text class="f-28">{{item.params.placeholder}}</text>
</navigator>
</view>
</view>
</view>

View File

@@ -0,0 +1,43 @@
.diy-search-box {
background: #f1f1f2;
padding: 10px 24rpx;
position: unset;
}
.diy-search-box .diy-search {
background: #fff;
border-bottom: 0;
border-radius: unset;
box-sizing: border-box;
color: #fff;
line-height: 60rpx;
margin: 0 auto;
overflow: hidden;
padding: 0 10px;
position: relative;
width: 90%;
}
.diy-search-box .diy-search .cont .icon-sousuo {
margin-right: 10rpx;
}
.diy-search-box text {
color: #999;
}
.diy-search-box .diy-search.angle-radius {
border-radius: 5px;
}
.diy-search-box .diy-search.angle-round {
border-radius: 80rpx;
}
.diy-search-box .diy-search.text-center {
text-align: center;
}
.diy-search-box .diy-search.text-right {
text-align: right;
}

View File

@@ -0,0 +1,61 @@
var t = getApp();
Page({
data: {
indicatorDots: !0,
autoplay: !0,
interval: 3e3,
duration: 800,
imgHeights: {},
imgCurrent: {},
items: {},
newest: {},
best: {},
scrollTop: 0
},
onLoad: function() {
t.setTitle(), t.setNavigationBar(), this.getIndexData();
},
getIndexData: function() {
var a = this;
t._get("index/page", {}, function(t) {
a.setData(t.data);
});
},
imagesHeight: function(t) {
var a = t.target.dataset.id, e = t.target.dataset.itemKey, i = 750 / (t.detail.width / t.detail.height), s = this.data.imgHeights;
void 0 === s[e] && (s[e] = {}), s[e][a] = i;
var n = this.data.imgCurrent;
void 0 === n[e] && (n[e] = Object.keys(this.data.items[e].data)[0]), this.setData({
imgHeights: s,
imgCurrent: n
});
},
bindChange: function(t) {
var a = t.target.dataset.itemKey, e = this.data.imgCurrent;
e[a] = t.detail.currentItemId, this.setData({
imgCurrent: e
});
},
goTop: function(t) {
this.setData({
scrollTop: 0
});
},
scroll: function(t) {
this.setData({
indexSearch: t.detail.scrollTop
}), t.detail.scrollTop > 300 ? this.setData({
floorstatus: !0
}) : this.setData({
floorstatus: !1
});
},
onShareAppMessage: function() {
return {
title: "小程序首页",
desc: "",
path: "/pages/index/index"
};
}
});

View File

@@ -0,0 +1,4 @@
{
"enablePullDownRefresh": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,53 @@
<view class="container">
<scroll-view bindscroll="scroll" scrollTop="{{scrollTop}}" scrollY="true" style="position:absolute; top:0; left:0; right:0; bottom:0;">
<block wx:for="{{items}}" wx:for-index="item_key" wx:key="this">
<include src="components/search/search.wxml" wx:if="{{item.type==='search'}}"></include>
<include src="components/banner/banner.wxml" wx:if="{{item.type==='banner'}}"></include>
</block>
<view class="recommended-index-list m-top20">
<view class="title-header b-f t-c f-32 col-3">新品推荐</view>
</view>
<view class="index_sale ">
<scroll-view scrollX="true">
<navigator hoverClass="none" style="display: inline-block;" url="../goods/index?goods_id={{item.goods_id}}" wx:for="{{newest}}" wx:key="this">
<view class="page-column">
<view class="sale_img">
<image mode="aspectFill" src="{{item.image[0].file_path}}"></image>
</view>
<view class="content onelist-hidden">
<text>{{item.goods_name}}</text>
</view>
<text class="price col-m f-30">¥{{item.spec[0].goods_price}}</text>
</view>
</navigator>
</scroll-view>
</view>
<view class="title-hrbg" style="margin-top:10rpx">
<text class="cont">
<text class="iconfont icon-huo col-m"></text>猜您喜欢 </text>
<view class="hr"></view>
</view>
<view class="category-list">
<navigator class="list b-f" hoverClass="none" url="../goods/index?goods_id={{item.goods_id}}" wx:for="{{best}}" wx:key="this">
<view class="left">
<view class="img">
<image class="goodsImg" mode="scaleToFill" src="{{item.image[0].file_path}}"></image>
</view>
</view>
<view class="right">
<view class="cont">
<text class="f-30 title twolist-hidden m-top10">{{item.goods_name}}</text>
<text class="price f-34 col-m f-w">¥{{item.spec[0].goods_price}}</text>
</view>
</view>
</navigator>
</view>
<view class="title-footer p-r">
<text class="f-24 col-9 cont">我是有底线的</text>
<view class="hr"></view>
</view>
</scroll-view>
<view bindtap="goTop" class="widget-goTop" wx:if="{{floorstatus}}">
<text class="iconfont icon-fanhuidingbu"></text>
</view>
</view>

View File

@@ -0,0 +1,110 @@
.diy-search-box {
background: #f1f1f2;
padding: 10px 24rpx;
position: unset;
}
.diy-search-box .diy-search {
background: #fff;
border-bottom: 0;
border-radius: unset;
box-sizing: border-box;
color: #fff;
line-height: 60rpx;
margin: 0 auto;
overflow: hidden;
padding: 0 10px;
position: relative;
width: 90%;
}
.diy-search-box .diy-search .cont .icon-sousuo {
margin-right: 10rpx;
}
.diy-search-box text {
color: #999;
}
.diy-search-box .diy-search.angle-radius {
border-radius: 5px;
}
.diy-search-box .diy-search.angle-round {
border-radius: 80rpx;
}
.diy-search-box .diy-search.text-center {
text-align: center;
}
.diy-search-box .diy-search.text-right {
text-align: right;
}
.diy-banner {
position: relative;
}
.diy-banner .linear {
background: linear-gradient(#111,transparent);
height: 3.4rem;
left: 0;
opacity: .6;
position: absolute;
top: 0;
width: 100%;
z-index: 9;
}
.swiper-box .wx-swiper-dots.wx-swiper-dots-horizontal {
margin-bottom: 2rpx;
}
.swiper-box .wx-swiper-dot {
height: 20rpx;
width: 20rpx;
}
.swiper-box.dot-rectangle .wx-swiper-dot {
border-radius: unset;
width: 30rpx;
}
.swiper-box.dot-square .wx-swiper-dot {
border-radius: unset;
}
.title-hrbg {
color: #888;
height: 80rpx;
line-height: 80rpx;
margin-top: 30rpx;
overflow: hidden;
position: relative;
text-align: center;
z-index: 1;
}
.title-hrbg .cont {
background: #f7f7f7;
font-size: 28rpx;
padding: 1rem .6rem;
z-index: 10;
}
.title-hrbg .cont .icon-huo {
padding-right: 10rpx;
}
.title-hrbg .hr {
background: #ddd;
border: 0;
height: 1rpx;
left: 10%;
margin-top: 1px;
position: absolute;
right: 10%;
top: 50%;
z-index: -1;
}

View File

@@ -0,0 +1,39 @@
var o = getApp();
Page({
data: {},
onLoad: function(o) {},
getUserInfo: function(e) {
var n = this;
o.getUserInfo(e, function() {
n.onNavigateBack();
});
},
getUserProfile: function() {
console.log("getUserProfile");
var e = this;
try {
wx.getUserProfile({
lang: "zh_CN",
desc: "获取用户相关信息",
success: function(n) {
var t = n.userInfo;
console.log("用户同意了授权"), console.log("userInfo", t), o.getUserInfo(t, function() {
e.onNavigateBack(1);
});
},
fail: function() {
console.log("用户拒绝了授权");
}
});
} catch (e) {
console.log("error", e.message), "wx.getUserProfile is not a function" === e.message ? o.showError("wx.getUserProfile 接口无法使用,请升级到最新版微信") : o.showError(error.message);
}
},
onNotLogin: function() {
this.onNavigateBack();
},
onNavigateBack: function() {
wx.navigateBack();
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "授权登录",
"usingComponents": {}
}

View File

@@ -0,0 +1,15 @@
<view class="container">
<view class="wechatapp">
<view class="header">
<open-data class="" type="userAvatarUrl"></open-data>
</view>
</view>
<view class="auth-title">申请获取以下权限</view>
<view class="auth-subtitle">获得你的公开信息(昵称、头像等)</view>
<view class="login-btn">
<button catchtap="getUserProfile" class="btn-normal">授权登录</button>
</view>
<view class="no-login-btn">
<button catchtap="onNotLogin" class="btn-normal">暂不登录</button>
</view>
</view>

View File

@@ -0,0 +1,66 @@
page {
background: #fff;
font-size: 32rpx;
}
.container {
padding: 0 60rpx;
}
.wechatapp {
border-bottom: 1rpx solid #e3e3e3;
margin-bottom: 72rpx;
padding: 80rpx 0 48rpx;
text-align: center;
}
.wechatapp .header {
border: 2px solid #fff;
border-radius: 50%;
box-shadow: 1px 0 5px rgba(50,50,50,.3);
height: 190rpx;
margin: 0rpx auto 0;
overflow: hidden;
width: 190rpx;
}
.auth-title {
color: #585858;
font-size: 34rpx;
margin-bottom: 40rpx;
}
.auth-subtitle {
color: #888;
font-size: 28rpx;
margin-bottom: 88rpx;
}
.login-btn {
padding: 0 20rpx;
}
.login-btn button {
background: #04be01;
border-radius: 999rpx;
color: #fff;
font-size: 30rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
}
.no-login-btn {
margin-top: 20rpx;
padding: 0 20rpx;
}
.no-login-btn button {
background: #dfdfdf;
border-radius: 999rpx;
color: #fff;
font-size: 30rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
}

View File

@@ -0,0 +1,82 @@
var r = getApp();
Page({
data: {
order_id: null,
order: {}
},
onLoad: function(r) {
this.data.order_id = r.order_id, this.getOrderDetail(r.order_id);
},
getOrderDetail: function(t) {
var e = this;
r._get("user.order/detail", {
order_id: t
}, function(r) {
e.setData(r.data);
});
},
goodsDetail: function(r) {
var t = r.currentTarget.dataset.id;
wx.navigateTo({
url: "../goods/index?goods_id=" + t
});
},
cancelOrder: function(t) {
var e = this.data.order_id;
wx.showModal({
title: "提示",
content: "确认取消订单?",
success: function(t) {
t.confirm && r._post_form("user.order/cancel", {
order_id: e
}, function(r) {
wx.navigateBack();
});
}
});
},
aftermarketOrder: function(r) {
var t = r.currentTarget.dataset.id;
wx.navigateTo({
url: "../aftermarket/create?order_goods_id=" + t
});
},
payOrder: function(t) {
var e = this, a = e.data.order_id;
wx.showLoading({
title: "正在处理..."
}), r._post_form("user.order/pay", {
order_id: a
}, function(t) {
if (-10 === t.code) return r.showError(t.msg), !1;
wx.requestPayment({
timeStamp: t.data.timeStamp,
nonceStr: t.data.nonceStr,
package: "prepay_id=" + t.data.prepay_id,
signType: "MD5",
paySign: t.data.paySign,
success: function(r) {
e.getOrderDetail(a);
},
fail: function() {
r.showError("订单未支付");
}
});
});
},
receipt: function(t) {
var e = this, a = e.data.order_id;
wx.showModal({
title: "提示",
content: "确认收到商品?",
success: function(t) {
t.confirm && r._post_form("user.order/receipt", {
order_id: a
}, function(r) {
e.getOrderDetail(a);
});
}
});
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "订单详情",
"usingComponents": {}
}

View File

@@ -0,0 +1,96 @@
<view class="container p-bottom" wx:if="{{order.order_id}}">
<scroll-view scrollY="true">
<view class="b-f">
<view class="flow-checkout-header b-f dis-flex">
<view class="flow-header-left padding-box">
<view class="flow-checkout-admin f-26 col-3">{{order.address.name}} <text class="f-26 col-m">{{order.address.phone}}</text>
</view>
<view class="flow-checkout-address"> {{order.address.region.province}} {{order.address.region.city}} {{order.address.region.region}} {{order.address.detail}} </view>
</view>
</view>
</view>
<view class="flow-all-money b-f padding-box m-top20" wx:if="{{order.delivery_status.value==20}}">
<view class="dis-flex flow-all-list-cont">
<text class="col-7">快递公司: {{order.express_company}}</text>
</view>
<view class="dis-flex flow-all-list-cont">
<text class="col-7" selectable="{{true}}">快递单号: {{order.express_no}}</text>
</view>
</view>
<view class="order-cont b-f m-top20">
<view class="padding-box b-f">
<view class="order-header dis-flex">
<view class="flex-box t-l">
<text class="title">商品列表</text>
</view>
<view class="flex-box t-r">
<text class="col-m" wx:if="{{order.pay_status.value==10}}">{{order.pay_status.text}}</text>
<text class="col-m" wx:if="{{order.pay_status.value==20&&order.delivery_status.value==10}}">{{order.delivery_status.text}}</text>
<text class="col-m" wx:if="{{order.pay_status.value==20&&order.delivery_status.value==20&&order.receipt_status.value==10}}">{{order.receipt_status.text}}</text>
<text class="col-m" wx:if="{{order.order_status.value==30}}">{{order.order_status.text}}</text>
</view>
</view>
</view>
<view class="padding-box b-f">
<view class="order-cont dis-flex">
<view class="order-num">
<text selectable="{{true}}">订单号:{{order.order_no}}</text>
</view>
<view class="order-time">
<text>{{order.create_time}}</text>
</view>
</view>
</view>
</view>
<view class="padding-box b-f">
<view class="dis-flex flow-shopList b-f" data-id="{{item.goods_id}}" wx:for="{{order.goods}}" wx:key="this">
<view bindtap="goodsDetail" class="flow-list-left" data-id="{{item.goods_id}}">
<image mode="scaleToFill" src="{{item.image.file_path}}"></image>
</view>
<view class="flow-list-right">
<text class="h4 twolist-hidden">{{item.goods_name}}</text>
<text class="p f-22 col-7">{{item.goods_attr}}</text>
<view class="flow-list-cont">
<text class="flow-cont">¥{{item.goods_price}}</text>
<text class="small">×{{item.total_num}}</text>
</view>
<view>
<view class="flex-box" wx:if="{{order.pay_status.value==20&&(order.order_status.value==10||order.order_status.value==30)&&item.refund_status==0&&order.delivery_status.value==20}}">
<view bindtap="aftermarketOrder" class="btn-main1" data-id="{{item.order_goods_id}}">申请售后</view>
</view>
<view class="flex-box" wx:if="{{item.refund_status>0}}">
<view bindtap="aftermarketOrder" class="btn-default" data-id="{{item.order_goods_id}}">售后详情</view>
</view>
</view>
</view>
</view>
</view>
<view class="select b-f">
<view class="flow-num-box b-f">共{{order.goods.length}}件商品,合计: <text class="flow-money">{{order.total_price}}</text>
</view>
</view>
<view class="flow-all-money b-f padding-box m-top20">
<view class="dis-flex flow-all-list">
<text class="flex-five">订单金额</text>
</view>
<view class="dis-flex flow-all-list-cont">
<text class="flex-five col-7">商品金额:</text>
<text class="flex-five col-m t-r">¥{{order.total_price}}</text>
</view>
<view class="dis-flex flow-all-list-cont">
<text class="flex-five col-7">应付金额:</text>
<text class="flex-five col-m t-r">¥{{order.pay_price}}</text>
</view>
</view>
</scroll-view>
<view class="flow-fixed-footer b-f">
<view class="dis-flex chackout-box" wx:if="{{order.pay_status.value==10}}">
<button class="flex-box chackout-right-detail btn-normal" openType="contact">
<text bindtap="payOrder" class="flow-btn" wx:if="{{order.pay_status.value==10}}">联系客服付款</text>
</button>
</view>
<view class="flow-btn h3" wx:if="{{order.delivery_status.value==20&&order.receipt_status.value==10}}">
<view bindtap="receipt">确认收货</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,140 @@
.flow-distribution {
border-bottom: 1rpx solid #eee;
padding: 18rpx 0;
}
.flow-distribution .flow-dis {
font-size: 30rpx;
}
.flow-distribution-left {
flex: 14;
}
.btn-default {
border: 1rpx solid #ccc;
border-radius: 4px;
color: #555;
float: right;
font-size: 28rpx;
padding: 6rpx 20rpx;
}
.flow-distribution-left .m-l {
color: #333;
float: right;
}
.flow-distribution-right {
flex: 1;
}
.flow-distribution image {
float: right;
height: 30rpx;
margin-top: 6rpx;
width: 30rpx;
}
.flow-message-box {
padding: 20rpx 15px;
position: relative;
}
.flow-message-box .flow-message-title {
color: #777;
}
.flow-message-box textarea {
border-bottom: 1rpx solid #eee;
height: 100rpx;
margin-top: 10rpx;
padding: 10rpx 0;
width: 100%;
}
.flow-message-box .flow-message-num {
bottom: 34rpx;
color: #777;
font-size: 26rpx;
position: absolute;
right: 30rpx;
}
.flow-distribution .flow-dis {
padding-right: 15px;
}
.flow-message-box {
border-bottom: 1rpx solid #f1f1f1;
}
.flow-message-box .cont {
color: #000;
padding: 10px 0;
}
.order-cont {
justify-content: space-between;
}
.order-cont .order-num text,.order-cont .time {
color: #888;
}
.order-cont .order-num text,.order-cont .order-time text {
color: #777;
font-size: 26rpx;
}
.order-header {
border-bottom: 1rpx solid #f1f1f1;
padding: 15rpx 0;
}
.order-header text {
font-size: 28rpx;
}
.order-header text.title {
color: #333;
}
.flow-list .header {
background: #fff;
border-bottom: 1rpx solid #f1f1f1;
padding: 15rpx 0;
position: relative;
}
.flow-list .header text {
font-size: 32rpx;
padding-left: 80rpx;
}
.flow-list .header image {
height: 37rpx;
left: 15px;
margin-top: -18rpx;
position: absolute;
top: 50%;
width: 34rpx;
}
.chackout-left-detail,.chackout-right-detail {
color: #333;
font-size: 34rpx;
}
.chackout-left-detail {
line-height: 44px;
}
.btn-main1 {
border: 1rpx solid #fd4a5f;
border-radius: 4px;
color: #fd4a5f;
float: right;
font-size: 28rpx;
padding: 6rpx 20rpx;
}

View File

@@ -0,0 +1,93 @@
var t = getApp();
Page({
data: {
dataType: "all",
list: []
},
onLoad: function(t) {
this.data.dataType = t.type || "all", this.setData({
dataType: this.data.dataType
});
},
onShow: function() {
this.getOrderList(this.data.dataType);
},
getOrderList: function(a) {
var e = this;
t._get("user.order/lists", {
dataType: a
}, function(t) {
e.setData(t.data), t.data.list.length && wx.pageScrollTo({
scrollTop: 0
});
});
},
bindHeaderTap: function(t) {
this.setData({
dataType: t.target.dataset.type
}), this.getOrderList(t.target.dataset.type);
},
cancelOrder: function(a) {
var e = this, r = a.currentTarget.dataset.id;
wx.showModal({
title: "提示",
content: "确认取消订单?",
success: function(a) {
a.confirm && t._post_form("user.order/cancel", {
order_id: r
}, function(t) {
e.getOrderList(e.data.dataType);
});
}
});
},
receipt: function(a) {
var e = this, r = a.currentTarget.dataset.id;
wx.showModal({
title: "提示",
content: "确认收到商品?",
success: function(a) {
a.confirm && t._post_form("user.order/receipt", {
order_id: r
}, function(t) {
e.getOrderList(e.data.dataType);
});
}
});
},
payOrder: function(a) {
var e = a.currentTarget.dataset.id;
wx.showLoading({
title: "正在处理..."
}), t._post_form("user.order/pay", {
order_id: e
}, function(a) {
if (-10 === a.code) return t.showError(a.msg), !1;
wx.requestPayment({
timeStamp: a.data.timeStamp,
nonceStr: a.data.nonceStr,
package: "prepay_id=" + a.data.prepay_id,
signType: "MD5",
paySign: a.data.paySign,
success: function(t) {
wx.navigateTo({
url: "../order/detail?order_id=" + e
});
},
fail: function() {
t.showError("订单未支付");
}
});
});
},
detail: function(t) {
var a = t.currentTarget.dataset.id;
wx.navigateTo({
url: "../order/detail?order_id=" + a
});
},
onPullDownRefresh: function() {
wx.stopPullDownRefresh();
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "我的订单",
"usingComponents": {}
}

View File

@@ -0,0 +1,84 @@
<view class="container m-b5">
<view class="goods-detail-box">
<view class="header f-28 col-3">
<view catchtap="bindHeaderTap" class="{{dataType==='all'?'active':''}}" data-type="all">全部订单</view>
<view bindtap="bindHeaderTap" class="{{dataType==='payment'?'active':''}}" data-type="payment">待付款</view>
<view bindtap="bindHeaderTap" class="{{dataType==='delivery'?'active':''}}" data-type="delivery">待发货</view>
<view bindtap="bindHeaderTap" class="{{dataType==='received'?'active':''}}" data-type="received">待收货</view>
</view>
<scroll-view scrollY="{{true}}">
<view class="wrapper">
<view wx:if="{{list.length}}">
<view class="m-top20 " wx:for="{{list}}" wx:key="this">
<view class="order-box b-f">
<view class="order-header dis-flex">
<view class="flex-box t-l">
<text class="title">商品列表</text>
</view>
<view class="flex-box t-r">
<text class="cont" wx:if="{{item.pay_status.value==10}}">{{item.pay_status.text}}</text>
<text class="cont" wx:if="{{item.pay_status.value==20&&item.delivery_status.value==10}}">{{item.delivery_status.text}}</text>
<text class="cont" wx:if="{{item.pay_status.value==20&&item.delivery_status.value==20&&item.receipt_status.value==10}}">{{item.receipt_status.text}}</text>
<text class="cont" wx:if="{{item.order_status.value==30}}">{{item.order_status.text}}</text>
</view>
</view>
</view>
<view class="order-box b-f">
<view class="order-cont dis-flex">
<view class="order-num">
<text>订单号:{{item.order_no}}</text>
</view>
<view class="order-time">
<text>{{item.create_time}}</text>
</view>
</view>
</view>
<view class="order-box order-img_list">
<view class="order-shop">
<view bindtap="detail" class="order-list-box dis-flex" data-id="{{item.order_id}}">
<view class="left">
<view class="dis-flex">
<view class="order-shop-left" wx:for="{{item.goods}}" wx:key="goods">
<image src="{{item.image.file_path}}"></image>
</view>
</view>
</view>
<view class="right p-r">
<text class="goods-number">共{{item.goods.length}}件</text>
<text class="iconfont icon-xiangyoujiantou user-orderJtou"></text>
</view>
</view>
</view>
</view>
<view class="order-box b-f">
<view class="order-btn dis-flex">
<view class="order-left">
<view class="text">
<text>合计:</text>
<text class="col-m">¥{{item.pay_price}}</text>
</view>
</view>
<view class="order-right">
<view class="dis-flex">
<view class="" wx:if="{{item.pay_status.value==10}}">
<button class="btn-main btn-normal" data-id="{{item.order_id}}" openType="contact">联系客服付款</button>
</view>
<view class="flex-box" wx:if="{{item.delivery_status.value==20&&item.receipt_status.value==10}}">
<view bindtap="receipt" class="btn-main" data-id="{{item.order_id}}">确认收货</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view wx:else>
<view class="yoshop-notcont">
<text class="iconfont icon-ziyuan"></text>
<text class="cont">亲,您还没有订单信息哦!</text>
</view>
</view>
</view>
</scroll-view>
</view>
</view>

View File

@@ -0,0 +1,151 @@
.header {
background: #fff;
border-bottom: 1rpx solid #e4e4e4;
display: flex;
height: 44px;
line-height: 44px;
position: fixed;
top: 0;
width: 100%;
z-index: 100;
}
.header view {
flex: 1;
text-align: center;
}
.header .active {
color: #fd4a5f;
}
.wrapper {
margin-top: 54px;
}
.order-box {
padding: 0 15px;
}
.order-header {
padding-top: 10rpx;
}
.order-header .title {
color: #333;
font-size: 30rpx;
}
.order-header .cont {
color: #fd4a5f;
font-size: 30rpx;
}
.order-cont {
justify-content: space-between;
padding: 15rpx 0;
}
.order-cont .order-num text,.order-cont .order-time text {
color: #777;
font-size: 26rpx;
}
.order-shop {
padding: 16rpx 0;
}
.order-shop-left,.order-shop-left image {
background: #fff;
display: inline-block;
height: 160rpx;
margin-right: 15rpx;
width: 160rpx;
}
.order-shop .num {
float: right;
}
.order-btn {
padding: 18rpx 0;
}
.order-btn .order-left {
flex: 3;
}
.order-btn .order-left .text,.order-btn .order-left text {
font-size: 30rpx;
}
.order-btn .order-left .text {
color: #777;
}
.order-btn .order-right {
flex: 1.5;
}
.order-list-box .left {
flex: 4;
overflow: hidden;
position: relative;
}
.order-list-box .right {
flex: 1;
}
.goods-number {
color: #777;
font-size: 28rpx;
position: absolute;
right: 12px;
top: 35%;
}
.btn-default {
border: 1rpx solid #ccc;
border-radius: 4px;
color: #555;
}
.btn-default,.btn-main {
float: right;
font-size: 28rpx;
padding: 6rpx 20rpx;
}
.btn-main {
border: 1rpx solid #fd4a5f;
border-radius: 4px;
color: #fd4a5f;
margin-left: 10rpx;
}
.user-orderJtou {
color: #888;
font-size: 24rpx;
margin-top: -20rpx;
position: absolute;
right: 0;
top: 50%;
}
.order-img_list {
background: #fff;
border-bottom: 1rpx solid #f1f1f1;
border-top: 1rpx solid #f1f1f1;
}
.order-right-name {
color: #555;
font-size: 30rpx;
left: 180rpx;
line-height: 1.6;
margin-top: -46rpx;
position: absolute;
top: 50%;
width: 100%;
}

View File

@@ -0,0 +1,35 @@
var t = getApp();
Page({
data: {
imageUrlList: []
},
preview: function(t) {
var a = t.currentTarget.dataset.src;
console.log(a);
var e = this.data.imageUrlList;
console.log(e), wx.previewImage({
current: a,
urls: e
});
},
pays: function() {
var a = this;
t._get("index/payList", {}, function(t) {
var e = t.data, r = [];
e.res.pays.forEach(function(t) {
r.push(t.url);
}), a.setData(e), a.setData({
imageUrlList: r
});
});
},
ToOrder: function() {
wx.redirectTo({
url: "../order/index?type=payment"
});
},
onLoad: function(t) {
this.pays();
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "提示",
"usingComponents": {}
}

View File

@@ -0,0 +1,21 @@
<view class="container">
<view wx:if="{{res.st}}">
<view style="padding:30rpx; margin:20rpx;">
<text style="color: red;">{{res.title}}</text>
<view style="text-align: center;padding-top:30rpx; margin-top:20rpx;">请滑动到底部跳转到订单列表</view>
</view>
<view style="display: flex;flex-direction: column; justify-content: center;align-items: center;" wx:for="{{res.pays}}" wx:key="this">
<view style="display: flex;flex-direction: column; justify-content: center;align-items: center;">
<view style="padding:20rpx 0;">{{item.name}}</view>
<view style="color: red;">{{item.content}}</view>
<image bindtap="preview" data-list="{{res.pays}}" data-src="{{item.url}}" src="{{item.url}}" style="max-height: 100%;max-width: 100%;height: 700rpx;"></image>
</view>
</view>
<view style="padding:30rpx; margin:20rpx;">
<text style="color: red;">{{res.title}}</text>
</view>
</view>
<view class="cont-box b-f">
<button bindtap="ToOrder" class="saoma">去查看我的订单</button>
</view>
</view>

View File

@@ -0,0 +1,11 @@
.saoma {
align-items: center;
background-color: #f70000;
border-radius: 98rpx;
color: #fff;
display: flex;
flex-direction: row;
justify-content: center;
margin-top: 10rpx;
width: 80%;
}

View File

@@ -0,0 +1,37 @@
getApp();
Page({
data: {
recentSearch: [],
searchValue: ""
},
onLoad: function(e) {},
onShow: function() {
this.getRecentSearch();
},
getRecentSearch: function() {
var e = wx.getStorageSync("recentSearch");
this.setData({
recentSearch: e
});
},
getSearchContent: function(e) {
this.data.searchValue = e.detail.value;
},
search: function() {
if (this.data.searchValue) {
var e = wx.getStorageSync("recentSearch") || [];
e.unshift(this.data.searchValue), wx.setStorageSync("recentSearch", e), wx.navigateTo({
url: "../category/list?search=" + this.data.searchValue
});
}
},
clearSearch: function() {
wx.removeStorageSync("recentSearch"), this.getRecentSearch();
},
goSearch: function(e) {
wx.navigateTo({
url: "../category/list?search=" + e.target.dataset.text
});
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "搜索",
"usingComponents": {}
}

View File

@@ -0,0 +1,28 @@
<view class="container">
<view class="cont-box">
<view class="dis-flex search-input-box">
<view class="search-input">
<view class="dis-flex search-box">
<view class="left">
<icon color="rgba(180,180,180,1)" size="15" type="search"></icon>
</view>
<view class="right">
<input bindinput="getSearchContent" class="input" focus="true" placeholder="请输入您搜索的商品" placeholderStyle="color:#aba9a9" type="text"></input>
</view>
</view>
</view>
<view class="serch-button">
<button bindtap="search" type="warn"> 搜索 </button>
</view>
</view>
<view class="search-cont-box" wx:if="{{recentSearch.length}}">
<view class="title-box">最近搜索 <text bindtap="clearSearch" class="iconfont icon-lajixiang col-7"></text>
</view>
<view class="sale-button-box">
<view class="seconds-kill-li" wx:for="{{recentSearch}}" wx:for-index="idx" wx:for-item="recent" wx:key="hotrecent">
<view bindtap="goSearch" class="recent-button" data-text="{{recent}}">{{recent}}</view>
</view>
</view>
</view>
</view>
</view>

View File

@@ -0,0 +1,102 @@
.seconds-kill-li {
float: left;
width: 33.3%;
}
.title-box .icon-lajixiang {
float: right;
}
.sale-button-box {
overflow: hidden;
padding: 10px 0;
}
.recent-button,.sale-button {
border: 1px solid #eee;
}
.serch-button button {
background: #ff495e;
}
.search-input-box {
height: 64rpx;
}
.search-input {
background: #fff;
border-radius: 5px 0 0 5px;
box-sizing: border-box;
overflow: hidden;
padding-left: 10rpx;
width: 80%;
}
.search-input input {
font-size: 30rpx;
height: 64rpx;
line-height: 64rpx;
}
.serch-button {
box-sizing: border-box;
width: 20%;
}
.serch-button button {
border-radius: 0 5px 5px 0;
font-size: 28rpx;
height: 64rpx;
line-height: 64rpx;
}
.seconds-kill-li {
box-sizing: border-box;
padding: 10rpx;
}
.title-box {
color: #777;
font-size: 10pt;
padding: 50rpx 0 0;
}
.recent-button,.sale-button {
background: #fff;
border: 1px solid #ccc;
border-radius: 50px;
font-size: 26rpx;
height: 30rpx;
justify-content: center;
line-height: 30rpx;
overflow: hidden;
padding: 10rpx;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
}
.search-cont {
background: #fff;
padding: 0 15px;
}
.search-box .left {
width: 28px;
}
.search-box .right {
flex: 1;
}
.sale-button-box .seconds-kill-li {
float: left;
width: 33.3%;
}
.title-box image {
float: right;
height: 35rpx;
width: 35rpx;
}

View File

@@ -0,0 +1,17 @@
var t = getApp();
Page({
data: {
list: []
},
onLoad: function(t) {},
onShow: function() {
this.getHelpList();
},
getHelpList: function() {
var a = this;
t._get("wxapp/help", {}, function(t) {
a.setData(t.data);
});
}
});

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "帮助",
"usingComponents": {}
}

View File

@@ -0,0 +1,10 @@
<view class="container">
<view class="help cont-box b-f" wx:for="{{list}}" wx:key="this">
<view>
<text class="h4">{{item.title}}</text>
</view>
<view>
<text class="p">{{item.content}}</text>
</view>
</view>
</view>

View File

@@ -0,0 +1,14 @@
.help {
border-bottom: 1px solid #f6f6f9;
}
.help .h4 {
color: #333;
font-size: 32rpx;
margin-bottom: 5px;
}
.help .p {
color: #666;
font-size: 26rpx;
}

View File

@@ -0,0 +1,60 @@
var e = getApp();
Page({
data: {
isadmin: !1,
isLogin: !1,
userInfo: {},
orderCount: {}
},
onLoad: function(e) {
this.pays();
},
pays: function() {
var t = this;
e._get("index/payList", {}, function(e) {
var n = e.data;
t.setData({
payList: n
});
});
},
onShow: function() {
this.setData({
isLogin: e.checkIsLogin()
}), this.data.isLogin && this.getUserDetail();
},
getUserDetail: function() {
var t = this;
e._get("user.index/detail", {}, function(e) {
t.setData(e.data), 10984 != e.data.userInfo.user_id && 10003 != e.data.userInfo.user_id && 10004 != e.data.userInfo.user_id && 10011 != e.data.userInfo.user_id || t.setData({
isadmin: !0
});
});
},
onTargetOrder: function(e) {
if (!this.onCheckLogin()) return !1;
wx.navigateTo({
url: {
all: "/pages/order/index?type=all",
payment: "/pages/order/index?type=payment",
delivery: "/pages/order/index?type=delivery",
received: "/pages/order/index?type=received"
}[e.currentTarget.dataset.type]
});
},
onTargetMenus: function(e) {
if (!this.onCheckLogin()) return !1;
wx.navigateTo({
url: "/" + e.currentTarget.dataset.url
});
},
onLogin: function() {
wx.navigateTo({
url: "../login/login"
});
},
onCheckLogin: function() {
return !!this.data.isLogin || (e.showError("很抱歉,您还没有登录"), !1);
}
});

View File

@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "个人中心",
"navigationBarBackgroundColor": "#ffdd00",
"usingComponents": {}
}

View File

@@ -0,0 +1,135 @@
<view class="container">
<view class="user">
<view class="user-header" style="background-image: url('/images/user-bg.png');">
<view class="user-header-cont" wx:if="{{isLogin}}">
<view class="user-header-avatar">
<image src="{{userInfo.avatarUrl}}"></image>
</view>
<text> {{userInfo.nickName}} </text>
</view>
<view catchtap="onLogin" class="user-header-cont" wx:else>
<view class="user-header-avatar">
<image src="/images/default-avatar.jpg"></image>
</view>
<view class="user-header-cont-name">点击登录</view>
</view>
</view>
<view class="order-navbar">
<form bindsubmit="onTargetOrder" data-type="all">
<button class="btn-normal" formType="submit">
<view class="order-navbar-header dis-flex">
<text class="f-30">我的订单</text>
<view class="dis-flex flex-y-center">
<text class="f-24 col-6">全部订单</text>
<text class="iconfont icon-xiangyoujiantou user-orderJtou"></text>
</view>
</view>
</button>
</form>
<view class="order-navbar-footer dis-flex m-top10">
<view class="order-navbar-item flex-box">
<form bindsubmit="onTargetOrder" data-type="all">
<button class="btn-normal" formType="submit">
<text class="order-navbar__icon iconfont icon-form"></text>
<text class="order-navbar__name">全部订单</text>
</button>
</form>
</view>
<view class="order-navbar-item flex-box">
<form bindsubmit="onTargetOrder" data-type="payment">
<button class="btn-normal" formType="submit">
<text class="order-navbar__icon iconfont icon-daifukuan"></text>
<text class="order-navbar__name">待付款</text>
<text class="order-badge" wx:if="{{orderCount.payment>0}}">{{orderCount.payment}}</text>
</button>
</form>
</view>
<view class="order-navbar-item flex-box">
<form bindsubmit="onTargetOrder" data-type="delivery">
<button class="btn-normal" formType="submit">
<text class="order-navbar__icon iconfont icon-daishouhuo"></text>
<text class="order-navbar__name">待发货</text>
<text class="order-badge" wx:if="{{orderCount.delivery>0}}">{{orderCount.delivery}}</text>
</button>
</form>
</view>
<view class="order-navbar-item flex-box">
<form bindsubmit="onTargetOrder" data-type="received">
<button class="btn-normal" formType="submit">
<text class="order-navbar__icon iconfont icon-edit"></text>
<text class="order-navbar__name">待收货</text>
<text class="order-badge" wx:if="{{orderCount.received>0}}">{{orderCount.received}}</text>
</button>
</form>
</view>
</view>
</view>
</view>
<view class="menus-list m-top20">
<form bindsubmit="onTargetMenus" data-url="pages/aftermarket/index">
<button class="btn-normal" formType="submit">
<view class="menus-item dis-flex b-f">
<view class="menus-item__left flex-box dis-flex flex-y-center">
<text class="iconfont icon-icon_service f-34"></text>
<text class="menus-item__name f-30">售后订单</text>
</view>
<view class="menus-item__right flex-box dis-flex flex-x-end flex-y-center">
<text class="iconfont icon-xiangyoujiantou f-26 col-7"></text>
</view>
</view>
</button>
</form>
<form bindsubmit="onTargetMenus" data-url="pages/address/index" wx:if="{{payList.res.st}}">
<button class="btn-normal" formType="submit">
<view class="menus-item dis-flex b-f">
<view class="menus-item__left flex-box dis-flex flex-y-center">
<text class="iconfont icon-map f-34"></text>
<text class="menus-item__name f-30">收货地址</text>
</view>
<view class="menus-item__right flex-box dis-flex flex-x-end flex-y-center">
<text class="iconfont icon-xiangyoujiantou f-26 col-7"></text>
</view>
</view>
</button>
</form>
<form bindsubmit="onTargetMenus" data-url="pages/user/help">
<button class="btn-normal" formType="submit">
<view class="menus-item dis-flex b-f">
<view class="menus-item__left flex-box dis-flex flex-y-center">
<text class="iconfont icon-help f-34"></text>
<text class="menus-item__name f-30">我的帮助</text>
</view>
<view class="menus-item__right flex-box dis-flex flex-x-end flex-y-center">
<text class="iconfont icon-xiangyoujiantou f-26 col-7"></text>
</view>
</view>
</button>
</form>
<form>
<button class="btn-normal" openType="contact">
<view class="menus-item dis-flex b-f">
<view class="menus-item__left flex-box dis-flex flex-y-center">
<text class="iconfont icon-icon_service f-34"></text>
<text class="menus-item__name f-30">联系客服</text>
</view>
<view class="menus-item__right flex-box dis-flex flex-x-end flex-y-center">
<text class="iconfont icon-xiangyoujiantou f-26 col-7"></text>
</view>
</view>
</button>
</form>
<form bindsubmit="onTargetMenus" data-url="pages/gongzuo/index" wx:if="{{isadmin}}">
<button class="btn-normal" formType="submit">
<view class="menus-item dis-flex b-f">
<view class="menus-item__left flex-box dis-flex flex-y-center">
<text class="iconfont icon-icon_service f-34"></text>
<text class="menus-item__name f-30">工作台</text>
</view>
<view class="menus-item__right flex-box dis-flex flex-x-end flex-y-center">
<text class="iconfont icon-xiangyoujiantou f-26 col-7"></text>
</view>
</view>
</button>
</form>
</view>
</view>

View File

@@ -0,0 +1,117 @@
.user {
background: #fff;
margin-bottom: 150rpx;
position: relative;
}
.user-header {
align-content: center;
background-color: #fd0;
background-position: 100%;
background-repeat: no-repeat;
background-size: auto 100%;
display: flex;
height: 310rpx;
padding-top: 1px;
width: 100%;
}
.user-header .user-header-cont {
align-items: center;
display: flex;
margin: auto auto 135rpx;
width: 79%;
}
.user-header .user-header-cont .user-header-avatar {
border: 5rpx solid #fff;
border-radius: 50%;
display: block;
height: 120rpx;
margin-right: 30rpx;
overflow: hidden;
width: 120rpx;
}
.user-header .user-header-cont .user-header-avatar image {
border-radius: 50%;
height: 120rpx;
width: 120rpx;
}
.user-header .user-header-cont .user-header-cont-name {
font-size: 32rpx;
padding: 20rpx 0;
}
.order-navbar {
background: #fff;
border-radius: 5rpx;
border-top: 1rpx solid #eee;
bottom: -125rpx;
box-shadow: 0 1rpx 5rpx 0 rgba(0,0,0,.05);
font-size: 30rpx;
left: 19rpx;
margin: auto;
padding: 15rpx 0;
position: absolute;
width: 95%;
}
.order-navbar-header {
align-items: center;
border-bottom: 1px solid #eee;
height: 70rpx;
justify-content: space-between;
margin: auto;
padding-bottom: 10rpx;
width: 91%;
}
.order-navbar-footer {
padding: 10rpx 0;
width: 100%;
}
.order-navbar-footer .order-navbar-item .order-navbar__icon {
color: #000;
display: block;
font-size: 36rpx;
margin: 0 auto;
padding: 10rpx 0;
text-align: center;
}
.order-navbar-footer .order-navbar-item .order-navbar__name {
color: #666;
display: block;
font-size: 24rpx;
margin-right: 10rpx;
text-align: center;
}
.order-navbar-footer .order-navbar-item .order-badge {
background: #ff495e;
border-radius: 100%;
color: #fff;
font-size: 22rpx;
line-height: 28rpx;
min-height: 30rpx;
min-width: 30rpx;
padding: 1rpx;
position: absolute;
right: 55rpx;
text-align: center;
top: 0;
}
.menus-list .menus-item {
border-bottom: 1rpx solid #eee;
padding: 28rpx;
position: relative;
}
.menus-list .menus-item .menus-item__name {
color: #444;
margin-left: 20rpx;
}