仿互站小程序

This commit is contained in:
Drawfans
2020-06-09 16:17:23 +08:00
commit 7bfd53851e
321 changed files with 22890 additions and 0 deletions

123
pages/member/list/detail.js Normal file
View File

@@ -0,0 +1,123 @@
function t(t, a, e) {
return a in t ? Object.defineProperty(t, a, {
value: e,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[a] = e, t;
}
var a = require("../../../common/common.js");
Page({
data: {
previewList: [],
dropShow: !1,
searchVal: [],
loading: !1,
Form: {},
getdata: [],
listdata: [],
popup: [],
spin: !0,
listIndex: 0,
loadnot: !1,
gotop: !1,
popupForm: {}
},
onLoad: function(t) {
a.init(this);
var e = this;
a.HttpMember({
url: "get/member/detail",
data: {
mode: t.mode
}
}, function(i) {
var n = {
getdata: {},
listdata: {},
listIndex: 0,
searchVal: []
};
i.tabs.forEach(function(a, e) {
a.value === t.mode && (n.listIndex = e), n.getdata[e] = {
mode: a.value,
page: 1
}, n.listdata[e] = {
list: [],
CurPage: 0
};
}), a.initializeRefresh(i), t.bh && i.tabs[n.listIndex].search && (n.getdata[n.listIndex].bh = t.bh,
n.searchVal[n.listIndex] = t.bh), e.setData({
getdata: n.getdata,
listdata: n.listdata,
listIndex: n.listIndex,
searchVal: n.searchVal
}), a.initialFun(!1), a.GetList(function(t) {
e.setData({
spin: !1
});
});
});
},
onShow: function() {
a.init(this);
},
initialize: function() {
var e, i = this, n = i.data.listIndex;
i.setData((e = {}, t(e, "initialValue.listIndex", n), t(e, "listdata." + n, {
list: [],
CurPage: 0
}), e)), a.initialFun(!0), a.GetList(function(t) {
wx.stopPullDownRefresh();
});
},
searchSubmit: function(e) {
var i, n = this, s = n.data.listIndex, o = e.detail ? e.detail.replace(/\s+/g, "") : "", l = n.data.searchVal[s], d = n.data.getdata;
if (l === o) return "" == o && a.Lay({
info: "亲,搜索内容不能为空!"
}), !1;
"" == o ? delete d[s].bh : d[s].bh = o, d[s].page = 1, n.setData((i = {
getdata: d
}, t(i, "searchVal." + s, o), t(i, "listdata." + s, {
list: [],
CurPage: 0
}), i)), a.GetList();
},
onReachBottom: function() {
var e = this, i = e.data.listIndex, n = e.data.listdata[i];
if (!e.data.loadnot && !e.data.loading && n.CurPage < n.TotalPage) {
var s = "getdata." + i + ".page";
e.setData(t({}, s, 1 * e.data.getdata[i].page + 1)), a.GetList();
}
},
tabChange: function(t) {
var e = this, i = t.detail.index, n = e.data.listdata[i];
i != e.data.listIndex && (e.setData({
listIndex: i
}), wx.setNavigationBarTitle({
title: e.data.Form.tabs[i].title
}), n.CurPage ? n.CurPage < n.TotalPage ? this.loadnot = !1 : this.loadnot = !0 : a.GetList());
},
onPageScroll: function(t) {
var a = this, e = t.scrollTop, i = a.data.gotop, n = 2 * a.data.SystemInfo.windowHeight;
(e >= n && !i || e < n && i) && a.setData({
gotop: !i
});
},
Lay: function(t) {
a.Lay(JSON.parse(JSON.stringify(t)));
},
Commom: function(t) {
var e = JSON.parse(JSON.stringify((t.currentTarget, t))), i = t.currentTarget ? e.currentTarget.dataset.action : e.action;
a[i](e);
},
Popup: function(t) {
a.Popup(t.currentTarget.dataset);
},
onPullDownRefresh: function() {
this.initialize();
},
onShareAppMessage: function() {}
});

View File

@@ -0,0 +1,16 @@
{
"usingComponents": {
"van-search": "/vant/search/index",
"van-field": "/vant/field/index",
"van-cell": "/vant/cell/index",
"van-cell-group": "/vant/cell-group/index",
"forview": "/utils/forview/index",
"van-loading": "/vant/loading/index",
"van-dialog": "/vant/dialog/index",
"van-button": "/vant/button/index",
"van-icon": "/vant/icon/index",
"van-popup": "/vant/popup/index",
"van-tab": "/vant/tab/index",
"van-tabs": "/vant/tabs/index"
}
}

View File

@@ -0,0 +1,27 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin,gotop:gotop}}"></template>
<block wx:if="{{!spin}}">
<van-tabs animated sticky swipeable active="{{listIndex}}" bind:change="tabChange" swipeThreshold="6">
<van-tab title="{{tab.name}}" wx:for="{{Form.tabs}}" wx:for-index="id" wx:for-item="tab" wx:key="value">
<van-search bind:search="searchSubmit" icon="search" placeholder="请输入{{tab.search}}" value="{{searchVal[id]}}" wx:if="{{tab.search}}"></van-search>
<view class="detailList" id="main">
<view class="item" wx:for="{{listdata[id].list}}" wx:for-item="list" wx:key="index">
<view class="row-flex">
<view class="t{{type}}" style="{{list.style[type]?list.style[type]:''}}" wx:if="{{type!='style'}}" wx:for="{{list}}" wx:for-index="type" wx:for-item="array" wx:key="index">
<view>
<block wx:for="{{array}}" wx:for-item="data" wx:key="index">
<view bindtap="{{data.bind||''}}" class="{{data.class||''}}" data-action="{{data.action||''}}" data-data="{{data.data||data.data===0?data.data:''}}" data-info="{{data.info||''}}" data-method="{{data.method||''}}" data-title="{{data.title||''}}" style="{{data.style||''}}" wx:if="{{!data.icon}}">
{{data.text}}
</view>
<van-icon bindtap="{{data.bind||''}}" customClass="{{data.class||''}}" data-action="{{data.action||''}}" data-info="{{data.info||''}}" data-title="{{data.title||''}}" name="{{data.icon}}" wx:else></van-icon>
</block>
</view>
</view>
</view>
</view>
</view>
</van-tab>
</van-tabs>
<template is="list_bottom" data="{{...listdata[listIndex],loading:loading,lazy:Form.lazy.add>0,unit:'条'}}"></template>
<template is="popupform" data="{{Form:popupForm}}"></template>
</block>

View File

@@ -0,0 +1,5 @@
@import "../../../__wuBaseWxss__/0.wxss";
@import "../../../__wuBaseWxss__/1.wxss";
@import "../../../vant/area/index.wxss";

144
pages/member/list/fav.js Normal file
View File

@@ -0,0 +1,144 @@
function t(t, a, i) {
return a in t ? Object.defineProperty(t, a, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[a] = i, t;
}
var a = require("../../../common/common.js");
Page({
data: {
loading: !1,
getdata: [],
listdata: [],
ListSh: {},
spin: !0,
Form: {},
listIndex: 0,
loadnot: !1,
gotop: !1,
popupForm: {},
itemAnimation: {}
},
onLoad: function(t) {
a.init(this);
var i = this;
a.HttpMember({
url: "get/member/fav",
data: {
mode: t.mode
}
}, function(e) {
var n = {
getdata: {},
listdata: {},
listIndex: 0
};
e.tabs.forEach(function(a, i) {
a.value === t.mode && (n.listIndex = i), n.getdata[i] = {
mode: a.value,
page: 1
}, n.listdata[i] = {
list: [],
CurPage: 0
};
}), a.initializeRefresh(e), t.bh && e.tabs[n.listIndex].search && (n.getdata[n.listIndex].bh = t.bh,
n.searchVal[n.listIndex] = t.bh), i.setData({
getdata: n.getdata,
listdata: n.listdata,
listIndex: n.listIndex
}), a.initialFun(!1), a.GetList(function(t) {
i.setData({
spin: !1
});
});
});
},
onShow: function() {
a.init(this);
},
initialize: function() {
var i, e = this, n = e.data.listIndex;
e.setData((i = {}, t(i, "initialValue.listIndex", n), t(i, "listdata." + n, {
list: [],
CurPage: 0
}), i)), a.initialFun(!0), a.GetList(function(t) {
wx.stopPullDownRefresh();
});
},
ListSh: function(a) {
var i = this, e = a.currentTarget.id, n = "ListSh." + e, s = wx.createAnimation({
duration: 200,
timingFunction: "ease",
delay: 0
});
i.data.ListSh[e] ? (s.translateY("100%").step(), setTimeout(function() {
i.setData(t({}, n, !1));
}, 201)) : (i.setData(t({}, n, !0)), s.translateY("0").step()), this.setData(t({}, n, s.export()));
},
action: function(i) {
var e = this, n = e.data.listIndex, s = e.data.listdata[n], o = i.currentTarget.dataset, r = o.id, l = o.action, d = s.list[r].bh, u = e.data.Form.tabs[n].value;
a.PostMember("post/fav", {
action: l,
bh: d,
tab: u
}, function(a) {
if (1 != a.state) return !1;
if ("del" == l) {
var i = wx.createAnimation({
duration: 300,
timingFunction: "ease",
delay: 0
});
i.translateX("120%").step(), e.setData(t({}, "itemAnimation." + d, i.export())),
setTimeout(function() {
s.Total--, s.list.splice(r, 1), e.setData(t({
itemAnimation: {}
}, "listdata." + n, s));
}, 301);
} else if ("up" == l || "down" == l) {
var o = s.list.splice(r, 1)[0];
o.top = Number(!Boolean(parseInt(o.top))), "up" == l ? s.list.unshift(o) : s.list.push(o),
e.setData(t({}, "listdata." + n, s));
}
});
},
onReachBottom: function() {
var i = this, e = i.data.listIndex, n = i.data.listdata[e];
if (!i.data.loadnot && !i.data.loading && n.CurPage < n.TotalPage) {
var s = "getdata." + e + ".page";
i.setData(t({}, s, 1 * i.data.getdata[e].page + 1)), a.GetList();
}
},
tabChange: function(t) {
var i = this, e = t.detail.index, n = i.data.listdata[e];
e != i.data.listIndex && (i.setData({
listIndex: e
}), wx.setNavigationBarTitle({
title: i.data.Form.tabs[e].title
}), n.CurPage ? n.CurPage < n.TotalPage ? this.loadnot = !1 : this.loadnot = !0 : a.GetList());
},
onPageScroll: function(t) {
var a = this, i = t.scrollTop, e = a.data.gotop, n = 2 * a.data.SystemInfo.windowHeight;
(i >= n && !e || i < n && e) && a.setData({
gotop: !e
});
},
Lay: function(t) {
a.Lay(JSON.parse(JSON.stringify(t)));
},
Commom: function(t) {
var i = JSON.parse(JSON.stringify((t.currentTarget, t))), e = t.currentTarget ? i.currentTarget.dataset.action : i.action;
a[e](i);
},
Popup: function(t) {
a.Popup(t.currentTarget.dataset);
},
onPullDownRefresh: function() {
this.initialize();
},
onShareAppMessage: function() {}
});

View File

@@ -0,0 +1,12 @@
{
"usingComponents": {
"forview": "/utils/forview/index",
"van-loading": "/vant/loading/index",
"van-dialog": "/vant/dialog/index",
"van-button": "/vant/button/index",
"van-icon": "/vant/icon/index",
"van-popup": "/vant/popup/index",
"van-tab": "/vant/tab/index",
"van-tabs": "/vant/tabs/index"
}
}

125
pages/member/list/fav.wxml Normal file
View File

@@ -0,0 +1,125 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin,gotop:gotop}}"></template>
<block wx:if="{{!spin}}">
<van-tabs animated sticky swipeable active="{{listIndex}}" bind:change="tabChange" swipeThreshold="7">
<van-tab title="{{tab.name}}" wx:if="{{tab.value=='code'||tab.value=='shop'||tab.num>0}}" wx:for="{{Form.tabs}}" wx:for-index="id" wx:for-item="tab" wx:key="value">
<view class="shopList" wx:if="{{tab.value=='shop'}}">
<view animation="{{itemAnimation[item.bh]}}" class="item" wx:for="{{listdata[id].list}}" wx:key="bh">
<view class="row-flex">
<navigator class="avatar" hoverClass="hover" url="{{item.url}}">
<image src="{{item.avatar}}!t40" webp="{{true}}"></image>
</navigator>
<view class="flex-item shop">
<view class="name">
<navigator hoverClass="hover" url="{{item.url}}">{{item.name}}</navigator>
</view>
<view class="{{item.rev}}"></view>
<view class="info">
<view class="num">
宝贝数:{{item.goods}}
</view>
<van-icon catchtap="ListSh" id="{{item.bh}}" name="ellipsis"></van-icon>
</view>
</view>
<view animation="{{ListSh[item.bh]}}" class="action {{ListSh[item.bh]?'show':'hide'}}">
<view catchtap="ListSh" class="row-flex" id="{{item.bh}}">
<view bindtap="action" class="flex-item" data-action="del" data-id="{{index}}">
<view class="icon delete">
<van-icon name="delete"></van-icon>
</view>
<view>删除收藏</view>
</view>
<view bindtap="action" class="flex-item" data-action="down" data-id="{{index}}" hidden="{{item.top!=1}}">
<view class="icon down">
<van-icon name="arrow-down"></van-icon>
</view>
<view>取消置顶</view>
</view>
<view bindtap="action" class="flex-item" data-action="up" data-id="{{index}}" hidden="{{item.top==1}}">
<view class="icon up">
<van-icon name="arrow-up"></van-icon>
</view>
<view>置顶收藏</view>
</view>
<view class="flex-item">
<view class="icon cross">
<van-icon name="cross"></van-icon>
</view>
<view>关闭</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="favList" id="main" wx:else>
<view animation="{{itemAnimation[item.bh]}}" class="item" wx:for="{{listdata[id].list}}" wx:key="bh">
<view class="row-flex">
<view class="pic">
<navigator url="{{item.url}}" wx:if="{{item.url!==false}}">
<image mode="widthFix" src="{{item.pic}}" webp="{{true}}" wx:if="{{item.pic}}"></image>
<text wx:else>{{item.typename}}</text>
</navigator>
<block wx:else>
<image src="{{item.pic}}" webp="{{true}}" wx:if="{{item.pic}}"></image>
<text wx:else>{{item.typename}}</text>
</block>
</view>
<view class="flex-item info">
<view class="tit">
<navigator url="{{item.url}}" wx:if="{{item.url!==false}}">{{item.tit}}</navigator>
<block wx:else>
{{item.tit}}
</block>
</view>
<view class="bottom">
<view class="row-flex">
<view class="flex-item money">{{item.money}}</view>
<view class="flex-item">
<text class="{{item.state.class||''}}">{{item.state.text}}</text>
</view>
<van-icon catchtap="ListSh" class="ListSh" id="{{item.bh}}" name="ellipsis"></van-icon>
</view>
</view>
<view animation="{{ListSh[item.bh]}}" class="action {{ListSh[item.bh]?'show':'hide'}}">
<view catchtap="ListSh" class="row-flex" id="{{item.bh}}">
<view bindtap="action" class="flex-item" data-action="cart" data-id="{{index}}" wx:if="{{item.card}}">
<view class="icon">
<van-icon name="cart-o"></van-icon>
</view>
<view>放购物车</view>
</view>
<view bindtap="action" class="flex-item" data-action="del" data-id="{{index}}">
<view class="icon delete">
<van-icon name="delete"></van-icon>
</view>
<view>删除收藏</view>
</view>
<view bindtap="action" class="flex-item" data-action="down" data-id="{{index}}" hidden="{{item.top!=1}}">
<view class="icon down">
<van-icon name="arrow-down"></van-icon>
</view>
<view>取消置顶</view>
</view>
<view bindtap="action" class="flex-item" data-action="up" data-id="{{index}}" hidden="{{item.top==1}}">
<view class="icon up">
<van-icon name="arrow-up"></van-icon>
</view>
<view>置顶收藏</view>
</view>
<view class="flex-item">
<view class="icon cross">
<van-icon name="cross"></van-icon>
</view>
<view>关闭</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</van-tab>
</van-tabs>
<template is="list_bottom" data="{{...listdata[listIndex],loading:loading}}"></template>
</block>

114
pages/member/list/fav.wxss Normal file
View File

@@ -0,0 +1,114 @@
@import "../../../__wuBaseWxss__/0.wxss";
.favList .item {
overflow: hidden;
color: #999;
position: relative;
margin: 10px 10px 0 10px;
background: #fff;
padding: 10px;
border-radius: 2px;
}
.favList .pic {
color: #333;
font-size: 14px;
overflow: hidden;
width: 100px;
text-align: center;
height: 80px;
line-height: 80px;
background: #fafafa;
border: 1px #eee solid;
}
.favList .pic image {
width: 100px;
height: 80px;
}
.favList .info {
position: relative;
height: 80px;
margin-left: 10px;
}
.favList .info .tit {
line-height: 16px;
font-size: 12px;
height: 32px;
overflow: hidden;
}
.favList .info .bottom {
position: absolute;
right: 0;
bottom: -10px;
width: 100%;
line-height: 25px;
}
.favList .info .bottom .money {
color: #ff5000;
padding-right: 5px;
}
.favList .info .bottom .money:before {
content: "¥";
font-size: 12px;
}
.favList .info .bottom .ListSh {
font-size: 18px;
padding: 0 0 5px 15px;
line-height: 25px;
color: #999;
}
.favList .info .action {
line-height: 20px;
text-align: center;
background-color: rgba(255,255,255,.9);
position: absolute;
right: 0;
top: 0;
height: 100%;
width: 100%;
transform: translateY(100%);
}
.favList .info .action .van-icon {
line-height: 28px;
width: 100%;
font-size: 20px;
color: #fff;
}
.favList .info .icon {
margin-top: 18px;
border-radius: 50%;
width: 30px;
height: 30px;
display: inline-block;
background: #f60;
}
.action .row-flex .flex-item .icon.delete {
background: #f00;
}
.action .row-flex .flex-item .icon.up {
background: #498BF8;
}
.action .row-flex .flex-item .icon.cross {
background: #c1c1c1;
}
.action .row-flex .flex-item .icon.down {
background: #3eabc3;
}
.action .row-flex .flex-item:last-child {
flex: 0.7;
}

209
pages/member/list/manage.js Normal file
View File

@@ -0,0 +1,209 @@
function t(t, a, e) {
return a in t ? Object.defineProperty(t, a, {
value: e,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[a] = e, t;
}
var a = require("../../../common/common.js");
Page({
data: {
postShow: !1,
searchShow: !1,
searchVal: "",
searchFocus: !1,
loading: !1,
getdata: [],
listdata: [],
popup: [],
spin: !0,
listIndex: 0,
loadnot: !1,
gotop: !1,
active: {},
previewList: [],
Form: {
form: {
radio: {},
checkbox: {},
picker: {}
}
},
popupForm: {
form: {
radio: {},
checkbox: {},
picker: {}
}
}
},
onLoad: function(t) {
a.init(this);
var e = this;
a.HttpMember({
url: "get/member/manage",
data: {
list: t.list || "goods"
}
}, function(i) {
a.initializeRefresh(i);
var s = {
listIndex: 0,
getdata: {},
listdata: {},
active: {}
};
i.tabs.total.forEach(function(a, e) {
s.getdata[e] = {
page: 1,
mode: a.key,
type: a.default
}, s.listdata[e] = {
list: [],
CurPage: 0
}, s.active[e] = 0, t.mode === a.key && (s.listIndex = e, t.type && i.tabs[a.key] && i.tabs[a.key].forEach(function(a, i) {
t.type === a.key && (s.active[e] = i, s.getdata[e].type = a.key);
}));
}), e.setData({
active: s.active,
getdata: s.getdata,
listdata: s.listdata,
listIndex: s.listIndex
}), a.initialFun(!1), a.GetList(function(t) {
e.setData({
spin: !1
});
});
});
},
initialize: function() {
a.initialFun(!0), a.GetList(function(t) {
wx.stopPullDownRefresh();
});
},
onShow: function() {
a.init(this), this.data.Form.form.formLoad && this.initialize();
},
searchRemove: function() {
(!(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0]) && "" != this.data.searchVal.replace(/(^\s*)|(\s*$)/g, "") && this.searchSubmit({
detail: ""
}), this.setData({
searchShow: !1,
searchVal: ""
});
},
searchSubmit: function(e) {
var i = this, s = i.data.listIndex, o = e.detail ? e.detail.replace(/\s+/g, "") : "", n = i.data.searchVal, r = i.data.getdata;
if (n === o) return "" == o && a.Lay({
info: "亲,搜索内容不能为空!"
}), !1;
"" == o ? delete r[s].key : r[s].key = o, r[s].page = 1, i.setData(t({
getdata: r,
searchVal: o
}, "listdata." + s, {
list: [],
CurPage: 0
})), a.GetList();
},
searchToggle: function(t) {
var a = this, e = a.data.searchShow;
a.setData({
searchShow: !e,
searchFocus: !1
}), e || setTimeout(function() {
a.setData({
searchFocus: !0
});
}, 100);
},
postToggle: function() {
this.setData({
postShow: !this.data.postShow
});
},
onReachBottom: function() {
var e = this, i = e.data.listIndex, s = e.data.listdata[i];
if (!e.data.loadnot && !e.data.loading && s.CurPage < s.TotalPage) {
var o = "getdata." + i + ".page";
e.setData(t({}, o, 1 * e.data.getdata[i].page + 1)), a.GetList();
}
},
typeChange: function(e) {
var i = this, s = e.detail, o = i.data.listIndex, n = i.data.getdata[o], r = i.data.Form.tabs[n.mode];
if (n.type != r[s].key) {
var d;
n.type = r[s].key, n.page = 1, n.key && (i.searchRemove(!1), delete n.key), i.setData((d = {},
t(d, "active." + o, s), t(d, "getdata." + o, n), t(d, "listdata." + o, {
list: [],
CurPage: 0
}), d)), a.GetList();
}
},
tabChange: function(t) {
var e = this, i = t.detail.index, s = e.data.listdata[i];
i != e.data.listIndex && (e.setData({
listIndex: i
}), s.CurPage ? s.CurPage < s.TotalPage ? this.loadnot = !1 : this.loadnot = !0 : a.GetList());
},
onPageScroll: function(t) {
var a = this, e = t.scrollTop, i = a.data.gotop, s = 2 * a.data.SystemInfo.windowHeight;
(e >= s && !i || e < s && i) && a.setData({
gotop: !i
});
},
UpdateTabs: function(a) {
var e, i = this.data.Form.tabs;
for (var s in a) {
var o = a[s];
for (var n in i) for (var r in i[n]) ("total" == n && i[n][r].key == o.mode || n == o.mode && i[n][r].key == o.type) && (i[n][r].num = o.number > 0 ? parseInt(i[n][r].num) + parseInt(o.number) : parseInt(i[n][r].num) - parseInt(-1 * o.number));
}
this.setData((e = {}, t(e, "Form.tabs", i), t(e, "initialValue.Form.tabs", i), e));
},
ExecuteCallBack: function(a) {
var e = this, i = e.data.listIndex, s = e.data.listdata[i], o = a.action, n = a.index;
if ("uptime" == o) s.list[n].time = a.time; else {
var r = a.mode, d = a.toMode, l = a.type;
if (s.list.splice(n, 1), s.Total--, "updown" == o) {
var c = [ {
type: l,
mode: r,
number: -1
}, {
type: l,
mode: d,
number: 1
} ], u = e.data.getdata;
for (var h in u) if (d == u[h].mode && l == u[h].type && e.data.listdata[h].list.length > 0) {
var p;
e.setData((p = {}, t(p, "listdata." + h, {
list: [],
CurPage: 0
}), t(p, "getdata." + h + ".page", 1), p));
break;
}
} else if ("del" == o) c = [ {
type: l,
mode: r,
number: -1
} ];
e.UpdateTabs(c);
}
e.setData(t({}, "listdata." + i, s));
},
Lay: function(t) {
a.Lay(JSON.parse(JSON.stringify(t)));
},
Commom: function(t) {
var e = JSON.parse(JSON.stringify((t.currentTarget, t))), i = t.currentTarget ? e.currentTarget.dataset.action : e.action;
a[i](e);
},
Popup: function(t) {
a.Popup(t.currentTarget.dataset);
},
onPullDownRefresh: function() {
this.initialize();
}
});

View File

@@ -0,0 +1,26 @@
{
"usingComponents": {
"van-search": "/vant/search/index",
"van-picker": "/vant/picker/index",
"van-tabbar": "/vant/tabbar/index",
"van-tabbar-item": "/vant/tabbar-item/index",
"van-transition": "/vant/transition/index",
"van-field": "/vant/field/index",
"van-radio": "/vant/radio/index",
"van-radio-group": "/vant/radio-group/index",
"van-cell": "/vant/cell/index",
"van-cell-group": "/vant/cell-group/index",
"van-rate": "/vant/rate/index",
"van-stepper": "/vant/stepper/index",
"van-checkbox": "/vant/checkbox/index",
"van-checkbox-group": "/vant/checkbox-group/index",
"forview": "/utils/forview/index",
"van-loading": "/vant/loading/index",
"van-dialog": "/vant/dialog/index",
"van-button": "/vant/button/index",
"van-icon": "/vant/icon/index",
"van-popup": "/vant/popup/index",
"van-tab": "/vant/tab/index",
"van-tabs": "/vant/tabs/index"
}
}

View File

@@ -0,0 +1,90 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin||popupSpin||false,gotop:gotop,bottom:45}}"></template>
<block wx:if="{{!spin&&Form.tabs}}">
<van-tabs animated sticky swipeable active="{{listIndex}}" bind:change="tabChange" customClass="fixed-tabs" id="total" lineWidth="{{(SystemInfo.windowWidth-50)/4}}" swipeThreshold="4">
<van-tab title="{{tab.name}}({{tab.num}})" wx:for="{{Form.tabs.total}}" wx:for-index="listid" wx:for-item="tab" wx:key="key">
<view hidden="{{getdata[listIndex].mode!==tab.key}}">
<van-tabbar fixed active="{{active[listid]}}" bind:change="typeChange" id="{{tab.key}}">
<van-tabbar-item icon="home-o" info="{{tabs.num||null}}" title="{{tabs.name}}" wx:for="{{Form.tabs[tab.key]}}" wx:for-index="typeid" wx:for-item="tabs" wx:key="name">{{tabs.name}}</van-tabbar-item>
</van-tabbar>
</view>
<view class="manageList">
<view class="item" wx:for="{{listdata[listid].list}}" wx:for-index="itemIndex" wx:key="bh">
<view class="top">
<view class="time">
{{item.time.name}}<text style="{{item.time.color?'color:'+item.time.color:''}}">{{item.time.value}}</text>
<block wx:if="{{item.djl}}">
{{item.djl.name}}<text>{{item.djl.value}}</text>
</block>
</view>
<view bindtap="{{item.state.bind?item.state.bind:item.state.link?'Lay':''}}" class="state {{item.state.class}}" data-action="{{item.state.action||'url'}}" data-info="{{item.state.info||item.state.link||''}}">
<van-icon name="yuanjiaojuxing"></van-icon>{{item.state.text}}</view>
</view>
<view class="row-flex info" wx:if="{{item.pic}}">
<navigator class="pic" url="{{item.url}}">
<image mode="widthFix" src="{{item.pic}}"></image>
</navigator>
<view class="flex-item">
<view bindtap="Lay" class="tit" data-action="url" data-info="{{item.url}}">
<block wx:if="{{searchVal==''}}">{{item.title}}</block>
<rich-text nodes="{{item.title}}" wx:else></rich-text>
</view>
<view class="note">
<view>
<block wx:for="{{item.note.left}}" wx:for-item="M" wx:key="index">
<view class="{{type}}" wx:for="{{M}}" wx:for-index="type" wx:for-item="info" wx:key="index">{{info}}</view>
</block>
<view class="tright" wx:if="{{item.note.right}}">
<template is="forview" data="{{list:item.note.right,form:popupForm.form}}"></template>
</view>
</view>
</view>
</view>
</view>
<view class="row-flex info" wx:else>
<view class="flex-item">
<view bindtap="Lay" class="tit" data-action="url" data-info="{{item.url}}">
<block wx:for="{{item.note.left}}" wx:for-item="M" wx:key="index">
<text class="{{type}}" wx:for="{{M}}" wx:for-index="type" wx:for-item="info" wx:key="index">{{info}}</text>
</block>
<block wx:if="{{searchVal==''}}">{{item.title}}</block>
<rich-text nodes="{{item.title}}" wx:else></rich-text>
</view>
</view>
</view>
<view class="bot row-flex">
<view class="flex-item">
<view class="gicon" wx:if="{{item.icon}}">
<block wx:for="{{item.icon}}" wx:for-item="is" wx:key="index">
<van-icon bindtap="{{is.bind||'Lay'}}" customClass="{{is.class||''}}" data-action="{{is.action||''}}" data-data="{{is.data||''}}" data-info="{{is.info||''}}" data-method="{{is.method||''}}" name="{{is.name||''}}" wx:if="{{is.type=='icon'}}"></van-icon>
<view bindtap="{{is.bind||'Lay'}}" class="{{is.class}}" data-action="{{is.action||''}}" data-data="{{is.data||''}}" data-info="{{is.info||''}}" data-method="{{is.method||''}}" name="{{is.name||''}}" wx:else>
{{is.text}}
</view>
</block>
</view>
</view>
<view class="ListAction">
<van-button bindtap="{{btn.bind||'Lay'}}" customClass="{{btn.class||''}}" data-action="{{btn.action||''}}" data-batch="{{btn.batch||'updown'}}" data-c1="{{item.bh||''}}" data-data="{{btn.data||''}}" data-index="{{itemIndex}}" data-info="{{btn.info||''}}" data-list="{{Form.list}}" data-method="{{btn.method||''}}" data-mode="{{getdata[listIndex].mode}}" data-type="{{getdata[listIndex].type}}" icon="{{btn.icon||''}}" iconstyle="{{btn.iconstyle}}" plain="true" size="small" type="{{btn.type||'default'}}" wx:for="{{item.btn}}" wx:for-item="btn" wx:key="text">{{btn.text}}</van-button>
</view>
</view>
</view>
</view>
</van-tab>
<view class="manageAction van-hairline--right" slot="nav-left">
<van-icon bindtap="postToggle" customClass="Action-icon" name="zhuce2" size="26px"></van-icon>
</view>
<view class="manageAction van-hairline--left" slot="nav-right">
<van-transition customClass="fixed" name="slide-down" show="{{searchShow}}">
<view class="van-hairline--bottom">
<van-search showAction bind:cancel="searchRemove" bind:search="searchSubmit" customClass="tab-search" focus="{{searchFocus}}" placeholder="请输入搜索标题关键词" shape="round" value="{{searchVal}}"></van-search>
</view>
</van-transition>
<van-icon bindtap="searchToggle" customClass="Action-icon" name="fenlei2"></van-icon>
</view>
</van-tabs>
<van-popup bind:close="postToggle" closeOnClickOverlay="{{false}}" customStyle="width:80%;" show="{{postShow}}" title="{{Form.typename}}发布" titleStyle="font-weight:700;{{Form.titleStyle||'color:red'}}" zIndex="10000">
<template is="forview" data="{{list:Form.post}}"></template>
</van-popup>
<template is="list_bottom" data="{{...listdata[listIndex],loading:loading,lazy:Form.lazy.add>0,bottom:45}}"></template>
<template is="popupform" data="{{Form:popupForm}}"></template>
</block>

View File

@@ -0,0 +1,233 @@
@import "../../../__wuBaseWxss__/0.wxss";
@import "../../../vant/area/index.wxss";
page {
padding-bottom: 50px;
}
.manageList {
min-height: 1px;
}
.manageList .item {
overflow: hidden;
background: #fff;
margin: 10px 10px 0 10px;
padding: 0 10px;
border-radius: 2px;
}
.manageList .top {
position: relative;
height: 36px;
line-height: 36px;
border-bottom: 1px #eee solid;
}
.manageList .top .state {
text-align: right;
position: absolute;
right: 0;
top: 50%;
margin-top: -18px;
}
.manageList .top .state.green {
color: #58ba5b;
}
.manageList .top .state .van-icon {
line-height: 14px;
vertical-align: middle;
margin: -2.6px 2px 0 0;
font-size: 14px;
}
.manageList .top .time {
color: #777;
}
.manageList .top .time text {
font-family: Helvetica;
padding: 0 5px 0 3px;
color: #999;
}
.manageList .top .time text:last-child {
padding-right: 0;
}
.manageList .bot {
position: relative;
}
.manageList .bot .gicon {
padding: 0;
left: 0;
right: auto;
top: 11px;
}
.manageList .bot .gicon view {
border-radius: 2px;
padding: 3px 5px;
margin: 0 5px 0 0;
width: auto;
height: auto;
}
.manageList .bot .gicon view:last-child {
margin: 0;
}
.manageList .bot .gicon .van-icon.stats {
vertical-align: middle;
margin-top: -3px;
font-size: 22px;
margin-right: 2px;
border: 0;
color: #498BF8;
}
.manageList .bot .gicon .van-icon.image {
color: #6a4;
}
.manageList .info {
position: relative;
padding: 10px 0;
border-bottom: solid 1px #eee;
}
.manageList .info .pic {
border: 1px #eee solid;
width: 96px;
height: 76px;
overflow: hidden;
}
.manageList .info .pic image {
width: 100%;
}
.manageList .info .flex-item {
position: relative;
display: block;
margin-left: 10px;
}
.manageList .info .flex-item .tit {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-height: 16px;
font-size: 12px;
color: #333;
max-height: 32px;
}
.manageList .info .flex-item .note {
color: #999;
position: absolute;
left: 0;
bottom: 5px;
width: 100%;
}
.manageList .info .flex-item .note>view {
position: relative;
}
.manageList .info .flex-item .note>view view {
display: inline-block;
}
.manageList .info .flex-item .note .tright {
position: absolute;
right: 0;
bottom: 0;
}
.manageList .info .flex-item .note .van-icon {
font-size: 14px;
margin-top: -2.6px;
vertical-align: middle;
}
.manageList .info .flex-item .note .text {
padding: 0 2px;
}
.manageList .info .flex-item .money {
font-family: Helvetica;
color: #f60;
padding-right: 2px;
}
.manageList .info .flex-item .money:first-child:before {
content: '¥';
font-size: 12px;
}
.manageAction {
width: 48px;
background: #fafafa;
}
.manageAction .Action-icon {
font-size: 20px;
color: #888;
line-height: 44px;
width: 40px;
text-align: center;
}
.tab-search.van-search {
padding: 5px 5px 5px 10px;
margin-top: 1px;
}
.released {
padding: 10px;
text-align: center;
}
.released .flex-item {
color: #3e98e2;
margin: 10px;
padding: 20px 35px;
border: #cde4f6 1px solid;
font-size: 18px;
border-radius: 6px;
background: #edf6fe;
}
.released .demand .flex-item {
color: #ff8521;
border: #ffe0cc 1px solid;
background: #fff8f4;
}
.released .flex-item:hover {
opacity: .8;
}
.released .title {
color: #666;
font-size: 18px;
line-height: 30px;
}
.released text {
vertical-align: top;
}
.released .van-icon {
font-size: 32px;
display: block;
margin-top: 3px;
}

View File

@@ -0,0 +1,134 @@
function t(t, a, e) {
return a in t ? Object.defineProperty(t, a, {
value: e,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[a] = e, t;
}
var a = require("../../../common/common.js");
Page({
data: {
search: "",
loading: !1,
Form: {},
getdata: [],
listdata: [],
spin: !0,
listIndex: 0,
loadnot: !1,
gotop: !1,
popupForm: {}
},
onLoad: function() {
a.init(this);
var t = this;
a.HttpMember("get/member/message", function(e) {
a.initializeRefresh(e);
var i = {
getdata: {},
listdata: {}
};
e.tabs.forEach(function(t, a) {
i.getdata[a] = {
mode: "message",
page: 1,
state: a
}, i.listdata[a] = {
list: [],
CurPage: 0
};
}), t.setData({
getdata: i.getdata,
listdata: i.listdata
}), a.initialFun(!1), a.GetList(function(a) {
t.setData({
spin: !1
});
});
});
},
initialize: function() {
var e, i = this, n = i.data.listIndex;
i.setData((e = {}, t(e, "initialValue.listIndex", n), t(e, "listdata." + n, {
list: [],
CurPage: 0
}), e)), a.initialFun(!0), a.GetList(function(t) {
wx.stopPullDownRefresh();
});
},
onShow: function() {
a.init(this);
},
searchChange: function(t) {
this.setData({
search: t.detail
});
},
searchSubmit: function() {
var t = this, e = {
getdata: {},
listdata: {}
};
t.data.Form.tabs.forEach(function(a, i) {
e.getdata[i] = {
page: 1,
state: i,
mode: "message"
}, "" != t.data.search && (e.getdata[i].key = t.data.search), e.listdata[i] = {
list: [],
CurPage: 0
};
}), t.setData({
getdata: e.getdata,
listdata: e.listdata
}), a.GetList();
},
onReachBottom: function() {
var e = this, i = e.data.listIndex, n = e.data.listdata[i];
if (!e.data.loadnot && !e.data.loading && n.CurPage < n.TotalPage) {
var s = "getdata." + i + ".page";
e.setData(t({}, s, 1 * e.data.getdata[i].page + 1)), a.GetList();
}
},
tabChange: function(t) {
var e = this, i = t.detail.index, n = e.data.listdata[i];
i != e.data.listIndex && (e.setData({
listIndex: i
}), n.CurPage ? n.CurPage < n.TotalPage ? e.loadnot = !1 : e.loadnot = !0 : a.GetList());
},
onPageScroll: function(t) {
var a = this, e = t.scrollTop, i = a.data.gotop, n = 2 * a.data.SystemInfo.windowHeight;
(e >= n && !i || e < n && i) && a.setData({
gotop: !i
});
},
readMessage: function(e) {
var i = this, n = e.currentTarget.dataset, s = n.index, o = n.url;
0 == n.state && (i.setData(t({}, "listdata." + i.data.listIndex + ".list[" + s + "].state", 1)),
a.Lay({
action: "ajax",
method: "execute",
batch: "message_read",
id: n.id
})), wx.navigateTo({
url: o
});
},
Lay: function(t) {
a.Lay(JSON.parse(JSON.stringify(t)));
},
Commom: function(t) {
var e = JSON.parse(JSON.stringify((t.currentTarget, t))), i = t.currentTarget ? e.currentTarget.dataset.action : e.action;
a[i](e);
},
Popup: function(t) {
a.Popup(t.currentTarget.dataset);
},
onPullDownRefresh: function() {
this.initialize();
},
onShareAppMessage: function() {}
});

View File

@@ -0,0 +1,13 @@
{
"usingComponents": {
"van-search": "/vant/search/index",
"forview": "/utils/forview/index",
"van-loading": "/vant/loading/index",
"van-dialog": "/vant/dialog/index",
"van-button": "/vant/button/index",
"van-icon": "/vant/icon/index",
"van-popup": "/vant/popup/index",
"van-tab": "/vant/tab/index",
"van-tabs": "/vant/tabs/index"
}
}

View File

@@ -0,0 +1,20 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin,gotop:gotop}}"></template>
<block wx:if="{{!spin}}">
<van-search bind:change="searchChange" bind:search="searchSubmit" icon="search" placeholder="请输入搜索标题关键词" shape="round" value="{{search}}"></van-search>
<van-tabs animated sticky swipeable active="{{listIndex}}" bind:change="tabChange" swipeThreshold="5">
<van-tab title="{{tab.name}}" wx:for="{{Form.tabs}}" wx:for-index="id" wx:for-item="tab" wx:key="value">
<view class="messageList" id="main">
<view bindtap="readMessage" class="item" data-id="{{item.id}}" data-index="{{index}}" data-state="{{item.state}}" data-url="{{item.url}}" wx:for="{{listdata[id].list}}" wx:key="id">
<view class="state v{{item.state}}"></view>
<view class="info">
<view class="time">
<text>{{item.sorts}}</text>{{item.time}}</view>
<view class="text">{{item.text}}</view>
</view>
</view>
</view>
</van-tab>
</van-tabs>
<template is="list_bottom" data="{{...listdata[listIndex],loading:loading,unit:'条'}}"></template>
</block>

View File

@@ -0,0 +1,45 @@
@import "../../../__wuBaseWxss__/0.wxss";
.messageList .item {
position: relative;
overflow: hidden;
margin: 10px 10px 0 10px;
}
.messageList .state {
background: #f00;
width: 8px;
height: 8px;
top: 50%;
left: 0;
position: absolute;
margin-top: -5px;
border-radius: 50px;
}
.messageList .state.v1 {
background: #c1c1c1;
}
.messageList .info {
margin-left: 18px;
background: #fff;
padding: 10px 10px 10px 13px;
line-height: 16px;
border: 1px #eee solid;
border-radius: 3px;
}
.messageList .info .time {
color: #999;
line-height: 12px;
padding-bottom: 5px;
}
.messageList .info text {
padding-right: 15px;
}
.messageList .info .text {
text-indent: -6px;
}

217
pages/member/list/order.js Normal file
View File

@@ -0,0 +1,217 @@
function t(t, a, e) {
return a in t ? Object.defineProperty(t, a, {
value: e,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[a] = e, t;
}
var a = function(t) {
return t && t.__esModule ? t : {
default: t
};
}(require("../../../vant/dialog/dialog")), e = require("../../../common/common.js");
Page({
data: {
dropShow: !1,
dropTips: "请输入订单号",
dropField: "order",
dropName: "订单号",
searchVal: "",
loading: !1,
Form: {},
getdata: [],
listdata: [],
animation: {},
popupSpin: !1,
popupForm: {},
previewList: [],
popup: [],
spin: !0,
listIndex: 0,
role: "buy",
loadnot: !1,
gotop: !1
},
onLoad: function(t) {
e.init(this);
var a = this;
e.HttpMember({
url: "get/member/order",
data: {
role: t.role || a.data.role
}
}, function(o) {
e.initializeRefresh(o);
var i = {
getdata: {},
listdata: {}
};
o.tabs.forEach(function(t, a) {
i.getdata[a] = {
mode: o.role,
page: 1,
state: t.value
}, i.listdata[a] = {
list: [],
CurPage: 0
};
}), a.setData({
role: t.role || a.data.role,
getdata: i.getdata,
listdata: i.listdata,
listIndex: t.mode || 0
}), e.initialFun(!1), e.GetList(function(t) {
a.setData({
spin: !1
});
});
});
},
onShow: function() {
e.init(this);
},
initialize: function() {
e.initialFun(!0), e.GetList(function(t) {
wx.stopPullDownRefresh();
});
},
confirmHandle: function(t) {
var o = t.currentTarget.dataset;
a.default.alert({
title: "提示",
message: decodeURIComponent(o.info),
overlay: !0,
showCancelButton: !0,
cancelButtonText: "返回",
closable: !1
}).then(function() {
e.HttpMember({
url: "deal/" + o.method,
data: o.data
});
}).catch(function() {});
},
orderHandlePopup: function(t) {
var a = t.currentTarget.dataset;
e.Lay({
table: "popupForm",
action: "pop",
method: "deal/" + a.method,
data: JSON.stringify({
number: a.data,
role: this.data.role,
action: a.action,
index: a.index
})
});
},
dropOpen: function() {
this.setData({
dropShow: !this.data.dropShow
});
},
searchChange: function(t) {
this.setData({
searchVal: t.detail
});
},
searchSubmit: function(t) {
var a = this, o = {
getdata: {},
listdata: {}
};
a.data.Form.tabs.forEach(function(t, e) {
o.getdata[e] = {
page: 1,
state: t.value,
mode: a.data.role,
first_input: a.data.searchVal,
first_select: a.data.dropField
}, o.listdata[e] = {
list: [],
CurPage: 0
};
}), a.setData({
listIndex: 0,
getdata: o.getdata,
listdata: o.listdata
}), e.GetList();
},
dropChange: function(t) {
var a = this, e = t.detail, o = a.data.Form.dropValue[e.index];
a.setData({
dropTips: "请输入" + e.value,
dropField: o,
dropName: e.value,
dropShow: !1
});
},
onReachBottom: function() {
var a = this, o = a.data.listIndex, i = a.data.listdata[o];
if (!a.data.loadnot && !a.data.loading && i.CurPage < i.TotalPage) {
var n = "getdata." + o + ".page";
a.setData(t({}, n, 1 * a.data.getdata[o].page + 1)), e.GetList();
}
},
tabChange: function(t) {
var a = this, o = t.detail.index, i = a.data.listdata[o];
o != a.data.listIndex && (a.setData({
listIndex: o
}), i.CurPage ? i.CurPage < i.TotalPage ? this.loadnot = !1 : this.loadnot = !0 : e.GetList());
},
onPageScroll: function(a) {
var e = this, o = a.scrollTop, i = e.data.gotop, n = 2 * e.data.SystemInfo.windowHeight;
if ((o >= n && !i || o < n && i) && e.setData({
gotop: !i
}), e.data.Form.lazy && e.data.Form.lazy.add > 0) {
var r = e.data.Form.lazy, d = Math.ceil((o + e.data.SystemInfo.windowHeight) / r.height) * e.data.Form.lazy.add;
d > r.pos && e.setData(t({}, "Form.lazy.pos", d));
}
},
ExecuteCallBack: function(a) {
var o = this, i = o.data.listIndex, n = a.index;
e.Popup({
action: "closeForm"
}), e.HttpMember({
url: o.data.Form.apiurl,
data: {
mode: o.data.role,
first_input: a.ddbh,
first_select: "order"
}
}, function(a) {
if (1 === a.Total) {
var e = a.list.shift(), r = wx.createAnimation({
duration: 600,
timingFunction: "ease"
});
r.rotateY(90).step(), setTimeout(function() {
o.setData(t({}, "animation." + e.ddbh, r.export()), function() {
setTimeout(function() {
r.rotateY(0).step(), o.setData(t({}, "animation." + e.ddbh, r.export()), function() {
o.setData(t({}, "listdata." + i + ".list[" + n + "]", e));
});
}, 600);
});
}, 100);
}
});
},
Lay: function(t) {
e.Lay(JSON.parse(JSON.stringify(t)));
},
Commom: function(t) {
var a = JSON.parse(JSON.stringify((t.currentTarget, t))), o = t.currentTarget ? a.currentTarget.dataset.action : a.action;
e[o](a);
},
Popup: function(t) {
e.Popup(t.currentTarget.dataset);
},
onPullDownRefresh: function() {
this.initialize();
},
onShareAppMessage: function() {}
});

View File

@@ -0,0 +1,23 @@
{
"usingComponents": {
"down": "/utils/count-down/index",
"van-search": "/vant/search/index",
"van-picker": "/vant/picker/index",
"van-cell": "/vant/cell/index",
"van-cell-group": "/vant/cell-group/index",
"van-field": "/vant/field/index",
"van-radio": "/vant/radio/index",
"van-radio-group": "/vant/radio-group/index",
"van-checkbox": "/vant/checkbox/index",
"van-checkbox-group": "/vant/checkbox-group/index",
"van-rate": "/vant/rate/index",
"forview": "/utils/forview/index",
"van-loading": "/vant/loading/index",
"van-dialog": "/vant/dialog/index",
"van-button": "/vant/button/index",
"van-icon": "/vant/icon/index",
"van-popup": "/vant/popup/index",
"van-tab": "/vant/tab/index",
"van-tabs": "/vant/tabs/index"
}
}

View File

@@ -0,0 +1,57 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin||popupSpin||false,gotop:gotop}}"></template>
<block wx:if="{{!spin}}">
<van-search useActionSlot bind:change="searchChange" bind:search="searchSubmit" icon="arrow-down" placeholder="{{dropTips}}" shape="round" value="{{searchVal}}">
<view catchtap="dropOpen" slot="label" style="padding:0 5px;line-height:34px;">{{dropName}}</view>
<view bind:tap="searchSubmit" slot="action">搜索</view>
</van-search>
<van-popup widthFull bind:close="dropOpen" closable="{{false}}" position="top" show="{{dropShow}}">
<van-picker showToolbar bind:cancel="dropOpen" bind:confirm="dropChange" columns="{{Form.dropKey}}" title="选择搜索对象"></van-picker>
</van-popup>
<van-tabs animated sticky swipeable active="{{listIndex}}" bind:change="tabChange" swipeThreshold="5">
<van-tab title="{{tab.name}}" wx:for="{{Form.tabs}}" wx:for-index="id" wx:for-item="tab" wx:key="value">
<view class="orderList" id="main">
<view animation="{{animation[item.ddbh]}}" class="item {{itemIndex===0&&'lazyView'}}" wx:for="{{listdata[id].list}}" wx:for-index="itemIndex" wx:key="itemIndex">
<view class="top">
<view class="name">{{item.dfinfo.role}}{{item.dfinfo.name}}</view>
<view class="contact">
<template is="forview" data="{{list:item.dfinfo.contact}}"></template>
</view>
<view class="money r">¥{{item.money}}<text wx:if="{{item.jifen>0}}">{{item.jifen}}积分</text>
</view>
</view>
<view class="row-flex info van-hairline--top-bottom">
<view class="pic loadImage van-hairline--surround" wx:if="{{item.thumb.type=='img'}}">
<image bindtap="Lay" data-action="preview" data-src="{{item.thumb.value}}" mode="widthFix" src="{{item.thumb.value}}" wx:if="{{Form.lazy.pos>itemIndex}}"></image>
</view>
<view class="pic van-hairline--surround" style="background: #fafafa;" wx:else>
<view>{{item.thumb.value}}</view>
</view>
<view class="flex-item attr">
<view class="title">
<navigator hoverClass="hover" url="{{item.link}}" wx:if="{{item.link}}">{{item.title}}</navigator>
<block wx:else>{{item.title}}</block>
</view>
<view class="gicon" wx:if="{{item.icon}}">
<template is="forview" data="{{list:item.icon}}"></template>
</view>
</view>
</view>
<view class="ts van-hairline--bottom">
<view class="time" style="color:{{item.time.color}}">
<van-icon name="{{item.time.down?'shalou':'clock-o'}}"></van-icon>
{{item.time.text}}<down customClass="{{item.time.class||''}}" customStyle="{{item.time.style||''}}" expireTime="{{item.time.value}}" wx:if="{{item.time.down==1}}"></down>
<block wx:else>{{item.time.value}}</block>
</view>
<rich-text class="state r" nodes="{{item.state}}"></rich-text>
</view>
<view class="ListAction">
<van-button bindtap="{{btn.bind||''}}" customClass="{{btn.class}}" data-action="{{btn.action||''}}" data-data="{{btn.data||''}}" data-index="{{itemIndex}}" data-info="{{btn.info||''}}" data-method="{{btn.method||''}}" icon="{{btn.icon||''}}" iconstyle="{{btn.iconstyle||''}}" plain="true" size="small" type="{{btn.type||'default'}}" wx:for="{{item.btn}}" wx:for-item="btn" wx:key="text">{{btn.text}}</van-button>
</view>
</view>
</view>
</van-tab>
</van-tabs>
<template is="list_bottom" data="{{...listdata[listIndex],loading:loading,lazy:Form.lazy.add>0,unit:'笔'}}"></template>
<template is="popupform" data="{{Form:popupForm}}"></template>
</block>

View File

@@ -0,0 +1,169 @@
@import "../../../__wuBaseWxss__/0.wxss";
@import "../../../vant/area/index.wxss";
.orderList .item {
overflow: hidden;
margin: 10px 10px 0 10px;
background: #fff;
padding: 0 10px;
border-radius: 2px;
}
.orderList .r {
position: absolute;
right: 0;
top: 0;
}
.orderList .top {
position: relative;
height: 40px;
line-height: 40px;
color: #999;
}
.orderList .top .name {
color: #666;
}
.orderList .top .money {
font-family: Helvetica;
color: red;
}
.orderList .top .money text {
color: #f60;
}
.orderList .top .money text:before {
content: " + ";
color: #ccc;
}
.orderList .top>view {
display: inline-block;
}
.orderList .top .contact view {
padding: 8px 3px;
vertical-align: middle;
margin-top: -2px;
}
.orderList .top .contact view:first-child {
margin-left: 5px;
}
.orderList .ts {
font-size: 12px;
height: 40px;
line-height: 40px;
position: relative;
}
.orderList .ts .time {
color: #999;
}
.orderList .ts .time .van-icon {
font-size: 19px;
line-height: 19px;
vertical-align: middle;
margin-top: -2px;
}
.orderList .action {
padding: 10px 0;
}
.orderList .action .van-button {
margin: 0 0 0 10px;
line-height: 23px;
font-size: 12px;
padding: 0 5px;
border: 1px solid #ededed;
color: #444;
height: 26px;
min-width: auto;
}
.orderList .action .van-button.green {
color: #3a933a;
border-color: #3a933a;
}
.orderList .action .van-button.orange {
color: #f60;
border-color: #f60;
}
.orderList .action .van-button.gray {
color: #999;
}
.orderList .action .van-button .van-icon {
vertical-align: middle;
margin-top: -2px;
margin-right: 2px;
}
.orderList .info {
padding: 12px 0;
width: 100%;
}
.orderList .info .pic {
color: #36c;
border: 1px #eee solid;
width: 96px;
height: 76px;
line-height: 76px;
overflow: hidden;
text-align: center;
}
.orderList .info .pic image {
width: 100%;
}
.orderList .info .attr {
margin-left: 10px;
position: relative;
}
.orderList .info .gicon {
position: absolute;
left: 0;
bottom: 0;
top: auto;
right: auto;
}
.orderList .info .gicon view {
border-radius: 2px;
padding: 3px 8px 4px 8px;
margin: 0 5px 0 0;
width: auto;
height: auto;
}
.orderList .info .attr .title {
line-height: 20px;
color: #333;
max-height: 40px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.orderList .info .attr navigator {
color: #333;
}
.nav_top {
border-bottom: solid 1px #eee;
}