仿互站小程序

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

2006
__wuBaseWxss__/0.wxss Normal file

File diff suppressed because it is too large Load Diff

868
__wuBaseWxss__/1.wxss Normal file
View File

@ -0,0 +1,868 @@
.u-club {
background: #fff;
position: relative;
}
.u-club .tabs {
position: absolute;
right: 0;
top: -41px;
text-align: center;
overflow: hidden;
}
.u-club .tabs .van-icon {
font-size: 24px;
color: #888;
width: 45px;
line-height: 43px;
height: 40px;
border: solid 1px #f1f1f1;
border-bottom: 0;
display: inline-block;
background: #f1f1f1;
}
.u-club .tabs .van-icon.on {
color: #666;
border-color: #eee;
background: #fff;
}
.u-club .box {
width: 100%;
}
.u-club .box .row-flex {
position: relative;
}
.u-club .box .item .van-icon {
overflow: hidden;
font-size: 25px;
line-height: 25px;
color: #888;
}
.u-club .box .item>view {
color: #686868;
text-align: center;
padding: 13px 0 15px 0;
}
.u-club .box .item text {
display: block;
font-size: 12px;
line-height: 12px;
}
.u-club .box .item:nth-child(3):before {
position: absolute;
left: 5%;
top: 0;
content: " ";
width: 90%;
height: 1px;
background: #eee;
}
.u-club .title {
font-size: 12px;
line-height: 32px;
padding: 2px 15px;
border-bottom: dotted 1px #e1e1e1;
color: #686868;
}
.u-club .title view:last-child {
text-align: right;
color: #a8a9ab;
display: inline-block;
}
.u-club .title .middle2 {
margin-top: -3px;
}
.u-icon {
background: #fff;
margin-top: 10px;
}
.u-icon .box {
width: 100%;
}
.u-icon .box .item>view {
color: #686868;
padding: 20px 0;
border-top: solid 1px #eee;
border-right: solid 1px #eee;
text-align: center;
}
.u-icon .box .item>view:last-child {
border-right: 0;
}
.u-icon .box .item>view .van-icon {
font-size: 30px;
line-height: 30px;
color: #888;
}
.u-icon .box .item>view text {
display: block;
font-size: 12px;
line-height: 14px;
padding-top: 2px;
}
.u-header {
background: #f1f1f1;
position: relative;
padding: 18px 0 18px 18px;
}
.u-header .action {
position: absolute;
right: 0;
top: 0;
}
.u-header .action>view {
position: relative;
display: inline-block;
height: 40px;
line-height: 40px;
width: 47px;
text-align: center;
}
.u-header .message .van-icon {
font-size: 22px;
vertical-align: middle;
}
.u-header .message .unread {
position: absolute;
right: 5px;
top: 2px;
min-width: 12px;
text-align: center;
line-height: 12px;
display: inline-block;
background: red;
color: #fff;
border-radius: 17px;
padding: 4px;
font-size: 16px;
transform: scale(.7);
font-family: Helvetica;
vertical-align: middle;
}
.u-header .avatar {
position: relative;
height: 55px;
width: 55px;
border-radius: 100%;
border: 4px solid #fff;
overflow: hidden;
}
.u-header .avatar .van-icon {
position: absolute;
left: 0;
top: -2px;
color: #45a1de;
background: #fff;
font-size: 58px;
}
.u-header .avatar image {
width: 100%;
height: 100%;
}
.u-header .info {
padding: 0 0 0 10px;
}
.u-header .info view {
display: inline-block;
}
.u-header .info .c-icon {
margin-left: 5px;
}
.u-header .info .name {
font-size: 14px;
line-height: 25px;
padding-top: 7px;
}
.u-header .info .assets {
display: block;
line-height: 14px;
padding-top: 4px;
}
.u-header .info .number {
color: #f60;
margin-right: 5px;
}
.onpay {
margin: 10px -12px;
}
.onpay .van-search {
margin: 10px;
padding: 0;
border-radius: 3px;
}
.onpay .van-icon-balance2 {
color: #999;
font-size: 24px;
}
.onpay .paylist {
padding: 0 10px;
}
.onpay .paylist .row-flex {
padding: 5px 10px;
margin-top: 10px;
line-height: 28px;
background: #fff;
border: 1px solid #e5e5e5;
border-radius: 3px;
}
.onpay .paylist .flex-item {
font-size: 14px;
line-height: 29px;
}
.onpay .paylist .logo {
font-size: 28px;
margin: -2px 20px 0 0;
vertical-align: middle;
}
.onpay .paylist .van-icon-passed {
border-radius: 50%;
}
.appealPost {
border: 1px solid #a7cbff;
padding: 30px 10px;
color: #666;
background: #fff;
margin: 10px;
border-radius: 2px;
text-align: center;
}
.cartpay {
overflow: hidden;
}
.cartpay .item {
background: #fafafa;
overflow: hidden;
margin-bottom: 10px;
border-bottom: 1px #e9e9e9 solid;
border-top: 1px #e9e9e9 solid;
}
.cartpay .shop {
line-height: 20px;
background: #fff;
padding: 10px;
color: #999;
border-bottom: 1px #e5e5e5 solid;
position: relative;
}
.cartpay .shop .name {
color: #333;
max-width: 40%;
font-size: 14px;
padding-left: 26px;
}
.cartpay .shop .van-icon {
color: #333;
font-size: 18px;
}
.cartpay .shop .gicon {
left: 10px;
padding: 0;
right: auto;
top: 50%;
margin-top: -10px;
}
.cartpay .shop .total {
position: absolute;
right: 10px;
top: 50%;
margin-top: -10px;
}
.cartpay .good {
padding: 10px 0;
border-bottom: 1px #f1f1f1 solid;
margin: 0 10px;
}
.cartpay .good:last-child {
border-bottom: 0;
}
.cartpay .good .pic {
text-align: center;
overflow: hidden;
line-height: 40px;
height: 40px;
width: 50px;
color: #36c;
margin: 0 8px 0 0;
border: 1px solid #eee;
background: #fafafa;
}
.cartpay .good .pic image {
width: 100%;
display: block;
}
.cartpay .good .info {
color: #999;
position: relative;
min-width: 0;
}
.cartpay .good .money {
position: absolute;
bottom: 0;
right: 0;
display: block;
width: 100%;
}
.cartpay .good .money>text:first-child {
color: #f40;
vertical-align: -1px;
}
.cartpay .m:before {
content: "¥";
font-size: .8em;
}
.cartpay .order {
background: #eef7fe;
}
.cartpay .order>view {
line-height: 20px;
padding: 8px;
display: flex;
flex-direction: row;
border-bottom: #e5ecf2 solid 1px;
}
.cartpay .order .gicon {
top: 0;
left: 0;
right: auto;
padding: 0;
}
.cartpay .order .gicon view {
margin: 0;
}
.cartpay .order .title {
padding-left: 20px;
}
.cartpay .order .top {
color: #111;
font-size: 14px;
background: #e5ecf2;
padding: 8px 10px;
}
.cartpay .order .label {
width: 72px;
text-align: right;
}
.cartpay .order>view>view:last-child {
flex: 1;
padding-right: 10px;
min-width: 0;
position: relative;
}
.cashier {
padding: 10px 10px 0 10px;
background: #fff;
overflow: hidden;
}
.cashier .safe {
line-height: 38px;
height: 38px;
background: #fff;
border: 1px #56aa16 solid;
padding: 0 10px;
}
.cashier .onpay {
margin: 10px -10px;
}
.cashier .onpay .row-flex {
border-radius: 0;
}
.ptips {
font-size: 14px;
line-height: 28px;
margin: 0 0 10px 0;
padding: 5px 10px;
height: 28px;
position: relative;
}
.ptips .tright {
right: 10px;
top: 50%;
margin-top: -14px;
position: absolute;
}
.ptips .van-checkbox {
border: #e0e0e0 solid 1px;
height: 38px;
}
.ptips .van-checkbox .van-checkbox__icon-wrap {
display: block;
height: 40px;
position: relative;
}
.ptips .van-checkbox {
left: 0;
top: 0;
width: 100%;
position: absolute;
z-index: 1;
}
.ptips .van-checkbox .van-checkbox__icon {
left: 10px;
top: 50%;
margin-top: -11px;
position: absolute;
}
.ptips .van-checkbox .van-checkbox__label {
left: 28px;
top: 50%;
margin-top: -10px;
position: absolute;
}
.pay-checked,.ptips .van-checkbox.pay-checked {
border: #85a1d4 solid 1px;
}
.ptips .tright .b {
color: #f60;
padding: 0 3px;
}
.ptips .text {
padding-left: 25px;
}
.prompt {
background: #eff8e4;
height: 100%;
font-size: 14px;
position: fixed;
width: 100%;
}
.prompt .body {
padding: 5px 15px;
}
.prompt.no {
background: #ffeeea;
}
.prompt.way {
background: #fff3e2;
}
.prompt.no .text {
color: #ff9393;
}
.prompt.way .icons {
background-position: -59px -419px;
}
.prompt .text {
line-height: 20px;
padding: 3px 0;
font-weight: 700;
}
.prompt .text {
color: #91c26c;
}
.prompt .text>view {
margin: 10px 0;
}
.prompt .text>view>view {
display: inline;
}
.prompt .text .label {
font-size: 14px;
color: #333;
}
.prompt .text input {
width: 358px;
background: #e2f2ff;
border: #bed3f0 solid 2px;
line-height: 25px;
}
.prompt .text input:hover {
background: #e2f2ff;
border: #8cb6f0 solid 2px;
}
.prompt .action navigator {
line-height: 14px;
font-size: 14px;
color: #999;
display: inline-block;
padding: 0 10px;
position: relative;
border-left: #999 solid 1px;
}
.prompt .action navigator:first-child {
border: 0;
padding-left: 0;
}
.prompt .action navigator:last-child {
padding-right: 0;
}
.prompt .trun .item {
display: flex;
flex-direction: row;
}
.prompt .trun .item>view {
flex: 1;
border-color: #ffeeea;
border: #ff9393 solid 2px;
color: #ff9393;
text-align: center;
margin: 12px 12px 12px 0;
padding: 8px 0;
}
.prompt .trun .item>view>view {
font-weight: 700;
font-size: 18px;
}
.prompt .trun .item>view:last-child {
margin-right: 0;
}
.prompt .trun .item>view.ok {
border-color: #eff8e4;
border: #91c26c solid 2px;
color: #91c26c;
}
.prompt .trun .top {
text-align: center;
padding: 12px 0 0 0;
font-weight: 700;
}
.prompt .trun button {
font-size: 13px;
color: #333;
background: #e2f2ff;
border: #bed3f0 solid 2px;
padding: 1px 0;
margin-bottom: 10px;
}
.prompt .trun button:after {
border: 0;
}
.prompt button,.prompt button::after {
border-radius: 1px;
}
.central .item {
overflow: hidden;
position: relative;
margin: 10px 10px 0 10px;
background: #fff;
padding: 5px 10px;
border-radius: 2px;
}
.central .item:last-child {
margin: 10px;
}
.central .top {
padding: 10px 5px;
line-height: 18px;
}
.central .center {
text-align: right;
color: #090;
}
.central .center .van-icon {
padding-right: 2px;
font-size: 18px;
vertical-align: middle;
margin-top: -3px;
}
.central .center.not {
color: #999;
}
.central .center.warn {
color: red;
}
.central .tright {
min-width: 80px;
}
.central .tright navigator,.central .tright view {
color: #428bca;
display: inline-block;
}
.central .tright navigator:nth-child(2) {
margin-left: 5px;
}
.central .tright navigator:nth-child(2):before {
content: "|";
padding-right: 5px;
color: #ccc;
}
.central .bottom {
padding: 10px 5px;
color: #999;
}
.whiteList {
margin-bottom: 5px;
}
.whiteList .items {
position: relative;
color: #666;
margin: 0 10px;
padding: 10px 0 10px 40px;
}
.whiteList .items:nth-child(2) {
border-top: #eee solid 1px;
}
.whiteList .name {
position: absolute;
left: 0;
top: 50%;
margin-top: -7px;
color: #000;
line-height: 14px;
width: 45px;
text-align: right;
}
.whiteList .lists.ip view {
line-height: 20px;
}
.whiteList .lists.region view {
border: 1px solid #eee;
background: #f9f9f9;
line-height: 12px;
font-size: 12px;
text-transform: capitalize;
margin: 3px 6px 3px 0;
padding: 3px 5px 4px 5px;
border-radius: 3px;
display: inline-block;
}
.detailList {
min-height: 1px;
}
.detailList .item {
margin: 10px 10px 0 10px;
overflow: hidden;
background: #fff;
padding: 10px;
line-height: 18px;
border-radius: 2px;
}
.detailList .add:before {
content: '+';
color: #0b9a00;
vertical-align: 1px;
}
.detailList .add:before {
content: '+';
color: #0b9a00;
vertical-align: 1px;
}
.detailList .green {
color: #87a34d;
}
.detailList .arrow {
color: #999;
vertical-align: middle;
margin: -2px -3px 0 0;
line-height: 16px;
height: 16px;
padding-left: 10px;
}
.detailList .tcenter {
flex: 1;
min-width: 0;
}
.detailList .cashed {
font-size: 28px;
line-height: 28px;
height: 28px;
}
.detailList .tleft,.detailList .tright {
display: flex;
justify-content: center;
align-items: center;
}
.detailList .tleft>view,.detailList .tright>view {
width: 100%;
}
.detailList .sub:before {
content: '-';
color: red;
vertical-align: 1px;
}
.detailList .link {
color: #056dae;
}
.bond {
background-color: #f1f1f1;
overflow: hidden;
width: 100%;
}
.bond .info {
padding: 15px 0;
background: #fff;
}
.bond .info:first-child {
font-size: 12px;
background: 0 0;
border-bottom: 2px #e1e1e1 solid;
padding: 11px 0 10px 0;
}
.bond .info .van-icon {
color: #555;
vertical-align: middle;
font-size: 18px;
margin: -2px 3px 0 0;
}
.bond .info rich-text {
display: inline-block;
}
.bond .info .flex-item {
padding: 0 0 0 14px;
border-right: 1px #f1f1f1 solid;
}
.bond .info .label {
color: #666;
}
.bond .info .money {
line-height: 30px;
vertical-align: -2px;
font-size: 26px;
color: #6b6b6b;
}
.mendsign {
background: #f8ffe0;
text-align: center;
padding: 30px 0 50px 0;
}
.mend_top {
padding: 20px 20px 5px 20px;
font-size: 14px;
font-weight: 400;
color: #707b5b;
line-height: 1.5;
}
.mend_top span {
font-size: 26px;
}

8
app.js Normal file
View File

@ -0,0 +1,8 @@
App({
onLaunch: function(n) {
wx.setStorageSync("apiurl", "https://m.huzhan.com/");
},
globalData: {
userInfo: null
}
});

51
app.json Normal file
View File

@ -0,0 +1,51 @@
{
"pages": [
"pages/index/index",
"pages/member/member",
"pages/index/article",
"pages/member/myorder",
"pages/index/show",
"pages/index/list",
"pages/index/shop",
"pages/member/html",
"pages/member/cart",
"pages/member/login",
"pages/member/list/fav",
"pages/member/list/order",
"pages/member/list/detail",
"pages/member/list/manage",
"pages/member/list/message"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "互站网",
"navigationBarTextStyle": "black",
"enablePullDownRefresh": true
},
"tabBar": {
"color": "#7a7e83",
"selectedColor": "#e93b3d",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "static/images/home.png",
"selectedIconPath": "static/images/home_hover.png"
},
{
"pagePath": "pages/member/cart",
"text": "购物车",
"iconPath": "static/images/cart.png",
"selectedIconPath": "static/images/cart_hover.png"
},
{
"pagePath": "pages/member/member",
"text": "我的",
"iconPath": "static/images/my.png",
"selectedIconPath": "static/images/my_hover.png"
}
]
},
"sitemapLocation": "sitemap96.json"
}

21
app.wxss Normal file
View File

@ -0,0 +1,21 @@
[is="utils/forview/index"] {
display: contents;
}
[is="vant/goods-action-button/index"] {
flex: 1;
}
[is="vant/tabbar-item/index"] {
flex: 1;
}
navigator {
color: #333;
}
page {
font-size: 14px;
color: #333;
background: #f2f2f2;
}

290
common/WxValidate.js Normal file
View File

@ -0,0 +1,290 @@
function t(t, e) {
if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function");
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
return typeof t;
} : function(t) {
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, n = function() {
function t(t, e) {
for (var n = 0; n < e.length; n++) {
var i = e[n];
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0),
Object.defineProperty(t, i.key, i);
}
}
return function(e, n, i) {
return n && t(e.prototype, n), i && t(e, i), e;
};
}(), i = function() {
function i() {
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {};
t(this, i), Object.assign(this, {
data: {},
rules: e,
messages: n
}), this.__init();
}
return n(i, [ {
key: "__init",
value: function() {
this.__initMethods(), this.__initDefaults(), this.__initData();
}
}, {
key: "__initData",
value: function() {
this.form = {}, this.errorList = [];
}
}, {
key: "__initDefaults",
value: function() {
this.defaults = {
messages: {
required: "不能为空",
email: "请输入有效的邮箱地址",
phone: "请输入11位的手机号码",
qq: "请输入5~11位的QQ号码",
url: "请输入有效的网址",
nice: "昵称必须为2~7位的数字、字母或汉字",
date: "请输入有效的日期",
dateISO: "请输入有效的日期ISO例如2009-06-231998/01/22",
number: "请输入有效的数字",
digits: "只能输入数字",
idcard: "请输入18位的有效身份证",
safe: "不少于6位且同时包含数字+字母",
pass: "密码长度要求6-20位",
vcode: "验证码错误,请重新输入",
equalTo: this.formatTpl("输入值必须和 {0} 相同"),
contains: this.formatTpl("输入值必须包含 {0}"),
minlength: this.formatTpl("最少需要输入 {0} 个字符"),
maxlength: this.formatTpl("最多允许输入 {0} 个字符"),
rangelength: this.formatTpl("长度要求:{0} 到 {1} 个字符"),
min: this.formatTpl("请输入不小于 {0} 的数字"),
max: this.formatTpl("请输入不大于 {0} 的数字"),
range: this.formatTpl("允许数字范围: {0} 到 {1} 之间")
}
};
}
}, {
key: "__initMethods",
value: function() {
var t = this;
t.methods = {
required: function(e, n) {
if (!t.depend(n)) return "dependency-mismatch";
if ("number" == typeof e) e = e.toString(); else if ("boolean" == typeof e) return !0;
return e.length > 0;
},
email: function(e) {
return t.optional(e) || /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e);
},
phone: function(e) {
return t.optional(e) || /^1[345789]\d{9}$/.test(e);
},
qq: function(e) {
return t.optional(e) || /^[1-9]\d{5,11}$/.test(e);
},
nice: function(e) {
return t.optional(e) || /^[\u4e00-\u9fa5a_a-zA-Z0-9\-]{2,14}$/.test(e);
},
pass: function(e) {
return t.optional(e) || /^\S{6,20}$/.test(e);
},
vcode: function(e) {
return t.optional(e) || /^\S{4,6}$/.test(e);
},
url: function(e) {
return t.optional(e) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e);
},
date: function(e) {
return t.optional(e) || !/Invalid|NaN/.test(new Date(e).toString());
},
dateISO: function(e) {
return t.optional(e) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(e);
},
number: function(e) {
return t.optional(e) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e);
},
digits: function(e) {
return t.optional(e) || /^\d+$/.test(e);
},
idcard: function(e) {
return t.optional(e) || /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(e);
},
equalTo: function(e, n) {
return t.optional(e) || e === t.data[n];
},
contains: function(e, n) {
return t.optional(e) || e.indexOf(n) >= 0;
},
minlength: function(e, n) {
return t.optional(e) || e.length >= n;
},
maxlength: function(e, n) {
return t.optional(e) || e.length <= n;
},
rangelength: function(e, n) {
return t.optional(e) || e.length >= n[0] && e.length <= n[1];
},
min: function(e, n) {
return t.optional(e) || e >= n;
},
max: function(e, n) {
return t.optional(e) || e <= n;
},
range: function(e, n) {
return t.optional(e) || e >= n[0] && e <= n[1];
},
safe: function(e, n) {
return t.optional(e) || /(?=^.*?\d)(?=^.*?[a-zA-Z])^[0-9a-zA-Z]{6,32}$/.test(e);
}
};
}
}, {
key: "addMethod",
value: function(t, e, n) {
this.methods[t] = e, this.defaults.messages[t] = void 0 !== n ? n : this.defaults.messages[t];
}
}, {
key: "isValidMethod",
value: function(t) {
var e = [];
for (var n in this.methods) n && "function" == typeof this.methods[n] && e.push(n);
return -1 !== e.indexOf(t);
}
}, {
key: "formatTpl",
value: function(t, e) {
var n = this;
return 1 === arguments.length ? function() {
var e = Array.from(arguments);
return e.unshift(t), n.formatTpl.apply(this, e);
} : void 0 === e ? t : (arguments.length > 2 && e.constructor !== Array && (e = Array.from(arguments).slice(1)),
e.constructor !== Array && (e = [ e ]), e.forEach(function(e, n) {
t = t.replace(new RegExp("\\{" + n + "\\}", "g"), function() {
return e;
});
}), t);
}
}, {
key: "depend",
value: function(t) {
switch (void 0 === t ? "undefined" : e(t)) {
case "boolean":
t = t;
break;
case "string":
t = !!t.length;
break;
case "function":
t = t();
default:
t = !0;
}
return t;
}
}, {
key: "optional",
value: function(t) {
return !this.methods.required(t) && "dependency-mismatch";
}
}, {
key: "customMessage",
value: function(t, n) {
var i = this.messages[t], r = "object" === (void 0 === i ? "undefined" : e(i));
if (i && r) return i[n.method];
}
}, {
key: "defaultMessage",
value: function(t, n) {
var i = this.customMessage(t, n) || this.defaults.messages[n.method], r = void 0 === i ? "undefined" : e(i);
return "undefined" === r ? i = "Warning: No message defined for " + n.method + "." : "function" === r && (i = i.call(this, n.parameters)),
void 0 !== this.messages[t] && this.messages[t].label ? i = "【" + this.messages[t].label + "】" + i : "required" == n.method && "不能为空" == i && (i = "此项" + i),
i;
}
}, {
key: "formatTplAndAdd",
value: function(t, e, n) {
var i = this.defaultMessage(t, e);
this.errorList.push({
param: t,
msg: i,
value: n
});
}
}, {
key: "checkParam",
value: function(t, n, i) {
if (this.data = i, void 0 === i[t]) return !0;
if (n.isShow) {
var r = !0;
for (var o in n.isShow) {
var a = n.isShow[o];
("object" == e(i[o]) ? i[o].join("") : i[o]) !== a && (r = !1);
}
if (!r) return !0;
}
var s = null !== i[t] ? i[t] : "";
for (var u in n) if ("isShow" != u && this.isValidMethod(u)) {
var f = {
method: u,
parameters: n[u]
}, l = this.methods[u](s, f.parameters);
if (this.setValue(t, u, l, s), !l || "dependency-mismatch" === l) return this.formatTplAndAdd(t, f, s),
!1;
}
return !0;
}
}, {
key: "setView",
value: function(t) {
this.form[t] = {
$name: t,
$valid: !0,
$invalid: !1,
$error: {},
$success: {},
$viewValue: ""
};
}
}, {
key: "setValue",
value: function(t, e, n, i) {
var r = this.form[t];
r.$valid = n, r.$invalid = !n, r.$error[e] = !n, r.$success[e] = n, r.$viewValue = i;
}
}, {
key: "checkForm",
value: function(t) {
this.__initData();
for (var e in this.rules) if (!(t.Send && [ "phone", "email" ].indexOf(e) < 0 || (this.setView(e),
this.checkParam(e, this.rules[e], t)))) return !1;
return this.valid();
}
}, {
key: "valid",
value: function() {
return 0 === this.size();
}
}, {
key: "size",
value: function() {
return this.errorList.length;
}
}, {
key: "validationErrors",
value: function() {
return this.errorList;
}
} ]), i;
}();
exports.default = i;

1058
common/common.js Normal file

File diff suppressed because it is too large Load Diff

63
pages/index/article.js Normal file
View File

@ -0,0 +1,63 @@
var t = require("../../common/common.js");
Page({
data: {
url: "",
popup: []
},
initialize: function() {
var i = this;
i.setData({
spin: !0,
popupSpin: !1,
Form: {
form: {
radio: {},
checkbox: {},
picker: {},
rate: {}
}
},
popupForm: {
form: {
radio: {},
checkbox: {},
picker: {}
}
}
}), t.Gethtml(i.data.url, function(i) {
t.initializeRefresh(i);
});
},
onPullDownRefresh: function() {
this.initialize();
},
onLoad: function(i) {
i.url ? this.setData({
url: t.UrlOptions(i)
}) : this.setData({
url: "get/article/help"
}), t.init(this), this.initialize();
},
searchSubmit: function(i) {
t.Lay({
action: "url",
info: t.Lay({
action: "geturl"
}) + "/search/" + i.detail.value
});
},
onShow: function() {
t.init(this);
},
Lay: function(i) {
t.Lay(JSON.parse(JSON.stringify(i)));
},
Commom: function(i) {
var a = JSON.parse(JSON.stringify((i.currentTarget, i))), n = i.currentTarget ? a.currentTarget.dataset.action : a.action;
t[n](a);
},
Popup: function(i) {
t.Popup(i.currentTarget.dataset);
}
});

18
pages/index/article.json Normal file
View File

@ -0,0 +1,18 @@
{
"usingComponents": {
"down": "/utils/count-down/index",
"van-field": "/vant/field/index",
"van-cell": "/vant/cell/index",
"van-cell-group": "/vant/cell-group/index",
"van-notice-bar": "/vant/notice-bar/index",
"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"
}
}

4
pages/index/article.wxml Normal file
View File

@ -0,0 +1,4 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{spin:spin}}"></template>
<template is="form" data="{{Form:Form}}" wx:if="{{!spin}}"></template>
<template is="popupform" data="{{Form:popupForm}}"></template>

260
pages/index/article.wxss Normal file
View File

@ -0,0 +1,260 @@
@import "../../__wuBaseWxss__/0.wxss";
.help-top {
height: 135px;
background: linear-gradient(to right,#5a8ef3,#6760fb);
background-color: #5a8ef3;
position: relative;
background-image: url(https://statics.huzhan.com/app/images/help-top-bg.jpg);
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}
.help-top .search-box {
width: 90%;
position: absolute;
left: 1rem;
bottom: .3rem;
}
.help-top .search-box .van-icon {
position: absolute;
left: 8px;
top: 8px;
font-size: 18px;
}
.help-top .search {
background: #fefefe;
border-radius: 5px;
position: relative;
width: 100%;
height: 35px;
}
.help-top .search input {
border: none;
font-size: .8rem;
height: 35px;
border-radius: 22px;
padding: 0 0 0 30px;
}
.help-top .link {
padding: .5rem 0 .5rem 0;
color: #fff;
}
.help-top .link navigator {
color: #fff;
display: inline-block;
margin-right: .3rem;
font-size: .82rem;
}
.help-palace {
background: #fff;
padding: .5rem 0;
position: relative;
overflow: hidden;
margin-top: 10px;
}
.help-palace .flex-item {
position: relative;
padding: 1px;
margin: 5px 0;
}
.help-palace .icon {
width: 30px;
height: 30px;
margin: 0 auto;
}
.help-palace .icon image {
display: block;
width: 100%;
height: 100%;
border: none;
}
.help-palace .text {
display: block;
text-align: center;
color: #333;
font-size: .85rem;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
padding-top: .2rem;
}
.help-palace .text {
font-size: .8rem;
font-weight: 400;
color: #666;
}
.help-block {
background: #fff;
padding: 1rem 1rem;
overflow: hidden;
margin: 10px 0;
}
.help-block .row-flex {
width: 50%;
float: left;
position: relative;
}
.help-block .row-flex:first-child:after {
content: '';
position: absolute;
z-index: 0;
top: 0;
right: 0;
height: 100%;
border-right: 1px solid #d9d9d9;
transform: scaleX(.5);
transform-origin: 100% 0;
}
.help-block .row-flex:last-child .pic {
margin-left: 10px;
}
.help-block .row-flex:last-child .flex-item {
margin-right: 5px;
}
.help-block .pic {
width: 40px;
height: 40px;
margin-right: .2rem;
}
.help-block .pic image {
width: 40px;
height: 40px;
border: none;
display: block;
border-radius: 3px;
}
.help-block .flex-item {
text-align: right;
margin-right: 1.5rem;
font-weight: 500;
font-size: 1rem;
color: #3d4457;
}
.help-block .flex-item view {
font-weight: 400;
font-size: .8rem;
color: #a9a9a9;
}
.help-tabs.van-tabs--card {
margin: 0;
padding: 10px 0 0 0;
background: #fff;
}
.help-tabs.van-tabs--card .van-tab.van-tab--active {
background: 0 0;
border: 0;
}
.help-tabs.van-tabs--card .van-tab.van-tab--active .van-tab__title {
color: #fff;
background: #6060fb;
}
.help-tabs .van-tabs__nav {
display: flex;
height: auto;
flex-wrap: wrap;
align-content: flex-start;
}
.help-tabs .van-tabs__wrap {
height: auto!important;
position: static;
}
.help-tabs .van-tabs__scroll--card {
border-radius: 0;
border: 0;
box-shadow: 0 3px 3px #e8e8e8;
padding: 0 5px;
margin-bottom: 6px;
}
.help-tabs .van-tabs__nav--card .van-tab {
padding: 0;
border: 0;
}
.help-tabs .van-tab {
border: 0;
position: relative;
text-align: center;
color: #585858;
font-size: .9rem;
flex: 0 0 33.333333%;
margin-bottom: 10px;
}
.help-tabs .van-tab .van-tab__title {
background: #f1f4f7;
margin: 0 5px;
border: 0;
color: #777;
line-height: 30px;
}
.help_table {
border-collapse: collapse;
border: solid #e0e0e0;
border-width: 0 1px 1px 1px;
width: 100%;
}
.help_table .a {
color: #056dae;
}
.help_table .thead .td {
background: #f0f0f0;
font-size: 14px;
border-width: 1px 0;
border-color: #e0e0e0;
}
.help_table .td {
padding: 5px 6px;
border: #e0e0e0 solid;
border-width: 1px 1px 1px 1px;
}
.help_table .tbody .tr {
background: #fff;
}
.help_table .tbody .tr.odd {
background: #fafafa;
}
.help_body .a {
color: #056dae;
display: inline-block!important;
}
.help_body image {
width: 100%;
vertical-align: middle;
}

89
pages/index/index.js Normal file
View File

@ -0,0 +1,89 @@
function t(t, i, a) {
return i in t ? Object.defineProperty(t, i, {
value: a,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[i] = a, t;
}
var i, a = require("../../common/common.js");
Page({
data: (i = {
spin: !0,
popup: [],
popupSpin: !1,
loading: !1,
Form: {},
getdata: {},
listdata: {}
}, t(i, "popup", []), t(i, "ListSh", {}), t(i, "gotop", !1), t(i, "Form", {
form: {
radio: {},
checkbox: {},
picker: {},
rate: {}
}
}), t(i, "popupForm", {
form: {
radio: {},
checkbox: {},
picker: {}
}
}), i),
initialize: function() {
var t = this;
a.Gethtml("get/index", function(i) {
a.initialFun(!1), a.initializeRefresh(i), t.tabsChange();
});
},
tabsChange: function() {
var i = this, e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {
detail: {
index: 0
}
}).detail.index, n = i.data.Form.tabs.list[e];
if (!i.data.getdata[e]) {
var r;
i.setData((r = {
listIndex: e
}, t(r, "getdata." + e, n), t(r, "listdata." + e, {
list: [],
CurPage: 0
}), r)), a.GetList();
}
},
ListSh: function(i) {
var a = this, e = i.currentTarget.id, n = "ListSh." + e, r = wx.createAnimation({
duration: 200,
timingFunction: "ease",
delay: 0
});
a.data.ListSh[e] ? (r.translateY("100%").step(), setTimeout(function() {
a.setData(t({}, n, !1));
}, 201)) : (a.setData(t({}, n, !0)), r.translateY("0").step()), this.setData(t({}, n, r.export()));
},
onLoad: function() {
a.init(this), this.initialize();
},
onShow: function() {
a.init(this);
},
onShareAppMessage: function() {
return a.getShare();
},
onPullDownRefresh: function() {
a.initialFun(), this.initialize();
},
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);
}
});

12
pages/index/index.json Normal file
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"
}
}

13
pages/index/index.wxml Normal file
View File

@ -0,0 +1,13 @@
<import src="/template/template.wxml"></import>
<import src="/pages/index/list.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin||popupSpin||false,gotop:gotop}}"></template>
<block wx:if="{{!spin}}">
<template is="form" data="{{Form:Form}}"></template>
<van-tabs active="{{Form.tabs.active||0}}" animated="{{Form.tabs.animated||false}}" bind:change="{{Form.tabs.bind||'tabsChange'}}" border="{{Form.tabs.border!==false}}" color="{{Form.tabs.color||false}}" customClass="{{Form.tabs.class||''}}" duration="{{Form.tabs.duration||0.3}}" lineWidth="{{Form.tabs.lineWidth||-1}}" sticky="{{Form.tabs.sticky||true}}" swipeThreshold="{{Form.tabs.swipeThreshold||4}}" swipeable="{{Form.tabs.swipeable||false}}" type="{{Form.tabs.styleType||'line'}}" zIndex="{{Form.tabs.zIndex||1}}" wx:if="{{Form.tabs.list}}">
<van-tab title="{{item.title}}" wx:for="{{Form.tabs.list}}" wx:key="title">
<template is="{{item.temp||item.type}}List" data="{{listdata:listdata[index],ListSh:ListSh}}"></template>
<template is="list_bottom" data="{{...listdata[index],loading:loading}}"></template>
</van-tab>
</van-tabs>
</block>
<template is="popupform" data="{{Form:popupForm}}"></template>

214
pages/index/index.wxss Normal file
View File

@ -0,0 +1,214 @@
@import "../../__wuBaseWxss__/0.wxss";
@import "list.wxss";
.i-swiper {
position: relative;
z-index: 0;
}
.i-swiper swiper {
height: 100%;
width: 100%;
}
.i-swiper image {
width: 100%;
height: 100%;
}
.i-swiper .wx-swiper-dots.wx-swiper-dots-horizontal {
margin-bottom: 32rpx;
}
.i-swiper .wx-swiper-dot {
width: 13rpx;
display: inline-flex;
height: 13rpx;
opacity: .8;
justify-content: space-between;
}
.i-swiper .wx-swiper-dot::before {
content: '';
flex-grow: 1;
background: #fff;
border-radius: 8rpx;
}
.i-swiper .wx-swiper-dot-active {
width: 18rpx;
}
.i-swiper .wx-swiper-dot-active::before {
background: #f80;
}
.i_notice {
margin: 10px;
font-size: 14px;
line-height: 30px;
height: 30px;
overflow: hidden;
}
.i_notice .van-icon {
font-size: 24px;
color: #45a1de;
vertical-align: middle;
margin-top: -2px;
}
.i_notice .flex-item {
padding: 0 5px;
height: 30px;
}
.i_notice swiper,.i_notice swiper view {
height: 30px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.i_notice .more {
width: 30px;
text-align: center;
color: gray;
}
.i_icon {
position: relative;
z-index: 1;
border-top-left-radius: 12px;
border-top-right-radius: 12px;
background: #fff;
margin: -10px 0 0 0;
text-align: center;
padding: 10px 5px 25px 5px;
}
.i_icon .box {
margin: 15px 0 5px 0;
display: inline-block;
width: 46px;
height: 46px;
border-radius: 100%;
background: #ff3030;
}
.i_icon text {
display: block;
}
.i_icon .van-icon {
font-size: 27px;
color: #fff;
line-height: 46px;
}
.i_tab {
text-align: center;
background: #fff;
margin: 0;
line-height: 42px;
border-bottom: 1px #eee solid;
}
.i_shop {
background: #fff;
overflow: hidden;
padding: 10px 10px 0 10px;
}
.i_shop .shop {
margin: 0 0 20px 0;
text-align: center;
width: 50%;
position: relative;
}
.i_shop .avatar {
position: absolute;
left: 50%;
top: 0;
margin-left: -35px;
width: 70px;
height: 70px;
}
.i_shop .avatar image {
background: #fff;
padding: 3px;
box-shadow: 0 -2px 1px 0 rgba(0,0,0,.15);
border-radius: 50%;
height: 100%;
display: block;
width: 100%;
}
.i_shop .shop .link {
display: block;
height: 100%;
padding: 0 10px;
}
.i_shop .info {
margin-top: 20px;
padding: 58px 0 8px 0;
text-align: center;
background: #fafafa;
border-radius: 5px;
width: 100%;
box-shadow: 0 1px 1px 0 rgba(0,0,0,.08);
line-height: 1.5;
border: #f5f5f5 1px solid;
border-bottom: 0;
}
.footer {
background: #fff;
clear: both;
padding: 0 0 10px 0;
}
.footbar {
height: 40px;
padding: 0 10px;
background: #fff;
margin-top: 10px;
border: solid 1px #eee;
border-width: 1px 0 1px 0;
}
.footbar navigator {
display: block;
height: 30px;
line-height: 30px;
float: left;
margin: 5px 0;
padding: 0 12px;
border-radius: 2px;
}
.login_btn {
background: #eff2f5;
margin-right: 10px;
}
.backtop_btn {
background: #eff2f5;
float: right!important;
}
.footlink {
text-align: center;
line-height: 20px;
margin-top: 10px;
}
.footlink navigator {
margin: 0 20px;
color: #45a1de;
display: inline-block;
}

182
pages/index/list.js Normal file
View File

@ -0,0 +1,182 @@
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: {
loading: !1,
Form: {},
sortValue: "",
search: "",
getdata: {},
listdata: {},
popup: [],
ListSh: {},
gotop: !1,
spin: !0,
filter: {
icon: !1,
show: "",
selectName: {},
selectValue: {}
}
},
onPageScroll: function(a) {
var e = this, i = a.scrollTop, r = e.data.gotop, n = 2 * e.data.SystemInfo.windowHeight;
if ((i >= n && !r || i < n && r) && e.setData({
gotop: !r
}), e.data.Form.lazy && e.data.Form.lazy.add > 0) {
var s = e.data.Form.lazy, o = Math.ceil((i + e.data.SystemInfo.windowHeight) / s.height) * e.data.Form.lazy.add;
o > s.pos && e.setData(t({}, "Form.lazy.pos", o));
}
},
onLoad: function(t) {
a.init(this);
var e = this;
t.url || (t.url = "get/lists/code"), a.Gethtml(t.url, function(t) {
a.initializeRefresh(t);
var i = {
page: 1,
type: t.type
};
t.par && (i.par = t.par), t.check && (i.check = t.check), t.store && (i.store = t.store.bh),
e.setData({
getdata: i,
listdata: {}
}), a.initialFun(!1), a.GetList(function(t) {
a.querySelect(".top", function(t) {
e.setData({
topHeight: t.height,
spin: !1
});
});
});
});
},
initialize: function() {
a.initialFun(), a.GetList(function(t) {
wx.stopPullDownRefresh();
});
},
onShow: function() {
a.init(this);
},
tabsChange: function(t) {
var e = this, i = t.currentTarget.dataset.field, r = e.data.Form, n = r.tabs, s = r[i], o = r.store && r.store.id ? "/" + r.store.id : "";
for (var l in n) if (n[l].index === t.detail && s != l) {
a.initialFun(), e.onLoad({
url: "type" == i ? "get/lists/" + l + o : "get/lists/demand/" + l
});
break;
}
},
ListSh: function(a) {
var e = this, i = a.currentTarget.id, r = "ListSh." + i, n = wx.createAnimation({
duration: 200,
timingFunction: "ease",
delay: 0
});
e.data.ListSh[i] ? (n.translateY("100%").step(), setTimeout(function() {
e.setData(t({}, r, !1));
}, 201)) : (e.setData(t({}, r, !0)), n.translateY("0").step()), this.setData(t({}, r, n.export()));
},
sortChange: function(t) {
var e = t.currentTarget.dataset.value;
if (e != this.data.sortValue) {
var i = this.data.getdata;
i.page = 1, e.length > 0 ? i.order = e : delete i.order, this.setData({
getdata: i,
listdata: {},
sortValue: e
}), a.GetList();
}
},
Fselect: function(a) {
var e = this, i = "filter.show";
if ("value" == a.currentTarget.id) {
var r, n = "filter.selectValue." + a.currentTarget.dataset.id, s = "filter.selectName." + a.currentTarget.dataset.id;
e.setData((r = {}, t(r, n, a.currentTarget.dataset.value), t(r, s, a.currentTarget.dataset.name),
t(r, i, 0), r));
} else "back" != a.currentTarget.id ? e.setData(t({}, i, a.currentTarget.id)) : e.setData(t({}, i, 0));
},
filterSubmit: function(e) {
var i = this, r = !1, n = e.detail.value, s = i.data.getdata;
for (var o in n) s.hasOwnProperty(o) && n[o].length <= 0 ? delete s[o] : n[o].length > 0 && (s[o] = n[o],
r = !0);
i.setData(t({
getdata: s
}, "filter.icon", r)), i.filterHide(!0), a.GetList();
},
filterReset: function(t) {
var a = JSON.parse(JSON.stringify(this.data.initialValue.filter));
a.show = 0, this.setData({
filter: a
});
},
filterShow: function() {
var a = this.data.filter;
this.setData(t({
filterOld: a
}, "filter.show", 0));
},
filterHide: function(a) {
var e = this;
!0 === a ? e.setData(t({
filterOld: ""
}, "filter.show", "")) : e.setData(t({
filter: e.data.filterOld
}, "filter.show", ""));
},
inputChange: function(a) {
this.setData(t({}, "filter.money." + a.target.id, a.detail.value));
},
checkboxChange: function(a) {
this.setData(t({}, "filter.checkbox." + a.target.id, a.detail.value.length > 0));
},
searchChange: function(t) {
var a = t.detail ? t.detail.replace(/\s+/g, "") : "";
this.setData({
search: a
});
},
searchSubmit: function(t) {
var e = this, i = e.data.getdata;
e.data.search !== i.key && (i.page = 1, e.data.search.length > 0 ? i.key = e.data.search : delete i.key,
e.setData({
getdata: i,
listdata: {}
}), a.GetList());
},
loginBackPage: function() {
this.onReachBottom(!0);
},
onReachBottom: function(t) {
var e = this.data.listdata;
this.data.loading || !(e.CurPage < e.TotalPage) || e.failview && !0 !== t || (this.setData({
"getdata.page": 1 * this.data.getdata.page + 1
}), a.GetList());
},
onPullDownRefresh: function() {
this.initialize();
},
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);
},
onShareAppMessage: function() {
return a.getShare();
}
});

22
pages/index/list.json Normal file
View File

@ -0,0 +1,22 @@
{
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black",
"usingComponents": {
"van-search": "/vant/search/index",
"van-tabbar": "/vant/tabbar/index",
"van-tabbar-item": "/vant/tabbar-item/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"
}
}

256
pages/index/list.wxml Normal file
View File

@ -0,0 +1,256 @@
<template name="shopList">
<view class="shopList">
<view class="item" wx:for="{{listdata.list}}" wx:key="index">
<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 class="row-flex">
<view class="flex-item">
<view class="icon">
<van-icon name="star-o"></van-icon>
</view>
<view>收藏店铺</view>
</view>
<view class="flex-item">
<navigator hoverClass="hover" url="{{item.url}}">
<view class="icon">
<van-icon name="shop-o"></van-icon>
</view>
<view>逛逛店铺</view>
</navigator>
</view>
<view catchtap="ListSh" class="flex-item" id="{{item.bh}}">
<view class="icon">
<van-icon name="cross"></van-icon>
</view>
<view>关闭</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<template name="jifenList">
<view class="jifenList">
<view class="item {{index===0&&'lazyView'}}" wx:for="{{listdata.list}}" wx:key="index">
<view>
<navigator class="pic loadImage {{!Form.lazy||Form.lazy.pos>index?'':'lazyImg'}}" hoverClass="hover" id="{{index}}" url="{{item.alink}}">
<image mode="widthFix" src="{{item.pic}}" webp="{{true}}" wx:if="{{!Form.lazy||Form.lazy.pos>index}}"></image>
</navigator>
<view class="info">
<view class="tit">
<navigator hoverClass="hover" url="{{item.alink}}">
<block wx:if="{{!getdata.key}}">{{item.tit}}</block>
<rich-text nodes="{{item.tit}}" wx:else></rich-text>
</navigator>
</view>
<view class="money">
<text>{{item.jifen}}</text>积分<block wx:if="{{item.money>0}}">
<text class="add">+</text>
<text>{{item.money}}</text>元</block>
<view class="sales" wx:if="{{item.sales>0}}">兑出<text class="num">{{item.sales}}</text>件</view>
</view>
</view>
</view>
</view>
</view>
</template>
<template name="taskList">
<view class="ddList">
<view class="item" wx:for="{{listdata.list}}" wx:key="index">
<view class="top">
<navigator hoverClass="hover" url="{{item.alink}}">
<view>{{item.typename}}</view>{{item.tit}}</navigator>
</view>
<view class="info">
<view class="money">{{item.money}}</view>
<view class="index">
<view>{{item.view}}</view>关注 | <view class="bid">{{item.bid}}</view>人报价</view>
</view>
<view class="bottom">
<template is="forview" data="{{list:item.action}}"></template>
</view>
</view>
</view>
</template>
<template name="ddList">
<view class="ddList">
<view class="item" wx:for="{{listdata.list}}" wx:key="index">
<view class="top">
<navigator hoverClass="hover" url="{{item.alink}}">
<view class="{{item.MoneyClass}}">{{item.money}}</view>{{item.tit}}</navigator>
</view>
<view class="bottom">
<template is="forview" data="{{list:item.action}}"></template>
</view>
</view>
</view>
</template>
<template name="webList">
<view class="webList">
<view class="item {{index===0&&'lazyView'}}" wx:for="{{listdata.list}}" wx:key="index">
<view class="top">
<view class="avatar">
<image src="{{item.seller.avatar}}!t40" webp="{{true}}"></image>
</view>
<view class="info">
<navigator hoverClass="hover" url="{{item.alink}}">
<block wx:if="{{!getdata.key}}">{{item.tit}}</block>
<rich-text nodes="{{item.tit}}" wx:else></rich-text>
</navigator>
<view class="attr">
<template is="forview" data="{{list:item.attr}}"></template>
</view>
</view>
</view>
<view class="bottom">
<view class="thumb loadImage">
<navigator hoverClass="hover" url="{{item.alink}}">
<image mode="widthFix" src="{{item.pic}}" webp="{{true}}" wx:if="{{!Form.lazy||Form.lazy.pos>index}}"></image>
</navigator>
<view animation="{{ListSh[item.bh]}}" class="lay {{ListSh[item.bh]?'show':'hide'}}">
<view></view>
<view catchtap="ListSh" class="cdes" id="{{item.bh}}">{{item.txt}}</view>
</view>
</view>
<view class="action">
<template is="forview" data="{{list:item.action}}"></template>
</view>
</view>
</view>
</view>
</template>
<template name="serveList">
<view class="serveList">
<view class="item {{index===0&&'lazyView'}}" wx:for="{{listdata.list}}" wx:key="index">
<navigator class="pic loadImage {{!Form.lazy||Form.lazy.pos>index?'':'lazyImg'}}" hoverClass="hover" url="{{item.alink}}">
<image mode="widthFix" src="{{item.pic}}" webp="{{true}}" wx:if="{{!Form.lazy||Form.lazy.pos>index}}"></image>
</navigator>
<view class="info">
<view class="tit">
<navigator hoverClass="hover" url="{{item.alink}}">
<block wx:if="{{!getdata.key}}">{{item.tit}}</block>
<rich-text nodes="{{item.tit}}" wx:else></rich-text>
</navigator>
</view>
<view class="bot">
<view class="gicon">
<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:for="{{item.icon}}" wx:for-item="is" wx:key="text">
{{is.text}}
</view>
</view>
<view class="text">评分:{{item.score.total>0?item.score.total:'暂无'}}</view>
</view>
<view class="bot money">
<view class="text">¥<view class="num">{{item.money}}</view>
</view>
<van-icon catchtap="ListSh" customClass="ListSh" id="{{item.bh}}" name="ellipsis"></van-icon>
</view>
<view animation="{{ListSh[item.bh]}}" class="shop {{ListSh[item.bh]?'show':'hide'}}">
<view>
<view class="action">
<template is="forview" data="{{list:item.action}}"></template>
<view catchtap="ListSh" hoverClass="hover" id="{{item.bh}}">关闭</view>
</view>
<navigator class="seller" hoverClass="hover" url="{{item.seller.shopurl}}">
<view class="litem">
<image class="avatar" src="{{item.seller.avatar}}!t18" webp="{{true}}"></image>{{item.seller.name}}</view>
<view class="litem">
<view class="tname">商家信誉</view>
<icon class="c-icon c-i-lw4 c-i-s1"></icon>
</view>
<view class="litem">
<view class="tname">服务态度</view>
<view class="review">
<icon class="star" style="width:{{item.score.efficiency}}%"></icon>
</view>
</view>
<view class="litem">
<view class="tname">工作效率</view>
<view class="review">
<icon class="star" style="width:{{item.score.attitude}}%"></icon>
</view>
</view>
<view class="litem">
<view class="tname">商品质量</view>
<view class="review">
<icon class="star" style="width:{{item.score.quality}}%"></icon>
</view>
</view>
</navigator>
</view>
</view>
</view>
</view>
</view>
</template>
<template name="codeList">
<view class="codeList">
<view class="item {{index===0&&'lazyView'}}" wx:for="{{listdata.list}}" wx:key="bh">
<view>
<navigator class="pic loadImage {{!Form.lazy||Form.lazy.pos>index?'':'lazyImg'}}" hoverClass="hover" id="{{index}}" url="{{item.alink}}">
<image webp mode="widthFix" src="{{item.pic}}" wx:if="{{!Form.lazy||Form.lazy.pos>index}}"></image>
</navigator>
<view class="info">
<view class="tit">
<navigator hoverClass="hover" url="{{item.alink}}">
<block wx:if="{{!getdata.key}}">{{item.tit}}</block>
<rich-text nodes="{{item.tit}}" wx:else></rich-text>
</navigator>
</view>
<view class="bot">
<view class="gicon">
<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:for="{{item.icon}}" wx:for-item="is" wx:key="text">
{{is.text}}
</view>
</view>
<view class="text">{{item.types}}</view>
</view>
<view class="bot">
<view class="text">¥<view class="num">{{item.money}}</view>
</view>
<van-icon catchtap="ListSh" customClass="ListSh" id="{{item.bh}}" name="ellipsis"></van-icon>
</view>
</view>
<view animation="{{ListSh[item.bh]}}" class="shop {{ListSh[item.bh]?'show':'hide'}}">
<view class="action">
<template is="forview" data="{{list:item.action}}"></template>
</view>
<navigator class="seller" hoverClass="hover" url="{{item.seller.shopurl}}">
<image class="avatar" src="{{item.seller.avatar}}" webp="{{true}}"></image>
<view class="name">
<view>{{item.seller.name}}</view>
<icon class="{{item.seller.rev_m}}"></icon>
</view>
</navigator>
<view catchtap="ListSh" class="ListSh" id="{{item.bh}}">关闭</view>
</view>
</view>
</view>
</view>
</template>
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin||popupSpin||false,gotop:gotop}}"></template>
<template is="list_top" data="{{html:Form,sortValue:sortValue,filter:filter,search:search,filterOld:filterOld,topHeight:topHeight}}"></template>
<block wx:if="{{!spin}}">
<template is="ddList" data="{{listdata:listdata,getdata:getdata}}" wx:if="{{Form.type=='domain'||Form.type=='demand'}}"></template>
<template is="taskList" data="{{listdata:listdata,getdata:getdata}}" wx:elif="{{Form.type=='task'}}"></template>
<template is="{{Form.type}}List" data="{{Form:Form,listdata:listdata,getdata:getdata,ListSh:ListSh}}" wx:else></template>
<template is="list_bottom" data="{{...listdata,loading:loading,lazy:Form.lazy.add>0}}"></template>
<template is="popupform" data="{{Form:popupForm}}"></template>
</block>

962
pages/index/list.wxss Normal file
View File

@ -0,0 +1,962 @@
@import "../../__wuBaseWxss__/0.wxss";
page {
height: 100%;
}
.filter_box {
height: 100%;
width: 100%;
z-index: 999;
overflow-y: auto;
position: relative;
}
.filter_t {
text-align: center;
height: 50px;
line-height: 50px;
position: relative;
background-color: #eee;
border-bottom: #f2f2f2 solid 1px;
}
.filter_t .back {
position: absolute;
left: 0;
top: 0;
padding: 0 .2rem;
font-size: 26px;
color: #999;
line-height: 50px;
}
.filter_t .ok-btn {
position: absolute;
display: inline-block;
right: 10px;
top: 50%;
color: #3993cf;
line-height: 30px;
height: 30px;
font-size: 14px;
margin-top: -15px;
}
.filter_t .title {
display: inline-block;
font-size: 14px;
}
.filter_b {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
.filter_b .row-flex {
padding: 20rpx 30rpx;
}
.filter_b .flex-item {
padding: 0 15rpx 0 0;
}
.filter_b .flex-item:last-child {
padding: 0 0 0 15rpx;
}
.filter_b button {
font-size: 16px;
color: #3993cf;
width: 100%;
height: 40px;
line-height: 40px;
border: #3993cf 1px solid;
}
.filter_b button.ok-btn {
color: #fff;
background: #3993cf;
}
.filter_a .ul {
border-bottom: #f0f0f0 1px solid;
padding: 20rpx 30rpx;
overflow: hidden;
}
.filter_a .name {
font-size: 14px;
padding-bottom: 0;
}
.filter_a .name .choice-res {
color: #3993cf;
font-weight: 400;
position: absolute;
right: 2rem;
top: 0;
line-height: 2rem;
}
.filter_a .name em.iconfont {
position: absolute;
right: .48rem;
top: 0;
font-size: .68rem;
color: #ccc;
line-height: 2rem;
}
.filter_a .name em:last-child {
display: none;
}
.filter_a label {
display: inline-block;
margin: 10px 15px 0 0;
}
.filter_a .money view {
color: #ccc;
display: inline-block;
line-height: 30px;
padding: 0 10px;
vertical-align: bottom;
}
.filter_a .money input {
background: #f5f5f5;
margin: 10px 0 0 0;
width: 100px;
border: #dcdcdc 1px solid;
padding: 0 5px;
display: inline-block;
}
.filter_a .attach checkbox-group,.filter_a .attach view {
display: inline-block;
line-height: 15px;
vertical-align: middle;
}
.filter_a checkbox .wx-checkbox-input {
border-radius: 3rpx;
height: 28rpx;
width: 28rpx;
}
.filter_a checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border-color: #3993cf;
background: #3993cf;
}
.filter_a checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
border-radius: 50%;
width: 28rpx;
height: 28rpx;
line-height: 26rpx;
text-align: center;
font-size: 22rpx;
color: #fff;
background: 0 0;
transform: translate(-50%,-50%) scale(1);
}
.filter_s .ul {
border-bottom: #f0f0f0 1px solid;
padding: 0 30rpx;
line-height: 40px;
height: 40px;
position: relative;
text-align: right;
}
.filter_s .ul .name {
margin: 0;
font-size: 14px;
position: absolute;
margin-top: -20px;
top: 50%;
left: 30rpx;
}
.filter_s .ul .arrow {
position: absolute;
top: 19.5px;
right: 30rpx;
}
.filter_s .ul .check {
display: inline-block;
margin-right: 10px;
}
.filter_s .ul .check input {
line-height: 37px;
height: 37px;
text-align: right;
color: #3993cf;
}
.filter_select {
height: 100%;
overflow-y: auto;
position: fixed;
width: 100%;
z-index: 1000;
right: 0;
top: 0;
background: #fff;
text-align: left;
}
.filter_select .ul .van-icon {
color: #ccc;
font-size: 14px;
}
.codeList {
padding: 0 5px;
}
.codeList .item {
width: 50%;
display: inline-block;
vertical-align: top;
}
.codeList .item>view {
overflow: hidden;
position: relative;
margin: 10px 5px 0 5px;
background: #fff;
border-radius: 2px;
}
.codeList .pic {
height: 0;
padding-bottom: 80%;
overflow: hidden;
}
.codeList .pic image {
width: 100%;
}
.codeList .info {
padding: 5px 5px 8px 5px;
}
.codeList .info .bot {
position: relative;
height: 20px;
margin: 6px 0 0 0;
line-height: 20px;
display: block;
text-align: right;
}
.codeList .info .text {
position: absolute;
top: 50%;
margin-top: -9.5px;
left: 0;
color: #ccc;
line-height: 19px;
height: 19px;
}
.codeList .info .tit {
overflow: hidden;
height: 30px;
line-height: 15px;
font-size: 12px;
margin: 3px 0 0 0;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
word-break: break-all;
}
.codeList .info .num {
font-size: 14px;
display: inline-block;
}
.codeList .info .bot:last-child {
margin: 0;
}
.codeList .info .bot:last-child .text {
display: inline;
font-size: 12px;
color: #f30;
padding: 0;
}
.codeList .info .ListSh {
display: inline-block;
padding: 0 0 5px 10px;
line-height: 25px;
height: 20px;
color: #999;
}
.codeList .shop {
background-color: rgba(255,255,255,.9);
position: absolute;
bottom: 0;
left: 0;
width: 100%;
transform: translateY(100%);
}
.codeList .shop .action navigator,.codeList .shop .action view {
display: inline-block;
margin: 5% 0 0 5%;
background: #fff;
width: 41%;
font-size: 14px;
line-height: 32px;
text-align: center;
border: 1px #e1e1e1 solid;
border-radius: 3px;
}
.codeList .shop .seller {
overflow: hidden;
margin: 5% 0 0 5%;
width: 87%;
padding: 1px;
border: 1px solid #e1e1e1;
background: #fff;
}
.codeList .shop .name {
line-height: 20px;
height: 40px;
margin-left: 45px;
}
.codeList .shop .avatar {
float: left;
width: 40px;
height: 40px;
}
.codeList .shop .name view {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 20px;
}
.codeList .shop .ListSh {
margin-top: 10px;
text-align: center;
line-height: 32px;
background: #eee;
}
.serveList .item {
position: relative;
overflow: hidden;
background: #fff;
margin: 10px 10px 0 10px;
border-radius: 2px;
padding: 10px;
height: 100px;
vertical-align: top;
}
.serveList .pic {
float: left;
width: 100px;
height: 100px;
}
.serveList .pic image {
width: 100px;
height: 100px;
}
.serveList .info {
position: relative;
margin-left: 110px;
height: 100px;
}
.serveList .info .tit {
overflow: hidden;
height: 32px;
line-height: 16px;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.serveList .info .bot {
position: relative;
height: 20px;
margin: 28px 0 2px 0;
line-height: 20px;
display: block;
}
.serveList .info .text {
color: #ccc;
height: 19px;
line-height: 19px;
}
.serveList .info .num:last-child {
font-size: 14px;
}
.serveList .info .money {
margin: 0;
text-align: right;
}
.serveList .info .money .text {
position: absolute;
top: 50%;
margin-top: -9.5px;
left: -2px;
display: inline-block;
font-size: 12px;
color: #f30;
padding: 0;
}
.serveList .info .num {
font-size: 16px;
display: inline-block;
}
.serveList .info .ListSh {
display: inline-block;
padding: 0 0 5px 10px;
line-height: 25px;
height: 20px;
color: #999;
}
.serveList .shop {
color: #333;
background-color: rgba(255,255,255,.5);
position: absolute;
bottom: 0;
left: 0;
width: 100%;
transform: translateY(100%);
}
.serveList .shop>view {
position: relative;
}
.serveList .shop .seller {
background-color: rgba(255,255,255,.9);
float: left;
height: 100px;
width: 82%;
}
.serveList .shop .avatar {
width: 16px;
height: 16px;
vertical-align: -3px;
padding-right: 5px;
}
.serveList .shop .tname {
color: #666;
padding-right: 5px;
display: inline-block;
}
.serveList .shop .litem {
vertical-align: top;
width: 100%;
height: 20px;
line-height: 20px;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.serveList .shop .action {
position: absolute;
top: 0;
right: 0;
height: 100%;
width: 18%;
}
.serveList .shop .action navigator,.serveList .shop .action view {
text-align: center;
display: block;
width: 100%;
height: 33.5px;
line-height: 33.5px;
color: #fff;
}
.serveList .shop .action .imfav {
background: #ff9402;
}
.serveList .shop .action .see {
background: #ff5000;
}
.serveList .shop .action view:last-child {
background: #c1c1c1;
}
.webList .item {
position: relative;
overflow: hidden;
background: #fff;
margin: 10px 10px 0 10px;
border-radius: 2px;
box-shadow: 2px 2px 5px #ccc;
vertical-align: top;
}
.webList .top {
width: 100%;
overflow: hidden;
padding: 10px 0;
}
.webList .bottom {
width: 100%;
}
.webList .avatar {
float: left;
height: 42px;
width: 42px;
padding: 0 10px;
}
.webList .avatar image {
width: 38px;
height: 38px;
border-radius: 50px;
border: 2px solid #fff;
box-shadow: 0 1px 5px #c1c1c1;
}
.webList .info {
padding-right: 10px;
margin-left: 65px;
}
.webList .info navigator {
font-size: 12px;
display: block;
color: #247fbd;
overflow: hidden;
height: 16px;
line-height: 16px;
white-space: nowrap;
text-overflow: ellipsis;
}
.webList .attr {
line-height: 20px;
height: 20px;
width: 100%;
background: #fff;
border: 1px solid #e1e1e1;
margin-top: 5px;
}
.webList .url {
float: left;
border-left: 0;
padding: 0 5px;
color: #888;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.webList .money {
font-weight: 700;
overflow: hidden;
display: block;
text-align: center;
background: #fff3eb;
height: 20px;
margin: -1px 0 0 -1px;
border: 1px solid #fdc7a2;
float: left;
color: #f60;
padding: 0 5px;
}
.webList .thumb {
position: relative;
float: left;
width: 100%;
height: 0;
padding-bottom: 79%;
overflow: hidden;
}
.webList .thumb navigator {
display: block;
width: 100%;
text-align: center;
height: 100%;
}
.webList .thumb image {
border-top: 1px solid #dfe0e2;
display: block;
width: 100%;
}
.webList .thumb .lay {
position: absolute;
bottom: 0;
height: 100%;
left: 0;
width: 100%;
transform: translateY(100%);
}
.webList .thumb .lay view {
position: absolute;
top: 0;
left: 0;
display: block;
background: #000;
opacity: .6;
height: 96%;
width: 96%;
padding: 2%;
}
.webList .thumb .lay view.cdes {
color: #fff;
background: 0 0;
opacity: 1;
background: 0 0;
font-family: serif;
line-height: 24px;
}
.webList .action {
background: #fafafa;
font-size: 14px;
white-space: nowrap;
background: #fff;
float: left;
width: 96%;
padding: 10px 2%;
border-top: 1px solid #e1e1e1;
color: #c1c1c1;
}
.webList .action .van-icon {
position: relative;
float: right;
font-size: 26px;
line-height: 30px;
height: 30px;
margin: 0 5px;
color: #ccc;
overflow: hidden;
}
.webList .action .stats {
float: left;
}
.webList .action view {
float: left;
line-height: 30px;
}
.webList dd .l4 span {
position: absolute;
top: 0;
right: 0;
height: 1rem;
width: 100%;
}
.webList dd .l4 span p {
padding-left: 100%;
}
.ddList .item {
border-radius: 2px;
margin: 10px 10px 0 10px;
position: relative;
background: #fff;
display: block;
overflow: hidden;
padding: 0 10px;
}
.ddList .top {
border-bottom: 1px solid #e1e1e1;
width: 100%;
overflow: hidden;
padding: 10px 0;
line-height: 20px;
max-height: 40px;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.ddList .money,.ddList .top .money {
color: #ff5000;
padding-right: 5px;
}
.ddList .money:before {
content: "¥";
font-size: 12px;
}
.ddList .top view {
font-weight: 700;
display: inline-block;
color: #007cd5;
padding-right: 2px;
}
.ddList .info {
border-bottom: 1px dashed #eee;
line-height: 16px;
height: 16px;
background: #fafafa;
white-space: nowrap;
background: #fff;
overflow: hidden;
padding: 10px 0;
color: #c1c1c1;
}
.ddList .info .money {
float: left;
font-weight: 700;
}
.ddList .info .index {
float: right;
}
.ddList .info .index view {
display: inline-block;
color: #247fbd;
}
.ddList .info .index view.bid {
color: #693;
}
.ddList .bottom {
line-height: 30px;
height: 30px;
background: #fafafa;
white-space: nowrap;
background: #fff;
overflow: hidden;
padding: 5px 0;
color: #c1c1c1;
}
.ddList .bottom image {
border-radius: 50px;
border: 1px solid #e1e1e1;
width: 25px;
height: 25px;
}
.ddList .bottom .van-icon {
position: relative;
float: right;
font-size: 26px;
margin: 0 5px;
color: #ccc;
overflow: hidden;
}
.ddList .bottom view {
float: left;
line-height: 28px;
margin-left: 5px;
}
.ddList .bottom view navigator {
color: #c1c1c1;
}
.jifenList {
padding: 5px;
}
.jifenList .item {
width: 50%;
display: inline-block;
vertical-align: top;
}
.jifenList .item>view {
overflow: hidden;
position: relative;
margin: 5px;
background: #fff;
border-radius: 2px;
}
.jifenList .pic {
height: 0;
padding-bottom: 100%;
overflow: hidden;
border-bottom: 1px dashed #e6e9ef;
}
.jifenList .pic image {
width: 100%;
}
.jifenList .info {
padding: 8px 8px;
line-height: 20px;
}
.jifenList .info .tit {
font-size: 14px;
overflow: hidden;
height: 20px;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
word-break: break-all;
}
.jifenList .info .money {
position: relative;
height: 20px;
}
.jifenList .info .money text {
display: inline-block;
font-weight: 700;
padding: 0 2px;
}
.jifenList .info .money .add {
color: #999;
padding: 0 3px;
}
.jifenList .info .money .num {
font-weight: 700;
}
.jifenList .info .money .sales {
position: absolute;
color: #333;
bottom: 0;
right: 0;
}
.jifenList .info .money {
color: rgb(217,22,28);
}
.jifenList .info .money text:first-child {
padding-left: 0;
}
.sort {
font-size: 13px;
color: #565d65;
position: relative;
line-height: 40px;
background: #fff;
border-bottom: 1px solid #eee;
}
.sort .flex-item {
text-align: center;
}
.sort .flex-item.on,.sort .flex-item.on .van-icon {
color: #f60;
}
.sort .updown {
width: 7px;
vertical-align: middle;
margin: -2px 0 0 3px;
display: inline-block;
}
.sort .updown view {
width: 0;
height: 0;
border: 3px solid transparent;
}
.sort .updown view.up {
border-bottom: 4px solid #666;
margin: 0 0 2px 0;
}
.sort .updown view.down {
border-top: 4px solid #666;
margin: 2px 0 0 0;
}
.sort .updown view.up.on {
border-bottom-color: #f60;
}
.sort .updown view.down.on {
border-top-color: #f60;
}
.sort .filter-icon {
font-size: 14px;
height: 14px;
line-height: 14px;
vertical-align: middle;
margin: -3px 0 0 1px;
color: #666;
}
.top-search .van-search__content {
border-radius: 5px;
background: #e7e7e7;
}
.top-search .van-icon-search {
color: #b2b2b2;
}
view.top-search {
padding: 10px 20px 0 20px;
}
.van-tabbar-item {
background: #f9f9f9;
}

106
pages/index/shop.js Normal file
View File

@ -0,0 +1,106 @@
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: [],
spin: !0,
popup: [],
gotop: !1,
tabIndex: 0,
getdata: {},
listdata: {},
loading: !1,
fixedOn: !1,
Form: {
form: {
radio: {},
checkbox: {},
picker: {},
rate: {},
send: {}
}
},
popupForm: {
form: {
radio: {},
checkbox: {},
picker: {}
}
}
},
initialize: function() {
var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], e = this;
a.Gethtml(e.data.url, function(i) {
a.initialFun(t), a.initializeRefresh(i), e.setData({
getdata: {
page: 1,
store: i.store.bh
},
spin: !1
}), wx.stopPullDownRefresh();
});
},
tabsChange: function(t) {
"评价" != t.detail.title || this.data.getdata.CurPage || a.GetList(), this.setData({
tabIndex: t.detail.index
});
},
radioChange: function(e) {
if (this.data.getdata.filter !== e.detail) {
var i;
this.setData((i = {}, t(i, "getdata.filter", e.detail), t(i, "getdata.page", 1),
i)), a.GetList();
}
},
onPageScroll: function(t) {
var a = this.data.gotop, e = t.scrollTop;
(e >= 1e3 && !a || e < 1e3 && a) && this.setData({
gotop: !a
});
},
onReachBottom: function() {
var t = this.data.listdata;
!this.data.loading && t.CurPage < t.TotalPage && (this.setData({
"getdata.page": 1 * this.data.getdata.page + 1
}), a.GetList());
},
contact: function() {
a.Lay({
action: "contact",
info: this.data.Form.store.bh
});
},
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);
},
onLoad: function(t) {
this.setData({
url: t.url ? t.url : "get/ishop/"
}), a.init(this), this.initialize(!1);
},
onShow: function() {
a.init(this);
},
onPullDownRefresh: function() {
this.initialize();
},
onShareAppMessage: function() {
return a.getShare();
}
});

15
pages/index/shop.json Normal file
View File

@ -0,0 +1,15 @@
{
"usingComponents": {
"van-goods-action-button": "/vant/goods-action-button/index",
"van-popup": "/vant/popup/index",
"van-radio": "/vant/radio/index",
"van-radio-group": "/vant/radio-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-tab": "/vant/tab/index",
"van-tabs": "/vant/tabs/index"
}
}

117
pages/index/shop.wxml Normal file
View File

@ -0,0 +1,117 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin,gotop:gotop}}"></template>
<block wx:if="{{!spin}}">
<template is="store" data="{{store:Form.store}}"></template>
<van-tabs sticky swipeable active="{{tabIndex}}" bind:change="tabsChange" bind:disabled="contact" color="#f60" customClass="nav-tabs" lineWidth="80">
<van-tab icon="home-o" iconStyle="line-height:21px;font-size:21px" title="首页">
<block wx:for="{{Form.commend}}" wx:for-index="type" wx:key="type">
<view class="store-name">
<view class="line"></view>
<text>推荐{{item.name}}</text>
<navigator hoverClass="hover" url="list?url=get/lists/{{type}}/{{Form.store.id}}">更多<van-icon customClass="middle2" name="arrow"></van-icon>
</navigator>
</view>
<view class="store-ibox">
<view class="item {{type}} {{index===0&&item.odd&&'big'}}" wx:for="{{item.list}}" wx:for-item="goods" wx:key="bh">
<view>
<view class="pic">
<navigator hoverClass="hover" url="{{goods.url}}">
<image mode="widthFix" src="{{goods.pic}}" webp="{{true}}"></image>
</navigator>
</view>
<view class="info">
<navigator class="title" hoverClass="hover" url="{{goods.url}}">{{goods.tit}}</navigator>
<view class="bottom">
<view class="money">¥<text>{{goods.money}}</text>
</view>
<view class="gicon">
<view bindtap="{{is.bind}}" class="{{is.class}}" data-action="{{is.action}}" data-id="{{item.id}}" data-info="{{is.text}}" data-title="信息" wx:for="{{goods.icon}}" wx:for-item="is" wx:key="index">{{is.name}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
</block>
</van-tab>
<van-tab icon="evaluate" title="评价">
<view class="revList">
<view class="radio-group">
<van-radio-group bind:change="radioChange" value="{{getdata.filter||''}}">
<van-radio name="">全部</van-radio>
<van-radio name="2">好评</van-radio>
<van-radio name="0">中评</van-radio>
<van-radio name="-1">差评</van-radio>
<van-radio name="notauto">非自评</van-radio>
<van-radio name="append">有追加</van-radio>
</van-radio-group>
</view>
<view class="item row-flex" wx:for="{{listdata.list}}" wx:for-index="evaIndex" wx:for-item="data" wx:key="index">
<view class="avatar">
<view>
<view>
<image mode="widthFix" src="{{data.user.avatar}}" webp="{{true}}"></image>
</view>
</view>
</view>
<view class="flex-item">
<navigator class="goods" hoverClass="hover" url="{{data.goods.url}}">
<text>{{data.goods.money}}</text> {{data.goods.tit}}</navigator>
<view class="info">
<block wx:for="{{data.eva}}" wx:for-index="type" wx:for-item="e" wx:key="index">
<view class="name {{type}}" wx:if="{{type=='buy'}}">
<text>{{data.user.name}}</text>
<view class="{{data.user.rev}}"></view>
<view class="eva {{e.give}}" wx:if="{{e.give}}">
<van-icon name="{{e.give=='bad'?'bad':'evaluate'}}"></van-icon>
</view>
</view>
<view class="name {{type}}" wx:else>
{{e.name}}
</view>
<view class="text">
{{e.text}}
<view class="bfile" wx:if="{{e.pic}}">
<view wx:for="{{e.pic}}" wx:for-item="src" wx:key="src">
<image hidden bindload="Lay" data-action="intoPreview" data-field="{{e.field}}" data-src="{{url}}" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="></image>
<view>
<view>
<image bindtap="Lay" data-action="allPreview" data-field="{{e.field}}" data-src="{{src}}" mode="widthFix" src="{{src}}" webp="{{true}}"></image>
</view>
</view>
</view>
</view>
</view>
<view class="time">
{{e.time}}
</view>
<view class="reply" wx:if="{{e.reply}}">
<view class="j-br"></view>
<view class="j-bg"></view>
<view class="name">{{e.reply.name}}</view>
<view class="text">{{e.reply.text}}</view>
<view class="bfile" wx:if="{{e.reply.pic}}">
<view wx:for="{{e.reply.pic}}" wx:for-item="src" wx:key="src">
<image hidden bindload="Lay" data-action="intoPreview" data-field="{{e.reply.field}}" data-src="{{url}}" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="></image>
<view>
<view>
<image bindtap="Lay" data-action="allPreview" data-field="{{e.reply.field}}" data-src="{{src}}" mode="widthFix" src="{{src}}" webp="{{true}}"></image>
</view>
</view>
</view>
</view>
<view class="time">{{e.reply.time}}</view>
</view>
</block>
</view>
</view>
</view>
</view>
<template is="list_bottom" data="{{...listdata,loading:loading}}"></template>
</van-tab>
<van-tab icon="user-o" title="资料">
<template is="forview" data="{{list:Form.shopinfo,form:Form.form}}"></template>
</van-tab>
<van-tab disabled icon="kefu2" title="客服">客服</van-tab>
</van-tabs>
</block>

287
pages/index/shop.wxss Normal file
View File

@ -0,0 +1,287 @@
@import "../../__wuBaseWxss__/0.wxss";
page {
background: #eee;
}
.nav-tabs .van-tab__title {
color: #666;
}
.nav-tabs .van-tab--active .van-tab__title {
color: #f60;
}
.nav-tabs .van-tab__title .van-icon {
font-size: 20px;
line-height: 20px;
height: 20px;
overflow: hidden;
margin: 6px 0 -2px 0;
}
.nav-tabs .van-tab {
text-align: center;
font-size: 12px;
line-height: 16px;
height: 50px;
}
.nav-tabs.van-tabs--line .van-tabs__wrap {
height: 50px;
}
.nav-tabs.van-tabs--line {
padding-top: 50px;
}
.store-nav {
height: 1rem;
background: #fff;
margin-bottom: 10px;
}
.store-nav.fixed {
top: 0;
width: 100%;
background: #3993cf;
z-index: 1000;
opacity: 0.99;
}
.store-nav ul {
height: 100%;
display: -webkit-box;
display: -webkit-flex;
display: -moz-flex;
display: flex;
}
.store-nav ul li {
border-bottom: #e9e9e9 .05rem solid;
text-align: center;
height: .95rem;
-webkit-box-flex: 1;
flex: 1;
}
.store-nav ul li a {
overflow: hidden;
display: block;
color: #666;
padding-top: .12rem;
}
.store-nav.fixed ul li a {
color: #fff;
}
.store-nav ul li.on a {
color: #f60;
}
.store-nav ul li.on {
border-color: #f60;
}
.store-nav.fixed ul li.on a {
color: #fffc00;
}
.store-nav.fixed ul li {
border-bottom-color: #3993cf;
}
.store-nav ul li p em {
font-family: iconfont;
font-size: 0.42rem;
}
.store-nav ul li p {
font-size: 0.32rem;
}
.store-search {
background: #fff;
}
.store-list {
overflow: hidden;
margin-bottom: 10px;
}
.store-ibox {
padding: 5px;
display: flex;
flex-flow: row wrap;
align-content: flex-start;
}
.store-ibox .item {
flex: 1 50%;
}
.store-ibox .item.big {
flex: 1 100%;
}
.store-ibox .item>view {
margin: 5px;
background: #fff;
}
.store-ibox .pic {
display: block;
height: 0;
padding-bottom: 80%;
overflow: hidden;
border: #f0f0f0 1px solid;
}
.store-ibox .pic image {
display: block;
width: 100%;
}
.store-ibox .serve .pic {
padding-bottom: 100%;
}
.store-ibox .info {
background: #fff;
overflow: hidden;
display: block;
padding: 0 6px;
border: #f1f1f1 1px solid;
}
.store-ibox .bottom {
display: block;
overflow: hidden;
padding: 0 0 10px 0;
width: 100%;
position: relative;
}
.store-ibox .title {
color: #555;
overflow: hidden;
height: 28px;
line-height: 14px;
font-size: 12px;
margin: 5px 0 5px 0;
}
.store-ibox .money {
font-family: Helvetica;
color: #f00;
}
.store-ibox .info text {
font-size: 14px;
}
.store-ibox .gicon {
position: absolute;
top: 0;
right: 0;
}
.store-ibox .tname {
padding-top: .2em;
line-height: 1.6em;
}
.store-ibox .tname i {
color: #999;
}
.store-name {
position: relative;
margin: 0 10px 0 10px;
line-height: 30px;
font-size: 16px;
text-align: center;
}
.store-name:first-child {
margin-top: 10px;
}
.store-name text {
position: relative;
text-align: center;
padding: 0 15px;
background: #eee;
}
.store-name .line {
border-radius: 45%;
position: absolute;
background: #CCC;
height: 2px;
width: 60%;
left: 20%;
margin-top: -1px;
top: 50%;
}
.store-name navigator {
font-size: 12px;
color: #999;
position: absolute;
top: 50%;
right: 0;
margin-top: -10px;
line-height: 20px;
height: 20px;
}
.store-name .van-icon {
font-size: 12px;
line-height: 10px;
height: 10px;
margin: -2px 0 0 2px;
}
.shop_info .item {
border-radius: 8px;
background: #fff;
margin: 10px 10px 0 10px;
overflow: hidden;
color: #666;
}
.shop_info .title {
font-size: 14px;
display: block;
height: 40px;
line-height: 40px;
border-bottom: 1px solid #eee;
color: #444;
padding-left: 15px;
background: #fff;
}
.shop_info .item>view:last-child {
padding: 12px 15px;
color: #555;
}
.shop_desc {
font-size: 12px;
line-height: 1.4;
}
.shop_skill view {
padding: 8px 12px;
border-radius: 5px;
border: 1px solid #e0e0e0;
text-align: center;
display: inline-block;
margin: 5px 5px 5px 0;
}
.shop_ver view.icons {
margin-right: 6px;
}

131
pages/index/show.js Normal file
View File

@ -0,0 +1,131 @@
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;
}
!function(t) {
t && t.__esModule;
}(require("../../common/WxValidate.js"));
var a = require("../../common/common.js");
Page({
data: {
spin: !0,
loading: !1,
previewList: [],
getdata: {},
listdata: {},
popup: [],
gotop: !1,
tabIndex: 0,
popupSpin: !1,
Form: {
form: {
radio: {},
checkbox: {},
picker: {},
rate: {},
send: {}
}
},
popupForm: {
form: {
radio: {},
checkbox: {},
picker: {}
}
}
},
initialize: function() {
var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], e = this;
e.setData({
spin: !0
}), a.Gethtml(e.data.url, function(i) {
a.initialFun(t), a.initializeRefresh(i), e.setData({
getdata: {
page: 1,
goods: i.data.bh
},
spin: !1
}), i.ShowAttr && i.ShowAttr.Countdown && a.Countdown(i.ShowAttr.Countdown, "Form"),
"task" == i.type && e.getBidList(), wx.stopPullDownRefresh();
});
},
onShow: function() {
a.init(this);
},
onLoad: function(t) {
a.init(this), t.url ? this.setData({
url: a.UrlOptions(t)
}) : this.setData({
url: "get/shows/code/0"
}), this.initialize(!1);
},
tabsChange: function(t) {
"评价记录" != t.detail.title || this.data.getdata.CurPage || a.GetList(), this.setData({
tabIndex: t.detail.index
});
},
getBidList: function() {
var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0], i = this, n = i.data.getdata.filter, o = i.data.Form.form.radio.filter || 0, r = e.currentTarget ? e.currentTarget.dataset.info : o;
if (r !== n) {
var s, d = 0 != r && /^[+-]?\d*\.?\d*$/.test(r) ? {
bh: r
} : {};
i.setData((s = {}, t(s, "getdata.filter", "reset" != r ? r : o), t(s, "getdata.page", 1),
t(s, "Form.form.goBid", d), s)), a.GetList(function(t) {
d.bh && a.querySelect(".item", function(t) {
a.Lay({
action: "go",
info: t.top
});
});
});
}
},
revChange: function(e) {
if (this.data.getdata.filter !== e.detail) {
var i;
this.setData((i = {}, t(i, "getdata.filter", e.detail), t(i, "getdata.page", 1),
i)), a.GetList();
}
},
addServe: function(t) {
var e = t.currentTarget.dataset, i = this.data.Form.data;
if (i.allmoney) {
var n = this.data.Form.AllmoneyOn || 0;
i.allmoney[n] && (e = Object.assign(i.allmoney[n], e));
}
a.Lay(e);
},
gaChange: function(a) {
this.setData(t({}, "Form." + a.currentTarget.dataset.field, a.currentTarget.id));
},
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]();
},
Popup: function(t) {
a.Popup(t.currentTarget.dataset);
},
onReachBottom: function() {
var t = this.data.listdata;
!this.data.loading && t.CurPage < t.TotalPage && (this.setData({
"getdata.page": 1 * this.data.getdata.page + 1
}), a.GetList());
},
onPullDownRefresh: function() {
this.initialize();
},
onShareAppMessage: function() {
return a.getShare();
}
});

25
pages/index/show.json Normal file
View File

@ -0,0 +1,25 @@
{
"usingComponents": {
"down": "/utils/count-down/index",
"van-goods-action": "/vant/goods-action/index",
"van-goods-action-icon": "/vant/goods-action-icon/index",
"van-goods-action-button": "/vant/goods-action-button/index",
"van-radio": "/vant/radio/index",
"van-radio-group": "/vant/radio-group/index",
"van-field": "/vant/field/index",
"van-cell": "/vant/cell/index",
"van-cell-group": "/vant/cell-group/index",
"van-stepper": "/vant/stepper/index",
"van-picker": "/vant/picker/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"
}
}

238
pages/index/show.wxml Normal file
View File

@ -0,0 +1,238 @@
<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}}">
<view class="info-id" wx:if="{{Form.data.id}}">信息ID{{Form.data.id}}</view>
<block wx:if="{{Form.type=='code'||Form.type=='serve'}}">
<view class="pro_bigImg van-hairline--bottom" wx:if="{{Form.data.tp}}">
<image mode="widthFix" src="{{Form.data.tp}}" webp="{{true}}"></image>
</view>
<view class="pro_baseInfor">
<view class="row-flex" wx:if="{{!Form.data.allmoney}}">
<view class="money">{{Form.data.money}}</view>
</view>
<view class="row-flex title van-multi-ellipsis--l2">{{Form.data.tit}}</view>
<view class="editionChoose" wx:if="{{Form.data.allmoney}}">
<view class="g_m row-flex">
<view class="name">
价 格:
</view>
<view class="flex-item">
<view class="price">{{Form.data.allmoney[Form.AllmoneyOn||0].money}}</view>
</view>
</view>
<view class="row-flex">
<view class="name">
版 本:
</view>
<view class="flex-item editionList">
<view bindtap="gaChange" class="item {{!Form.AllmoneyOn&&index==0||Form.AllmoneyOn==index?'on':''}}" data-field="AllmoneyOn" id="{{index}}" wx:for="{{Form.data.allmoney}}" wx:for-item="items" wx:key="edition">{{items.edition}}<van-icon name="duigou1"></van-icon>
</view>
</view>
</view>
</view>
</view>
<view class="pro_guarantee van-hairline--top">
<view class="top">
<view bindtap="gaChange" class="tit {{!Form.GuaranteeOn&&index==0||Form.GuaranteeOn==index?'on':''}}" data-field="GuaranteeOn" data-title="{{items.text}}" id="{{index}}" wx:for="{{Form.Guarantee}}" wx:for-item="items" wx:key="name">
<view>
<van-icon name="duigou"></van-icon> {{items.name}}</view>
</view>
</view>
<view class="bottom van-hairline--top">{{Form.Guarantee[Form.GuaranteeOn||0].text}}</view>
</view>
<view class="pro_attr" wx:if="{{Form.ShowAttr}}">
<view class="tit van-hairline--bottom">商品属性</view>
<view class="list">
<view class="item" wx:for="{{Form.ShowAttr}}" wx:for-item="items" wx:key="title">
<view class="name" wx:if="{{items.title}}">{{items.title}}</view>
<view class="text">
<template is="forview" data="{{list:items.list,form:Form.form}}" wx:if="{{items.list}}"></template>
<template is="view" data="{{view:items}}" wx:else></template>
</view>
</view>
</view>
</view>
<view class="pro_ishop">
<view class="top">
<image src="{{Form.role.avatar}}"></image>
<view class="info">
<view class="name">{{Form.role.name}} <icon class="{{Form.role.rev}}"></icon>
</view>
<view class="certification">
<view class="tit">商家认证:</view>
<template is="forview" data="{{list:Form.role.cer,form:Form.form}}" wx:if="{{Form.role.cer}}"></template>
</view>
<view>
<view class="tit">店铺评分:</view>
<view class="store-score">
<view wx:for="{{Form.role.score}}" wx:key="index">
<text>{{index}}</text>
<view class="{{item.trend}}">
{{item.value}} <van-icon name="shang{{item.trend=='down'?'-copy-copy':''}}"></van-icon>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="bottom row-flex" wx:if="{{Form.ishopAction}}">
<template is="forview" data="{{list:Form.ishopAction,form:Form.form}}"></template>
</view>
</view>
<view class="pro_main">
<van-tabs sticky swipeable active="{{tabIndex}}" bind:change="tabsChange" color="#f60" lineWidth="100">
<van-tab title="{{Form.tabs[0].name}}">
<view class="ul pro_info">
<block wx:for="{{Form.data.txt}}" wx:key="index">
<rich-text nodes="{{item.text}}" wx:if="{{item.type=='html'}}"></rich-text>
<block wx:if="{{item.type=='image'}}">
<image hidden bindload="Lay" data-action="intoPreview" data-field="{{Form.type}}Txt" data-src="{{item.src}}" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="></image>
<image bindtap="Lay" class="gimg" data-action="allPreview" data-field="{{Form.type}}Txt" data-src="{{item.src}}" mode="widthFix" src="{{item.src}}" webp="{{true}}"></image>
</block>
</block>
</view>
</van-tab>
<van-tab title="{{Form.tabs[1].name}}">
<view class="revList">
<view class="radio-group">
<van-radio-group bind:change="revChange" value="{{getdata.filter||''}}">
<van-radio name="">全部</van-radio>
<van-radio name="2">好评</van-radio>
<van-radio name="0">中评</van-radio>
<van-radio name="-1">差评</van-radio>
<van-radio name="notauto">非自评</van-radio>
<van-radio name="append">有追加</van-radio>
</van-radio-group>
</view>
<view class="item row-flex" wx:for="{{listdata.list}}" wx:for-item="data" wx:key="index">
<view class="avatar">
<view>
<view>
<image mode="widthFix" src="{{data.user.avatar}}" webp="{{true}}"></image>
</view>
</view>
</view>
<view class="flex-item">
<navigator class="goods" hoverClass="hover" url="{{data.goods.url}}">
<text>{{data.goods.money}}</text> {{data.goods.tit}}</navigator>
<view class="info">
<block wx:for="{{data.eva}}" wx:for-index="type" wx:for-item="e" wx:key="index">
<view class="name {{type}}" wx:if="{{type=='buy'}}">
<text>{{data.user.name}}</text>
<view class="{{data.user.rev}}"></view>
<view class="eva {{e.give}}" wx:if="{{e.give}}">
<van-icon name="{{e.give=='bad'?'bad':'evaluate'}}"></van-icon>
</view>
</view>
<view class="name {{type}}" wx:else>
{{e.name}}
</view>
<view class="text">
{{e.text}}
<view class="bfile" wx:if="{{e.pic}}">
<view wx:for="{{e.pic}}" wx:for-item="src" wx:key="src">
<image hidden bindload="Lay" data-action="intoPreview" data-field="{{e.field}}" data-src="{{src}}" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="></image>
<view>
<view>
<image bindtap="Lay" data-action="allPreview" data-field="{{e.field}}" data-src="{{src}}" mode="widthFix" src="{{src}}" webp="{{true}}"></image>
</view>
</view>
</view>
</view>
</view>
<view class="time">
{{e.time}}
</view>
<view class="reply" wx:if="{{e.reply}}">
<view class="j-br"></view>
<view class="j-bg"></view>
<view class="name">{{e.reply.name}}</view>
{{e.reply.text}}
<view class="bfile" wx:if="{{e.reply.pic}}">
<view wx:for="{{e.reply.pic}}" wx:for-item="src" wx:key="src">
<image hidden bindload="Lay" data-action="intoPreview" data-field="{{e.reply.field}}" data-src="{{src}}" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="></image>
<view>
<view>
<image bindtap="Lay" data-action="allPreview" data-field="{{e.reply.field}}" data-src="{{src}}" mode="widthFix" src="{{src}}" webp="{{true}}"></image>
</view>
</view>
</view>
</view>
<view class="time">{{e.reply.time}}</view>
</view>
</block>
</view>
</view>
</view>
</view>
<template is="list_bottom" data="{{...listdata,loading:loading,bottom:50}}"></template>
</van-tab>
<van-tab title="{{Form.tabs[2].name}}">
<view class="ul pro_rule">
<rich-text nodes="{{Form.rule}}"></rich-text>
</view>
</van-tab>
</van-tabs>
</view>
</block>
<block wx:elif="{{Form.type=='jifen'}}">
<view class="pro_bigImg van-hairline--bottom" wx:if="{{Form.data.tp}}">
<image mode="widthFix" src="{{Form.data.tp}}" webp="{{true}}"></image>
</view>
<template is="forview" data="{{list:Form.data.jhtml}}"></template>
<view class="pro_main">
<van-tabs sticky swipeable active="{{tabIndex}}" color="#f60" lineWidth="100">
<van-tab title="{{Form.tabs[0].name}}">
<view class="ul pro_info">
<block wx:for="{{Form.data.txt}}" wx:key="index">
<rich-text nodes="{{item.text}}" wx:if="{{item.type=='html'}}"></rich-text>
<block wx:if="{{item.type=='image'}}">
<image hidden bindload="Lay" data-action="intoPreview" data-field="{{Form.type}}Txt" data-src="{{item.src}}" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="></image>
<image bindtap="Lay" class="gimg" data-action="allPreview" data-field="{{Form.type}}Txt" data-src="{{item.src}}" mode="widthFix" src="{{item.src}}" webp="{{true}}"></image>
</block>
</block>
</view>
</van-tab>
</van-tabs>
</view>
</block>
<block wx:elif="{{Form.type=='task'}}">
<view class="pro_table">
<view class="tit">{{Form.data.tit}}</view>
<view class="list">
<view class="row row-flex" wx:for="{{Form.ShowAttr}}" wx:for-item="items" wx:key="name">
<view class="name" wx:if="{{items.title}}">
{{items.title}}
</view>
<template is="forview" data="{{list:items.list,form:Form.form}}" wx:if="{{items.list}}"></template>
<template is="view" data="{{view:items}}" wx:else></template>
</view>
</view>
</view>
<template is="forview" data="{{list:listdata.list,form:Form.form}}"></template>
</block>
<block wx:else>
<view class="pro_bigImg" wx:if="{{Form.data.tp}}">
<image src="{{Form.data.tp}}"></image>
</view>
<view class="pro_table">
<view class="tit">{{Form.data.tit}}</view>
<view class="list">
<view class="row row-flex" wx:for="{{Form.ShowAttr}}" wx:for-item="items" wx:key="title">
<view class="name" wx:if="{{items.title}}">
{{items.title}}
</view>
<template is="forview" data="{{list:items.list,form:Form.form}}" wx:if="{{items.list}}"></template>
<template is="view" data="{{view:items}}" wx:else></template>
</view>
</view>
</view>
</block>
<van-goods-action wx:if="{{Form.AcBot}}">
<block wx:for="{{Form.AcBot}}" wx:for-item="items" wx:key="text">
<van-goods-action-icon bind:click="{{items.bind||'Lay'}}" class="{{items.flex?'flex-item center':''}}" data-action="{{items.action||''}}" data-data="{{items.data||''}}" data-info="{{items.info||''}}" data-method="{{items.method||''}}" disabled="{{items.disabled===true}}" flex="{{items.flex||''}}" icon="{{items.icon}}" openType="{{items.openType||''}}" text="{{items.text||''}}" wx:if="{{items.icon}}"></van-goods-action-icon>
<van-goods-action-button bind:click="{{items.bind||'Lay'}}" data-action="{{items.action||''}}" data-data="{{items.data||''}}" data-info="{{items.info||''}}" data-method="{{items.method||''}}" disabled="{{items.disabled===true}}" openType="{{items.openType||''}}" text="{{items.text||''}}" type="{{items.color||''}}" wx:else></van-goods-action-button>
</block>
</van-goods-action>
<template is="popupform" data="{{Form:popupForm}}"></template>
</block>

630
pages/index/show.wxss Normal file
View File

@ -0,0 +1,630 @@
@import "../../__wuBaseWxss__/0.wxss";
@import "../../vant/area/index.wxss";
page {
padding-bottom: 60px;
}
.pro_bigImg {
background: #f2f2f2;
text-align: center;
overflow: hidden;
}
.pro_bigImg image {
width: 100%;
max-width: 350px;
vertical-align: top;
}
.pro_baseInfor {
overflow: hidden;
background: #fff;
padding: 10px 3%;
}
.pro_baseInfor .title {
line-height: 18px;
font-size: 13px;
margin: 5px 0;
color: #000;
}
.pro_baseInfor .money {
font-weight: 700;
color: #f40;
font-size: 18px;
margin-right: 10px;
font-size: 24px;
}
.pro_baseInfor .money:before {
content: "¥";
font-size: 14px;
}
.pro_baseInfor .ul cite {
color: #b68571;
font-size: 18px;
}
.pro_baseInfor .ul cite:before {
font-family: iconfont;
content: "\e662";
font-size: .4rem;
vertical-align: -1px;
}
.jgoods-info {
line-height: 20px;
padding: 12px 0;
background: #fff;
}
.jgoods-info .title {
font-size: 14px;
margin: 0 15px;
color: #000;
}
.jgoods-info .spe {
color: #666;
}
.jgoods-info .spe .bg {
margin: 7px 0 2px 0;
background: #fafafa;
font-size: 14px;
padding: 7px 0;
}
.jgoods-info .spe .item {
padding: 5px 15px;
}
.jgoods-info .spe .text {
color: #333;
display: inline;
}
.jgoods-info .spe .price {
display: inline-block;
height: 24px;
line-height: 24px;
font-size: 22px;
color: #e71f19;
vertical-align: -2px;
}
.jgoods-info .spe .price text {
color: #333;
font-size: 14px;
vertical-align: 3px;
}
.pro_guarantee {
overflow: hidden;
background: #f8f8f8;
width: 100%;
}
.pro_guarantee .top {
padding: 0 10px;
height: 34px;
overflow-y: hidden;
}
.pro_guarantee .tit {
height: 19px;
overflow: hidden;
display: inline-block;
padding: 7px 10px;
font-size: 12px;
}
.pro_guarantee .tit.on {
margin-top: 1px;
color: #444;
background: #fff;
position: relative;
z-index: 1;
}
.pro_guarantee .tit view {
display: inline-block;
position: relative;
}
.pro_guarantee .tit .van-icon {
padding-right: 2px;
font-size: 15px;
vertical-align: middle;
margin-top: -4px;
color: #69a519;
}
.pro_guarantee .bottom {
padding: 8px 10px;
margin-top: -1px;
line-height: 20px;
background: #fff;
color: #444;
}
.pro_attr {
background: #fff;
margin: 10px 0 0 0;
}
.pro_attr .tit {
line-height: 38px;
color: #666;
margin: 0 10px 5px 10px;
}
.pro_attr .list {
overflow: hidden;
margin: 5px 0 5px 10px;
padding: 3px 0 10px 0;
}
.pro_attr .item {
float: left;
width: 56%;
margin: 5px 0;
}
.pro_attr .item:nth-child(odd) {
width: 44%;
}
.pro_attr .name {
float: left;
color: #999;
min-width: 72px;
text-align: right;
}
.pro_attr .text {
margin-left: 72px;
color: #666;
}
.pro_attr .text navigator,.pro_attr .text view {
display: inline-block;
}
.pro_attr .demo {
color: #00a1ec;
}
.pro_attr .demo .van-icon {
font-size: 16px;
margin: -2px 2px 0 0;
vertical-align: middle;
}
.pro_ishop {
overflow: hidden;
background: #fff;
padding: 12px 10px 2px 10px;
margin: 10px 0 0 0;
}
.pro_ishop .bottom,.pro_ishop .top {
float: left;
padding: 0 0 12px 0;
width: 100%;
}
.pro_ishop .top image {
float: left;
width: 60px;
height: 60px;
border-radius: 3px;
border: 1px #eee solid;
padding: 1px;
}
.pro_ishop .top .info {
margin-left: 74px;
color: #999;
line-height: 22px;
}
.pro_ishop .top .name {
color: #111;
}
.pro_ishop .top .tit {
color: #666;
display: inline;
}
.pro_ishop .top .store-score {
display: inline-block;
}
.pro_ishop .top .num {
padding-right: 5px;
display: inline;
}
.pro_ishop .top .num {
color: #c70100;
}
.pro_ishop .top .icons {
display: inline-block;
}
.pro_ishop .bottom .flex-item {
line-height: 14px;
height: 14px;
text-align: center;
margin-right: 15px;
padding: 8px 0 10px 0;
border: 1px #f0f0f0 solid;
border-radius: 4px;
box-shadow: 0 1px 2px #fafafa;
color: #555;
}
.pro_ishop .bottom .flex-item:nth-child(3) {
margin: 0;
}
.pro_ishop .bottom .flex-item.bond {
color: #2e8a11;
border-color: #c6f6bc;
background: #f6fdf4;
}
.pro_ishop .bottom .flex-item .van-icon {
font-size: 18px;
}
.pro_main {
overflow: hidden;
background: #fff;
margin: 10px 0 0 0;
}
.pro_main .ul {
padding: 10px;
overflow: auto;
word-wrap: break-word;
white-space: normal;
word-break: break-all;
}
.pro_info .table {
border-right: 1px solid #f0f0f0;
border-bottom: 1px solid #f0f0f0;
margin: 5px 0;
}
.pro_info .table .td {
padding: 8px 2px;
border-left: 1px solid #f0f0f0;
border-top: 1px solid #f0f0f0;
}
.pro_info .table .tr .td {
flex: 1;
}
.pro_info .gimg {
width: 100%;
}
.lay_pic {
display: block;
width: 100%;
height: 20px;
background: url(https://statics.huzhan.com/image/lazyload.gif) center center no-repeat;
background-size: .3rem .3rem;
}
.pro_rule .item {
font-size: 14px;
display: block;
width: 100%;
}
.pro_rule .tit {
display: block;
border-bottom: 2px solid #eee;
height: 28px;
margin-top: 2px;
}
.pro_rule .h1 {
display: inline-block;
position: relative;
padding: 0 1px;
font-weight: 700;
border-bottom: 2px solid #f70;
font-size: 16px;
height: 26px;
line-height: 26px;
bottom: -2px;
}
.pro_rule .txt {
display: block;
color: #666;
margin: 10px 0;
}
.pro_rule .txt img {
margin-top: 15px;
}
.pro_table {
background: #fff;
}
.pro_table .tit {
text-align: justify;
max-height: 44px;
overflow: hidden;
line-height: 22px;
font-size: 18px;
padding: 10px;
color: #333;
}
.pro_table .row {
background: #fafafa;
margin: 0 10px;
padding: 10px;
}
.pro_table .list {
padding-bottom: 10px;
}
.pro_table .row:nth-child(even) {
background: #fff;
}
.pro_table .row view {
display: inline-block;
color: #333;
}
.pro_table .row .name {
color: #999;
}
.pro_table .row .money {
color: #ff5000;
}
.pro_table .row .money:before {
content: "¥";
font-size: 12px;
}
.pro_table .row .stats {
margin: -2px 0;
display: inline-block;
color: #6a4;
border: 1px solid #6a4;
background: #eff;
padding: 1px 5px;
border-radius: 1px;
margin-left: 5px;
}
.pro_table .row .stats.links {
color: #498bf8;
border-color: #71a3f5;
background: #eef9ff;
}
.pro_table .row .bid {
display: inline-block;
color: #6899ec;
border: 2px dashed #6899ec;
font-size: 12px;
padding: 2px 6px;
border-radius: 1px;
margin: -2px 0 0 5px;
}
.bidTit {
position: relative;
color: #666;
background: #fff;
border-bottom: 1px solid #e5e5e5;
border-top: 1px solid #e5e5e5;
overflow: hidden;
line-height: 34px;
margin-top: 10px;
}
.bidTit .title {
font-size: 14px;
color: #333;
font-weight: 700;
width: 90px;
text-align: center;
background: #ededed;
}
.bidTit .total {
color: #666;
padding: 0 10px;
}
.bidTit .van-radio {
padding-left: 8px;
}
.bidTit .goBid {
position: absolute;
top: 0;
width: 100%;
z-index: 1;
}
.bidTit .goBid>view {
background: #fff;
position: relative;
margin-left: 90px;
padding: 0 10px;
}
.bidTit .goBid van-icon {
background: #fff;
position: absolute;
right: 5px;
top: 5px;
}
.bidInfo {
background: #f5faff;
border-top: 1px solid #d4e7f6;
border-bottom: 1px solid #d4e7f6;
text-align: center;
margin: 10px 0;
padding: 20px;
}
.bidInfo .add {
padding: 10px;
font-size: 14px;
color: #247fbd;
}
.bidList .item {
display: block;
border: 1px solid #ededed;
border-top: 0;
}
.bidList .top {
background: #f9f9f9;
padding: 10px;
}
.bidList .top .slink>navigator,.bidList .top .slink>view {
font-size: .8rem;
padding: 0 5px;
text-align: center;
line-height: 22px;
background: #fff;
border: 1px solid #ededed;
color: #666;
border-radius: 2px;
}
.bidList .top .slink>navigator:first-child {
margin-bottom: 6px;
}
.bidList .avatar {
background: #fff;
width: 50px;
height: 50px;
padding: 1px;
border: 1px solid #ededed;
}
.bidList .binfo {
padding-right: 5px;
}
.bidList .binfo>view {
display: flex;
align-items: center;
height: 100%;
width: 100%;
}
.bidList .binfo text {
display: block;
font-weight: 700;
color: #ff4800;
font-size: 1.2rem;
border: 1px solid #f60;
background: #fffbfa;
padding: 3px 6px;
border-radius: 2px;
}
.bidList .binfo text.red {
color: red;
border: 1px solid #f10;
}
.bidList .baction,.bidList .slink {
max-width: 64px;
}
.bidList .baction navigator {
background: #f5faff;
border: 1px solid #d4e7f6;
color: #74b4ea;
}
.bidList .baction .won {
color: #eaa374;
border-color: #ffe0cc;
background: #fff8f4;
}
.bidList .user {
flex: 1;
color: #666;
padding: 0 10px;
}
.bidList .user>view {
display: flex;
align-items: center;
height: 100%;
width: 100%;
}
.bidList .user .name {
font-size: 14px;
padding-right: 3px;
color: #247fbd;
line-height: 15px;
}
.bidList .user .contact {
margin-top: 3px;
}
.bidList .body {
padding: 10px 10px 0 10px;
border-top: 1px dashed #ddd;
background: #fff;
line-height: 16px;
}
.bidList .bottom {
background: #fff;
padding: 0 10px 10px 10px;
line-height: 22px;
}
.bidList .bottom text {
padding-right: 15px;
color: #999;
}
.info-id {
position: fixed;
top: 45px;
left: 0;
z-index: -1;
width: 100%;
text-align: center;
color: #c0c0c0;
}

223
pages/member/cart.js Normal file
View File

@ -0,0 +1,223 @@
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: {
loading: !1,
Form: {},
ListSh: {},
getdata: "",
listdata: {},
popup: [],
title: "",
tabCurrent: 0,
MyJifen: 0,
CartMoney: 0,
CartCount: 0,
CartTotal: 0,
CartPost: {},
Allchecked: !0,
spin: !0,
timestamp: 0,
previewList: []
},
onReachBottom: function() {
var t = this, e = this.data.listdata;
!t.data.loading && e.CurPage < e.TotalPage && (t.setData({
"getdata.page": 1 * t.data.getdata.page + 1,
spin: !0,
timestamp: a.timestamp()
}), a.GetList(function(a) {
t.create_cartList("init");
}));
},
create_cartList: function(t) {
var e = this, o = e.data.listdata.list, i = [], n = [], s = [], d = [], r = 0, c = 0, g = 0, l = {};
for (var h in o) {
var u = o[h];
for (var f in u.goods) {
var m = u.goods[f];
m.gchecked && (i[r] = m.bh, n[r] = m.yjifen, s[r] = m.type, d[r] = m.achecked ? 1 : 0,
c += Number(m.money), m.achecked && (c += Number(m.amoney)), m.yjifen > 0 && (c -= Number((.1 * m.yjifen).toFixed(2))),
"init" != t && m["m_" + m.bh] && (l["m_" + m.bh] = m["m_" + m.bh], l["z_" + m.bh] = m["z_" + m.bh]),
r++), m.gdisabled || g++;
}
}
var y = {
id: i.join("|"),
jf: n.join("|"),
ty: s.join("|"),
az: d.join("|")
};
"init" == t ? e.setData({
CartMoney: c,
CartCount: r,
CartTotal: g,
CartPost: y,
spin: !1
}) : (e.setData({
postIng: !0
}), a.HttpMember({
url: "post/cart",
data: Object.assign(y, l)
}, function(t) {
e.setData({
postIng: !1
}), "url" == t.action && a.Lay(t);
}));
},
AllChange: function(a) {
if (a.detail && (a.detail.checked || this.data.CartTotal == this.data.CartCount && this.data.CartCount > 0)) {
var e = this, o = a.detail.checked, i = e.data.listdata.list;
for (var n in i) for (var s in i[n].goods) o !== i[n].goods[s].gchecked && e.goodChange({
detail: {
name: "good_" + n + "_" + i[n].goods[s].bh,
checked: o
}
});
e.setData(t({
ListSh: {},
Allchecked: o
}, "listdata.list", i));
}
},
ListSh: function(a) {
var e = this, o = a.currentTarget.id, i = "ListSh." + o, n = wx.createAnimation({
duration: 200,
timingFunction: "ease",
delay: 0
});
e.data.ListSh[o] ? (n.translateX("100%").step(), setTimeout(function() {
e.setData(t({}, i, !1));
}, 201)) : (e.setData(t({}, i, !0)), n.translateX("0").step()), this.setData(t({}, i, n.export()));
},
action: function(e) {
var o = this, i = o.data.listdata.list, n = e.currentTarget.dataset, s = n.action, d = n.id, r = n.gid, c = i[d].goods, g = c[r], l = i[d].sell, h = c.length <= 1;
a.PostMember("post/" + s, {
action: s,
bh: g.bh,
tab: g.type
}, function(a) {
if (1 != a.state) return !1;
var e = wx.createAnimation({
duration: 300,
timingFunction: "ease",
delay: 0
});
e.translateX("120%").step(), o.setData(t({}, "delAnimation." + (h ? l : g.bh), e.export())),
setTimeout(function() {
h ? i.splice(d, 1) : i[d].goods.splice(r, 1);
var a = t({
delAnimation: {}
}, "listdata.list", i);
h && (a.ListSh = {}), o.setData(a), o.create_cartList("init");
}, 301);
});
},
goodChange: function(a) {
if (a.detail) {
var e = this, o = a.detail.checked, i = a.detail.name.split("_"), n = i[0], s = i[1], d = i[2], r = e.data.listdata.list[s], c = {
no: 0,
ok: 0
}, g = "listdata.list[" + s + "]";
if ("install" == n || "jifen" == n) for (var l in r.goods) r.goods[l].bh != d || r.goods[l].gdisabled || (o && !r.goods[l].gchecked && e.goodChange({
detail: {
name: "good_" + s + "_" + d,
checked: o
}
}), "install" == n ? (r.goods[l].achecked = o, e.setData({
CartMoney: e.data.CartMoney + Number(o ? r.goods[l].amoney : -1 * r.goods[l].amoney)
})) : (r.goods[l].jchecked = o, o ? (r.goods[l].yjifen = e.data.MyJifen <= r.goods[l].kjifen ? e.data.MyJifen : r.goods[l].kjifen,
e.setData({
MyJifen: e.data.MyJifen - r.goods[l].yjifen,
CartMoney: e.data.CartMoney - Number((.1 * r.goods[l].yjifen).toFixed(2))
})) : (e.setData({
MyJifen: e.data.MyJifen + r.goods[l].yjifen,
CartMoney: e.data.CartMoney + Number((.1 * r.goods[l].yjifen).toFixed(2))
}), r.goods[l].yjifen = 0))); else if ("good" == n) {
for (var l in r.goods) if (!r.goods[l].gdisabled) {
if (r.goods[l].bh == d) {
var h = r.goods[l].achecked, u = r.goods[l].jchecked;
r.goods[l].gchecked = o, o ? (e.setData({
CartCount: e.data.CartCount + 1,
CartMoney: e.data.CartMoney + Number(r.goods[l].money)
}), r.goods[l].achecked || (r.goods[l].achecked = r.goods[l].amoney <= 0)) : (e.setData({
CartCount: e.data.CartCount - 1,
CartMoney: e.data.CartMoney - Number(r.goods[l].money)
}), r.goods[l].achecked = !1, r.goods[l].jchecked = !1), r.goods[l].achecked !== h && e.goodChange({
detail: {
name: "install_" + s + "_" + d,
checked: r.goods[l].achecked
}
}), r.goods[l].jchecked !== u && e.goodChange({
detail: {
name: "jifen_" + s + "_" + d,
checked: r.goods[l].jchecked
}
});
}
r.goods[l].gchecked ? c.ok++ : c.no++;
}
e.data.CartTotal > e.data.CartCount && e.data.Allchecked && e.setData({
Allchecked: !1
}), e.data.CartTotal != e.data.CartCount || e.data.Allchecked || e.setData({
Allchecked: !0
}), 0 != c.ok && 0 != c.no || (r.schecked = 0 === c.no);
} else if ("shop" == n) {
for (var l in r.goods) r.goods[l].gdisabled || r.goods[l].gchecked === o || (e.goodChange({
detail: {
name: "good_" + s + "_" + r.goods[l].bh,
checked: o
}
}), r.goods[l].gchecked = o);
r.schecked !== o && (r.schecked = o);
}
e.setData(t({}, g, r));
}
},
initialize: function() {
var t = this;
t.setData({
spin: !0,
postIng: !1
}), a.HttpMember("get/member/cart?islogin=0", function(e) {
a.initializeRefresh(e), t.setData({
"getdata.page": 1,
MyJifen: e.Myjifen,
timestamp: a.timestamp()
}), wx.stopPullDownRefresh(), a.GetList(function(a) {
t.create_cartList("init");
});
});
},
Lay: function(t) {
a.Lay(JSON.parse(JSON.stringify(t)));
},
Commom: function(t) {
var e = JSON.parse(JSON.stringify((t.currentTarget, t))), o = t.currentTarget ? e.currentTarget.dataset.action : e.action;
a[o](e);
},
Popup: function(t) {
a.Popup(t.currentTarget.dataset);
},
onLoad: function() {
a.init(this);
},
onShow: function() {
a.init(this);
var t = a.timestamp();
(!wx.getStorageSync("sessionid") || t - this.data.timestamp >= 30) && this.initialize();
},
onPullDownRefresh: function() {
this.initialize();
},
onShareAppMessage: function() {}
});

15
pages/member/cart.json Normal file
View File

@ -0,0 +1,15 @@
{
"usingComponents": {
"van-submit-bar": "/vant/submit-bar/index",
"van-checkbox": "/vant/checkbox/index",
"van-checkbox-group": "/vant/checkbox-group/index",
"van-popup": "/vant/popup/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-tab": "/vant/tab/index",
"van-tabs": "/vant/tabs/index"
}
}

111
pages/member/cart.wxml Normal file
View File

@ -0,0 +1,111 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin}}"></template>
<view class="flex-item cartList" style="padding-bottom:{{Form.pd?50+Form.pd:50}}px" wx:if="{{!spin}}">
<template is="forview" data="{{list:listdata.nologin}}" wx:if="{{listdata.nologin}}"></template>
<view animation="{{delAnimation[shop.sell]}}" class="item" wx:if="{{getdata.page>=1}}" wx:for="{{listdata.list}}" wx:for-index="id" wx:for-item="shop" wx:key="sell">
<view class="row-flex shops">
<view class="flex-item">
<view class="row-flex">
<view style="width:30px;">
<van-checkbox bind:change="goodChange" disabled="{{shop.sdisabled}}" name="{{'shop_'+id}}" type="circle" value="{{shop.schecked}}"></van-checkbox>
</view>
<view class="flex-item">
<navigator url="{{shop.url}}">{{shop.name}}</navigator>
</view>
</view>
</view>
<view catchtap="ListSh" id="{{id}}" style="width:35px;text-align:right;height:20px;">
<van-icon color="#999999" name="ellipsis" size="22px"></van-icon>
</view>
</view>
<view animation="{{delAnimation[data.bh]}}" wx:for="{{shop.goods}}" wx:for-index="gid" wx:for-item="data" wx:key="bh">
<view class="row-flex info">
<view class="middle" style="width:30px;">
<van-checkbox bind:change="goodChange" disabled="{{data.gdisabled}}" name="{{'good_'+id+'_'+data.bh}}" shape="square" value="{{data.gchecked}}"></van-checkbox>
</view>
<view class="pic middle center" style="width:78px;">
<image bindtap="Lay" data-action="preview" data-src="{{data.pic.value}}" src="{{data.pic.value}}" wx:if="{{data.pic.type=='image'}}"></image>
<text wx:else>{{data.pic.value}}</text>
</view>
<view class="flex-item">
<navigator class="tit" url="{{data.goodurl}}">[{{data.typename}}]{{data.tit}}</navigator>
<view class="bot">
<view class="gicon" wx:if="{{!data.gdisabled}}">
<view bind:change="goodChange" bindtap="Lay" class="protect tips view" data-action="bond" data-info="已加入消保,商家已缴纳保证金 300 元">
</view>
</view>
<view class="{{data.error.class}}" wx:if="{{data.error.text}}">
{{data.error.text}}
<navigator url="{{data.error.link}}" wx:if="{{data.error.link}}">查看详情</navigator>
</view>
</view>
</view>
<view class="money tright" style="width:80px;">
<view class="text">¥<view class="num">{{data.money}}</view>
</view>
</view>
<view animation="{{ListSh[id]}}" catchtap="ListSh" class="row-flex more {{ListSh[id]?'show':'hide'}}" id="{{id}}">
<view catchtap="Lay" class="flex-item" data-action="contact" data-info="{{shop.sell+'/'+data.type}}">
<view class="action">
<van-icon customStyle="background:#498BF8;" name="chat-o"></van-icon>
<view>联系商家</view>
</view>
</view>
<view catchtap="action" class="flex-item" data-action="cart_delete" data-gid="{{gid}}" data-id="{{id}}">
<view class="action">
<van-icon customStyle="background:#ff5000;" name="delete"></van-icon>
<view>删除商品</view>
</view>
</view>
<view catchtap="action" class="flex-item" data-action="fav" data-gid="{{gid}}" data-id="{{id}}">
<view class="action">
<van-icon customStyle="background:#ff9402;" name="star-o"></van-icon>
<view>移至收藏</view>
</view>
</view>
<view class="flex-item">
<view class="action">
<van-icon name="cross"></van-icon>
<view>关闭</view>
</view>
</view>
</view>
</view>
<view class="row-flex attach" wx:if="{{data.type=='code'&&!data.gdisabled}}">
<view style="width:24px"></view>
<view class="pl-5 middle" style="width:90px">
<van-checkbox bind:change="goodChange" disabled="{{data.amoney<=0}}" name="{{'install_'+id+'_'+data.bh}}" shape="square" value="{{data.achecked}}">安装服务</van-checkbox>
</view>
<view class="flex-item explain">
购买前请看【<text bindtap="Lay" class="u" data-action="install" data-info="{{data.id}}">要求说明</text>】
</view>
<view class="money tright" style="width:80px">
<view class="text" wx:if="{{data.amoney>0}}">¥<view class="num">{{data.amoney}}</view>
</view>
<view class="text green" wx:else>免费</view>
</view>
</view>
<view class="row-flex attach" wx:if="{{data.type=='code'&&!data.gdisabled&&data.kjifen>0}}">
<view style="width:24px"></view>
<view class="pl-5" style="width:90px">
<van-checkbox bind:change="goodChange" disabled="{{MyJifen<=0&&data.yjifen<=0}}" name="{{'jifen_'+id+'_'+data.bh}}" shape="square" value="{{data.jchecked}}">积分抵价</van-checkbox>
</view>
<view class="flex-item explain">
<view wx:if="{{MyJifen<=0&&data.yjifen<=0}}">您当前可用积分不足</view>
<view wx:else>商品支持使用<view class="b">{{data.kjifen}}</view>积分</view>
<view wx:if="{{data.yjifen>0}}">当前准备使用<view class="b">{{data.yjifen}}</view>积分</view>
</view>
<view class="money tright" style="width:80px">
<view class="text green" wx:if="{{data.yjifen>0}}">-¥<view class="num">{{data.yjifen/10}}</view>
</view>
</view>
</view>
</view>
</view>
<van-submit-bar bind:submit="create_cartList" buttonText="提交结算" buttonHidden="{{Form.buttonHidden}}" disabled="{{CartMoney<=0}}" loading="{{postIng}}" price="{{CartMoney*100}}" tip="{{Form.tip}}">
<view slot="tip"></view>
<view style="width:10px"></view>
<van-checkbox bind:change="AllChange" shape="square" value="{{Allchecked}}">全选({{CartCount}}</van-checkbox>
</van-submit-bar>
</view>

294
pages/member/cart.wxss Normal file
View File

@ -0,0 +1,294 @@
@import "../../__wuBaseWxss__/0.wxss";
.nologin {
position: absolute;
margin-top: -100px;
top: 50%;
left: 0;
width: 100%;
text-align: center;
}
.cartList .item {
position: relative;
background: #fff;
margin-bottom: 10px;
border-bottom: 1px #ddd solid;
border-top: 1px #ddd solid;
}
.cartList .item:last-child {
margin: 0;
}
.cartList .shops {
padding: 10px;
}
.cartList .ListSh {
display: inline-block;
margin-bottom: -5px;
padding: 0 0 5px 10px;
line-height: 20px;
font-size: 14px;
color: #999;
}
.cartList .info {
position: relative;
background: #fafafa;
padding: 10px;
border-top: 1px #e1e1e1 solid;
}
.cartList .info .more {
position: absolute;
width: 100%;
background-color: rgba(255,255,255,.9);
text-align: center;
top: 0;
left: 0;
height: 100%;
font-size: 12px;
line-height: 24px;
transform: translateX(100%);
}
.cartList .info .more.hide {
display: none;
}
.cartList .info .action {
padding-top: 14px;
}
.cartList .info .action .van-icon {
background: #c1c1c1;
border-radius: 50%;
padding: 5px;
color: #fff;
font-size: 20px;
}
.cartList .info .pic {
overflow: hidden;
margin: 0 10px 0 0;
line-height: 58px;
height: 58px;
width: 76px;
color: #36c;
border: 1px solid #eee;
}
.cartList .info .pic image {
width: 76px;
height: 58px;
}
.cartList .info .tit {
overflow: hidden;
height: 32px;
line-height: 16px;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.cartList .info .bot {
position: relative;
height: 20px;
line-height: 20px;
display: block;
}
.cartList .info .bot .gicon {
padding: 0;
background: 0 0;
left: 0;
right: auto;
}
.cartList .info .bot .gicon view {
margin: 0 5px 0 0;
}
.cartList .info .text {
color: #ccc;
height: 19px;
line-height: 19px;
font-size: 14px;
}
.cartList .info .money .text {
display: inline;
font-size: 12px;
color: #f30;
}
.cartList .info .num {
font-size: 14px;
display: inline-block;
font-weight: 700;
}
.cartList .attach {
background: #fff;
padding: 8px 10px;
line-height: 18px;
font-size: 14px;
border-top: 1px solid #eee;
}
.cartList .attach .van-checkbox {
margin-top: -2px;
}
.cartList .attach .explain {
font-size: 12px;
color: rgba(69,90,100,.6);
}
.cartList .attach .explain .b {
font-weight: 700;
}
.cartList .attach .explain view {
display: inline-block;
}
.cartList .attach .money .text {
display: inline;
font-size: 12px;
color: #f30;
}
.cartList .attach .money .green {
color: #3a933a;
}
.cartList .attach .money .num {
display: inline-block;
font-weight: 700;
}
.cartList .shop {
color: #333;
background-color: rgba(255,255,255,.5);
position: absolute;
bottom: 0;
left: 0;
width: 100%;
}
.cartList .shop .seller {
background-color: rgba(255,255,255,.9);
float: left;
height: 100px;
width: 82%;
}
.cartList .shop .avatar {
display: inline-block;
width: 20px;
height: 20px;
}
.cartList .shop .avatar image {
width: 16px;
height: 16px;
}
.cartList .shop .name {
color: #000;
}
.cartList .shop .tname {
color: #666;
padding-right: 5px;
display: inline-block;
}
.cartList .shop .litem {
float: left;
width: 100%;
height: 20px;
line-height: 20px;
display: inline-block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.cartList .shop .action {
float: right;
height: 100%;
width: 18%;
}
.cartList .shop .action .navigator,.cartList .shop .action view {
text-align: center;
display: block;
width: 100%;
height: 33.5px;
line-height: 33.5px;
background: #ff9402;
color: #fff;
}
.cartList .shop .action navigator:nth-child(1) {
background: #ff5000;
}
.cartList .shop .action view {
background: #c1c1c1;
}
.shop_view {
padding-bottom: 50px;
}
.shop_list {
height: 100px;
border-bottom: 1px solid #dbdbdb;
line-height: 100px;
padding-left: 20px;
}
.fixed_top {
background: #ff774f;
}
.fixed_top .ui-col {
color: #fff;
}
.fixed_bottom {
background: #fff;
box-shadow: 0 -8px 10px 0 #eaeaea;
}
.fixed_bottom .form_list {
background: #fe6a3c;
color: #fff;
height: 50px;
text-align: center;
line-height: 50px;
font-size: 16px;
}
.fixed_bottom .money {
color: #f30;
display: inline-block;
font-size: 12px;
}
.fixed_bottom .money .num {
font-size: 20px;
display: inline-block;
font-weight: 700;
}
.fixed_bottom .form_num {
display: inline-block;
}

115
pages/member/html.js Normal file
View File

@ -0,0 +1,115 @@
function t(t, e, i) {
return e in t ? Object.defineProperty(t, e, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[e] = i, t;
}
var e = function(t) {
return t && t.__esModule ? t : {
default: t
};
}(require("../../vant/dialog/dialog")), i = require("../../common/common.js");
Page({
data: {
url: "",
popup: [],
previewList: []
},
initialize: function() {
var t = this;
t.setData({
spin: !0,
popupSpin: !1,
Form: {
form: {
radio: {},
checkbox: {},
picker: {},
rate: {}
}
},
popupForm: {
form: {
radio: {},
checkbox: {},
picker: {}
}
}
}), i.HttpMember(t.data.url, function(t) {
i.initializeRefresh(t);
});
},
onPullDownRefresh: function() {
this.initialize();
},
onLoad: function(t) {
t && this.setData({
url: i.UrlOptions(t)
}), i.init(this), this.initialize();
},
onShow: function() {
i.init(this), this.data.Form.form.formLoad && this.initialize();
},
Lay: function(t) {
i.Lay(JSON.parse(JSON.stringify(t)));
},
Commom: function(t) {
var e = JSON.parse(JSON.stringify((t.currentTarget, t))), a = t.currentTarget ? e.currentTarget.dataset.action : e.action;
i[a](e);
},
Popup: function(t) {
i.Popup(t.currentTarget.dataset);
},
AllmoneyChange: function(e) {
var i = commom.getTableName(), a = this.data[i].form, r = a.radio.SelectEdition, o = a.radio.piece, n = a.allMoney;
if (r) {
var l = r.split("-|-");
n.edition = l[0], n.money = parseInt(l[1]);
}
n.count = parseInt(o * n.money), a.allMoney = n, this.setData(t({}, i + ".form", a));
},
allMoney: function(i) {
var a = this, r = i.currentTarget.dataset.action, o = i.currentTarget.dataset.data, n = 0, l = [];
for (var s in a.data.Form.input) if ("moneyBox" == a.data.Form.input[s].id) var u = s;
var f = a.data.Form.input[u].list[1].list[0].list[1].list, m = f.length;
if ("up" == r || "down" == r) {
var c = JSON.parse(JSON.stringify(f[o])), d = "up" == r ? o <= 0 ? m - 1 : o - 1 : o >= m - 1 ? 0 : o + 1;
f[o] = f[d], f[o] = f[d], f[d] = c, f[d] = c;
} else if ("del" == r) {
if (m <= 1) return e.default.alert({
title: "提示",
message: '至少需要保留<b style="color:red">1个</b>价格!',
overlay: !0,
closable: !1
}).then(function() {
var e;
a.setData((e = {}, t(e, "Form.form.formLoad", !1), t(e, "Form.form.textareaToggle", !1),
e));
}), !1;
delete f[o];
} else if ("add" == r) {
if (m >= 5) return e.default.alert({
title: "提示",
message: '最多只能设置<b style="color:blue">5个</b>动态价格!',
overlay: !0,
closable: !1
}).then(function() {
var e;
a.setData((e = {}, t(e, "Form.form.formLoad", !1), t(e, "Form.form.textareaToggle", !1),
e));
}), !1;
f[m] = JSON.parse(JSON.stringify(f[0])), f[m].list[0].list[0].value = "", f[m].list[1].list[0].value = "";
}
for (var s in f) {
f[s].list[0].list[0].name = f[s].list[0].list[0].name.replace(/[\d]/g, "") + n,
f[s].list[1].list[0].name = f[s].list[1].list[0].name.replace(/[\d]/g, "") + n;
for (var p in f[s].list[2].list) f[s].list[2].list[p].data = n;
l[n] = f[s], n++;
}
a.setData(t({}, "Form.input[" + u + "].list[1].list[0].list[1].list", l));
}
});

25
pages/member/html.json Normal file
View File

@ -0,0 +1,25 @@
{
"usingComponents": {
"down": "/utils/count-down/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-stepper": "/vant/stepper/index",
"van-picker": "/vant/picker/index",
"van-checkbox": "/vant/checkbox/index",
"van-checkbox-group": "/vant/checkbox-group/index",
"van-notice-bar": "/vant/notice-bar/index",
"van-search": "/vant/search/index",
"van-steps": "/vant/steps/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"
}
}

4
pages/member/html.wxml Normal file
View File

@ -0,0 +1,4 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin||popupSpin||false}}"></template>
<template is="form" data="{{Form:Form}}" wx:if="{{!spin}}"></template>
<template is="popupform" data="{{Form:popupForm}}"></template>

5
pages/member/html.wxss Normal file
View File

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

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;
}

167
pages/member/login.js Normal file
View File

@ -0,0 +1,167 @@
var t = function(t) {
return t && t.__esModule ? t : {
default: t
};
}(require("../../vant/dialog/dialog")), e = require("../../common/common.js");
Page({
data: {
username: "",
password: "",
options: {},
switchvalue: !1,
spin: !0,
current: 0,
tabs: [ {
key: 0,
title: "绑定已有帐号"
}, {
key: 1,
title: "新注册并绑定"
} ],
title: {
binding: "账号绑定",
authorize: "登录授权",
forget: "找回密码"
},
userInfo: [],
placeholderStyle: "font-size:12px;color:#ccc",
forgetSteps: [ {
text: "账号信息"
}, {
text: "手机验证"
}, {
text: "重设密码"
} ],
forgetFlow: 0
},
initialize: function() {
var t = this;
wx.getSetting({
success: function(e) {
e.authSetting["scope.userInfo"] && wx.getUserInfo({
success: function(e) {
t.setData({
userInfo: e.userInfo
});
}
});
}
}), t.setData({
spin: !0,
popupSpin: !1,
Form: {
form: {
radio: {},
checkbox: {},
picker: {},
rate: {}
}
},
popupForm: {
form: {
radio: {},
checkbox: {},
picker: {}
}
}
}), e.Http("html/login", function(t) {
e.initializeRefresh(t);
});
},
onLoad: function(t) {
e.init(this), this.initialize(), t.action || (t.action = "authorize"), this.setData({
options: t,
backfun: t.backfun || !1,
spin: !1
}), wx.setNavigationBarTitle({
title: this.data.title[t.action]
});
},
loginTypeChange: function(t) {
t.detail.value = 1 == t.detail.index ? "phone" : "name", e.Lay(t);
},
notBindSubmit: function(n) {
var i = n.detail.target.dataset.title;
t.default.alert({
title: "提示",
message: '<b>您确定<span style="color:red">不绑定</span>微信' + i + "吗?</b><br>绑定微信可以一键快捷登录账号",
closeOnClickOverlay: !1,
showCancelButton: !0,
cancelButtonText: "不绑定" + i,
confirmButtonText: "绑定" + i
}).then(function() {
e.Lay(n);
}).catch(function() {
n.detail.value.notbind = !0, e.Lay(n);
});
},
formSubmit: function(t) {
if ("notbind" == t.detail.target.dataset.method) return this.notBindSubmit(t);
e.Lay(t);
},
Lay: function(t) {
e.Lay(JSON.parse(JSON.stringify(t)));
},
Commom: function(t) {
var n = JSON.parse(JSON.stringify((t.currentTarget, t))), i = t.currentTarget ? n.currentTarget.dataset.action : n.action;
e[i](n);
},
Popup: function(t) {
e.Popup(t.currentTarget.dataset);
},
register: function() {
wx.navigateTo({
url: "register/register"
});
},
backurl: function() {
wx.getStorageSync("loginback");
this.setData({
forgetFlow: 0
}), this.data.backfun ? e.Lay({
action: "backfun",
info: this.data.backfun
}) : wx.reLaunch({
url: "/pages/member/member"
});
},
binding: function() {
this.setData({
"options.action": "binding"
});
},
bindGetUserInfo: function(t) {
var n = this;
t.detail;
e.Wxlogin(function(e) {
n.WxloginCallBack({
state: e
}, t);
});
},
WxloginCallBack: function(t, n) {
var i = this;
"success" == t.state ? i.backurl() : "binding" == t.state ? i.binding() : "authorize" == t.state && (n.detail.userInfo ? (n.detail.value = {
endata: encodeURIComponent(n.detail.encryptedData),
iv: encodeURIComponent(n.detail.iv),
signature: n.detail.signature
}, e.Lay(n)) : wx.showModal({
content: "必须授权才能继续操作,是否重新手动授权?",
confirmText: "授权",
cancelText: "取消",
success: function(t) {
t.confirm ? wx.openSetting({
success: function(t) {
t.authSetting["scope.userInfo"] && i.initialize();
}
}) : wx.reLaunch({
url: "/pages/index/index"
});
}
}));
},
onPullDownRefresh: function() {
this.initialize();
}
});

14
pages/member/login.json Normal file
View File

@ -0,0 +1,14 @@
{
"usingComponents": {
"van-field": "../../vant/field/index",
"van-steps": "../../vant/steps/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"
}
}

60
pages/member/login.wxml Normal file
View File

@ -0,0 +1,60 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin}}"></template>
<view class="login_wrap">
<view class="portrait">
<image src="{{userInfo.avatarUrl}}" wx:if="{{userInfo.avatarUrl}}"></image>
<van-icon customStyle="font-size:80px;color:#eee;" name="touxiang" wx:else></van-icon>
</view>
<view class="login_content" wx:if="{{options.action=='authorize'}}">
<view style="margin-top:50px;">
<van-button block bind:getuserinfo="bindGetUserInfo" data-action="formSubmit" data-url="get/login/authorize" openType="getUserInfo" size="normal" type="primary">微信{{!userInfo.language?'授权':''}}登录</van-button>
</view>
<view class="login_bottom">
<navigator class="login_back" hoverClass="other-navigator-hover" id="" openType="switchTab" url="/pages/index/index">
返回首页
</navigator>
</view>
</view>
<view class="login_wrap" wx:elif="{{options.action=='binding'}}">
<view class="login_content form">
<van-tabs active="{{current}}" color="#33cd5f" type="card">
<van-tab title="已有帐号">
<form bindsubmit="formSubmit" data-action="formSubmit" data-url="login?islogin=0">
<input hidden maxlength="-1" name="oauthAvatar" value="{{userInfo.avatarUrl}}"></input>
<input hidden maxlength="-1" name="oauthNick" value="{{userInfo.nickName}}"></input>
<input hidden maxlength="-1" name="login" value="{{Form.form.input.login||'name'}}"></input>
<van-tabs animated bind:change="loginTypeChange" data-action="input" data-name="login">
<van-tab title="账号密码登录">
<template is="forview" data="{{list:Form.input.name.list,form:Form.form}}"></template>
</van-tab>
<van-tab title="手机验证登录">
<template is="forview" data="{{list:Form.input.phone.list,form:Form.form}}"></template>
</van-tab>
</van-tabs>
<view style="margin-top:50px;">
<button class="formbutton" data-method="bind" data-title="登录" formType="submit" hoverClass="hover">登录并绑定微信</button>
<button class="notbind" data-method="notbind" data-title="登录" formType="submit">登录但不绑定微信</button>
</view>
</form>
<view class="login_bottom">
<navigator class="gray" hoverClass="hover" id="" openType="switchTab" url="/pages/index/index">
返回首页
</navigator>
<navigator class="gray" hoverClass="hover" url="{{Form.fetchUrl}}">忘记密码</navigator>
</view>
</van-tab>
<van-tab title="新注册">
<form bindsubmit="formSubmit" data-action="formSubmit" data-url="reg?islogin=0" style="margin-top:10px;">
<input hidden maxlength="-1" name="oauthAvatar" value="{{userInfo.avatarUrl}}"></input>
<input hidden maxlength="-1" name="oauthNick" value="{{userInfo.nickName}}"></input>
<template is="forview" data="{{list:Form.input.reg.list,form:Form.form}}"></template>
<view style="margin-top:10px;">
<button class="formbutton" data-method="bind" data-title="注册" formType="submit">注册并绑定微信</button>
<button class="notbind" data-method="notbind" data-title="注册" formType="submit">注册但不绑定微信</button>
</view>
</form>
</van-tab>
</van-tabs>
</view>
</view>
</view>

67
pages/member/login.wxss Normal file
View File

@ -0,0 +1,67 @@
@import "../../__wuBaseWxss__/0.wxss";
@import "../../__wuBaseWxss__/1.wxss";
page {
background: #fff;
}
.notbind {
background: none;
border: 0;
height: 20px;
line-height: 20px;
font-size: 14px;
color: #666;
margin: 20px 0;
}
.notbind:after {
display: none;
}
.login_wrap {
height: 100%;
display: flex;
flex-direction: column;
}
.portrait {
text-align: center;
padding: 100rpx 0;
flex: 1;
background: #f5f5f5;
}
.portrait image {
overflow: hidden;
border: 3px solid #fff;
border-radius: 50%;
width: 80px;
height: 80px;
}
.login_content {
padding: 20px 20px 0 20px;
}
.login_bottom {
position: fixed;
bottom: 10px;
left: 0;
width: 100%;
text-align: center;
}
.login_bottom view {
display: inline-block;
padding: 5px;
font-size: 14px;
color: #9C9C9C;
color: #D4D4D4;
}
.login_bottom navigator {
display: inline-block;
padding: 5px;
}

72
pages/member/member.js Normal file
View File

@ -0,0 +1,72 @@
function t(t, i, e) {
return i in t ? Object.defineProperty(t, i, {
value: e,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[i] = e, t;
}
var i = require("../../common/common.js");
Page({
data: {
spin: !0,
CustomNavigation: !0,
timestamp: 0
},
initialize: function() {
this.setData({
spin: !0,
popupSpin: !1,
Form: {
form: {
radio: {},
checkbox: {},
picker: {},
rate: {}
}
},
popupForm: {
form: {
radio: {},
checkbox: {},
picker: {}
}
},
timestamp: i.timestamp()
}), i.HttpMember("get/member/index?islogin=0", function(t) {
i.initializeRefresh(t);
});
},
onShow: function(t) {
i.init(this), i.timestamp() - this.data.timestamp >= 30 && this.initialize();
},
signHide: function() {
var i = this.data.Form.form;
i.radio.sign = !0, this.setData(t({}, "Form.form", i));
},
onLoad: function() {
i.init(this);
},
onPullDownRefresh: function() {
this.initialize();
},
swiperAutoHeight: function(e) {
var n = this, r = e.currentTarget.dataset, a = (n.data.Form.form.swiperHeight || {})[r.name] || {};
a[e.detail.current] || i.querySelect("#swiper-" + r.name + "-" + e.detail.current, function(i) {
a[e.detail.current] = "height:" + i.height + "px;", n.setData(t({}, "Form.form.swiperHeight." + r.name, a));
});
},
Lay: function(t) {
i.Lay(JSON.parse(JSON.stringify("Event" == t.type ? t.detail : t)));
},
Commom: function(t) {
var e = JSON.parse(JSON.stringify((t.currentTarget, t))), n = t.currentTarget ? e.currentTarget.dataset.action : e.action;
i[n](e);
},
Popup: function(t) {
i.Popup(t.currentTarget.dataset);
},
onShareAppMessage: function() {}
});

16
pages/member/member.json Normal file
View File

@ -0,0 +1,16 @@
{
"usingComponents": {
"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"
},
"navigationStyle": "custom"
}

5
pages/member/member.wxml Normal file
View File

@ -0,0 +1,5 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{spin:spin}}"></template>
<view style="height:{{SystemInfo.CustomBar||60}}px"></view>
<template is="form" data="{{Form:Form}}" wx:if="{{!spin}}"></template>
<template is="popupform" data="{{Form:popupForm}}"></template>

361
pages/member/member.wxss Normal file
View File

@ -0,0 +1,361 @@
@import "../../__wuBaseWxss__/0.wxss";
@import "../../__wuBaseWxss__/1.wxss";
.m-bg {
height: 180px;
background-image: linear-gradient(to right,#8debff,#6cacff);
background-color: #6cacff;
border-radius: 0 0 16px 16px;
z-index: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.member {
position: relative;
z-index: 1;
padding: 6px 15px 15px 15px;
font-size: 1rem;
}
.m-topicon {
z-index: 999;
height: 28px;
position: absolute;
top: -30px;
left: 15px;
}
.m-topicon .van-icon {
color: #fafafa;
font-size: 28px;
line-height: 28px;
height: 28px;
}
.m-box {
background: #fff;
border-radius: 8px;
padding: 15px;
margin-bottom: 15px;
box-shadow: 0 1px 4px #e0e0e0;
}
.m-box:last-child {
margin: 0;
}
.m-user {
position: relative;
}
.m-user .myid {
font-size: 0.8rem;
position: absolute;
right: -5px;
top: -5px;
color: #c0c0c0;
}
.m-user image {
width: 50px;
height: 50px;
border-radius: 100%;
border: none;
}
.m-user .info {
padding: 3px 0 0 12px;
overflow: hidden;
}
.m-user .name {
font-weight: 700;
margin-bottom: 2px;
padding-right: 2.2rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.m-assets {
text-align: center;
padding: 15px 0 0 0;
font-size: 0.8rem;
}
.m-assets .flex-item {
position: relative;
}
.m-assets .flex-item:not(:last-child):after {
content: " ";
position: absolute;
pointer-events: none;
box-sizing: border-box;
transform-origin: center;
top: -30%;
left: -50%;
right: -50%;
bottom: -30%;
transform: scale(.5);
border: 0 solid #e5e5e5;
border-right-width: 1px;
}
.m-assets .number {
font-size: 1rem;
color: #333;
padding-bottom: 2px;
}
.m-notice {
color: #666;
padding: 10px 0 0 0;
margin-top: 15px;
}
.m-notice .van-icon {
font-size: 1.2rem;
color: #9b9b9b;
vertical-align: middle;
margin-top: -3px;
}
.m-notice .flex-item {
padding: 0 5px;
height: 20px;
color: #666;
}
.m-notice swiper,.m-notice swiper view {
height: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.m-block {
text-align: center;
padding: 12px 0 12px 0;
}
.m-block .row-flex {
padding: 8px 0;
}
.m-block .flex-item {
line-height: 20px;
}
.m-block .flex-item .icon {
display: inline-block;
position: relative;
}
.m-block .flex-item .number {
position: absolute;
top: -5px;
right: -5px;
border-radius: 12px;
font-size: 12px;
line-height: 12px;
background: #fff;
border: 1px #FEA832 solid;
color: #FEA832;
padding: 1px 3px;
min-width: 8px;
text-align: center;
}
.m-block .flex-item .count0 {
display: none;
}
.m-block .flex-item text {
display: block;
padding-top: 3px;
}
.m-block .flex-item .van-icon {
font-size: 1.8rem;
color: #a9a9a9;
}
.m-title {
padding: 3px 0 12px 0;
margin: 0 15px 8px 15px;
line-height: 1.2rem;
}
.m-title .row-flex {
padding: 0;
}
.m-title .van-icon {
margin-top: -2px;
}
.m-title text {
font-weight: 700;
font-size: 1rem;
}
.m-title .flex-item {
padding: 0 3px;
font-size: .9rem;
color: #a9a9a9;
text-align: right;
}
.m-icon .wx-swiper-dots.wx-swiper-dots-horizontal {
bottom: -10px;
}
.m-icon .wx-swiper-dot {
width: 16px;
display: inline-flex;
height: 2px;
opacity: .8;
justify-content: space-between;
}
.m-icon .wx-swiper-dot::before {
content: '';
flex-grow: 1;
background: #ccc;
}
.m-icon .wx-swiper-dot-active::before {
background: #f80;
}
.m-strip .row-flex {
line-height: 20px;
padding: 10px 0;
}
.m-strip .row-flex:first-child {
padding-top: 3px;
}
.m-strip .row-flex:last-child {
padding-bottom: 3px;
}
.m-strip .van-icon {
font-size: 1.3rem;
color: #9b9b9b;
vertical-align: middle;
margin-top: -3px;
}
.m-strip .flex-item {
padding: 0 3px;
font-size: .9rem;
color: #999;
text-align: right;
}
.m-strip text {
padding-left: 8px;
}
.datadiff_top {
position: fixed;
width: 100%;
top: 42px;
border-bottom: 1px solid #e5e5e5;
box-shadow: 0 1px 2px #e6e6e6;
background: #fff;
}
.datadiff .datadiff_top tr td {
text-align: left;
padding: 10px;
color: #999;
}
.datadiff_bottom {
border-top: 2px solid rgb(222,229,237);
position: fixed;
width: 100%;
bottom: 0;
background: #f2f5f8;
}
.datadiff_bottom tr td {
background-color: #f2f5f8;
}
.datadiff_center {
width: 100%;
margin-bottom: 44px;
}
.datadiff_center td {
border-bottom: rgb(222,229,237) solid 1px;
}
.datadiff .datadiff_bottom tr td {
text-align: center;
padding: 10px;
}
.datadiff tr td {
text-align: center;
padding: 15px;
word-wrap: break-word;
word-break: break-all;
}
.datadiff tr td.tcer {
background: #fbfdff;
border-left: rgb(222,229,237) solid 1px;
border-right: rgb(222,229,237) solid 1px;
}
.datadiff .action {
top: 42px;
padding: 10px 0;
position: fixed;
right: 5px;
width: 100%;
text-align: center;
}
.datadiff .action {
top: 42px;
padding: 10px 0;
position: fixed;
right: 5px;
width: 100%;
text-align: center;
}
.datadiff img {
border: #e5e5e5 1px solid;
border-radius: 2px;
box-shadow: 0 2px 3px rgba(0,0,0,.1);
}
.datadiff_txt {
display: block;
text-align: center;
}
.datadiff_img img {
margin: 3px;
}
.datadiff_action {
bottom: 40px;
padding: 10px 0;
position: fixed;
right: 0;
width: 100%;
text-align: center;
}

179
pages/member/myorder.js Normal file
View File

@ -0,0 +1,179 @@
function t(t, i, e) {
return i in t ? Object.defineProperty(t, i, {
value: e,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[i] = e, t;
}
var i = function(t) {
return t && t.__esModule ? t : {
default: t
};
}(require("../../vant/dialog/dialog")), e = require("../../common/common.js");
Page({
data: {
bh: "",
spin: !0,
popupSpin: !1,
popup: [],
flowShow: !1,
timestamp: 0,
gotop: !1,
row: [],
height: {
ListAction: 0
},
historyDispute: {},
previewList: [],
Form: {
form: {
radio: {},
checkbox: {},
picker: {}
}
},
popupForm: {
form: {
radio: {},
checkbox: {},
picker: {}
}
}
},
onLoad: function(t) {
t.bh && this.setData({
bh: t.bh
}), e.init(this), this.initialize(!1);
},
onShow: function() {
e.init(this), this.data.Form.form.formLoad && this.initialize();
},
initialize: function() {
var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0], i = this;
i.setData({
spin: !0
}), e.initialFun(t), e.HttpMember("get/myorder/" + i.data.bh, function(t) {
if (wx.setNavigationBarTitle({
title: "订单详情"
}), wx.setNavigationBarColor({
frontColor: "#ffffff",
backgroundColor: "#FE952B",
animation: {
duration: 0,
timingFunc: "easeIn"
}
}), 0 === t.state) return e.Lay(i, {
info: t.info
});
i.setData({
row: t,
spin: !1,
timestamp: e.timestamp()
}), wx.stopPullDownRefresh();
});
},
flowChange: function() {
this.setData({
flowShow: !this.data.flowShow
});
},
onPageScroll: function(t) {
var i = this, e = t.scrollTop, a = i.data.gotop, o = 2 * i.data.SystemInfo.windowHeight;
if (i.data.height.main >= o) {
var n = Math.ceil((i.data.height.main - i.data.SystemInfo.windowHeight) / 2);
(e <= n && !0 === a || e > n && !0 !== a) && i.setData({
gotop: !0 !== a || i.data.height.bottom
});
}
},
htmlHeight: function() {
var t = this;
wx.createSelectorQuery().selectAll("#main,#ListAction").boundingClientRect(function(i) {
var e = {
bottom: 10
};
for (var a in i) {
var o = i[a];
e[o.id] = Math.ceil(o.height), e.bottom += e[o.id];
}
t.setData({
height: e,
gotop: e.bottom >= 2 * t.data.SystemInfo.windowHeight && e.bottom
});
}).exec();
},
Lay: function(t) {
e.Lay(JSON.parse(JSON.stringify(t)));
},
Commom: function(t) {
var i = JSON.parse(JSON.stringify((t.currentTarget, t))), a = t.currentTarget ? i.currentTarget.dataset.action : i.action;
e[a](i);
},
Popup: function(t) {
e.Popup(t.currentTarget.dataset);
},
confirmHandle: function(t) {
var a = t.currentTarget.dataset;
i.default.alert({
title: "提示",
message: decodeURIComponent(a.info),
overlay: !0,
showCancelButton: !0,
cancelButtonText: "返回",
closable: !1
}).then(function() {
e.HttpMember({
url: "deal/" + a.method,
data: a.data
});
}).catch(function() {});
},
orderHandlePopup: function(t) {
var i = t.currentTarget.dataset;
e.Lay({
action: "pop",
method: "deal/" + i.method,
data: JSON.stringify({
number: this.data.bh,
role: this.data.row.myRole,
action: i.action,
utime: this.data.row.order.utime
})
});
},
orderHide: function() {
this.setData({
Form: {
form: {
radio: {},
checkbox: {},
picker: {}
}
}
}), this.WxValidate = {};
},
disputeChange: function() {
var i = this, a = i.data.historyDispute;
if (i.setData({
popupSpin: !0
}), a.html) {
var o;
i.setData((o = {}, t(o, "historyDispute.show", !a.show), t(o, "popupSpin", !1),
o));
} else e.HttpMember("get/myorder/" + i.data.bh + "/dispute", function(e) {
var a;
i.setData((a = {}, t(a, "initialValue.historyDispute.html", e.html), t(a, "historyDispute", e),
t(a, "popupSpin", !1), a));
});
wx.setNavigationBarTitle({
title: a.show ? "退款历史记录" : "订单详情"
});
},
onPullDownRefresh: function() {
this.initialize();
},
onShareAppMessage: function() {}
});

25
pages/member/myorder.json Normal file
View File

@ -0,0 +1,25 @@
{
"enablePullDownRefresh": false,
"usingComponents": {
"down": "/utils/count-down/index",
"van-steps": "/vant/steps/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-stepper": "/vant/stepper/index",
"van-picker": "/vant/picker/index",
"van-rate": "/vant/rate/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"
}
}

111
pages/member/myorder.wxml Normal file
View File

@ -0,0 +1,111 @@
<import src="/template/template.wxml"></import>
<template is="ly" data="{{popup:popup,popuphtml:popuphtml,spin:spin||popupSpin||false,gotop:gotop,bottom:height.ListAction}}"></template>
<view id="main" wx:if="{{!spin}}">
<view class="ostate" wx:if="{{row.order}}">
<view class="top row-flex">
<view class="icon">
<van-icon name="shalou"></van-icon>
</view>
<view class="state">{{row.order.state}}</view>
<view bindtap="Lay" class="flex-item tright" data-action="copy" data-info="订单号:{{bh}}" data-title="订单号复制成功">订单号:{{bh}}</view>
<view bindtap="flowChange" class="more">
<van-icon name="wap-nav"></van-icon>
</view>
</view>
<view class="ohtml">
<view class="tmain">
<view class="{{hang.class||'p'}}" style="{{hang.style||''}}" wx:for="{{row.prompt.index}}" wx:for-item="hang" wx:key="index">
<block wx:if="{{hang.class!='dispute'}}">
<template is="view" data="{{view:row}}" wx:for="{{hang.list}}" wx:for-item="row" wx:key="index"></template>
</block>
<template is="forview" data="{{list:row.prompt.dispute}}" wx:else></template>
</view>
</view>
</view>
</view>
<view class="ohis van-hairline--top-bottom" wx:if="{{row.prompt.his}}">
<block wx:for="{{row.prompt.his}}" wx:key="index">
<view bindtap="{{data.bind||''}}" class="{{data.class||''}}" data-action="{{data.action||''}}" data-data="{{data.data||''}}" data-info="{{data.info||''}}" data-method="{{data.method||''}}" wx:for="{{item.list}}" wx:for-item="data" wx:key="text">{{data.text}}</view>
</block>
</view>
<view class="oinfo">
<view class="row-flex van-hairline--bottom" wx:if="{{item}}" wx:for="{{row.oinfo}}" wx:key="index">
<view class="tright">{{index}}</view>
<view class="flex-item" wx:if="{{index!='交易内容'}}">
<template is="forview" data="{{list:item}}"></template>
</view>
<view class="flex-item txt" wx:else>
<view class="{{!item[0].main||item[1]?'box '+txt.class:''}}" wx:for="{{item}}" wx:for-index="xh" wx:for-item="txt" wx:key="index">
<view class="top" wx:if="{{!item[0].main||item[1]}}">
<text class="left">{{txt.title}}</text>
<text class="right">{{txt.time}}</text>
</view>
<view class="bottom">
<text class="text">{{txt.text}}</text>
<block wx:if="{{txt.filelist}}">
<block wx:if="{{txt.filelist.image}}">
<view class="filetit">图片附件</view>
<view class="bfile">
<view wx:for="{{txt.filelist.image}}" wx:for-item="url" wx:key="url">
<image hidden bindload="Lay" data-action="intoPreview" data-field="Txt{{xh}}" data-src="{{url}}" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg=="></image>
<view>
<view>
<image bindtap="Lay" data-action="allPreview" data-field="Txt{{xh}}" data-src="{{url}}" mode="widthFix" src="{{url}}" webp="{{true}}"></image>
</view>
</view>
</view>
</view>
</block>
<block wx:if="{{txt.filelist.other}}">
<view class="filetit">非图片附件仅能在PC端查看内容</view>
<view class="other">
<view wx:for="{{txt.filelist.other}}" wx:for-index="i" wx:for-item="data" wx:key="index">
{{data}}
</view>
</view>
</block>
</block>
</view>
</view>
</view>
</view>
</view>
<view style="height:{{height.ListAction+10}}px;overflow:hidden;">
<image bindload="htmlHeight" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==" style="width:0;height:0;"></image>
</view>
<view class="ListAction fixed" id="ListAction">
<view>
<view bindtap="onPullDownRefresh" class="shuaxin">
<van-icon name="shuaxin1"></van-icon>
</view>
<van-button bindtap="{{btn.bind||''}}" customClass="{{btn.class}}" data-action="{{btn.action}}" data-data="{{btn.data||''}}" data-info="{{btn.info}}" data-method="{{btn.method||''}}" icon="{{btn.icon}}" iconstyle="{{btn.iconstyle}}" plain="true" size="small" type="{{btn.type||'default'}}" wx:for="{{row.button}}" wx:for-item="btn" wx:key="value">{{btn.value}}</van-button>
</view>
</view>
<van-popup heightFull bind:close="flowChange" customStyle="width:88%;" overlay="{{true}}" position="right" show="{{flowShow}}" title="交易记录" titleStyle="text-align: center" zIndex="10000">
<view class="lyTop">
<view class="good">
<image mode="widthFix" src="{{row.order.goodpic}}!/fh/74/canvas/74x74a0a0" wx:if="{{row.order.goodpic&&flowShow}}"></image>
<block wx:else>{{row.order.typename}}</block>
</view>
<view class="info">
<view action="url" bind="Lay" class="tit" info="{{row.order.goodurl}}">{{row.order.tit}}</view>
<view>金额:<text class="money">{{row.order.money}}</text>元</view>
<view>订单号:{{bh}}</view>
</view>
</view>
<view class="oflow">
<view class="row {{index==row.flow.curr?'cur':''}}" wx:for="{{row.flow.list}}" wx:key="text">
<view class="info">
<view class="text">{{item.text}}</view>
<rich-text class="desc" nodes="{{item.desc}}" wx:if="{{item.desc}}"></rich-text>
</view>
</view>
</view>
</van-popup>
<van-popup heightFull widthFull bind:close="disputeChange" closeOnClickOverlay="{{false}}" overlay="{{true}}" position="right" show="{{historyDispute.show}}" title="订单号:{{bh}}" titleStyle="text-align: center" zIndex="10000">
<view class="history dispute" wx:if="{{historyDispute.html}}">
<template is="forview" data="{{list:historyDispute.html}}"></template>
</view>
</van-popup>
<template is="popupform" data="{{Form:popupForm}}"></template>
</view>

652
pages/member/myorder.wxss Normal file
View File

@ -0,0 +1,652 @@
@import "../../__wuBaseWxss__/0.wxss";
@import "../../vant/area/index.wxss";
.oinfo {
overflow: hidden;
width: 100%;
background: #fff;
}
.oinfo .row-flex {
margin: 0 10px;
}
.oinfo .tright {
padding: 12px 10px 12px 0;
line-height: 20px;
color: #000;
border-right: 1px #f1f1f1 solid;
width: 65px;
}
.oinfo .flex-item {
padding: 12px 0 12px 10px;
line-height: 20px;
position: relative;
}
.oinfo navigator,.oinfo text,.oinfo view {
word-break: break-all;
}
.oinfo .flex-item .contact {
position: absolute;
right: 0;
top: 50%;
height: 40px;
margin-top: -20px;
}
.oinfo .flex-item .contact view {
padding: 10px 3px;
}
.oinfo .flex-item .but {
margin: 5px 5px 0 0;
height: 20px;
line-height: 20px;
padding: 0 5px;
border: 1px solid #6a4;
background: #eff;
color: #6a4;
display: inline-block;
border-radius: 2px;
}
.oinfo .flex-item .but.buy_install {
margin-right: 100px;
border-color: #c9c9c9;
background: #fff;
color: #666;
}
.oinfo .txt .top {
overflow: hidden;
background: #f9f9f9;
color: #666;
padding: 5px 10px;
border-bottom: #eee solid 1px;
line-height: 20px;
}
.oinfo .txt .top .left {
color: #000;
}
.oinfo .no .bottom,.oinfo .ok .bottom {
padding: 8px 10px;
}
.oinfo .txt .top:before {
content: '有效';
color: #090;
margin-left: 10px;
float: right;
}
.oinfo .txt .no .top:before {
content: '无效';
color: red;
}
.oinfo .txt .box {
border: #eee solid 1px;
margin-top: 10px;
border-radius: 3px;
}
.oinfo .txt .box:first-child {
margin: 0;
}
.oinfo .txt .text {
line-height: 18px;
}
.oinfo .txt .filetit {
border: 1px solid #f1f1f1;
background: #f9f9f9;
padding: 5px 10px;
line-height: 20px;
margin-top: 8px;
}
.oinfo .txt .other {
border: 1px solid #eee;
border-top: 0;
}
.oinfo .txt .other view {
line-height: 18px;
margin: 0 5px;
padding: 2px 0;
border-bottom: 1px solid #f1f1f1;
}
.ostate {
overflow: hidden;
background: #fff;
border-bottom: 1px solid #f6f6f6;
}
.ostate .top {
position: relative;
font-size: 14px;
padding: 0 5px;
line-height: 32px;
height: 32px;
border-bottom: 2px solid #fe952b;
border-left: 0;
border-right: 0;
}
.ostate .top .icon {
width: 34px;
}
.ostate .top .icon .van-icon {
color: #fe952b;
margin-bottom: -1.5px;
font-size: 34px;
line-height: 34px;
}
.ostate .top .more {
width: 22px;
padding-left: 5px;
}
.ostate .top .more .van-icon {
font-size: 22px;
line-height: 31px;
}
.ostate .top .state {
color: #fe952b;
padding-left: 5px;
width: 110px;
font-size: 14px;
}
.ostate .top .tright {
color: #666;
}
.ohtml {
position: relative;
overflow: hidden;
background: #fff7eb;
text-align: left;
color: #666;
}
.ohtml .tmain {
padding: 5px 15px;
font-size: 12px;
}
.ohtml .p {
border-top: 1px dotted #ccc;
padding: 10px 0;
}
.ohtml .p:first-child {
border-top: 0;
}
.ohtml .p:after {
content: "";
}
.ohtml .p:last-child:after {
content: "。";
}
.ohtml .p>view {
display: inline;
}
.ohtml .u {
text-decoration: underline;
}
.ostate_tips div.ostate_ico {
margin-top: 5px;
height: 35px;
float: left;
width: 2.5rem;
background: url(//static.huzhan.com/img/claims_ico.png) no-repeat;
}
.ostate_suc div.ostate_ico {
background-position: .8rem -80px;
}
.ostate_suc .p {
color: #51863c;
}
.ostate_ing div.ostate_ico {
background-position: .8rem -1px;
}
.ostate_ing .p {
color: #f60;
}
.ostate_no div.ostate_ico {
background-position: .8rem -40px;
}
.ostate_no .p {
color: #97731f;
}
.appeal {
position: relative;
margin: 8px 0 -2px 0;
border: #a6c5ef solid 1px;
background: #edf7ff;
padding: 8px 10px;
border-radius: 4px;
box-shadow: 0 1px 3px #e6ecf3;
}
.dispute {
position: relative;
margin: 0 0 -2px 0;
overflow: hidden;
border: 1px solid #e5e5e5;
background: #fff;
border-radius: 5px;
padding: 10px;
}
.dispute.history {
margin: 0;
border-radius: 0;
border: 0;
}
.dispute .dl {
margin-bottom: 10px;
padding: 5px 0 5px 42px;
overflow: hidden;
position: relative;
}
.dispute .dl.mine {
padding: 5px 42px 5px 0;
text-align: right;
}
.dispute .avatar {
position: absolute;
left: 0;
width: 32px;
height: 32px;
border-radius: 50%;
top: 5px;
overflow: hidden;
}
.dispute .avatar image {
width: 100%;
border-radius: 50%;
}
.dispute .mine .avatar {
left: auto;
right: 0;
}
.dispute .head {
overflow: hidden;
}
.dispute .head view {
display: inline-block;
line-height: 22px;
font-size: 12px;
white-space: nowrap;
color: #999;
padding-right: 10px;
font-style: normal;
}
.dispute .body {
margin: 3px 0 0 0;
position: relative;
padding: 10px;
background: #f0f0f0;
border-radius: 3px;
color: #333;
word-break: break-all;
margin-right: 35px;
}
.dispute .body:after {
content: '';
position: absolute;
left: -6px;
top: 15px;
width: 0;
height: 0;
border-style: solid dashed dashed;
border-color: #f0f0f0 transparent transparent;
overflow: hidden;
border-width: 6px;
}
.dispute .mine .head view {
float: right;
padding-left: 10px;
padding-right: 0;
}
.dispute .mine .body {
line-height: 1.5;
margin: 0 0 0 35px;
}
.dispute .mine .body:after {
left: auto;
right: -6px;
}
.dispute .fortips {
padding: 10px 0;
text-align: center;
}
.dispute .fortips .body {
float: none;
background: #fafafa;
border: #ddd solid 1px;
padding: 8px 10px;
margin: 0;
border-radius: 5px;
display: inline-block;
box-shadow: 1px 1px 8px rgba(0,0,0,.2);
}
.dispute .fortips .body:after {
display: none;
}
.dispute .moneyInfo view {
padding: 4px 3px 5px 8px;
border: 1px solid #e0e0e0;
border-bottom: 1px solid #c5c5c5;
box-shadow: 0 1px 1px #dbdbdb;
background: #fafafa;
border-radius: 3px;
margin-bottom: 5px;
color: #555;
display: inline-block;
}
.dispute .notMoney .moneyInfo view,.dispute .notUpquote .txt {
text-decoration: line-through;
}
.ohis {
text-align: right;
background: #f6f7f6;
}
.ohis view {
display: inline-block;
font-size: 12px;
color: #999;
margin: 8px 8px 8px 0;
padding: 2px 6px;
background: #f5faff;
border: #d4e7f6 solid 1px;
}
.oflow {
background: #fff;
overflow: hidden;
padding: 10px 0 10px 19px;
}
.oflow .row {
position: relative;
padding: 0 0 0 19px;
border-left: 1px solid #cecece;
color: #999;
}
.oflow .row:before {
content: "";
position: absolute;
left: -6px;
top: 50%;
margin-top: -5px;
border-radius: 100%;
width: 10px;
height: 10px;
background: #cecece;
}
.oflow .info {
border-bottom: 1px solid #f1f1f1;
padding: 15px 0;
font-size: 14px;
}
.oflow .info .text {
line-height: 25px;
}
.oflow .info .desc {
font-size: 12px;
color: #999;
}
.oflow .row:last-child .info {
border: 0;
}
.oflow .row.cur .text {
color: #333;
}
.oflow .row.cur:before {
background: #f55b5b;
border: 2px solid #fbc1c1;
left: -8px;
margin-top: -7px;
width: 12px;
height: 12px;
}
.ListAction {
bottom: 0;
top: auto;
text-align: right;
overflow: hidden;
padding-top: 0;
border-top: 1px #eee solid;
background: #fff;
width: 100%;
}
.ListAction>view {
padding-left: 42px;
position: relative;
}
.ListAction .shuaxin {
position: absolute;
left: 10px;
top: 50%;
margin-top: -7px;
width: 22px;
height: 22px;
line-height: 22px;
}
.ListAction .shuaxin .van-icon {
font-size: 22px;
color: #ccc;
}
.ListAction .van-button {
margin: 10px 10px 0 0;
}
.myInfo {
overflow: hidden;
margin: 10px 0 0 0;
border: #ffe0cc solid 2px;
background: #fff8f4;
}
.myInfo .row-flex {
padding: 5px;
border-top: #ffe0cc solid 1px;
line-height: 18px;
}
.myInfo .label {
font-weight: 700;
width: 40px;
}
.myInfo .update {
text-align: right;
width: 50px;
}
.myInfo .tit {
background: #ffe0cc;
font-weight: 700;
font-size: 14px;
}
.hisInfo {
background: #fafafa;
margin: 0 10px 10px 10px;
padding: 1px 10px;
border-radius: 2px;
line-height: 20px;
border: 1px solid #e5e5e5;
}
.hisInfo .label {
color: #222;
font-weight: 700;
display: inline;
}
.hisInfo .label:after {
content: '';
}
.hisInfo .row {
padding: 5px 0;
border-bottom: 1px solid #f2f2f2;
}
.hisInfo .row:last-child {
border: 0;
}
.hisInfo:first-child {
margin-top: 10px;
}
.appendSee {
margin: 10px;
background: #fff;
}
.appendSee .row-flex {
border: #a6c5ef solid 3px;
border-top: 0;
line-height: 20px;
}
.appendSee .head {
background: #a6c5ef;
padding: 5px 0 2px 0;
color: #fff;
text-align: center;
}
.appendSee .head .flex-item {
padding: 0;
}
.appendSee .state .flex-item>view>view {
display: inline;
}
.appendSee .f3div {
position: relative;
height: 100%;
}
.appendSee .f3wx {
text-align: center;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
.appendSee .f3wx view {
position: absolute;
width: 100%;
top: 0;
left: 0;
height: 100%;
background: #fff;
opacity: .9;
}
.appendSee .f3wx view view {
line-height: 35px;
font-weight: 700;
height: 35px;
left: 0;
top: 70px;
color: red;
background: 0 0;
-khtml-opacity: 1;
opacity: 1;
font-family: serif;
}
.appendSee .row-flex.state {
background: #edf7ff;
color: #222;
border-top: #a6c5ef solid 3px;
}
.appendSee .flex-item {
border-left: #a6c5ef solid 1px;
padding: 10px;
}
.appendSee .label {
font-size: 14px;
text-align: right;
width: 40px;
padding: 10px 10px 10px 0;
font-weight: 700;
}
.appendSee .info {
padding-top: 5px;
margin-top: 5px;
overflow: hidden;
position: relative;
word-break: break-all;
border-top: #a6c5ef dashed 1px;
}

53
project.config.json Normal file
View File

@ -0,0 +1,53 @@
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": false,
"es6": true,
"postcss": true,
"minified": true,
"newFeature": true,
"coverView": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"compileType": "miniprogram",
"libVersion": "2.11.1",
"appid": "wxe2b2f69be5c4c0b5",
"projectname": "%E4%BA%92%E7%AB%99",
"debugOptions": {
"hidedInDevtools": []
},
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}
}

9
sitemap.json Normal file
View File

@ -0,0 +1,9 @@
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [
{
"action": "allow",
"page": "*"
}
]
}

7
sitemap96.json Normal file
View File

@ -0,0 +1,7 @@
{
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
"rules": [{
"action": "allow",
"page": "*"
}]
}

BIN
static/images/cart.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
static/images/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/images/my.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/images/my_hover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

7
template/member.wxml Normal file
View File

@ -0,0 +1,7 @@
<template name="HttpLoading">
<view class="loadingFull">
<view class="content">
<van-loading size="40px" type="spinner"></van-loading>
</view>
</view>
</template>

0
template/member.wxss Normal file
View File

492
template/template.wxml Normal file
View File

@ -0,0 +1,492 @@
<template name="ly">
<template is="{{items.tempname}}" data="{{...items,popuphtml:popuphtml[index],index:index}}" wx:if="{{items.tempname}}" wx:for="{{popup}}" wx:for-item="items" wx:key="index"></template>
<van-dialog id="van-dialog"></van-dialog>
<view class="loadingFull" wx:if="{{spin}}">
<view class="content">
<van-loading size="40px"></van-loading>
</view>
</view>
<view class="gotop {{gotop&&gotop!==true?'gobottom':''}}" hidden="{{!gotop}}" style="{{bottom?'bottom:'+bottom+25+'px':''}}" title="{{gotop}}">
<van-icon catchtap="Lay" data-action="go" data-info="{{gotop&&gotop!==true?gotop:'top'}}" name="fanhuidingbu" size="28px"></van-icon>
</view>
</template>
<template name="list_bottom">
<view class="PageCount" style="{{bottom?'bottom:'+bottom+30+'px':''}}" wx:if="{{Total>0&&!failview}}">
<view class="box">
<view>{{CurPage}}/{{TotalPage}}页 {{Total}}{{unit||'个'}}</view>
</view>
</view>
<view style="width:0px;height:0px;overflow:hidden;" wx:if="{{lazy&&Total>0}}">
<image bindload="Lay" data-action="lazyHeight" data-element=".lazyView" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==" style="width:0;height:0;"></image>
</view>
<template is="forview" data="{{list:failview}}" wx:if="{{failview}}"></template>
<view class="loading center" id="loading" wx:else>
<view hidden="{{!loading}}">
<van-loading size="20px" type="spinner"></van-loading>
</view>
<block wx:if="{{!loading&&CurPage}}">
<view wx:if="{{Total<=0}}">
没有相关信息
</view>
<view wx:elif="{{CurPage>=TotalPage}}">
没有更多了
</view>
</block>
</view>
</template>
<template name="notes">
<view class="notes" style="{{note.style||style||''}}">
<block wx:if="{{title!='style'}}" wx:for="{{note}}" wx:for-index="title" wx:for-item="list" wx:key="title">
<view class="title" wx:if="{{title!='not'}}">
<view class="icons"></view>
<text>{{title}}</text>
</view>
<view class="item {{row.class||''}}" style="{{row.style||''}}" wx:for="{{list}}" wx:for-item="row" wx:key="index">
<text class="number"></text>
<view bindtap="{{data.bind||''}}" class="{{data.class||''}}" data-action="{{data.action||''}}" data-data="{{data.data||''}}" data-info="{{data.info||''}}" data-method="{{data.method||''}}" style="{{data.style||''}}" wx:for="{{row.list}}" wx:for-index="i" wx:for-item="data" wx:key="i">
<block wx:if="{{!data.endTime}}">{{data.text}}</block>
<down expireTime="{{data.endTime}}" wx:else></down>
</view>
</view>
</block>
</view>
</template>
<template name="notice">
<view class="notice {{notice.class||''}}" style="{{notice.style||''}}">
<template is="forview" data="{{list:notice.text}}"></template>
</view>
</template>
<template name="PopupTem">
<van-popup bind:click-overlay="Popup" bind:close="Popup" closable="{{closable}}" closeOnClickOverlay="{{true}}" customStyle="{{customstyle}}" data-action="close" data-index="{{index}}" duration="{{duration}}" overlay="{{overlay}}" overlayStyle="{{overlaystyle}}" position="{{position}}" safeAreaInsetBottom="{{safeareainsetbottom}}" safeAreaInsetTop="{{safeareainsettop}}" scroll="{{scroll}}" show="{{show}}" zIndex="{{zindex}}">
<view class="wxParse">
<block wx:if="{{info=='wxParse'}}">
<import src="../wxParse/wxParse.wxml"></import>
<template is="wxParse" data="{{wxParseData:popuphtml.nodes}}"></template>
</block>
<block wx:else>
{{info}}
</block>
</view>
</van-popup>
</template>
<template name="install">
<van-popup bind:click-overlay="Popup" bind:close="Popup" closable="{{closable}}" closeOnClickOverlay="{{true}}" customStyle="{{customstyle}}" data-action="close" data-index="{{index}}" duration="{{duration}}" overlay="{{overlay}}" overlayStyle="{{overlaystyle}}" position="{{position}}" safeAreaInsetBottom="{{safeareainsetbottom}}" safeAreaInsetTop="{{safeareainsettop}}" scroll="{{scroll}}" show="{{show}}" zIndex="{{zindex}}">
<view class="ly_install">
<block wx:if="{{index!='note'}}" wx:for="{{info}}" wx:key="index">
<view class="name">{{index}}</view>
<view class="tr" wx:for="{{item}}" wx:for-item="items" wx:key="name">
<view class="td">{{items.name}}</view>
<view class="td {{items.class}}">{{items.text}} <view class="add {{items.addclass}}" wx:if="{{items.addtext}}">{{items.addtext}}</view>
</view>
</view>
</block>
</view>
<template is="notes" data="{{note:info.note,style:'border-top:1px solid #eee;'}}" wx:if="{{info.note}}"></template>
</van-popup>
</template>
<template name="input">
<input hidden maxlength="-1" name="{{input.name||''}}" value="{{form&&input.field?tools.showField(input.field,form):input.value?input.value:''}}" wx:if="{{!input.type&&!input.label}}"></input>
<van-checkbox-group bind:change="{{input.bind||'Lay'}}" data-action="{{input.action||'checkbox'}}" data-endbind="{{input.endbind||false}}" data-name="{{input.name}}" name="{{input.name}}" value="{{form.checkbox[input.name]||input.value}}" wx:elif="{{input.type=='toggle'}}">
<van-cell customClass="{{input.cellClass||''}}" data-index="{{input.name}}" label="{{input.desc||''}}" labelClass="{{input.descClass||''}}" title="{{input.label}}" titleWidth="{{input.titleWidth}}">
<van-checkbox checkedClass="{{input.checkedClass||''}}" class="toggleCheckbox" disabled="{{input.disabled===true||input.disabled[index]===true}}" name="1" noColor="{{input.noColor||'#666'}}" single="{{true}}"></van-checkbox>
</van-cell>
</van-checkbox-group>
<van-checkbox-group bind:change="{{input.bind||'Lay'}}" data-action="{{input.action||'checkbox'}}" data-endbind="{{input.endbind||false}}" data-name="{{input.name}}" name="{{input.name}}" value="{{form.checkbox[input.name]||input.value}}" wx:elif="{{input.type=='checkbox'}}">
<van-cell customClass="{{input.cellClass||''}}" hidden="{{input.isShow?tools.isShow(input.isShow,form):false}}" label="{{input.desc||''}}" labelClass="{{input.descClass||''}}" title="{{input.label||''}}" titleWidth="{{input.titleWidth||''}}" wx:if="{{input.cell!==false}}">
<van-checkbox checkedClass="{{input.checkedClass||''}}" disabled="{{input.disabled===true||input.disabled[index]===true}}" name="{{index}}" noColor="{{input.noColor||'#666'}}" shape="{{input.shape||'round'}}" wx:for="{{input.vlist}}" wx:for-item="value" wx:key="index">
{{value}}
</van-checkbox>
</van-cell>
<block wx:else>
<van-checkbox checkedClass="{{input.checkedClass||''}}" disabled="{{input.disabled===true||input.disabled[index]===true}}" name="{{index}}" noColor="{{input.noColor||'#666'}}" shape="{{input.shape||'round'}}" wx:for="{{input.vlist}}" wx:for-item="value" wx:key="index">
{{value}}
</van-checkbox>
</block>
</van-checkbox-group>
<van-radio-group bind:change="{{input.bind||'Lay'}}" checkedClass="{{input.checkedClass||'checked'}}" data-action="{{input.action||'radio'}}" data-endbind="{{input.endbind||false}}" data-method="{{input.method||''}}" data-name="{{input.name}}" name="{{input.name}}" value="{{form.radio[input.name]||input.value}}" wx:elif="{{input.type=='radio'}}">
<van-cell customClass="{{input.cellClass||''}}" hidden="{{input.isShow?tools.isShow(input.isShow,form):false}}" label="{{input.desc||''}}" labelClass="{{input.descClass||''}}" title="{{input.label||''}}" titleWidth="{{input.titleWidth||''}}" wx:if="{{input.cell!==false}}">
<van-radio checkedStyle="{{input.checkedStyle||'passed'}}" customClass="{{input.class||''}}" disabled="{{input.disabled===true||input.disabled[index]===true}}" iconSize="{{input.iconSize||'18px'}}" name="{{index===0?'0':index===1?'1':index}}" wx:for="{{input.vlist}}" wx:for-item="value" wx:key="index">
{{value}}
</van-radio>
</van-cell>
<block wx:else>
<van-radio checkedStyle="{{input.checkedStyle||'passed'}}" customClass="{{input.class||''}}" iconSize="{{input.iconSize||'18px'}}" name="{{index}}" wx:for="{{input.vlist}}" wx:for-item="value" wx:key="index">
{{value}}
</van-radio>
</block>
</van-radio-group>
<block wx:elif="{{input.type=='stepper'}}">
<van-cell hidden="{{input.isShow?tools.isShow(input.isShow,form):false}}" label="{{input.desc||''}}" labelClass="{{input.descClass||''}}" title="{{input.label}}" titleWidth="{{input.titleWidth||''}}" wx:if="{{input.cell!==false}}">
<van-stepper asyncChange="{{input.asyncAhange===true}}" bind:change="{{input.bind||''}}" data-action="{{input.action||'radio'}}" data-endbind="{{input.endbind||false}}" data-method="{{input.method||''}}" data-name="{{input.name||''}}" disableInput="{{input.disableInput===true}}" disabled="{{input.disabled===true}}" inputWidth="{{input.inputWidth||'30px'}}" integer="{{input.disabled!==false}}" max="{{input.max||60}}" min="{{input.min||3}}" name="{{input.name||''}}" showMinus="{{input.showMinus!==false}}" showPlus="{{input.showPlus!==false}}" step="{{input.step||1}}" unit="{{input.unit||''}}" value="{{input.value||''}}"></van-stepper>
</van-cell>
<van-stepper asyncChange="{{input.asyncAhange===true}}" bind:change="{{input.bind||''}}" data-action="{{input.action||'radio'}}" data-endbind="{{input.endbind||false}}" data-method="{{input.method||''}}" data-name="{{input.name||''}}" disableInput="{{input.disableInput===true}}" disabled="{{input.disabled===true}}" inputWidth="{{input.inputWidth||'30px'}}" integer="{{input.disabled!==false}}" max="{{input.max||60}}" min="{{input.min||3}}" name="{{input.name||''}}" showMinus="{{input.showMinus!==false}}" showPlus="{{input.showPlus!==false}}" step="{{input.step||1}}" unit="{{input.unit||''}}" value="{{input.value||''}}" wx:else></van-stepper>
</block>
<van-steps active="{{input.active}}" activeColor="{{input.activeColor||'#3388FF'}}" steps="{{input.steps}}" wx:elif="{{input.type=='steps'}}"></van-steps>
<block wx:elif="{{input.type=='picker'}}">
<van-cell arrowDirection="down" bind:click="{{input.bind||'Lay'}}" customClass="picker {{form.picker[input.name].show?'Show':''}}" data-action="{{input.action||'picker'}}" data-endbind="{{input.endbind||false}}" data-name="{{input.name||''}}" hidden="{{input.isShow?tools.isShow(input.isShow,form):false}}" label="{{input.desc||''}}" labelClass="{{input.descClass||''}}" title="{{input.label}}" titleWidth="{{input.titleWidth||''}}" value="{{form.picker[input.name]&&form.picker[input.name].index>=0?input.vlist[form.picker[input.name].index]:input.index||input.index===0?input.vlist[ tools.getPickerIndex(input.index,input.value) ]:input.placeholder?input.placeholder:''}}" valueClass="{{form.picker[input.name]&&form.picker[input.name].index>=0||input.index||input.index===0?'black':''}}">
<input hidden name="{{input.name||''}}" value="{{form.picker[input.name]&&form.picker[input.name].index>=0?input.value[form.picker[input.name].index]:input.index||input.index===0?input.value[ tools.getPickerIndex(input.index,input.value) ]:''}}"></input>
</van-cell>
<van-popup overlay widthFull bind:close="{{input.bind||'Lay'}}" closable="{{false}}" data-action="{{input.action||'picker'}}" data-name="{{input.name||''}}" position="bottom" show="{{form.picker[input.name].show||false}}">
<van-picker showToolbar bind:cancel="{{input.bind||'Lay'}}" bind:confirm="{{input.bind||'Lay'}}" columns="{{input.vlist}}" data-action="{{input.action||'picker'}}" data-endbind="{{input.endbind||false}}" data-name="{{input.name||''}}" defaultIndex="{{(input.index||input.index===0)&&input.value?tools.getPickerIndex(input.index,input.value):0}}" title="选择{{input.label}}"></van-picker>
</van-popup>
</block>
<van-cell hidden="{{input.isShow?tools.isShow(input.isShow,form):false}}" title="{{input.label||''}}" titleWidth="{{input.titleWidth||''}}" wx:elif="{{input.type=='rate'}}">
<van-rate allowHalf="{{input.allowHalf||false}}" bind:change="{{input.bind||'Lay'}}" color="{{input.color||'#ffd21e'}}" count="{{input.count||5}}" data-action="{{input.action||'radio'}}" data-endbind="{{input.endbind||false}}" data-name="{{input.name||''}}" disabled="{{input.disabled||false}}" disabledColor="{{input.disabledColor||'#bdbdbd'}}" icon="{{input.icon||'star'}}" name="{{input.name||''}}" readonly="{{input.readonly||false}}" size="{{input.size||20}}" value="{{form.radio[input.name]>=0?form.radio[input.name]:input.value}}" voidColor="{{input.voidColor||'#c7c7c7'}}" voidIcon="{{input.voidIcon||'star-o'}}"></van-rate>
<text style="font-size: 12px;"> {{input.vlist[ (form.radio[input.name]>=0?form.radio[input.name]:input.value)-1 ]}}</text>
</van-cell>
<van-search background="{{input.background||'none'}}" bind:change="{{input.bind||''}}" data-action="{{input.action||'input'}}" data-endbind="{{input.endbind||false}}" data-name="{{input.name||''}}" disabled="{{input.disabled||false}}" focus="{{form.focus==input.name}}" icon="{{input.icon||''}}" inputAlign="{{input.inputAlign||'right'}}" label="{{input.label||''}}" maxlength="{{input.maxlength||-1}}" name="{{input.name||''}}" placeholder="{{input.placeholder||''}}" placeholderStyle="{{input.placeholderStyle||''}}" readonly="{{input.readonly||false}}" shape="{{input.shape||'square'}}" showAction="{{input.showAction||false}}" type="{{input.inputType||'text'}}" value="{{input.value||''}}" wx:elif="{{input.type=='search'}}"></van-search>
<template is="forview" data="{{list:input.list,form:form}}" wx:elif="{{input.type=='forview'}}"></template>
<block wx:elif="{{input.type=='view'}}">
<van-cell bind:click="{{input.bind||''}}" data-action="{{input.action||''}}" data-data="{{input.data||''}}" data-info="{{input.info||''}}" data-name="{{input.name||''}}" hidden="{{input.isShow?tools.isShow(input.isShow,form):false}}" icon="{{input.icon||false}}" isLink="{{input.isLink||false}}" label="{{input.desc||''}}" labelClass="{{input.descClass||''}}" rightIcon="{{input.icon||''}}" title="{{input.label}}" titleWidth="{{input.titleWidth||''}}" url="{{input.url||false}}" value="{{input.value||''}}" valueClass="{{input.valueClass||''}}" wx:if="{{input.cell!==false}}"></van-cell>
<van-cell bind:click="{{input.bind||''}}" hidden="{{input.isShow?tools.isShow(input.isShow,form):false}}" label="{{input.desc||''}}" title="{{input.label||''}}" titleWidth="{{input.titleWidth||''}}" valueClass="{{input.valueClass||''}}" wx:else>
<template is="view" data="{{view:input,form:form}}" wx:if="{{input.view}}"></template>
<template is="forview" data="{{list:input.vlist,form:form}}" wx:elif="{{input.forview}}"></template>
<rich-text nodes="{{input.value}}" wx:elif="{{input.html}}"></rich-text>
<block wx:else>{{input.value}}</block>
</van-cell>
</block>
<block wx:elif="{{input.type=='button'}}">
<van-cell wx:if="{{input.cell}}">
<van-button bindtap="{{input.bind||''}}" customClass="{{input.class}}" data-action="{{input.action||''}}" data-data="{{input.data||''}}" data-info="{{input.info||''}}" data-method="{{input.method||''}}" disabled="{{input.disabled||false}}" icon="{{input.icon||''}}" iconstyle="{{input.iconstyle||''}}" plain="{{input.plain===false?false:true}}" size="{{input.size||'small'}}" type="{{input.buttonType||'default'}}">
{{input.text}}
</van-button>
</van-cell>
<van-button bindtap="{{input.bind||''}}" customClass="{{input.class}}" data-action="{{input.action||''}}" data-data="{{input.data||''}}" data-info="{{input.info||''}}" data-method="{{input.method||''}}" disabled="{{input.disabled||false}}" icon="{{input.icon||''}}" iconstyle="{{input.iconstyle||''}}" plain="{{input.plain===false?false:true}}" size="{{input.size||'small'}}" type="{{input.buttonType||'default'}}" wx:else>
{{input.text}}
</van-button>
</block>
<button bindtap="{{input.bind||''}}" class="{{input.class||''}}" data-action="{{input.action||''}}" data-data="{{input.data||''}}" data-info="{{input.info||''}}" data-method="{{input.method||''}}" disabled="{{input.disabled||false}}" formType="{{input.formType||''}}" hoverClass="{{input.hoverClass||'button-hover'}}" loading="{{input.loading||false}}" openType="{{input.openType||''}}" plain="{{input.plain||false}}" size="{{input.size||'default'}}" style="{{input.style||''}}" type="{{input.buttonType||'default'}}" wx:elif="{{input.type=='nativeButton'}}">
{{input.text}}
</button>
<input bindconfirm="{{input.bindconfirm||''}}" bindinput="{{input.bind||''}}" class="nativeInput {{input.class||''}}" confirmType="{{input.confirmType||'done'}}" data-action="{{input.action||'input'}}" data-endbind="{{input.endbind||false}}" data-name="{{input.name||''}}" disabled="{{input.disabled||false}}" focus="{{form.focus==input.name}}" hidden="{{input.isShow?tools.isShow(input.isShow,form):false}}" maxlength="{{input.maxlength||-1}}" name="{{input.name||''}}" password="{{input.password||false}}" placeholder="{{input.placeholder||''}}" placeholderStyle="{{input.placeholderStyle||''}}" readonly="{{input.readonly||false}}" style="{{input.style||''}}" type="{{input.inputType||'text'}}" value="{{input.value||''}}" wx:elif="{{input.type=='nativeInput'}}"></input>
<van-field center required useButtonSlot border="{{input.border===false?false:true}}" clearable="{{input.clearable===false?false:true}}" data-action="{{input.action||'input'}}" data-name="{{input.name||''}}" focus="{{form.focus==input.name}}" label="{{input.label!==false?input.label||'验证码':''}}" name="{{input.name||''}}" placeholder="{{input.placeholder||''}}" placeholderStyle="{{input.placeholderStyle||''}}" toggle="{{form.textareaToggle}}" value="{{input.value||''}}" wx:elif="{{input.type=='vcode'}}">
<view class="formSubmit" slot="button">
<van-button disabled="{{form.send.Stop}}" size="small" type="default">{{form.send.Stop&&form.send.Tips?form.send.Tips:'发送验证码'}}</van-button>
<button class="default" data-action="send" formType="submit" hidden="{{form.send.Stop}}" hoverClass="click" id="send"></button>
</view>
</van-field>
<van-field bind:change="{{input.bind||''}}" bind:confirm="{{input.bindconfirm||''}}" border="{{input.border===false?false:true}}" clearable="{{input.clearable===false?false:true}}" data-action="{{input.action||'input'}}" data-endbind="{{input.endbind||false}}" data-fixed="{{input.type=='textarea'&&(form.popupForm||input.fixed===true)}}" data-method="{{input.method||''}}" data-name="{{input.name||''}}" disabled="{{input.disabled||false}}" fixed="{{input.type=='textarea'&&(form.popupForm||input.fixed===true)}}" focus="{{form.focus==input.name}}" hidden="{{input.isShow?tools.isShow(input.isShow,form):false}}" inputAlign="{{input.align||'right'}}" inputClass="{{input.class||''}}" label="{{input.label||''}}" maxlength="{{input.maxlength||-1}}" name="{{input.name||''}}" placeholder="{{input.placeholder||''}}" placeholderStyle="{{input.placeholderStyle||''}}" readonly="{{input.readonly||false}}" required="{{input.validateRules||input.required?true:false}}" titleWidth="{{input.titleWidth||''}}" toggle="{{form.textareaToggle}}" type="{{input.type}}" value="{{input.value||''}}" wx:elif="{{input.name||input.label}}"></van-field>
</template>
<template name="view">
<down customClass="{{view.class||''}}" customStyle="{{view.style||''}}" expireTime="{{view.endTime}}" wx:if="{{view.endTime}}"></down>
<text bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-name="{{view.name||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" id="{{view.id||''}}" style="{{view.style||''}}" wx:elif="{{view.type=='text'}}">{{form&&view.field?tools.showField(view.field,form):view.text}}</text>
<image bindtap="{{view.bind?view.bind:view.bind!==false?'Lay':''}}" class="{{view.class||''}}" data-action="{{view.action||'preview'}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-src="{{view.src}}" data-webp="{{view.webp!==false}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" id="{{view.id||''}}" mode="{{view.mode||'widthFix'}}" src="{{view.src}}" style="{{view.style||''}}" webp="{{view.webp!==false}}" wx:elif="{{view.type=='image'}}"></image>
<navigator class="{{view.class||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" hoverClass="{{view.hover?view.hover:view.hover!==false?'hover':'none'}}" id="{{view.id||''}}" openType="{{view.open||'navigate'}}" style="{{view.style||''}}" url="{{view.url}}" wx:elif="{{view.type=='link'}}">{{view.text}}</navigator>
<van-icon bind:click="{{view.bind||''}}" customClass="{{view.class||''}}" customStyle="{{view.style||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" id="{{view.id||''}}" name="{{view.name||''}}" wx:elif="{{view.type=='icon'}}"></van-icon>
<rich-text bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-title="{{form&&view.field?tools.showField(view.field,form):view.text}}" nodes="{{form&&view.field?tools.showField(view.field,form):view.text}}" style="{{view.style||''}}" wx:elif="{{view.type=='html'}}"></rich-text>
<view class="{{view.class||''}}" style="{{view.style||''}}" wx:elif="{{view.type=='swiper'}}">
<swiper autoplay="{{view.autoplay!==false}}" bindchange="{{view.bind||''}}" current="{{form.picker[view.name]>=0?form.picker[view.name]:view.current>=0?view.current:0}}" data-action="swiper" data-endbind="{{view.endbind||''}}" data-name="{{view.name||'swiper'}}" duration="{{view.duration||500}}" indicatorDots="{{view.dots!==false}}" interval="{{view.interval||5000}}" style="{{form.swiperHeight[view.name][form.picker[view.name]>=0?form.picker[view.name]:view.current>=0?view.current:0]||''}};transition: all 0.5s;" vertical="{{view.vertical||false}}">
<swiper-item wx:for="{{view.vlist}}" wx:key="index">
<view id="swiper-{{view.name}}-{{index}}" wx:if="{{view.forview}}">
<forview bind:Event="Lay" data="{{[item]}}" form="{{form}}"></forview>
</view>
<image bindtap="{{item.bind||'Lay'}}" data-action="{{item.action||'url'}}" data-data="{{item.data||''}}" data-info="{{item.info||''}}" data-method="{{item.method||''}}" src="{{item.src}}" webp="{{true}}" wx:elif="{{item.src}}"></image>
<view bindtap="{{item.bind||'Lay'}}" data-action="{{item.action||'url'}}" data-data="{{item.data||''}}" data-info="{{item.info||''}}" data-method="{{item.method||''}}" hoverClass="{{item.hover?item.hover:item.hover!==false?'hover':'none'}}" src="{{item.src}}" wx:else>{{item.text}}</view>
</swiper-item>
</swiper>
</view>
<view class="bfile" style="{{view.style||''}}" wx:elif="{{view.class=='bfile'}}">
<view wx:for="{{view.image}}" wx:for-item="url" wx:key="url">
<image hidden bindload="Lay" data-action="intoPreview" data-field="{{view.field}}" data-src="{{url}}" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==" wx:if="{{view.field}}"></image>
<view>
<view>
<image bindtap="Lay" data-action="allPreview" data-field="{{view.field}}" data-src="{{url}}" mode="widthFix" src="{{url}}" webp="{{true}}"></image>
</view>
</view>
</view>
</view>
<view class="upload autoright" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" style="{{view.style||''}}" wx:elif="{{view.class=='upload'}}">
<view class="top">
<view class="tips">
<view>
<text class="flex-item">{{form.upload.note}}</text>
</view>
</view>
<view class="button">
<van-button bindtap="Lay" data-action="upload" data-method="choose" icon="add-o" iconstyle="color:#5FB878;margin:-3px 2px 0 0;vertical-align: middle;font-size:16px;" size="small" type="default">{{form.upload.button||'上传图片'}}</van-button>
</view>
</view>
<view class="single" hidden="{{!form.upload.list.ing[0]&&!form.upload.list.suc[0]&&!form.upload.defaultPic}}" wx:if="{{form.upload.max===1}}">
<image bindtap="Lay" data-action="preview" data-data="{{form.upload.list.ing[0]||form.upload.list.suc[0]||form.upload.defaultPic}}" mode="widthFix" src="{{form.upload.list.ing[0]||form.upload.list.suc[0]||form.upload.defaultPic}}" style="{{form.upload.defaultPicStyle||''}}"></image>
</view>
<block wx:else>
<block wx:if="{{form.upload.number[key]>0||key=='del'}}" wx:for="{{form.upload.list}}" wx:for-index="key" wx:for-item="list" wx:key="index">
<view class="list" wx:if="{{key!='del'}}">
<view class="title">
<text>{{key=='ing'?'待传':key=='err'?'失败':'已传'}}({{form.upload.number[key]}})</text>{{form.upload.tips[key]||''}}</view>
<view class="pic" wx:for="{{list}}" wx:for-item="url" wx:key="*this">
<view>
<view bindtap="Lay" data-action="uploadPreview" data-data="{{url}}" data-method="{{key}}" wx:if="{{tools.isImage(url)===true}}">
<view class="text err" wx:if="{{form.upload.msg[url]}}">
<view>{{form.upload.msg[url]}}</view>
</view>
<image mode="widthFix" src="{{url}}"></image>
</view>
<view bindtap="Lay" data-info="该类型文件暂不支持在移动端预览" wx:else>
<view class="text file">
<view>{{tools.isImage(url)}}</view>
</view>
</view>
</view>
<view bindtap="Lay" class="status" data-action="upload" data-data="{{key}}" data-info="{{index}}" data-method="delete">
删除
</view>
</view>
</view>
<block wx:else>
<input hidden maxlength="-1" name="delfile[{{index}}]" value="{{item}}" wx:for="{{list}}" wx:key="*this"></input>
</block>
</block>
</block>
<input hidden name="uploadCount" value="{{form.upload.number.count||0}}"></input>
<view style="width:0px;height:0px;overflow:hidden;">
<image bindload="Lay" data-action="uploadInit" data-custom-options="{{view.options||false}}" src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWNgYGBgAAAABQABh6FO1AAAAABJRU5ErkJggg==" style="width:0;height:0;"></image>
</view>
</view>
<template is="notes" data="{{note:view.vlist,style:'border-bottom:1px solid #eee;'}}" wx:elif="{{view.type=='note'}}"></template>
<template is="input" data="{{input:view,form:form}}" wx:elif="{{view.name}}"></template>
<view animation="{{view.animation||false}}" bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-name="{{view.name||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" hoverClass="{{view.hover?view.hover:view.hover!==false&&view.action=='url'?'hover':'none'}}" id="{{view.id||''}}" style="{{view.style||''}}" wx:elif="{{view.type=='view'||view.class||view.bind||view.style}}">{{view.text}}</view>
<block wx:elif="{{view.text}}">{{view.text}}</block>
</template>
<template name="form">
<template is="notes" data="{{note:Form.note}}" wx:if="{{Form.note}}"></template>
<template is="notice" data="{{notice:Form.notice}}" wx:if="{{Form.notice.text}}"></template>
<template is="forview" data="{{list:Form.html,form:Form.form}}" wx:if="{{Form.html}}"></template>
<form bindsubmit="{{Form.bindsubmit||'Lay'}}" data-action="formSubmit" data-url="{{Form.postUrl||false}}" wx:if="{{Form.input}}">
<view class="{{Form.formclass||'form'}}">
<van-cell-group border="{{false}}">
<block wx:for="{{Form.input}}" wx:for-index="inputindex" wx:for-item="input" wx:key="inputindex">
<template is="input" data="{{input:input,form:Form.form}}" wx:if="{{input.name||input.label}}"></template>
<block wx:elif="{{input.type=='view'}}">
<template is="view" data="{{view:input,form:Form.form}}" wx:if="{{!input.list}}"></template>
<template is="forview" data="{{list:[input],form:Form.form}}" wx:else></template>
</block>
</block>
</van-cell-group>
<view class="formSubmit {{Form.submitClass||''}}" style="margin:10px 0;{{Form.submitStyle||''}}" wx:for="{{Form.submit}}" wx:for-item="submit" wx:key="value">
<van-button bind:click="{{submit.bind||''}}" block="{{submit.block!==false}}" data-action="{{submit.action||''}}" data-data="{{submit.data||''}}" data-info="{{submit.info||''}}" data-method="{{submit.method||''}}" disabled="{{submit.disabled===true}}" loading="{{Form.form.formLoad||Form.form.upload.being}}" loadingText="{{Form.form.upload.being?'正在上传图片中':'正在提交中'}}" plain="{{submit.plain||false}}" size="{{submit.size||'normal'}}" type="{{submit.type||'danger'}}">
{{submit.value}}
</van-button>
<button class="default" formType="submit" hidden="{{submit.bind||Form.form.formLoad||Form.form.upload.being||submit.disabled===true}}" hoverClass="click"></button>
</view>
</view>
</form>
<template is="forview" data="{{list:Form.bootomhtml,form:Form.form}}" wx:if="{{Form.bootomhtml}}"></template>
<template is="notes" data="{{note:Form.bottomnote,style:'border-top:1px solid #eee;'}}" wx:if="{{Form.bottomnote}}"></template>
<view class="formLoad" hidden="{{Form.form.formLoad!==true}}"></view>
</template>
<template name="popupform">
<van-popup overlay widthFull bind:close="Popup" closeOnClickOverlay="{{false}}" data-action="closeForm" position="{{Form.position||'bottom'}}" show="{{Form.show}}" title="{{Form.title}}" titleStyle="font-weight:700;{{Form.titleStyle||'color:red'}}" zIndex="10000">
<template is="form" data="{{Form:Form}}"></template>
</van-popup>
</template>
<template name="forview7">
<block wx:for="{{list}}" wx:for-item="view" wx:key="index">
<template is="view" data="{{view:view,form:form}}" wx:if="{{!view.list}}"></template>
<view bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-name="{{view.name||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" hoverClass="{{view.hover?view.hover:view.hover!==false&&view.action=='url'?'hover':'none'}}" style="{{view.style||''}}" wx:else>
<template is="view" data="{{view:v,form:form}}" wx:for="{{view.list}}" wx:for-item="v" wx:key="index"></template>
</view>
</block>
</template>
<template name="forview6">
<block wx:for="{{list}}" wx:for-item="view" wx:key="index">
<template is="tabs" data="{{...view,form:form,Findex:6}}" wx:if="{{view.type=='tabs'}}"></template>
<template is="view" data="{{view:view,form:form}}" wx:if="{{!view.list}}"></template>
<view bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-name="{{view.name||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" hoverClass="{{view.hover?view.hover:view.hover!==false&&view.action=='url'?'hover':'none'}}" style="{{view.style||''}}" wx:else>
<template is="forview7" data="{{list:view.list,form:form}}"></template>
</view>
</block>
</template>
<template name="forview5">
<block wx:for="{{list}}" wx:for-item="view" wx:key="index">
<template is="tabs" data="{{...view,form:form,Findex:5}}" wx:if="{{view.type=='tabs'}}"></template>
<template is="view" data="{{view:view,form:form}}" wx:if="{{!view.list}}"></template>
<view bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-name="{{view.name||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" hoverClass="{{view.hover?view.hover:view.hover!==false&&view.action=='url'?'hover':'none'}}" style="{{view.style||''}}" wx:else>
<template is="forview6" data="{{list:view.list,form:form}}"></template>
</view>
</block>
</template>
<template name="forview4">
<block wx:for="{{list}}" wx:for-item="view" wx:key="index">
<template is="tabs" data="{{...view,form:form,Findex:4}}" wx:if="{{view.type=='tabs'}}"></template>
<template is="view" data="{{view:view,form:form}}" wx:if="{{!view.list}}"></template>
<view bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-name="{{view.name||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" hoverClass="{{view.hover?view.hover:view.hover!==false&&view.action=='url'?'hover':'none'}}" style="{{view.style||''}}" wx:else>
<template is="forview5" data="{{list:view.list,form:form}}"></template>
</view>
</block>
</template>
<template name="forview3">
<block wx:for="{{list}}" wx:for-item="view" wx:key="index">
<template is="tabs" data="{{...view,form:form,Findex:3}}" wx:if="{{view.type=='tabs'}}"></template>
<template is="view" data="{{view:view,form:form}}" wx:elif="{{!view.list}}"></template>
<view bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-name="{{view.name||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" hoverClass="{{view.hover?view.hover:view.hover!==false&&view.action=='url'?'hover':'none'}}" style="{{view.style||''}}" wx:else>
<template is="forview4" data="{{list:view.list,form:form}}"></template>
</view>
</block>
</template>
<template name="forview2">
<block wx:for="{{list}}" wx:for-item="view" wx:key="index">
<template is="tabs" data="{{...view,form:form,Findex:2}}" wx:if="{{view.type=='tabs'}}"></template>
<template is="view" data="{{view:view,form:form}}" wx:elif="{{!view.list}}"></template>
<view bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-name="{{view.name||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" hoverClass="{{view.hover?view.hover:view.hover!==false&&view.action=='url'?'hover':'none'}}" style="{{view.style||''}}" wx:else>
<template is="forview3" data="{{list:view.list,form:form}}"></template>
</view>
</block>
</template>
<template name="forview">
<block wx:for="{{list}}" wx:for-item="view" wx:key="index">
<template is="tabs" data="{{...view,form:form,Findex:1}}" wx:if="{{view.type=='tabs'}}"></template>
<template is="view" data="{{view:view,form:form}}" wx:elif="{{!view.list}}"></template>
<view bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-name="{{view.name||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" hoverClass="{{view.hover?view.hover:view.hover!==false&&view.action=='url'?'hover':'none'}}" style="{{view.style||''}}" wx:else>
<template is="forview2" data="{{list:view.list,form:form}}"></template>
</view>
</block>
</template>
<template name="tabs">
<van-tabs active="{{active||0}}" animated="{{animated||false}}" bind:change="{{bind||''}}" bind:click="{{bindClick||''}}" bind:disabled="{{bindDisabled||''}}" border="{{border!==false}}" color="{{color||false}}" customClass="{{class||''}}" duration="{{duration||0.3}}" lineWidth="{{lineWidth||-1}}" sticky="{{sticky||false}}" swipeThreshold="{{swipeThreshold||4}}" swipeable="{{swipeable||false}}" type="{{styleType||'line'}}" zIndex="{{zIndex||1}}">
<van-tab disabled="{{item.disabled===true}}" dot="{{item.dot===true}}" info="{{item.info||null}}" title="{{item.title}}" titleStyle="{{item.titleStyle||''}}" wx:for="{{list}}" wx:key="title">
<template is="forview{{Findex+1}}" data="{{list:item.list,form:form}}"></template>
</van-tab>
</van-tabs>
</template>
<template name="contact">
<van-popup bind:click-overlay="Popup" bind:close="Popup" closable="{{closable}}" closeOnClickOverlay="{{true}}" customStyle="{{customstyle}}" data-action="close" data-index="{{index}}" duration="{{duration}}" overlay="{{overlay}}" overlayStyle="{{overlaystyle}}" position="{{position}}" safeAreaInsetBottom="{{safeareainsetbottom}}" safeAreaInsetTop="{{safeareainsettop}}" scroll="{{scroll}}" show="{{show}}" zIndex="{{zindex}}">
<view class="ly_contact">
<view class="header">
<image mode="widthFix" src="{{info.avatar}}" webp="{{true}}" wx:if="{{info.avatar}}"></image>
<view>{{info.name}}</view>
</view>
<block wx:for="{{info}}" wx:for-index="type" wx:key="type">
<view class="list" wx:if="{{type!='name'&&type!='avatar'}}" wx:for="{{item}}" wx:for-item="items" wx:key="index">
<view class="type">{{items.label}}</view>
<view class="value">{{items.value}}</view>
<van-button plain bindtap="Lay" data-action="copy" data-info="{{items.value}}" size="small" type="info" wx:if="{{type=='qq'}}">复制号码</van-button>
<van-button plain bindtap="Lay" data-action="phone" data-info="{{items.value}}" size="small" type="info" wx:if="{{type=='phone'}}">拨打电话</van-button>
</view>
</block>
<view class="bottom">
<view>声明:为了安全起见,不要轻易与卖家进行线下交易;</view>
<view>非平台线上交易的项目,出现任何后果均与互站无关;</view>
<view>无论卖家以何理由要求线下交易的,请联系管理举报。</view>
</view>
</view>
</van-popup>
</template>
<template name="store">
<view class="store-top">
<view class="row-flex">
<view class="avatar">
<image mode="widthFix" src="{{store.avatar}}" webp="{{true}}" wx:if="{{store.avatar}}"></image>
</view>
<view class="flex-item info">
<view class="name">
{{store.name}} <view class="{{store.rev}}"></view>
</view>
<view class="store-score">
<view wx:for="{{store.score}}" wx:key="index">
<text>{{index}}</text>
<view class="{{item.trend}}">
{{item.value}} <van-icon name="shang{{item.trend=='down'?'-copy-copy':''}}"></van-icon>
</view>
</view>
</view>
</view>
</view>
<van-icon bindtap="Lay" customClass="bond" data-info="商家暂未缴纳保证金" name="jifen1" wx:if="{{!store.bond}}"></van-icon>
<van-icon bindtap="Lay" customClass="bond suc" data-info="<span style=\"color:#2E8A11\">商家已缴纳保证金 <span style=\"color:#ff6600\">{{store.bond}}</span> 元</span>" name="jifen1" wx:else></van-icon>
</view>
</template>
<template name="list_top">
<view style="height:{{topHeight}}px" wx:if="{{topHeight}}"></view>
<view class="top fixed">
<template is="store" data="{{store:html.store}}" wx:if="{{html.store}}"></template>
<van-tabbar active="{{html.tabs[html.store?html.type:html.par].index}}" bind:change="tabsChange" data-field="{{html.store?'type':'par'}}" fixed="{{false}}" wx:if="{{html.tabs}}">
<van-tabbar-item icon="{{item.icon}}" wx:for="{{html.tabs}}" wx:key="name">{{item.name}}</van-tabbar-item>
</van-tabbar>
<van-search bind:change="searchChange" bind:search="searchSubmit" customClass="top-search" placeholder="请输入搜索关键词" value="{{search}}" wx:if="{{html.type}}"></van-search>
<view class="sort row-flex" wx:if="{{html.sort}}">
<view catchtap="sortChange" class="flex-item {{(sortValue==item||sortValue=='dm'&&item=='am')&&'on'}}" data-name="{{index}}" data-value="{{sortValue=='am'&&item=='am'?'dm':item}}" wx:for="{{html.sort}}" wx:key="index">
{{index}}<view class="updown" wx:if="{{item=='am'}}">
<view class="up {{sortValue=='dm'&&'on'}}"></view>
<view class="down {{sortValue=='am'&&'on'}}"></view>
</view>
</view>
<view bindtap="filterShow" class="flex-item {{filter.icon&&'on'}}" wx:if="{{html.menu}}">
筛选<van-icon customClass="filter-icon" name="filter-o"></van-icon>
</view>
</view>
<van-popup closeOnClickOverlay heightFull bind:click-overlay="filterHide" closable="{{false}}" customStyle="width:88%;" overlay="{{true}}" position="right" show="{{filter.show!==''}}">
<form bindreset="filterReset" bindsubmit="filterSubmit">
<view class="filter_box">
<view class="filter_index">
<view class="filter_t">
<van-icon bindtap="filterHide" customClass="middle2 back" name="arrow-left"></van-icon>
<view class="title">{{html.name}}筛选</view>
<button bindtap="formSubmit" class="ok-btn" formType="submit">确认</button>
</view>
<view class="filter_c">
<view class="filter_s">
<view catchtap="Fselect" class="ul" id="{{item.tid}}" wx:if="{{item.name1!='.CS源文件'}}" wx:for="{{html.menu}}" wx:key="name1">
<input hidden="true" name="menu-{{item.tid}}" type="number" value="{{filter.selectValue[item.tid]}}"></input>
<view class="name"> {{item.name1}}</view>
<view class="check">
<input disabled name="" placeholder="不限" placeholderStyle="color:#999" type="text" value="{{filter.selectName[item.tid]}}"></input>
</view>
<view class="arrow">
<view class="rightArrow"></view>
</view>
<view class="filter_select {{filter.show==item.tid?'show':'hide'}}">
<view class="filter_t">
<van-icon catchtap="Fselect" customClass="middle2 back" id="back" name="arrow-left"></van-icon>
<view class="title">{{item.name1}}</view>
</view>
<view catchtap="Fselect" class="ul" data-id="{{item.tid}}" data-name="" data-value="" id="value">
<view class="name">不限</view>
<van-icon customClass="middle2" name="success" wx:if="{{!filter.selectValue[item.tid]}}"></van-icon>
</view>
<view catchtap="Fselect" class="ul" data-id="{{item.tid}}" data-name="{{items.name2}}" data-value="{{items.tid}}" id="value" wx:for="{{item.lists}}" wx:for-item="items" wx:key="index">
<view class="name">{{items.name2}}</view>
<van-icon customClass="middle2" name="success" wx:if="{{filter.selectValue[item.tid]===items.tid}}"></van-icon>
</view>
</view>
</view>
</view>
</view>
<view class="filter_a">
<view class="ul">
<view class="name">价格范围</view>
<view class="money">
<input bindinput="inputChange" id="am" name="am" placeholder="下限金额" placeholderStyle="color:#999" type="number" value="{{filter.money.am}}"></input>
<view>-</view>
<input bindinput="inputChange" id="dm" name="dm" placeholder="上限金额" placeholderStyle="color:#999" type="number" value="{{filter.money.dm}}"></input>
</view>
</view>
<view class="ul" wx:if="{{html.attach}}">
<view class="name">其他选项</view>
<view class="attach">
<checkbox-group bindchange="checkboxChange" id="{{i}}" name="{{i}}" wx:for="{{html.attach}}" wx:for-index="i" wx:key="i">
<label>
<checkbox checked="{{filter.checkbox[i]}}" value="1"></checkbox>
<view>{{item}}</view>
</label>
</checkbox-group>
</view>
</view>
</view>
<view class="filter_b">
<view class="row-flex">
<view class="flex-item">
<button formType="reset">重置</button>
</view>
<view class="flex-item">
<button class="ok-btn" formType="submit">确认</button>
</view>
</view>
</view>
</view>
</view>
</form>
</van-popup>
</view>
</template>
<wxs module="tools" src="../utils/tools.wxs" />

0
template/template.wxss Normal file
View File

107
utils/count-down/index.js Normal file
View File

@ -0,0 +1,107 @@
Component({
options: {
addGlobalClass: !0
},
externalClasses: [ "class" ],
properties: {
format: {
type: String,
value: "天小时分秒"
},
expireText: {
type: String,
value: "已结束"
},
customClass: String,
customStyle: String,
showSlot: {
type: Boolean,
value: !1
},
expireTime: {
type: String,
observer: function(t, e, a) {
this.timer && clearInterval(this.timer);
var i = Number(this.getDate(t).getTime());
this.timer = setInterval(function(t, e) {
return function() {
return t.apply(e, arguments);
};
}(function() {
this.getRightTime(i);
}, this), 1e3);
}
}
},
data: {
downDate: {}
},
lifetimes: {
attached: function() {
this.data.__page = this.__getPage();
},
detached: function() {
clearInterval(this.timer);
}
},
methods: {
onCountDown: function() {
var t = {
data: this.data
}, e = {};
this.triggerEvent("countDown", t, e);
},
onExpire: function() {
this.showSlot || this.setData({
countDownText: this.data.expireText
}, function() {});
var t = {
data: this.data
}, e = {};
this.triggerEvent("expire", t, e);
},
checkTime: function(t) {
return t < 10 && (t = "0" + t), t;
},
getRightTime: function(t) {
var e = t - Number(new Date().getTime());
if (e > 0) {
var a = parseInt(e / 864e5, 10), i = parseInt((e - 864e5 * a) / 36e5, 10), n = parseInt((e - 864e5 * a - 36e5 * i) / 6e4, 10), s = parseInt((e - 864e5 * a - 36e5 * i - 6e4 * n) / 1e3, 10);
this.data.downDate.day = this.checkTime(a), this.data.downDate.hour = this.checkTime(i),
this.data.downDate.minute = this.checkTime(n), this.data.downDate.second = this.checkTime(s);
var r = null;
if (this.data.showSlot) this.onCountDown(); else {
var o = this.data.format;
if (o) {
"function" == typeof this.__getPage()[o] && (o = this.__getPage()[o](this));
var h = {
day: "天",
hour: "小时",
minute: "分",
second: "秒"
};
for (var u in h) {
var c = parseInt(this.data.downDate[u]);
o = o.replace(h[u], c > 0 ? c + h[u] : "");
}
r = o, this.setData({
countDownText: r
}, function() {});
}
}
} else this.onExpire(), clearInterval(this.timer);
},
__getPage: function() {
if (this.data.__page) return this.data.__page;
var t = getCurrentPages();
return t[t.length - 1];
},
getDate: function(t) {
var e = t.split(/[- :]/), a = this._getValue(e[0]), i = this._getValue(e[1]) - 1, n = this._getValue(e[2]), s = this._getValue(e[3]), r = this._getValue(e[4]), o = this._getValue(e[5]);
return new Date(a, i, n, s, r, o);
},
_getValue: function(t) {
return t || 0;
}
}
});

View File

@ -0,0 +1,13 @@
{
"component": true,
"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"
}
}

View File

@ -0,0 +1,2 @@
<text class="{{customClass||''}}" style="{{customStyle||''}}" wx:if="{{!showSlot}}">{{countDownText}}</text>
<slot wx:else></slot>

View File

15
utils/forview/index.js Normal file
View File

@ -0,0 +1,15 @@
Component({
options: {
styleIsolation: "apply-shared"
},
properties: {
data: Object,
form: Object
},
lifetimes: {},
methods: {
Lay: function(t) {
this.triggerEvent("Event", "Event" == t.type ? t.detail : t);
}
}
});

13
utils/forview/index.json Normal file
View File

@ -0,0 +1,13 @@
{
"component": true,
"usingComponents": {
"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"
}
}

8
utils/forview/index.wxml Normal file
View File

@ -0,0 +1,8 @@
<import src="/template/template.wxml"></import>
<block wx:for="{{data}}" wx:for-item="view" wx:key="index">
<template is="view" data="{{view:view,form:form}}" wx:if="{{!view.list}}"></template>
<view bindtap="{{view.bind||''}}" class="{{view.class||''}}" data-action="{{view.action||''}}" data-data="{{view.data||view.data===0?view.data:''}}" data-info="{{view.info||''}}" data-method="{{view.method||''}}" data-name="{{view.name||''}}" hidden="{{view.isShow?tools.isShow(view.isShow,form):false}}" hoverClass="{{view.hover?view.hover:view.hover!==false&&view.action=='url'?'hover':'none'}}" style="{{view.style||''}}" wx:else>
<forview bind:Event="Lay" data="{{view.list}}" form="{{form}}"></forview>
</view>
</block>
<wxs module="tools" src="../tools.wxs" />

0
utils/forview/index.wxss Normal file
View File

41
utils/tools.wxs Normal file
View File

@ -0,0 +1,41 @@
module.exports = ({
isShow: (function(Show, form) {
if (typeof Show.field !== 'object' && typeof Show.value !== 'number') {
var field = Show.field.split(",");
var value = Show.value.split(",")
} else if (typeof Show.value == 'number') {
var field = [Show.field];
var value = [Show.value]
} else {
var field = Show.field;
var value = Show.value
};
for (i = 0; i < field.length; i++) {
var F = field[((nt_0 = (i), null == nt_0 ? undefined : 'number' === typeof nt_0 ? nt_0 : "" + nt_0))];
var V = value[((nt_1 = (i), null == nt_1 ? undefined : 'number' === typeof nt_1 ? nt_1 : "" + nt_1))];
var res = F ? (!form[((nt_2 = (Show.type), null == nt_2 ? undefined : 'number' === typeof nt_2 ? nt_2 : "" + nt_2))] || !form[((nt_3 = (Show.type), null == nt_3 ? undefined : 'number' === typeof nt_3 ? nt_3 : "" + nt_3))][((nt_3 = (F), null == nt_3 ? undefined : 'number' === typeof nt_3 ? nt_3 : "" + nt_3))] ? Show.hide : (Show.type == 'checkbox' ? (form[((nt_4 = (Show.type), null == nt_4 ? undefined : 'number' === typeof nt_4 ? nt_4 : "" + nt_4))][((nt_4 = (F), null == nt_4 ? undefined : 'number' === typeof nt_4 ? nt_4 : "" + nt_4))].join("") !== V ? true : false) : (V == 'true' ? (!form[((nt_5 = (Show.type), null == nt_5 ? undefined : 'number' === typeof nt_5 ? nt_5 : "" + nt_5))][((nt_5 = (F), null == nt_5 ? undefined : 'number' === typeof nt_5 ? nt_5 : "" + nt_5))] ? true : false) : (V == 'false' ? (!form[((nt_6 = (Show.type), null == nt_6 ? undefined : 'number' === typeof nt_6 ? nt_6 : "" + nt_6))][((nt_6 = (F), null == nt_6 ? undefined : 'number' === typeof nt_6 ? nt_6 : "" + nt_6))] ? false : true) : form[((nt_7 = (Show.type), null == nt_7 ? undefined : 'number' === typeof nt_7 ? nt_7 : "" + nt_7))][((nt_7 = (F), null == nt_7 ? undefined : 'number' === typeof nt_7 ? nt_7 : "" + nt_7))] !== V ? true : false)))) : false;
if (res) return (res);
};
return (res)
}),
getPickerIndex: (function(index, list) {
list = undefined === list ? [] : list;
var i = list.indexOf(index);
return (i > 0 ? i : 0)
}),
showField: (function(field, form) {
var F = [];
var F = field.split(".");
var res = form;
for (i = 0; i < F.length; i++) {
if (!res[((nt_8 = (F[((nt_9 = (i), null == nt_9 ? undefined : 'number' === typeof nt_9 ? nt_9 : "" + nt_9))]), null == nt_8 ? undefined : 'number' === typeof nt_8 ? nt_8 : "" + nt_8))]) return ('');;
res = res[((nt_10 = (F[((nt_11 = (i), null == nt_11 ? undefined : 'number' === typeof nt_11 ? nt_11 : "" + nt_11))]), null == nt_10 ? undefined : 'number' === typeof nt_10 ? nt_10 : "" + nt_10))]
};
return (res || '')
}),
isImage: (function(filename) {
var name = filename.toLowerCase();
var type = name.split('.').slice(-1).join('');
return (['jpg', 'png', 'gif', 'svg'].indexOf(type) >= 0 ? true : type)
}),
});

View File

@ -0,0 +1,38 @@
var e = require("../common/component"), t = require("../mixins/safe-area");
(0, e.VantComponent)({
mixins: [ (0, t.safeArea)() ],
props: {
show: Boolean,
title: String,
cancelText: String,
zIndex: {
type: Number,
value: 100
},
actions: {
type: Array,
value: []
},
overlay: {
type: Boolean,
value: !0
},
closeOnClickOverlay: {
type: Boolean,
value: !0
}
},
methods: {
onSelect: function(e) {
var t = e.currentTarget.dataset.index, n = this.data.actions[t];
!n || n.disabled || n.loading || this.$emit("select", n);
},
onCancel: function() {
this.$emit("cancel");
},
onClose: function() {
this.$emit("close");
}
}
});

View File

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

View File

@ -0,0 +1,20 @@
<van-popup bind:close="onClose" closeOnClickOverlay="{{closeOnClickOverlay}}" customClass="van-action-sheet" overlay="{{overlay}}" position="bottom" safeAreaInsetBottom="{{safeAreaInsetBottom}}" show="{{show}}" zIndex="{{zIndex}}">
<view class="van-hairline--bottom van-action-sheet__header" wx:if="{{title}}">
{{title}}
<van-icon bind:click="onClose" customClass="van-action-sheet__close" name="close"></van-icon>
</view>
<view wx:if="{{actions&&actions.length}}">
<button bind:tap="onSelect" class="{{utils.bem( 'action-sheet__item',{disabled:item.disabled||item.loading} )}} van-hairline--top {{item.className||''}}" data-index="{{index}}" hoverClass="van-action-sheet__item--hover" openType="{{item.openType}}" wx:for="{{actions}}" wx:key="index">
<block wx:if="{{!item.loading}}">
{{item.name}}
<text class="van-action-sheet__subname" wx:if="{{item.subname}}">{{item.subname}}</text>
</block>
<van-loading size="20px" wx:else></van-loading>
</button>
</view>
<slot></slot>
<view bind:tap="onCancel" class="van-action-sheet__cancel" hoverClass="van-action-sheet__cancel--hover" hoverStayTime="70" wx:if="{{cancelText}}">
{{cancelText}}
</view>
</van-popup>
<wxs module="utils" src="../wxs/utils.wxs" />

View File

@ -0,0 +1,60 @@
@import "../area/index.wxss";
.van-action-sheet {
max-height: 90%!important;
color: #333;
}
.van-action-sheet__cancel,.van-action-sheet__item {
height: 50px;
font-size: 16px;
line-height: 50px;
text-align: center;
background-color: #fff;
}
.van-action-sheet__cancel--hover,.van-action-sheet__item--hover {
background-color: #f2f3f5;
}
.van-action-sheet__cancel {
height: 60px;
}
.van-action-sheet__cancel:before {
display: block;
height: 10px;
background-color: #f8f8f8;
content: " ";
}
.van-action-sheet__item--disabled {
color: #c9c9c9;
}
.van-action-sheet__item--disabled.van-action-sheet__item--hover {
background-color: #fff;
}
.van-action-sheet__subname {
margin-left: 5px;
font-size: 12px;
color: #7d7e80;
}
.van-action-sheet__header {
font-size: 16px;
font-weight: 500;
line-height: 44px;
text-align: center;
}
.van-action-sheet__close {
position: absolute!important;
top: 0;
right: 0;
padding: 0 15px;
font-size: 18px!important;
line-height: inherit!important;
color: #999;
}

155
vant/area/index.js Normal file
View File

@ -0,0 +1,155 @@
var e = function() {
function e(e, t) {
var n = [], i = !0, r = !1, s = void 0;
try {
for (var c, u = e[Symbol.iterator](); !(i = (c = u.next()).done) && (n.push(c.value),
!t || n.length !== t); i = !0) ;
} catch (e) {
r = !0, s = e;
} finally {
try {
!i && u.return && u.return();
} finally {
if (r) throw s;
}
}
return n;
}
return function(t, n) {
if (Array.isArray(t)) return t;
if (Symbol.iterator in Object(t)) return e(t, n);
throw new TypeError("Invalid attempt to destructure non-iterable instance");
};
}(), t = require("../common/component"), n = require("../picker/shared");
(0, t.VantComponent)({
classes: [ "active-class", "toolbar-class", "column-class" ],
props: Object.assign({}, n.pickerProps, {
value: String,
areaList: {
type: Object,
value: {}
},
columnsNum: {
type: [ String, Number ],
value: 3
}
}),
data: {
columns: [ {
values: []
}, {
values: []
}, {
values: []
} ],
displayColumns: [ {
values: []
}, {
values: []
}, {
values: []
} ]
},
watch: {
value: function(e) {
this.code = e, this.setValues();
},
areaList: "setValues",
columnsNum: function(e) {
this.set({
displayColumns: this.data.columns.slice(0, +e)
});
}
},
mounted: function() {
this.setValues();
},
methods: {
getPicker: function() {
return null == this.picker && (this.picker = this.selectComponent(".van-area__picker")),
this.picker;
},
onCancel: function(e) {
this.emit("cancel", e.detail);
},
onConfirm: function(e) {
this.emit("confirm", e.detail);
},
emit: function(e, t) {
t.values = t.value, delete t.value, this.$emit(e, t);
},
onChange: function(e) {
var t = this, n = e.detail, i = n.index, r = n.picker, s = n.value;
this.code = s[i].code, this.setValues().then(function() {
t.$emit("change", {
picker: r,
values: r.getValues(),
index: i
});
});
},
getConfig: function(e) {
var t = this.data.areaList;
return t && t[e + "_list"] || {};
},
getList: function(e, t) {
var n = [];
if ("province" !== e && !t) return n;
var i = this.getConfig(e);
return n = Object.keys(i).map(function(e) {
return {
code: e,
name: i[e]
};
}), t && ("9" === t[0] && "city" === e && (t = "9"), n = n.filter(function(e) {
return 0 === e.code.indexOf(t);
})), n;
},
getIndex: function(e, t) {
var n = "province" === e ? 2 : "city" === e ? 4 : 6, i = this.getList(e, t.slice(0, n - 2));
"9" === t[0] && "province" === e && (n = 1), t = t.slice(0, n);
for (var r = 0; r < i.length; r++) if (i[r].code.slice(0, n) === t) return r;
return 0;
},
setValues: function() {
var t = this, n = this.getConfig("county"), i = this.code || Object.keys(n)[0] || "", r = this.getList("province"), s = this.getList("city", i.slice(0, 2)), c = this.getPicker();
if (c) {
var u = [];
if (u.push(c.setColumnValues(0, r, !1)), u.push(c.setColumnValues(1, s, !1)), s.length && "00" === i.slice(2, 4)) {
var o = e(s, 1);
i = o[0].code;
}
return u.push(c.setColumnValues(2, this.getList("county", i.slice(0, 4)), !1)),
Promise.all(u).catch(function() {}).then(function() {
return c.setIndexes([ t.getIndex("province", i), t.getIndex("city", i), t.getIndex("county", i) ]);
}).catch(function() {});
}
},
getValues: function() {
var e = this.getPicker();
return e ? e.getValues().filter(function(e) {
return !!e;
}) : [];
},
getDetail: function() {
var e = this.getValues(), t = {
code: "",
country: "",
province: "",
city: "",
county: ""
};
if (!e.length) return t;
var n = e.map(function(e) {
return e.name;
});
return t.code = e[e.length - 1].code, "9" === t.code[0] ? (t.country = n[1] || "",
t.province = n[2] || "") : (t.province = n[0] || "", t.city = n[1] || "", t.county = n[2] || ""),
t;
},
reset: function() {
return this.code = "", this.setValues();
}
}
});

14
vant/area/index.json Normal file
View File

@ -0,0 +1,14 @@
{
"component": true,
"usingComponents": {
"van-picker": "../picker/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"
}
}

1
vant/area/index.wxml Normal file
View File

@ -0,0 +1 @@
<van-picker showToolbar activeClass="active-class" bind:cancel="onCancel" bind:change="onChange" bind:confirm="onConfirm" cancelButtonText="{{cancelButtonText}}" class="van-area__picker" columnClass="column-class" columns="{{displayColumns}}" confirmButtonText="{{confirmButtonText}}" itemHeight="{{itemHeight}}" loading="{{loading}}" title="{{title}}" toolbarClass="toolbar-class" valueKey="name" visibleItemCount="{{visibleItemCount}}"></van-picker>

68
vant/area/index.wxss Normal file
View File

@ -0,0 +1,68 @@
.van-ellipsis {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.van-multi-ellipsis--l2 {
-webkit-line-clamp: 2;
}
.van-multi-ellipsis--l2,.van-multi-ellipsis--l3 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
}
.van-multi-ellipsis--l3 {
-webkit-line-clamp: 3;
}
.van-clearfix:after {
content: "";
display: table;
clear: both;
}
.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom {
position: relative;
}
.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after {
content: " ";
position: absolute;
pointer-events: none;
box-sizing: border-box;
transform-origin: center;
top: -50%;
left: -50%;
right: -50%;
bottom: -50%;
transform: scale(.5);
border: 0 solid #e5e5e5;
}
.van-hairline--top:after {
border-top-width: 1px;
}
.van-hairline--left:after {
border-left-width: 1px;
}
.van-hairline--right:after {
border-right-width: 1px;
}
.van-hairline--bottom:after {
border-bottom-width: 1px;
}
.van-hairline--top-bottom:after {
border-width: 1px 0;
}
.van-hairline--surround:after {
border-width: 1px;
}

34
vant/badge-group/index.js Normal file
View File

@ -0,0 +1,34 @@
(0, require("../common/component").VantComponent)({
relation: {
name: "badge",
type: "descendant",
linked: function(e) {
this.badges.push(e), this.setActive(this.data.active);
},
unlinked: function(e) {
this.badges = this.badges.filter(function(t) {
return t !== e;
}), this.setActive(this.data.active);
}
},
props: {
active: {
type: Number,
value: 0,
observer: "setActive"
}
},
beforeCreate: function() {
this.badges = [], this.currentActive = -1;
},
methods: {
setActive: function(e) {
var t = this.badges, i = this.currentActive;
if (!t.length) return Promise.resolve();
this.currentActive = e;
var s = [];
return i !== e && t[i] && s.push(t[i].setActive(!1)), t[e] && s.push(t[e].setActive(!0)),
Promise.all(s);
}
}
});

View File

@ -0,0 +1,13 @@
{
"component": true,
"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"
}
}

View File

@ -0,0 +1,3 @@
<view class="van-badge-group van-hairline--top-bottom custom-class">
<slot></slot>
</view>

Some files were not shown because too many files have changed in this diff Show More