├── README.md
├── 后台PHP部分源码
├── category.inc.php
├── item.inc.php
└── order.inc.php
└── 微信小程序二手书源码
└── usedbook
├── __wuBaseWxss__
└── 0.wxss
├── app.js
├── app.json
├── app.wxss
├── libs
├── images
│ ├── 1.gif
│ ├── Shape.png
│ ├── address_bg.gif
│ ├── bind.png
│ ├── btn.png
│ ├── buy.gif
│ ├── check-circle.png
│ ├── cog@2x.png
│ ├── coins.png
│ ├── collect.png
│ ├── credit.png
│ ├── del.png
│ ├── dollar-sign@2x.png
│ ├── erbg.png
│ ├── erbt.jpg
│ ├── fans.png
│ ├── holder.png
│ ├── list.png
│ ├── list@2x.png
│ ├── loading.gif
│ ├── mbag.png
│ ├── photo.png
│ ├── post.png
│ ├── poster.jpg
│ ├── pub.gif
│ ├── qiugou.png
│ ├── sc.png
│ ├── sell.gif
│ ├── service.png
│ ├── shouji.png
│ ├── star@2x.png
│ ├── task.png
│ ├── tx.jpg
│ ├── user@2x.png
│ ├── yz.png
│ └── zan.png
├── map.js
├── qqmap-wx-jssdk.js
├── request.js
├── wxParse
│ ├── html2json.js
│ ├── htmlparser.js
│ ├── showdown.js
│ ├── wxDiscode.js
│ ├── wxParse.js
│ ├── wxParse.wxml
│ └── wxParse.wxss
└── zanui
│ ├── actionsheet
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── badge
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── btn-group
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── btn
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ ├── index.wxss
│ └── native-button-behaviors.js
│ ├── capsule
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── card
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── cell-group
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── cell
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── col
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── common
│ ├── helper.js
│ └── pop-manager
│ │ ├── index.js
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
│ ├── datetime-picker
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── dialog
│ ├── data.js
│ ├── dialog.js
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── field
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── icon
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── index.js
│ ├── loading
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── loadmore
│ ├── index.wxml
│ └── index.wxss
│ ├── movable
│ ├── movable.js
│ ├── movable.json
│ ├── movable.wxml
│ └── movable.wxss
│ ├── noticebar
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── panel
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── popup
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── row
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── select
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── stepper
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── steps
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── switch
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── tab-line
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── tab
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── tag
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
│ ├── toast
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ ├── index.wxss
│ └── toast.js
│ └── toptips
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── pages
├── cashier
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── detail
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── home
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── item_list
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── list
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── my
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── my_order
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── notice
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
├── post
│ ├── index.js
│ ├── index.json
│ ├── index.wxml
│ └── index.wxss
└── templates
│ ├── cube.wxml
│ └── cube.wxss
├── project.config.json
├── siteinfo.js
└── we7
├── pages
└── templates
│ ├── footer.wxml
│ └── footer.wxss
└── resource
├── icon
├── error.png
├── home.png
├── homeselect.png
├── msg.png
├── msgselect.png
├── my.png
├── myselect.png
├── pub.png
└── pubselect.png
└── js
├── base64.js
├── htmlToWxml.js
├── md5.js
├── underscore.js
├── util.js
└── webview.js
/README.md:
--------------------------------------------------------------------------------
1 | # usedbook
2 | 微信小程序二手书交易
3 |
4 | 功能介绍参考博客
5 | 原文链接:https://blog.csdn.net/sinat_30690685/article/details/88977709
6 |
7 | 开发工具
8 | 1.微信开发工具
9 | 2.notepad++
10 |
11 | 文档
12 | 1.微信小程序开发官方文档
13 | 2.微擎开发官方文档
14 |
15 | 开发语言
16 | 1.前端 js
17 | 2.后台 PHP 微擎框架
18 |
19 | 服务器
20 | 1.阿里云CenOS7.3 64位1核CPU2G内存1M带宽40G系统盘
21 |
--------------------------------------------------------------------------------
/后台PHP部分源码/category.inc.php:
--------------------------------------------------------------------------------
1 | $val) {
17 | pdo_update('superman_hand2_category', array('displayorder' => $val), array('id' => $id));
18 | }
19 | itoast('操作成功!', referer(), 'success');
20 | }
21 | }
22 | $pindex = max(1, intval($_GPC['page']));
23 | $pagesize = 20;
24 | $filter = array(
25 | 'uniacid' => $_W['uniacid'],
26 | );
27 | $total = pdo_getcolumn('superman_hand2_category', $filter, 'COUNT(*)');
28 | $orderby = 'displayorder DESC';
29 | $list = pdo_getall('superman_hand2_category', $filter, '*', '', $orderby, array($pindex, $pagesize));
30 | $pager = pagination($total, $pindex, $pagesize);
31 | } else if ($act == 'post') {
32 | $id = intval($_GPC['id']);
33 | if (!empty($id)) {
34 | $category = pdo_get('superman_hand2_category', array('id' => $id));
35 | }
36 | if (checksubmit()) {
37 | $title = $_GPC['title'];
38 | if (empty($title)) {
39 | itoast('请输入名称!', 'referer', 'error');
40 | }
41 | if (empty($_GPC['cover'])) {
42 | itoast('请选择分类图片!', 'referer', 'error');
43 | }
44 | $data = array(
45 | 'title' => $title,
46 | 'cover' => $_GPC['cover'],
47 | 'displayorder' => intval($_GPC['displayorder']),
48 | 'status' => $_GPC['status']?1:0,
49 | );
50 | if (empty($category)) {
51 | $data['uniacid'] = $_W['uniacid'];
52 | pdo_insert('superman_hand2_category', $data);
53 | $new_id = pdo_insertid();
54 | if (empty($new_id)) {
55 | itoast('数据库添加失败!', '', 'error');
56 | }
57 | } else {
58 | $ret = pdo_update('superman_hand2_category', $data, array('id' => $id));
59 | if ($ret === false) {
60 | itoast('数据库更新失败!', '', 'error');
61 | }
62 | }
63 | $url = $_W['siteroot'].'web/'.$this->createWebUrl('category').'&version_id='.$_GPC['version_id'];
64 | itoast('操作成功!', $url, 'success');
65 | }
66 | } else if ($act == 'delete') {
67 | $id = intval($_GPC['id']);
68 | if (empty($id)) {
69 | itoast('非法请求!', '', 'error');
70 | }
71 | $ret = pdo_delete('superman_hand2_category', array('id' => $id));
72 | if ($ret === false) {
73 | itoast('数据库删除失败!', '', 'error');
74 | }
75 | pdo_update('superman_hand2_item', array('cid' => 0), array('cid' => $id));
76 | itoast('操作成功!', 'referer', 'success');
77 | }
78 | include $this->template($this->web_template_path);
--------------------------------------------------------------------------------
/后台PHP部分源码/order.inc.php:
--------------------------------------------------------------------------------
1 | $_W['uniacid'],
19 | );
20 | if (!empty($ordersn)) {
21 | $filter['ordersn'] = $ordersn;
22 | }
23 | if (!empty($order_title)) {
24 | $filter['title LIKE'] = "%{$order_title}%";
25 | }
26 | $status = in_array($_GPC['status'], array( '-2', '-1', '0', '1', '2', '3', '4', 'all'))?$_GPC['status']:'all';
27 | if ($status != 'all') {
28 | $filter['status'] = $status;
29 | }
30 | $pindex = max(1, intval($_GPC['page']));
31 | $pagesize = 20;
32 | $total = pdo_getcolumn('superman_hand2_order', $filter, 'COUNT(*)');
33 | $orderby = 'createtime DESC';
34 | $list = pdo_getall('superman_hand2_order', $filter, '', '', $orderby, array($pindex, $pagesize));
35 | $pager = pagination($total, $pindex, $pagesize);
36 | if (!empty($list)) {
37 | foreach ($list as &$li) {
38 | $li['_status_title'] = SupermanHandUtil::order_status_title($li['status']);
39 | $li['seller'] = mc_fetch($li['seller_uid'], array('nickname'));
40 | $li['buyer'] = mc_fetch($li['buyer_uid'], array('nickname'));
41 | $li['_createtime'] = $li['createtime']?date('Y-m-d H:i:s', $li['createtime']):'';
42 | }
43 | unset($li);
44 | }
45 | }
46 | include $this->template($this->web_template_path);
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/app.js:
--------------------------------------------------------------------------------
1 | function _defineProperty(e, t, a) {
2 | return t in e ? Object.defineProperty(e, t, {
3 | value: a,
4 | enumerable: !0,
5 | configurable: !0,
6 | writable: !0
7 | }) : e[t] = a, e;
8 | }
9 |
10 | App({
11 | data: {
12 | version: "1.0.1"
13 | },
14 | util: require("we7/resource/js/util.js"),
15 |
16 | tabBar: {
17 | color: "#707070",
18 | selectedColor: "#f60",
19 | borderStyle: "#eee",
20 | backgroundColor: "#fff",
21 | height: "110rpx",
22 | list: [ {
23 | pagePath: "/pages/home/index",
24 | iconPath: "/we7/resource/icon/home.png",
25 | selectedIconPath: "/we7/resource/icon/homeselect.png",
26 | text: "首页"
27 | }, {
28 | pagePath: "/pages/post/index",
29 | iconPath: "/we7/resource/icon/pub.png",
30 | selectedIconPath: "/we7/resource/icon/pubselect.png",
31 | text: "发布"
32 | }, {
33 | pagePath: "/pages/my/index",
34 | iconPath: "/we7/resource/icon/my.png",
35 | selectedIconPath: "/we7/resource/icon/myselect.png",
36 | redDot: !1,
37 | text: "我的"
38 | } ]
39 | },
40 |
41 | siteInfo: require("siteinfo.js")
42 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/home/index",
4 | "pages/post/index",
5 | "pages/my/index",
6 | "pages/list/index",
7 | "pages/my_order/index",
8 | "pages/item_list/index",
9 | "pages/notice/index",
10 | "pages/cashier/index",
11 | "pages/detail/index"
12 |
13 | ],
14 | "permission": {
15 | "scope.userLocation": {
16 | "desc": "你的位置信息将用于小程序位置接口的效果展示"
17 | }
18 | },
19 | "window": {
20 | "navigationBarTitleText": "fjnuusedbook"
21 | }
22 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/1.gif
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/Shape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/Shape.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/address_bg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/address_bg.gif
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/bind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/bind.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/btn.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/buy.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/buy.gif
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/check-circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/check-circle.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/cog@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/cog@2x.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/coins.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/coins.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/collect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/collect.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/credit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/credit.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/del.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/del.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/dollar-sign@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/dollar-sign@2x.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/erbg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/erbg.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/erbt.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/erbt.jpg
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/fans.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/fans.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/holder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/holder.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/list.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/list.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/list@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/list@2x.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/loading.gif
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/mbag.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/mbag.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/photo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/photo.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/post.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/post.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/poster.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/poster.jpg
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/pub.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/pub.gif
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/qiugou.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/qiugou.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/sc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/sc.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/sell.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/sell.gif
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/service.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/shouji.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/shouji.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/star@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/star@2x.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/task.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/task.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/tx.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/tx.jpg
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/user@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/user@2x.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/yz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/yz.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/images/zan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/images/zan.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/map.js:
--------------------------------------------------------------------------------
1 | Object.defineProperty(exports, "__esModule", {
2 | value: !0
3 | });
4 |
5 | var _createClass = function() {
6 | function o(e, t) {
7 | for (var n = 0; n < t.length; n++) {
8 | var o = t[n];
9 | o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0),
10 | Object.defineProperty(e, o.key, o);
11 | }
12 | }
13 | return function(e, t, n) {
14 | return t && o(e.prototype, t), n && o(e, n), e;
15 | };
16 | }();
17 |
18 | function _classCallCheck(e, t) {
19 | if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
20 | }
21 |
22 | var wxqqmap = require("./qqmap-wx-jssdk.js"), qqwxmap = new wxqqmap({
23 | key: "7M4BZ-FDEK3-JC737-YXQ5O-V3IO3-E5FH5"
24 | }), qqmap = function() {
25 | function e() {
26 | _classCallCheck(this, e);
27 | }
28 | return _createClass(e, [ {
29 | key: "getLocateInfo",
30 | value: function() {
31 | var o = this;
32 | return new Promise(function(t, n) {
33 | o.location().then(function(e) {
34 | wx.setStorageSync("lat", e.latitude), wx.setStorageSync("lng", e.longitude), qqwxmap.reverseGeocoder({
35 | location: {
36 | latitude: e.latitude,
37 | longitude: e.longitude
38 | },
39 | success: function(e) {
40 | t(e.result.address_component.city);
41 | },
42 | fail: function(e) {
43 | n(e);
44 | }
45 | });
46 | },
47 | function(e) {
48 | wx.showModal({
49 | title: "",
50 | content: "自动定位需要授权地理定位选项",
51 | confirmText: "去授权",
52 | success: function(e) {
53 | e.confirm && wx.openSetting({
54 | success: function(e) {
55 | console.log(e), o.getLocateInfo();
56 | }
57 | });
58 | }
59 | });
60 | });
61 | });
62 | }
63 | }, {
64 | key: "getCityList",
65 | value: function() {
66 | return new Promise(function(t, e) {
67 | qqwxmap.getCityList({
68 | success: function(e) {
69 | t(e.result[1]);
70 | }
71 | });
72 | });
73 | }
74 | }, {
75 | key: "location",
76 | value: function() {
77 | return new Promise(function(t, n) {
78 | wx.getLocation({
79 | altitude: !0,
80 | success: function(e) {
81 | t(e);
82 | },
83 | fail: function(e) {
84 | n(e);
85 | }
86 | });
87 | });
88 | }
89 | } ]), e;
90 | }();
91 |
92 | exports.default = qqmap;
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/request.js:
--------------------------------------------------------------------------------
1 | var DEBUG = !1, util = require("../we7/resource/js/util.js");
2 |
3 | function ajax() {
4 | var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "", a = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {
5 | m: "superman_hand2"
6 | }, t = arguments[2];
7 | DEBUG || util.request({
8 | url: e,
9 | cachetime: "0",
10 | data: a,
11 | success: function(e) {
12 | t(e);
13 | }
14 | });
15 | }
16 |
17 | module.exports = {
18 | ajax: ajax
19 | };
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/wxParse/htmlparser.js:
--------------------------------------------------------------------------------
1 | var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/, attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"), block = makeMap("a,address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"), inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"), closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"), special = makeMap("wxxxcode-style,script,style,view,scroll-view,block");
2 |
3 | function HTMLParser(e, n) {
4 | var t, a, r, i = [], s = e;
5 | for (i.last = function() {
6 | return this[this.length - 1];
7 | }; e; ) {
8 | if (a = !0, i.last() && special[i.last()]) e = e.replace(new RegExp("([\\s\\S]*?)" + i.last() + "[^>]*>"), function(e, t) {
9 | return t = t.replace(/|/g, "$1$2"), n.chars && n.chars(t),
10 | "";
11 | }), c("", i.last()); else if (0 == e.indexOf("\x3c!--") ? 0 <= (t = e.indexOf("--\x3e")) && (n.comment && n.comment(e.substring(4, t)),
12 | e = e.substring(t + 3), a = !1) : 0 == e.indexOf("") ? (r = e.match(endTag)) && (e = e.substring(r[0].length),
13 | r[0].replace(endTag, c), a = !1) : 0 == e.indexOf("<") && (r = e.match(startTag)) && (e = e.substring(r[0].length),
14 | r[0].replace(startTag, o), a = !1), a) {
15 | t = e.indexOf("<");
16 | for (var l = ""; 0 === t; ) l += "<", t = (e = e.substring(1)).indexOf("<");
17 | l += t < 0 ? e : e.substring(0, t), e = t < 0 ? "" : e.substring(t), n.chars && n.chars(l);
18 | }
19 | if (e == s) throw "Parse Error: " + e;
20 | s = e;
21 | }
22 | function o(e, t, a, r) {
23 | if (t = t.toLowerCase(), block[t]) for (;i.last() && inline[i.last()]; ) c("", i.last());
24 | if (closeSelf[t] && i.last() == t && c("", t), (r = empty[t] || !!r) || i.push(t),
25 | n.start) {
26 | var s = [];
27 | a.replace(attr, function(e, t) {
28 | var a = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[t] ? t : "";
29 | s.push({
30 | name: t,
31 | value: a,
32 | escaped: a.replace(/(^|[^\\])"/g, '$1\\"')
33 | });
34 | }), n.start && n.start(t, s, r);
35 | }
36 | }
37 | function c(e, t) {
38 | if (t) {
39 | t = t.toLowerCase();
40 | for (a = i.length - 1; 0 <= a && i[a] != t; a--) ;
41 | } else var a = 0;
42 | if (0 <= a) {
43 | for (var r = i.length - 1; a <= r; r--) n.end && n.end(i[r]);
44 | i.length = a;
45 | }
46 | }
47 | c();
48 | }
49 |
50 | function makeMap(e) {
51 | for (var t = {}, a = e.split(","), r = 0; r < a.length; r++) t[a[r]] = !0;
52 | return t;
53 | }
54 |
55 | module.exports = HTMLParser;
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/wxParse/wxDiscode.js:
--------------------------------------------------------------------------------
1 | function strNumDiscode(e) {
2 | return e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(/∀/g, "∀")).replace(/∂/g, "∂")).replace(/&exists;/g, "∃")).replace(/∅/g, "∅")).replace(/∇/g, "∇")).replace(/∈/g, "∈")).replace(/∉/g, "∉")).replace(/∋/g, "∋")).replace(/∏/g, "∏")).replace(/∑/g, "∑")).replace(/−/g, "−")).replace(/∗/g, "∗")).replace(/√/g, "√")).replace(/∝/g, "∝")).replace(/∞/g, "∞")).replace(/∠/g, "∠")).replace(/∧/g, "∧")).replace(/∨/g, "∨")).replace(/∩/g, "∩")).replace(/∩/g, "∪")).replace(/∫/g, "∫")).replace(/∴/g, "∴")).replace(/∼/g, "∼")).replace(/≅/g, "≅")).replace(/≈/g, "≈")).replace(/≠/g, "≠")).replace(/≤/g, "≤")).replace(/≥/g, "≥")).replace(/⊂/g, "⊂")).replace(/⊃/g, "⊃")).replace(/⊄/g, "⊄")).replace(/⊆/g, "⊆")).replace(/⊇/g, "⊇")).replace(/⊕/g, "⊕")).replace(/⊗/g, "⊗")).replace(/⊥/g, "⊥")).replace(/⋅/g, "⋅");
3 | }
4 |
5 | function strGreeceDiscode(e) {
6 | return e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(/Α/g, "Α")).replace(/Β/g, "Β")).replace(/Γ/g, "Γ")).replace(/Δ/g, "Δ")).replace(/Ε/g, "Ε")).replace(/Ζ/g, "Ζ")).replace(/Η/g, "Η")).replace(/Θ/g, "Θ")).replace(/Ι/g, "Ι")).replace(/Κ/g, "Κ")).replace(/Λ/g, "Λ")).replace(/Μ/g, "Μ")).replace(/Ν/g, "Ν")).replace(/Ξ/g, "Ν")).replace(/Ο/g, "Ο")).replace(/Π/g, "Π")).replace(/Ρ/g, "Ρ")).replace(/Σ/g, "Σ")).replace(/Τ/g, "Τ")).replace(/Υ/g, "Υ")).replace(/Φ/g, "Φ")).replace(/Χ/g, "Χ")).replace(/Ψ/g, "Ψ")).replace(/Ω/g, "Ω")).replace(/α/g, "α")).replace(/β/g, "β")).replace(/γ/g, "γ")).replace(/δ/g, "δ")).replace(/ε/g, "ε")).replace(/ζ/g, "ζ")).replace(/η/g, "η")).replace(/θ/g, "θ")).replace(/ι/g, "ι")).replace(/κ/g, "κ")).replace(/λ/g, "λ")).replace(/μ/g, "μ")).replace(/ν/g, "ν")).replace(/ξ/g, "ξ")).replace(/ο/g, "ο")).replace(/π/g, "π")).replace(/ρ/g, "ρ")).replace(/ς/g, "ς")).replace(/σ/g, "σ")).replace(/τ/g, "τ")).replace(/υ/g, "υ")).replace(/φ/g, "φ")).replace(/χ/g, "χ")).replace(/ψ/g, "ψ")).replace(/ω/g, "ω")).replace(/ϑ/g, "ϑ")).replace(/ϒ/g, "ϒ")).replace(/ϖ/g, "ϖ")).replace(/·/g, "·");
7 | }
8 |
9 | function strcharacterDiscode(e) {
10 | return e = (e = (e = (e = (e = (e = e.replace(/ /g, " ")).replace(/"/g, "'")).replace(/&/g, "&")).replace(/</g, "<")).replace(/>/g, ">")).replace(/•/g, "•");
11 | }
12 |
13 | function strOtherDiscode(e) {
14 | return e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = (e = e.replace(/Œ/g, "Œ")).replace(/œ/g, "œ")).replace(/Š/g, "Š")).replace(/š/g, "š")).replace(/Ÿ/g, "Ÿ")).replace(/ƒ/g, "ƒ")).replace(/ˆ/g, "ˆ")).replace(/˜/g, "˜")).replace(/ /g, "")).replace(/ /g, "")).replace(/ /g, "")).replace(//g, "")).replace(//g, "")).replace(//g, "")).replace(//g, "")).replace(/–/g, "–")).replace(/—/g, "—")).replace(/‘/g, "‘")).replace(/’/g, "’")).replace(/‚/g, "‚")).replace(/“/g, "“")).replace(/”/g, "”")).replace(/„/g, "„")).replace(/†/g, "†")).replace(/‡/g, "‡")).replace(/•/g, "•")).replace(/…/g, "…")).replace(/‰/g, "‰")).replace(/′/g, "′")).replace(/″/g, "″")).replace(/‹/g, "‹")).replace(/›/g, "›")).replace(/‾/g, "‾")).replace(/€/g, "€")).replace(/™/g, "™")).replace(/←/g, "←")).replace(/↑/g, "↑")).replace(/→/g, "→")).replace(/↓/g, "↓")).replace(/↔/g, "↔")).replace(/↵/g, "↵")).replace(/⌈/g, "⌈")).replace(/⌉/g, "⌉")).replace(/⌊/g, "⌊")).replace(/⌋/g, "⌋")).replace(/◊/g, "◊")).replace(/♠/g, "♠")).replace(/♣/g, "♣")).replace(/♥/g, "♥")).replace(/♦/g, "♦")).replace(/'/g, "'");
15 | }
16 |
17 | function strMoreDiscode(e) {
18 | return e = (e = (e = e.replace(/\r\n/g, "")).replace(/\n/g, "")).replace(/code/g, "wxxxcode-style");
19 | }
20 |
21 | function strDiscode(e) {
22 | return e = strMoreDiscode(e = strOtherDiscode(e = strcharacterDiscode(e = strGreeceDiscode(e = strNumDiscode(e)))));
23 | }
24 |
25 | function urlToHttpUrl(e, r) {
26 | return new RegExp("^//").test(e) && (e = r + ":" + e), e;
27 | }
28 |
29 | module.exports = {
30 | strDiscode: strDiscode,
31 | urlToHttpUrl: urlToHttpUrl
32 | };
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/wxParse/wxParse.js:
--------------------------------------------------------------------------------
1 | var _showdown = require("./showdown.js"), _showdown2 = _interopRequireDefault(_showdown), _html2json = require("./html2json.js"), _html2json2 = _interopRequireDefault(_html2json);
2 |
3 | function _interopRequireDefault(e) {
4 | return e && e.__esModule ? e : {
5 | default: e
6 | };
7 | }
8 |
9 | function _defineProperty(e, t, a) {
10 | return t in e ? Object.defineProperty(e, t, {
11 | value: a,
12 | enumerable: !0,
13 | configurable: !0,
14 | writable: !0
15 | }) : e[t] = a, e;
16 | }
17 |
18 | var realWindowWidth = 0, realWindowHeight = 0;
19 |
20 | function wxParse() {
21 | var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "wxParseData", t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : "html", a = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : '
数据不能为空
', i = arguments[3], r = arguments[4], n = i, o = {};
22 | if ("html" == t) o = _html2json2.default.html2json(a, e), console.log(JSON.stringify(o, " ", " ")); else if ("md" == t || "markdown" == t) {
23 | var d = new _showdown2.default.Converter().makeHtml(a);
24 | o = _html2json2.default.html2json(d, e), console.log(JSON.stringify(o, " ", " "));
25 | }
26 | o.view = {}, void (o.view.imagePadding = 0) !== r && (o.view.imagePadding = r);
27 | var s = {};
28 | s[e] = o, n.setData(s), n.bindData = s, n.wxParseImgLoad = wxParseImgLoad, n.wxParseImgTap = wxParseImgTap;
29 | }
30 |
31 | function wxParseImgTap(e) {
32 | var t = e.target.dataset.src, a = e.target.dataset.from;
33 | void 0 !== a && 0 < a.length && wx.previewImage({
34 | current: t,
35 | urls: this.bindData[a].imageUrls
36 | });
37 | }
38 |
39 | function wxParseImgLoad(e) {
40 | var t = e.target.dataset.from, a = e.target.dataset.idx;
41 | void 0 !== t && 0 < t.length && calMoreImageInfo(e, a, this, t);
42 | }
43 |
44 | function calMoreImageInfo(e, t, a, i) {
45 | var r, n = a.data[i];
46 | if (n && 0 != n.images.length) {
47 | var o = n.images, d = wxAutoImageCal(e.detail.width, e.detail.height, a, i), s = o[t].index, l = "" + i, g = !0, m = !1, h = void 0;
48 | try {
49 | for (var w, u = s.split(".")[Symbol.iterator](); !(g = (w = u.next()).done); g = !0) {
50 | l += ".nodes[" + w.value + "]";
51 | }
52 | } catch (e) {
53 | m = !0, h = e;
54 | } finally {
55 | try {
56 | !g && u.return && u.return();
57 | } finally {
58 | if (m) throw h;
59 | }
60 | }
61 | var f = l + ".width", v = l + ".height";
62 | a.setData((_defineProperty(r = {}, f, d.imageWidth), _defineProperty(r, v, d.imageheight),
63 | r));
64 | }
65 | }
66 |
67 | function wxAutoImageCal(e, t, a, i) {
68 | var r, n = 0, o = 0, d = {}, s = a.data[i].view.imagePadding;
69 | return realWindowHeight, (r = realWindowWidth - 2 * s) < e ? (o = (n = r) * t / e,
70 | d.imageWidth = n, d.imageheight = o) : (d.imageWidth = e, d.imageheight = t), d;
71 | }
72 |
73 | function wxParseTemArray(e, t, a, i) {
74 | for (var r = [], n = i.data, o = null, d = 0; d < a; d++) {
75 | var s = n[t + d].nodes;
76 | r.push(s);
77 | }
78 | e = e || "wxParseTemArray", (o = JSON.parse('{"' + e + '":""}'))[e] = r, i.setData(o);
79 | }
80 |
81 | function emojisInit() {
82 | var e = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "", t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : "/wxParse/emojis/", a = arguments[2];
83 | _html2json2.default.emojisInit(e, t, a);
84 | }
85 |
86 | wx.getSystemInfo({
87 | success: function(e) {
88 | realWindowWidth = e.windowWidth, realWindowHeight = e.windowHeight;
89 | }
90 | }), module.exports = {
91 | wxParse: wxParse,
92 | wxParseTemArray: wxParseTemArray,
93 | emojisInit: emojisInit
94 | };
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/wxParse/wxParse.wxss:
--------------------------------------------------------------------------------
1 | .wxParse {
2 | margin: 0 5px;
3 | font-family: Helvetica,sans-serif;
4 | font-size: 28rpx;
5 | color: #666;
6 | line-height: 1.8;
7 | }
8 |
9 | view {
10 | word-break: break-all;
11 | overflow: auto;
12 | }
13 |
14 | .wxParse-inline {
15 | display: inline;
16 | margin: 0;
17 | padding: 0;
18 | }
19 |
20 | .wxParse-div {
21 | margin: 0;
22 | padding: 0;
23 | }
24 |
25 | .wxParse-h1 {
26 | font-size: 2em;
27 | margin: .67em 0;
28 | }
29 |
30 | .wxParse-h2 {
31 | font-size: 1.5em;
32 | margin: .75em 0;
33 | }
34 |
35 | .wxParse-h3 {
36 | font-size: 1.17em;
37 | margin: .83em 0;
38 | }
39 |
40 | .wxParse-h4 {
41 | margin: 1.12em 0;
42 | }
43 |
44 | .wxParse-h5 {
45 | font-size: .83em;
46 | margin: 1.5em 0;
47 | }
48 |
49 | .wxParse-h6 {
50 | font-size: .75em;
51 | margin: 1.67em 0;
52 | }
53 |
54 | .wxParse-h1 {
55 | font-size: 18px;
56 | font-weight: 400;
57 | margin-bottom: .9em;
58 | }
59 |
60 | .wxParse-h2 {
61 | font-size: 16px;
62 | font-weight: 400;
63 | margin-bottom: .34em;
64 | }
65 |
66 | .wxParse-h3 {
67 | font-weight: 400;
68 | font-size: 15px;
69 | margin-bottom: .34em;
70 | }
71 |
72 | .wxParse-h4 {
73 | font-weight: 400;
74 | font-size: 14px;
75 | margin-bottom: .24em;
76 | }
77 |
78 | .wxParse-h5 {
79 | font-weight: 400;
80 | font-size: 13px;
81 | margin-bottom: .14em;
82 | }
83 |
84 | .wxParse-h6 {
85 | font-weight: 400;
86 | font-size: 12px;
87 | margin-bottom: .04em;
88 | }
89 |
90 | .wxParse-h1,.wxParse-h2,.wxParse-h3,.wxParse-h4,.wxParse-h5,.wxParse-h6,.wxParse-b,.wxParse-strong {
91 | font-weight: bolder;
92 | }
93 |
94 | .wxParse-i,.wxParse-cite,.wxParse-em,.wxParse-var,.wxParse-address {
95 | font-style: italic;
96 | }
97 |
98 | .wxParse-pre,.wxParse-tt,.wxParse-code,.wxParse-kbd,.wxParse-samp {
99 | font-family: monospace;
100 | }
101 |
102 | .wxParse-pre {
103 | white-space: pre;
104 | }
105 |
106 | .wxParse-big {
107 | font-size: 1.17em;
108 | }
109 |
110 | .wxParse-small,.wxParse-sub,.wxParse-sup {
111 | font-size: .83em;
112 | }
113 |
114 | .wxParse-sub {
115 | vertical-align: sub;
116 | }
117 |
118 | .wxParse-sup {
119 | vertical-align: super;
120 | }
121 |
122 | .wxParse-s,.wxParse-strike,.wxParse-del {
123 | text-decoration: line-through;
124 | }
125 |
126 | .wxParse-strong,.wxParse-s {
127 | display: inline;
128 | }
129 |
130 | .wxParse-a {
131 | color: deepskyblue;
132 | word-break: break-all;
133 | overflow: auto;
134 | }
135 |
136 | .wxParse-video {
137 | text-align: center;
138 | margin: 10px 0;
139 | }
140 |
141 | .wxParse-video-video {
142 | width: 100%;
143 | }
144 |
145 | .wxParse-img {
146 | overflow: hidden;
147 | }
148 |
149 | .wxParse-blockquote {
150 | margin: 0;
151 | padding: 10px 0 10px 5px;
152 | font-family: Courier,Calibri,"宋体";
153 | background: #f5f5f5;
154 | border-left: 3px solid #dbdbdb;
155 | }
156 |
157 | .wxParse-code,.wxParse-wxxxcode-style {
158 | display: inline;
159 | background: #f5f5f5;
160 | }
161 |
162 | .wxParse-ul {
163 | margin: 20rpx 10rpx;
164 | }
165 |
166 | .wxParse-li,.wxParse-li-inner {
167 | display: flex;
168 | align-items: baseline;
169 | margin: 10rpx 0;
170 | }
171 |
172 | .wxParse-li-text {
173 | align-items: center;
174 | line-height: 20px;
175 | }
176 |
177 | .wxParse-li-circle {
178 | display: inline-flex;
179 | width: 5px;
180 | height: 5px;
181 | background-color: #333;
182 | margin-right: 5px;
183 | }
184 |
185 | .wxParse-li-square {
186 | display: inline-flex;
187 | width: 10rpx;
188 | height: 10rpx;
189 | background-color: #333;
190 | margin-right: 5px;
191 | }
192 |
193 | .wxParse-li-ring {
194 | display: inline-flex;
195 | width: 10rpx;
196 | height: 10rpx;
197 | border: 2rpx solid #333;
198 | border-radius: 50%;
199 | background-color: #fff;
200 | margin-right: 5px;
201 | }
202 |
203 | .wxParse-u {
204 | text-decoration: underline;
205 | }
206 |
207 | .wxParse-hide {
208 | display: none;
209 | }
210 |
211 | .WxEmojiView {
212 | align-items: center;
213 | }
214 |
215 | .wxEmoji {
216 | width: 16px;
217 | height: 16px;
218 | }
219 |
220 | .wxParse-tr {
221 | display: flex;
222 | border-right: 1px solid #e0e0e0;
223 | border-bottom: 1px solid #e0e0e0;
224 | border-top: 1px solid #e0e0e0;
225 | }
226 |
227 | .wxParse-th,.wxParse-td {
228 | flex: 1;
229 | padding: 5px;
230 | font-size: 28rpx;
231 | border-left: 1px solid #e0e0e0;
232 | word-break: break-all;
233 | }
234 |
235 | .wxParse-td:last {
236 | border-top: 1px solid #e0e0e0;
237 | }
238 |
239 | .wxParse-th {
240 | background: #f0f0f0;
241 | border-top: 1px solid #e0e0e0;
242 | }
243 |
244 | .wxParse-del {
245 | display: inline;
246 | }
247 |
248 | .wxParse-figure {
249 | overflow: hidden;
250 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/actionsheet/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | externalClasses: [ "mask-class", "container-class" ],
3 | properties: {
4 | actions: {
5 | type: Array,
6 | value: []
7 | },
8 | show: {
9 | type: Boolean,
10 | value: !1
11 | },
12 | cancelWithMask: {
13 | type: Boolean,
14 | value: !0
15 | },
16 | cancelText: {
17 | type: String,
18 | value: ""
19 | }
20 | },
21 | methods: {
22 | onMaskClick: function() {
23 | this.data.cancelWithMask && this.cancelClick();
24 | },
25 | cancelClick: function() {
26 | this.triggerEvent("cancel");
27 | },
28 | handleBtnClick: function(e) {
29 | var t = e.currentTarget, a = ((void 0 === t ? {} : t).dataset || {}).index;
30 | this.triggerEvent("actionclick", {
31 | index: a
32 | });
33 | }
34 | }
35 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/actionsheet/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "zan-btn": "../btn/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/actionsheet/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{item.name}}
7 |
8 | {{item.subname}}
9 |
10 |
11 |
12 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/actionsheet/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-actionsheet {
2 | background-color: #f8f8f8;
3 | }
4 |
5 | .zan-actionsheet__mask {
6 | position: fixed;
7 | top: 0;
8 | left: 0;
9 | right: 0;
10 | bottom: 0;
11 | z-index: 10;
12 | background: rgba(0,0,0,.7);
13 | display: none;
14 | }
15 |
16 | .zan-actionsheet__container {
17 | position: fixed;
18 | left: 0;
19 | right: 0;
20 | bottom: 0;
21 | background: #f8f8f8;
22 | transform: translate3d(0,50%,0);
23 | transform-origin: center;
24 | transition: all .2s ease;
25 | z-index: 11;
26 | opacity: 0;
27 | visibility: hidden;
28 | }
29 |
30 | .zan-actionsheet__btn {
31 | margin-bottom: 0!important;
32 | }
33 |
34 | .zan-actionsheet__footer .zan-actionsheet__btn {
35 | background: #fff;
36 | }
37 |
38 | .zan-actionsheet__btn-content {
39 | display: flex;
40 | flex-direction: row;
41 | justify-content: center;
42 | }
43 |
44 | .zan-actionsheet__subname {
45 | color: #999;
46 | }
47 |
48 | .zan-actionsheet__name,.zan-actionsheet__subname {
49 | height: 45px;
50 | line-height: 45px;
51 | }
52 |
53 | .zan-actionsheet__btn.zan-btn:last-child::after {
54 | border-bottom-width: 0;
55 | }
56 |
57 | .zan-actionsheet__subname {
58 | margin-left: 2px;
59 | font-size: 12px;
60 | }
61 |
62 | .zan-actionsheet__footer {
63 | margin-top: 10px;
64 | }
65 |
66 | .zan-actionsheet__btn--loading .zan-actionsheet__subname {
67 | color: transparent;
68 | }
69 |
70 | .zan-actionsheet--show .zan-actionsheet__container {
71 | opacity: 1;
72 | transform: translate3d(0,0,0);
73 | visibility: visible;
74 | }
75 |
76 | .zan-actionsheet--show .zan-actionsheet__mask {
77 | display: block;
78 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/badge/index.js:
--------------------------------------------------------------------------------
1 | var DEFAULT_COLOR = "#fff", DEFAULT_BACKGROUND_COLOR = "#f44", DEFAULT_FONT_SIZE = 10, DEFAULT_BOX_SHADOW = "0 0 0 2px #fff";
2 |
3 | Component({
4 | properties: {
5 | color: {
6 | type: String,
7 | value: DEFAULT_COLOR
8 | },
9 | backgroundColor: {
10 | type: String,
11 | value: DEFAULT_BACKGROUND_COLOR
12 | },
13 | fontSize: {
14 | type: Number,
15 | value: DEFAULT_FONT_SIZE
16 | },
17 | boxShadow: {
18 | type: String,
19 | value: DEFAULT_BOX_SHADOW
20 | }
21 | }
22 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/badge/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/badge/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/badge/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-badge {
2 | position: relative;
3 | }
4 |
5 | .zan-badge__text {
6 | position: absolute;
7 | top: -2.4em;
8 | right: .2em;
9 | height: 1.6em;
10 | min-width: 1.6em;
11 | line-height: 1.6;
12 | padding: 0 .4em;
13 | font-size: 20px;
14 | border-radius: .8em;
15 | background: #f44;
16 | color: #fff;
17 | text-align: center;
18 | white-space: nowrap;
19 | transform: translateX(50%) scale(.5);
20 | transform-origin: center;
21 | z-index: 10;
22 | box-shadow: 0 0 0 2px #fff;
23 | box-sizing: border-box;
24 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/btn-group/index.js:
--------------------------------------------------------------------------------
1 | function updateBtnChild() {
2 | var t = this.getRelationNodes("../btn/index");
3 | if (0 < t.length) {
4 | var i = t.length - 1;
5 | t.forEach(function(t, n) {
6 | t.switchLastButtonStatus(n === i);
7 | });
8 | }
9 | }
10 |
11 | Component({
12 | relations: {
13 | "../btn/index": {
14 | type: "child",
15 | linked: function() {
16 | updateBtnChild.call(this);
17 | },
18 | linkChange: function() {
19 | updateBtnChild.call(this);
20 | },
21 | unlinked: function() {
22 | updateBtnChild.call(this);
23 | }
24 | }
25 | }
26 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/btn-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/btn-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/btn-group/index.wxss:
--------------------------------------------------------------------------------
1 | .btn-group {
2 | margin: 15px;
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/btn/index.js:
--------------------------------------------------------------------------------
1 | var nativeButtonBehavior = require("./native-button-behaviors");
2 |
3 | Component({
4 | externalClasses: [ "custom-class" ],
5 | behaviors: [ nativeButtonBehavior ],
6 | relations: {
7 | "../btn-group/index": {
8 | type: "parent",
9 | linked: function() {
10 | this.setData({
11 | inGroup: !0
12 | });
13 | },
14 | unlinked: function() {
15 | this.setData({
16 | inGroup: !1
17 | });
18 | }
19 | }
20 | },
21 | properties: {
22 | type: {
23 | type: String,
24 | value: ""
25 | },
26 | size: {
27 | type: String,
28 | value: ""
29 | },
30 | plain: {
31 | type: Boolean,
32 | value: !1
33 | },
34 | disabled: {
35 | type: Boolean,
36 | value: !1
37 | },
38 | loading: {
39 | type: Boolean,
40 | value: !1
41 | }
42 | },
43 | data: {
44 | inGroup: !1,
45 | isLast: !1
46 | },
47 | methods: {
48 | handleTap: function() {
49 | this.data.disabled ? this.triggerEvent("disabledclick") : this.triggerEvent("btnclick");
50 | },
51 | switchLastButtonStatus: function() {
52 | var t = 0 < arguments.length && void 0 !== arguments[0] && arguments[0];
53 | this.setData({
54 | isLast: t
55 | });
56 | }
57 | }
58 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/btn/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/btn/index.wxml:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/btn/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-btn {
2 | position: relative;
3 | color: #333;
4 | background-color: #fff;
5 | padding-left: 15px;
6 | padding-right: 15px;
7 | border-radius: 2px;
8 | font-size: 16px;
9 | line-height: 45px;
10 | height: 45px;
11 | box-sizing: border-box;
12 | text-decoration: none;
13 | text-align: center;
14 | vertical-align: middle;
15 | overflow: visible;
16 | }
17 |
18 | .zan-btn--group {
19 | margin-bottom: 10px;
20 | }
21 |
22 | .zan-btn::after {
23 | content: '';
24 | position: absolute;
25 | top: 0;
26 | left: 0;
27 | width: 200%;
28 | height: 200%;
29 | transform: scale(.5);
30 | transform-origin: 0 0;
31 | pointer-events: none;
32 | box-sizing: border-box;
33 | border: 0 solid #e5e5e5;
34 | border-width: 1px;
35 | border-radius: 4px;
36 | }
37 |
38 | .zan-btn--primary {
39 | color: #fff;
40 | background-color: #4b0;
41 | }
42 |
43 | .zan-btn--primary::after {
44 | border-color: #0a0;
45 | }
46 |
47 | .zan-btn--warn {
48 | color: #fff;
49 | background-color: #f85;
50 | }
51 |
52 | .zan-btn--warn::after {
53 | border-color: #f85;
54 | }
55 |
56 | .zan-btn--danger {
57 | color: #fff;
58 | background-color: #f44;
59 | }
60 |
61 | .zan-btn--danger::after {
62 | border-color: #e33;
63 | }
64 |
65 | .zan-btn--small {
66 | display: inline-block;
67 | height: 30px;
68 | line-height: 30px;
69 | font-size: 12px;
70 | }
71 |
72 | .zan-btn--small.zan-btn--group {
73 | margin-bottom: 0;
74 | margin-right: 5px;
75 | }
76 |
77 | .zan-btn--mini {
78 | display: inline-block;
79 | line-height: 21px;
80 | height: 22px;
81 | font-size: 10px;
82 | padding-left: 5px;
83 | padding-right: 5px;
84 | }
85 |
86 | .zan-btn--mini.zan-btn--group {
87 | margin-bottom: 0;
88 | margin-right: 5px;
89 | }
90 |
91 | .zan-btn--large {
92 | border-radius: 0;
93 | border: none;
94 | line-height: 50px;
95 | height: 50px;
96 | }
97 |
98 | .zan-btn--large.zan-btn--group {
99 | margin-bottom: 0;
100 | }
101 |
102 | .zan-btn--plain.zan-btn {
103 | background-color: transparent;
104 | }
105 |
106 | .zan-btn--plain.zan-btn--primary {
107 | color: #06bf04;
108 | }
109 |
110 | .zan-btn--plain.zan-btn--warn {
111 | color: #f60;
112 | }
113 |
114 | .zan-btn--plain.zan-btn--danger {
115 | color: #f44;
116 | }
117 |
118 | .button-hover {
119 | opacity: .9;
120 | }
121 |
122 | .zan-btn--loading {
123 | color: transparent;
124 | opacity: 1;
125 | }
126 |
127 | .zan-btn--loading::before {
128 | position: absolute;
129 | left: 50%;
130 | top: 50%;
131 | content: ' ';
132 | width: 16px;
133 | height: 16px;
134 | margin-left: -8px;
135 | margin-top: -8px;
136 | border: 3px solid #e5e5e5;
137 | border-color: #666 #e5e5e5 #e5e5e5 #e5e5e5;
138 | border-radius: 8px;
139 | box-sizing: border-box;
140 | animation: btn-spin .6s linear;
141 | animation-iteration-count: infinite;
142 | }
143 |
144 | .zan-btn--danger.zan-btn--loading::before,.zan-btn--primary.zan-btn--loading::before,.zan-btn--warn.zan-btn--loading::before {
145 | border-color: #fff rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.1);
146 | }
147 |
148 | @keyframes btn-spin {
149 | 0% {
150 | transform: rotate(0);
151 | }
152 |
153 | 100% {
154 | transform: rotate(360deg);
155 | }
156 | }
157 |
158 | .zan-btn.zan-btn--disabled {
159 | color: #999!important;
160 | background: #f8f8f8!important;
161 | border-color: #e5e5e5!important;
162 | cursor: not-allowed!important;
163 | opacity: 1!important;
164 | }
165 |
166 | .zan-btn.zan-btn--disabled::after {
167 | border-color: #e5e5e5!important;
168 | }
169 |
170 | .zan-btn--group.zan-btn--last {
171 | margin-bottom: 0;
172 | margin-right: 0;
173 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/btn/native-button-behaviors.js:
--------------------------------------------------------------------------------
1 | module.exports = Behavior({
2 | properties: {
3 | loading: Boolean,
4 | openType: String,
5 | appParameter: String,
6 | hoverStopPropagation: Boolean,
7 | hoverStartTime: {
8 | type: Number,
9 | value: 20
10 | },
11 | hoverStayTime: {
12 | type: Number,
13 | value: 70
14 | },
15 | lang: {
16 | type: String,
17 | value: "en"
18 | },
19 | sessionFrom: {
20 | type: String,
21 | value: ""
22 | },
23 | sendMessageTitle: String,
24 | sendMessagePath: String,
25 | sendMessageImg: String,
26 | showMessageCard: String
27 | },
28 | methods: {
29 | bindgetuserinfo: function() {
30 | var e = (0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e;
31 | this.triggerEvent("getuserinfo", t);
32 | },
33 | bindcontact: function() {
34 | var e = (0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e;
35 | this.triggerEvent("contact", t);
36 | },
37 | bindgetphonenumber: function() {
38 | var e = (0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e;
39 | this.triggerEvent("getphonenumber", t);
40 | },
41 | binderror: function() {
42 | var e = (0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e;
43 | this.triggerEvent("error", t);
44 | }
45 | }
46 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/capsule/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | type: {
4 | type: String,
5 | value: ""
6 | },
7 | color: {
8 | type: String,
9 | value: ""
10 | },
11 | leftText: {
12 | type: String,
13 | value: ""
14 | },
15 | rightText: {
16 | type: String,
17 | value: ""
18 | }
19 | }
20 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/capsule/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/capsule/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{leftText}}
4 | {{rightText}}
5 |
6 |
7 | {{leftText}}
8 | {{rightText}}
9 |
10 |
11 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/capsule/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-capsule {
2 | display: inline-block;
3 | font-size: 12px;
4 | vertical-align: middle;
5 | line-height: 19px;
6 | transform: scale(.83);
7 | }
8 |
9 | .zan-capsule__left,.zan-capsule__right {
10 | display: inline-block;
11 | line-height: 17px;
12 | height: 19px;
13 | vertical-align: middle;
14 | box-sizing: border-box;
15 | }
16 |
17 | .zan-capsule__left {
18 | padding: 0 2px;
19 | color: #fff;
20 | background: #999;
21 | border-radius: 2px 0 0 2px;
22 | border: 1rpx solid #999;
23 | }
24 |
25 | .zan-capsule__right {
26 | padding: 0 5px;
27 | color: #999;
28 | border-radius: 0 2px 2px 0;
29 | border: 1rpx solid #999;
30 | }
31 |
32 | .zan-capsule--danger .zan-capsule__left {
33 | color: #fff;
34 | background: #f24544;
35 | border-color: #f24544;
36 | }
37 |
38 | .zan-capsule--danger .zan-capsule__right {
39 | color: #f24544;
40 | border-color: #f24544;
41 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/card/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | options: {
3 | multipleSlots: !0
4 | },
5 | externalClasses: [ "card-class" ],
6 | properties: {
7 | useThumbSlot: {
8 | type: Boolean,
9 | value: !1
10 | },
11 | useDetailSlot: {
12 | type: Boolean,
13 | value: !1
14 | },
15 | thumb: String,
16 | price: String,
17 | title: String,
18 | btnText: String,
19 | num: String,
20 | desc: String,
21 | status: String
22 | }
23 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/card/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/card/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{price}}
10 |
11 | {{title}}
12 | {{btnText}}
13 |
14 |
15 |
16 | {{num}}
17 |
18 | {{desc}}
19 |
20 |
21 |
22 | {{status}}
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/cell-group/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | relations: {
3 | "../cell/index": {
4 | type: "child",
5 | linked: function() {
6 | this._updateIsLastCell();
7 | },
8 | linkChanged: function() {
9 | this._updateIsLastCell();
10 | },
11 | unlinked: function() {
12 | this._updateIsLastCell();
13 | }
14 | }
15 | },
16 | data: {
17 | cellUpdateTimeout: 0
18 | },
19 | methods: {
20 | _updateIsLastCell: function() {
21 | var e = this;
22 | if (!(0 < this.data.cellUpdateTimeout)) {
23 | var t = setTimeout(function() {
24 | e.setData({
25 | cellUpdateTimeout: 0
26 | });
27 | var t = e.getRelationNodes("../cell/index");
28 | if (0 < t.length) {
29 | var a = t.length - 1;
30 | t.forEach(function(t, e) {
31 | t.updateIsLastCell(e === a);
32 | });
33 | }
34 | });
35 | this.setData({
36 | cellUpdateTimeout: t
37 | });
38 | }
39 | }
40 | }
41 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/cell-group/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/cell-group/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/cell-group/index.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/zanui/cell-group/index.wxss
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/cell/index.js:
--------------------------------------------------------------------------------
1 | var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2 | return typeof t;
3 | } : function(t) {
4 | return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
5 | }, warn = function(t, e) {
6 | console.warn(t);
7 | };
8 |
9 | Component({
10 | options: {
11 | multipleSlots: !0
12 | },
13 | relations: {
14 | "../cell-group/index": {
15 | type: "parent"
16 | }
17 | },
18 | properties: {
19 | title: {
20 | type: String,
21 | description: "左侧标题"
22 | },
23 | label: {
24 | type: String,
25 | description: "标题下方的描述信息"
26 | },
27 | value: {
28 | type: String,
29 | description: "右侧内容"
30 | },
31 | onlyTapFooter: {
32 | type: Boolean,
33 | description: "只有点击 footer 区域才触发 tab 事件"
34 | },
35 | isLink: {
36 | type: null,
37 | value: "",
38 | description: "是否展示右侧箭头并开启尝试以 url 跳转"
39 | },
40 | linkType: {
41 | type: String,
42 | value: "navigateTo",
43 | description: "链接类型,可选值为 navigateTo,redirectTo,switchTab,reLaunch"
44 | },
45 | url: {
46 | type: String,
47 | value: ""
48 | }
49 | },
50 | data: {
51 | isLastCell: !0
52 | },
53 | methods: {
54 | navigateTo: function() {
55 | var t = this.data.url, e = void 0 === t ? "" : t, i = _typeof(this.data.isLink);
56 | this.triggerEvent("tap", {}), this.data.isLink && e && "true" !== e && "false" !== e && ("boolean" === i || "string" === i ? -1 !== [ "navigateTo", "redirectTo", "switchTab", "reLaunch" ].indexOf(this.data.linkType) ? wx[this.data.linkType].call(wx, {
57 | url: e
58 | }) : warn("linkType 属性可选值为 navigateTo,redirectTo,switchTab,reLaunch", this.data.linkType) : warn("isLink 属性值必须是一个字符串或布尔值", this.data.isLink));
59 | },
60 | cellTap: function() {
61 | this.data.onlyTapFooter || this.navigateTo();
62 | },
63 | updateIsLastCell: function(t) {
64 | this.setData({
65 | isLastCell: t
66 | });
67 | }
68 | }
69 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/cell/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/cell/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{title}}
7 | {{label}}
8 |
9 |
10 |
11 | {{value}}
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/cell/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-cell {
2 | position: relative;
3 | padding: 12px 15px;
4 | display: flex;
5 | align-items: center;
6 | line-height: 1.4;
7 | font-size: 14px;
8 | }
9 |
10 | .zan-cell::after {
11 | content: '';
12 | position: absolute;
13 | top: 0;
14 | left: 0;
15 | width: 200%;
16 | height: 200%;
17 | transform: scale(.5);
18 | transform-origin: 0 0;
19 | pointer-events: none;
20 | box-sizing: border-box;
21 | border: 0 solid #e5e5e5;
22 | border-bottom-width: 1px;
23 | left: 15px;
24 | right: 0;
25 | }
26 |
27 | .zan-cell .zan-cell__icon {
28 | margin-right: 5px;
29 | }
30 |
31 | .zan-cell .zan-cell__icon:empty {
32 | display: none;
33 | }
34 |
35 | .zan-cell__bd {
36 | flex: 1;
37 | }
38 |
39 | .zan-cell__text {
40 | line-height: 24px;
41 | font-size: 14px;
42 | }
43 |
44 | .zan-cell__desc {
45 | line-height: 1.2;
46 | font-size: 12px;
47 | color: #666;
48 | }
49 |
50 | .zan-cell__ft {
51 | position: relative;
52 | text-align: right;
53 | color: #666;
54 | }
55 |
56 | .zan-cell__no-pading {
57 | padding: 0;
58 | }
59 |
60 | .zan-cell__no-pading .zan-cell__bd_padding {
61 | padding: 12px 0 12px 15px;
62 | }
63 |
64 | .zan-cell__no-pading .zan-cell__bd_padding .zan-form__input {
65 | height: 26px;
66 | }
67 |
68 | .zan-cell__no-pading .zan-cell__ft_padding {
69 | padding: 12px 15px 12px 0;
70 | }
71 |
72 | .zan-cell.last-cell::after {
73 | display: none;
74 | }
75 |
76 | .zan-cell--access .zan-cell__ft {
77 | padding-right: 13px;
78 | }
79 |
80 | .zan-cell--access .zan-cell__ft::after {
81 | position: absolute;
82 | top: 50%;
83 | right: 2px;
84 | content: " ";
85 | display: inline-block;
86 | height: 6px;
87 | width: 6px;
88 | border-width: 2px 2px 0 0;
89 | border-color: #c8c8c8;
90 | border-style: solid;
91 | transform: translateY(-50%) matrix(.71,.71,-.71,.71,0,0);
92 | }
93 |
94 | .zan-cell--switch {
95 | padding-top: 6px;
96 | padding-bottom: 6px;
97 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/col/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | externalClasses: [ "col-class" ],
3 | relations: {
4 | "../row/index": {
5 | type: "parent"
6 | }
7 | },
8 | properties: {
9 | col: {
10 | value: 0,
11 | type: Number
12 | },
13 | offset: {
14 | value: 0,
15 | type: Number
16 | }
17 | }
18 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/col/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/col/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/col/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-col {
2 | float: left;
3 | box-sizing: border-box;
4 | width: 0;
5 | }
6 |
7 | .zan-col-1 {
8 | width: 4.16667%;
9 | }
10 |
11 | .zan-col-offset-1 {
12 | margin-left: 4.16667%;
13 | }
14 |
15 | .zan-col-2 {
16 | width: 8.33333%;
17 | }
18 |
19 | .zan-col-offset-2 {
20 | margin-left: 8.33333%;
21 | }
22 |
23 | .zan-col-3 {
24 | width: 12.5%;
25 | }
26 |
27 | .zan-col-offset-3 {
28 | margin-left: 12.5%;
29 | }
30 |
31 | .zan-col-4 {
32 | width: 16.66667%;
33 | }
34 |
35 | .zan-col-offset-4 {
36 | margin-left: 16.66667%;
37 | }
38 |
39 | .zan-col-5 {
40 | width: 20.83333%;
41 | }
42 |
43 | .zan-col-offset-5 {
44 | margin-left: 20.83333%;
45 | }
46 |
47 | .zan-col-6 {
48 | width: 25%;
49 | }
50 |
51 | .zan-col-offset-6 {
52 | margin-left: 25%;
53 | }
54 |
55 | .zan-col-7 {
56 | width: 29.16667%;
57 | }
58 |
59 | .zan-col-offset-7 {
60 | margin-left: 29.16667%;
61 | }
62 |
63 | .zan-col-8 {
64 | width: 33.33333%;
65 | }
66 |
67 | .zan-col-offset-8 {
68 | margin-left: 33.33333%;
69 | }
70 |
71 | .zan-col-9 {
72 | width: 37.5%;
73 | }
74 |
75 | .zan-col-offset-9 {
76 | margin-left: 37.5%;
77 | }
78 |
79 | .zan-col-10 {
80 | width: 41.66667%;
81 | }
82 |
83 | .zan-col-offset-10 {
84 | margin-left: 41.66667%;
85 | }
86 |
87 | .zan-col-11 {
88 | width: 45.83333%;
89 | }
90 |
91 | .zan-col-offset-11 {
92 | margin-left: 45.83333%;
93 | }
94 |
95 | .zan-col-12 {
96 | width: 50%;
97 | }
98 |
99 | .zan-col-offset-12 {
100 | margin-left: 50%;
101 | }
102 |
103 | .zan-col-13 {
104 | width: 54.16667%;
105 | }
106 |
107 | .zan-col-offset-13 {
108 | margin-left: 54.16667%;
109 | }
110 |
111 | .zan-col-14 {
112 | width: 58.33333%;
113 | }
114 |
115 | .zan-col-offset-14 {
116 | margin-left: 58.33333%;
117 | }
118 |
119 | .zan-col-15 {
120 | width: 62.5%;
121 | }
122 |
123 | .zan-col-offset-15 {
124 | margin-left: 62.5%;
125 | }
126 |
127 | .zan-col-16 {
128 | width: 66.66667%;
129 | }
130 |
131 | .zan-col-offset-16 {
132 | margin-left: 66.66667%;
133 | }
134 |
135 | .zan-col-17 {
136 | width: 70.83333%;
137 | }
138 |
139 | .zan-col-offset-17 {
140 | margin-left: 70.83333%;
141 | }
142 |
143 | .zan-col-18 {
144 | width: 75%;
145 | }
146 |
147 | .zan-col-offset-18 {
148 | margin-left: 75%;
149 | }
150 |
151 | .zan-col-19 {
152 | width: 79.16667%;
153 | }
154 |
155 | .zan-col-offset-19 {
156 | margin-left: 79.16667%;
157 | }
158 |
159 | .zan-col-20 {
160 | width: 83.33333%;
161 | }
162 |
163 | .zan-col-offset-20 {
164 | margin-left: 83.33333%;
165 | }
166 |
167 | .zan-col-21 {
168 | width: 87.5%;
169 | }
170 |
171 | .zan-col-offset-21 {
172 | margin-left: 87.5%;
173 | }
174 |
175 | .zan-col-22 {
176 | width: 91.66667%;
177 | }
178 |
179 | .zan-col-offset-22 {
180 | margin-left: 91.66667%;
181 | }
182 |
183 | .zan-col-23 {
184 | width: 95.83333%;
185 | }
186 |
187 | .zan-col-offset-23 {
188 | margin-left: 95.83333%;
189 | }
190 |
191 | .zan-col-24 {
192 | width: 100%;
193 | }
194 |
195 | .zan-col-offset-24 {
196 | margin-left: 100%;
197 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/common/helper.js:
--------------------------------------------------------------------------------
1 | function _toConsumableArray(r) {
2 | if (Array.isArray(r)) {
3 | for (var n = 0, e = Array(r.length); n < r.length; n++) e[n] = r[n];
4 | return e;
5 | }
6 | return Array.from(r);
7 | }
8 |
9 | function extractComponentId() {
10 | return ((0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).currentTarget || {}).dataset.componentId;
11 | }
12 |
13 | var LIFE_CYCLE = [ "onLoad", "onReady", "onShow", "onHide", "onUnload", "onPullDownRefresh", "onReachBottom", "onShareAppMessage", "onPageScroll" ], extendCreator = function() {
14 | var r = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, n = r.life, e = void 0 === n ? LIFE_CYCLE : n, t = r.exclude, o = void 0 === t ? [] : t, i = o.concat(LIFE_CYCLE.map(getFuncArrayName));
15 | if (!Array.isArray(e) || !Array.isArray(o)) throw new Error("Invalid Extend Config");
16 | var u = e.filter(function(r) {
17 | return 0 <= LIFE_CYCLE.indexOf(r);
18 | });
19 | return function(a) {
20 | for (var r = arguments.length, n = Array(1 < r ? r - 1 : 0), e = 1; e < r; e++) n[e - 1] = arguments[e];
21 | return n.forEach(function(t) {
22 | t && Object.keys(t).forEach(function(r) {
23 | var n = t[r];
24 | if (!(0 <= i.indexOf(r))) if (0 <= u.indexOf(r) && "function" == typeof n) {
25 | var e, o = getFuncArrayName(r);
26 | if (a[o] || (a[o] = [], a[r] && a[o].push(a[r]), a[r] = function() {
27 | for (var n = this, r = arguments.length, e = Array(r), t = 0; t < r; t++) e[t] = arguments[t];
28 | a[o].forEach(function(r) {
29 | return r.apply(n, e);
30 | });
31 | }), t[o]) (e = a[o]).push.apply(e, _toConsumableArray(t[o])); else a[o].push(n);
32 | } else a[r] = n;
33 | });
34 | }), a;
35 | };
36 | }, getFuncArrayName = function(r) {
37 | return "__$" + r;
38 | };
39 |
40 | module.exports = {
41 | extractComponentId: extractComponentId,
42 | extend: Object.assign,
43 | extendCreator: extendCreator
44 | };
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/common/pop-manager/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | show: {
4 | type: Boolean,
5 | value: !1
6 | },
7 | overlay: {
8 | type: Boolean,
9 | value: !0
10 | },
11 | showOverlay: {
12 | type: Boolean,
13 | value: !0
14 | },
15 | type: {
16 | type: String,
17 | value: "center"
18 | }
19 | },
20 | methods: {
21 | handleMaskClick: function() {
22 | this.triggerEvent("clickmask", {});
23 | }
24 | }
25 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/common/pop-manager/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/common/pop-manager/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/common/pop-manager/index.wxss:
--------------------------------------------------------------------------------
1 | .pop {
2 | visibility: hidden;
3 | }
4 |
5 | .pop--show {
6 | visibility: visible;
7 | }
8 |
9 | .pop__mask {
10 | position: fixed;
11 | top: 0;
12 | left: 0;
13 | right: 0;
14 | bottom: 0;
15 | z-index: 10;
16 | background: rgba(0,0,0,.7);
17 | display: none;
18 | }
19 |
20 | .pop__mask--hide {
21 | background: 0 0;
22 | }
23 |
24 | .pop__container {
25 | position: fixed;
26 | left: 50%;
27 | top: 50%;
28 | transform: translate3d(-50%,-50%,0);
29 | transform-origin: center;
30 | transition: all .4s ease;
31 | z-index: 1111;
32 | opacity: 0;
33 | }
34 |
35 | .pop--show .pop__container {
36 | opacity: 1;
37 | }
38 |
39 | .pop--show .pop__mask {
40 | display: block;
41 | }
42 |
43 | .pop--left .pop__container {
44 | left: 0;
45 | top: 50%;
46 | transform: translate3d(-100%,-50%,0);
47 | }
48 |
49 | .pop--show.pop--left .pop__container {
50 | transform: translate3d(0,-50%,0);
51 | }
52 |
53 | .pop--right .pop__container {
54 | right: 0;
55 | top: 50%;
56 | left: auto;
57 | transform: translate3d(100%,-50%,0);
58 | }
59 |
60 | .pop--show.pop--right .pop__container {
61 | transform: translate3d(0,-50%,0);
62 | }
63 |
64 | .pop--bottom .pop__container {
65 | top: auto;
66 | left: 50%;
67 | bottom: 110rpx;
68 | transform: translate3d(-50%,100%,0);
69 | }
70 |
71 | .pop--show.pop--bottom .pop__container {
72 | transform: translate3d(-50%,0,0);
73 | }
74 |
75 | .pop--top .pop__container {
76 | top: 0;
77 | left: 50%;
78 | transform: translate3d(-50%,-100%,0);
79 | }
80 |
81 | .pop--show.pop--top .pop__container {
82 | transform: translate3d(-50%,0,0);
83 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/datetime-picker/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/datetime-picker/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{item}}
5 |
6 |
7 | {{item}}
8 |
9 |
10 | {{item}}
11 |
12 |
13 | {{item}}
14 |
15 |
16 | {{item}}
17 |
18 |
19 | {{item}}
20 |
21 |
22 |
23 |
24 |
25 |
26 | {{text||placeholder}}
27 |
28 |
29 |
30 |
31 |
32 | {{text||placeholder}}
33 |
34 |
35 | 取消
36 | 确认
37 |
38 |
39 |
40 |
41 | {{item}}
42 |
43 |
44 | 年
45 |
46 |
47 | {{item}}
48 |
49 |
50 | 月
51 |
52 |
53 | {{item}}
54 |
55 |
56 | 日
57 |
58 |
59 | {{item}}
60 |
61 |
62 | 时
63 |
64 |
65 | {{item}}
66 |
67 |
68 | 分
69 |
70 |
71 | {{item}}
72 |
73 |
74 | 秒
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/datetime-picker/index.wxss:
--------------------------------------------------------------------------------
1 | .picker-view-column {
2 | font-size: 14px;
3 | }
4 |
5 | .placeholder-class {
6 | width: 100%;
7 | }
8 |
9 | .picker {
10 | position: fixed;
11 | bottom: -100px;
12 | width: 100vw;
13 | left: 0;
14 | background: #fff;
15 | z-index: 999;
16 | display: flex;
17 | flex-direction: column;
18 | height: 0;
19 | transition: height ease-in 0.3s;
20 | }
21 |
22 | .picker-view .picker {
23 | position: relative;
24 | bottom: auto;
25 | left: auto;
26 | width: 100%;
27 | z-index: auto;
28 | }
29 |
30 | .picker-visible {
31 | height: 236px;
32 | bottom: 0;
33 | }
34 |
35 | .picker-view .picker-visible {
36 | height: 200px;
37 | }
38 |
39 | .picker-mask {
40 | position: fixed;
41 | top: 0;
42 | left: 0;
43 | right: 0;
44 | bottom: 100vh;
45 | background: rgba(0,0,0,0.5);
46 | z-index: -1;
47 | }
48 |
49 | .picker-mask.show {
50 | bottom: 0;
51 | z-index: 998;
52 | }
53 |
54 | .picker .picker-action {
55 | height: 36px;
56 | border-bottom: 1rpx solid #e5e5e5;
57 | display: flex;
58 | align-items: center;
59 | justify-content: space-between;
60 | padding: 0 15px;
61 | }
62 |
63 | .picker-action view:last-child {
64 | color: #1aad16;
65 | }
66 |
67 | .picker .picker-cols {
68 | display: flex;
69 | flex: 1;
70 | margin: 10px 5px;
71 | box-sizing: border-box;
72 | position: relative;
73 | overflow: hidden;
74 | height: 180px;
75 | font-size: 16px;
76 | }
77 |
78 | .picker-cols .fixed-col {
79 | color: #999;
80 | margin-left: 5px;
81 | height: 100%;
82 | line-height: 180px;
83 | }
84 |
85 | .picker-cols .col {
86 | transform-origin: center;
87 | font-size: 14px;
88 | }
89 |
90 | .picker-cols .col .select-item {
91 | color: #333;
92 | font-size: 16px;
93 | }
94 |
95 | .picker-cols .col {
96 | flex: 1;
97 | text-align: right;
98 | color: #aaa;
99 | height: 180px;
100 | position: relative;
101 | padding-top: 79px;
102 | }
103 |
104 | .picker-cols .col>view {
105 | transition: transform 0.0003s;
106 | }
107 |
108 | .picker-cols .col .cell {
109 | height: 36px;
110 | }
111 |
112 | .picker-cols::after,.picker-cols::before {
113 | content: '';
114 | position: absolute;
115 | height: 72px;
116 | width: calc(100% - 10px);
117 | pointer-events: none;
118 | }
119 |
120 | .picker-cols::before {
121 | top: 0;
122 | border-bottom: 1rpx solid #e5e5e5;
123 | }
124 |
125 | .picker-cols::after {
126 | bottom: 0;
127 | border-top: 1rpx solid #e5e5e5;
128 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/dialog/data.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | title: "",
3 | buttons: [],
4 | message: " ",
5 | selector: "#zan-dialog",
6 | buttonsShowVertical: !1,
7 | showConfirmButton: !0,
8 | confirmButtonText: "确定",
9 | confirmButtonColor: "#3CC51F",
10 | showCancelButton: !1,
11 | cancelButtonText: "取消",
12 | cancelButtonColor: "#333"
13 | };
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/dialog/dialog.js:
--------------------------------------------------------------------------------
1 | var _extends = Object.assign || function(t) {
2 | for (var e = 1; e < arguments.length; e++) {
3 | var o = arguments[e];
4 | for (var r in o) Object.prototype.hasOwnProperty.call(o, r) && (t[r] = o[r]);
5 | }
6 | return t;
7 | }, defaultData = require("./data");
8 |
9 | function Dialog(t, e) {
10 | var o = _extends({}, defaultData, t), r = e;
11 | if (!r) {
12 | var n = getCurrentPages();
13 | r = n[n.length - 1];
14 | }
15 | var a = r.selectComponent(o.selector);
16 | if (!a) return console.error("无法找到对应的dialog组件,请于页面中注册并在 wxml 中声明 dialog 自定义组件"),
17 | Promise.reject({
18 | type: "component error"
19 | });
20 | var s = o.buttons, c = void 0 === s ? [] : s, l = !1;
21 | if (0 === c.length) {
22 | if (o.showConfirmButton && c.push({
23 | type: "confirm",
24 | text: o.confirmButtonText,
25 | color: o.confirmButtonColor
26 | }), o.showCancelButton) {
27 | var i = {
28 | type: "cancel",
29 | text: o.cancelButtonText,
30 | color: o.cancelButtonColor
31 | };
32 | o.buttonsShowVertical ? c.push(i) : c.unshift(i);
33 | }
34 | } else l = !0;
35 | return new Promise(function(t, e) {
36 | a.setData(_extends({}, o, {
37 | buttons: c,
38 | showCustomBtns: l,
39 | key: "" + new Date().getTime(),
40 | show: !0,
41 | promiseFunc: {
42 | resolve: t,
43 | reject: e
44 | }
45 | }));
46 | });
47 | }
48 |
49 | module.exports = Dialog;
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/dialog/index.js:
--------------------------------------------------------------------------------
1 | var _extends = Object.assign || function(t) {
2 | for (var e = 1; e < arguments.length; e++) {
3 | var a = arguments[e];
4 | for (var o in a) Object.prototype.hasOwnProperty.call(a, o) && (t[o] = a[o]);
5 | }
6 | return t;
7 | }, defaultData = require("./data"), _f = function() {};
8 |
9 | Component({
10 | properties: {},
11 | data: _extends({}, defaultData, {
12 | key: "",
13 | show: !1,
14 | showCustomBtns: !1,
15 | promiseFunc: {}
16 | }),
17 | methods: {
18 | handleButtonClick: function(t) {
19 | var e = t.currentTarget, a = (void 0 === e ? {} : e).dataset, o = void 0 === a ? {} : a, r = this.data.promiseFunc || {}, n = r.resolve, s = void 0 === n ? _f : n, i = r.reject, c = void 0 === i ? _f : i;
20 | this.setData({
21 | show: !1
22 | }), this.data.showCustomBtns ? s({
23 | type: o.type
24 | }) : "confirm" === o.type ? s({
25 | type: "confirm"
26 | }) : c({
27 | type: "cancel"
28 | });
29 | }
30 | }
31 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/dialog/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "pop-manager": "../common/pop-manager/index",
5 | "zan-button": "../btn/index"
6 | }
7 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/dialog/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{message}}
6 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/dialog/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-dialog--container {
2 | width: 80vw;
3 | font-size: 16px;
4 | overflow: hidden;
5 | border-radius: 4px;
6 | background-color: #fff;
7 | color: #333;
8 | }
9 |
10 | .zan-dialog__header {
11 | padding: 15px 0 0;
12 | text-align: center;
13 | }
14 |
15 | .zan-dialog__content {
16 | position: relative;
17 | padding: 15px 20px;
18 | line-height: 1.5;
19 | min-height: 40px;
20 | }
21 |
22 | .zan-dialog__content::after {
23 | content: '';
24 | position: absolute;
25 | top: 0;
26 | left: 0;
27 | width: 200%;
28 | height: 200%;
29 | transform: scale(.5);
30 | transform-origin: 0 0;
31 | pointer-events: none;
32 | box-sizing: border-box;
33 | border: 0 solid #e5e5e5;
34 | border-bottom-width: 1px;
35 | }
36 |
37 | .zan-dialog__content--title {
38 | color: #999;
39 | font-size: 14px;
40 | }
41 |
42 | .zan-dialog__footer {
43 | overflow: hidden;
44 | }
45 |
46 | .zan-dialog__button {
47 | flex: 1;
48 | }
49 |
50 | .zan-dialog__button-inside,.zan-dialog__button-inside--first {
51 | margin-bottom: 0;
52 | line-height: 50px;
53 | height: 50px;
54 | }
55 |
56 | .zan-dialog__button-inside--first::after,.zan-dialog__button-inside::after {
57 | border-width: 0;
58 | border-radius: 0;
59 | }
60 |
61 | .zan-dialog__footer--horizon {
62 | display: flex;
63 | }
64 |
65 | .zan-dialog__footer--horizon .zan-dialog__button-inside::after {
66 | border-left-width: 1px;
67 | }
68 |
69 | .zan-dialog__footer--vertical .zan-dialog__button-inside::after {
70 | border-top-width: 1px;
71 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/field/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | behaviors: [ "wx://form-field" ],
3 | properties: {
4 | title: String,
5 | type: {
6 | type: String,
7 | value: "input"
8 | },
9 | disabled: Boolean,
10 | inputType: {
11 | type: String,
12 | value: "text"
13 | },
14 | placeholder: String,
15 | focus: Boolean,
16 | mode: {
17 | type: String,
18 | value: "normal"
19 | },
20 | right: Boolean,
21 | error: Boolean,
22 | maxlength: {
23 | type: Number,
24 | value: 140
25 | }
26 | },
27 | methods: {
28 | handleFieldChange: function(e) {
29 | var t = e.detail, i = (void 0 === t ? {} : t).value, n = void 0 === i ? "" : i;
30 | this.setData({
31 | value: n
32 | }), this.triggerEvent("change", e);
33 | },
34 | handleFieldFocus: function(e) {
35 | this.triggerEvent("focus", e);
36 | },
37 | handleFieldBlur: function(e) {
38 | this.triggerEvent("blur", e);
39 | }
40 | }
41 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/field/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/field/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/field/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-cell {
2 | position: relative;
3 | padding: 12px 15px;
4 | display: flex;
5 | align-items: center;
6 | line-height: 1.4;
7 | font-size: 14px;
8 | }
9 |
10 | .zan-cell::after {
11 | content: '';
12 | position: absolute;
13 | top: 0;
14 | left: 0;
15 | width: 200%;
16 | height: 200%;
17 | transform: scale(.5);
18 | transform-origin: 0 0;
19 | pointer-events: none;
20 | box-sizing: border-box;
21 | border: 0 solid #e5e5e5;
22 | border-bottom-width: 1px;
23 | left: 15px;
24 | right: 0;
25 | }
26 |
27 | .zan-cell .zan-cell__icon {
28 | margin-right: 5px;
29 | }
30 |
31 | .zan-cell .zan-cell__icon:empty {
32 | display: none;
33 | }
34 |
35 | .zan-cell__bd {
36 | flex: 1;
37 | }
38 |
39 | .zan-cell__text {
40 | line-height: 24px;
41 | font-size: 14px;
42 | }
43 |
44 | .zan-cell__desc {
45 | line-height: 1.2;
46 | font-size: 12px;
47 | color: #666;
48 | }
49 |
50 | .zan-cell__ft {
51 | position: relative;
52 | text-align: right;
53 | color: #666;
54 | }
55 |
56 | .zan-cell__no-pading {
57 | padding: 0;
58 | }
59 |
60 | .zan-cell__no-pading .zan-cell__bd_padding {
61 | padding: 12px 0 12px 15px;
62 | }
63 |
64 | .zan-cell__no-pading .zan-cell__bd_padding .zan-form__input {
65 | height: 26px;
66 | }
67 |
68 | .zan-cell__no-pading .zan-cell__ft_padding {
69 | padding: 12px 15px 12px 0;
70 | }
71 |
72 | .zan-cell.last-cell::after {
73 | display: none;
74 | }
75 |
76 | .zan-cell--access .zan-cell__ft {
77 | padding-right: 13px;
78 | }
79 |
80 | .zan-cell--access .zan-cell__ft::after {
81 | position: absolute;
82 | top: 50%;
83 | right: 2px;
84 | content: " ";
85 | display: inline-block;
86 | height: 6px;
87 | width: 6px;
88 | border-width: 2px 2px 0 0;
89 | border-color: #c8c8c8;
90 | border-style: solid;
91 | transform: translateY(-50%) matrix(.71,.71,-.71,.71,0,0);
92 | }
93 |
94 | .zan-cell--switch {
95 | padding-top: 6px;
96 | padding-bottom: 6px;
97 | }
98 |
99 | .zan-field {
100 | padding: 7px 15px;
101 | color: #333;
102 | }
103 |
104 | .zan-field--wrapped {
105 | margin: 10px 15px;
106 | background-color: #fff;
107 | }
108 |
109 | .zan-field--wrapped::after {
110 | left: 0;
111 | border-width: 1px;
112 | border-radius: 4px;
113 | }
114 |
115 | .zan-field.zan-field--wrapped::after {
116 | display: block;
117 | }
118 |
119 | .zan-field--error {
120 | color: #f40;
121 | }
122 |
123 | .zan-field--wrapped.zan-field--error::after {
124 | border-color: #f40;
125 | }
126 |
127 | .zan-field__title {
128 | color: #333;
129 | min-width: 65px;
130 | padding-right: 10px;
131 | }
132 |
133 | .zan-field__input {
134 | flex: 1;
135 | line-height: 1.6;
136 | padding: 4px 0;
137 | min-height: 22px;
138 | height: 65px!important;
139 | font-size: 14px;
140 | }
141 |
142 | .zan-field__placeholder {
143 | font-size: 14px;
144 | }
145 |
146 | .zan-field__input--right {
147 | text-align: right;
148 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/icon/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | type: {
4 | type: String,
5 | value: ""
6 | }
7 | }
8 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/icon/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/icon/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/index.js:
--------------------------------------------------------------------------------
1 | exports.Dialog = require("./dialog/dialog"), exports.Toast = require("./toast/toast");
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/loading/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | type: {
4 | type: String,
5 | value: "circle"
6 | },
7 | color: {
8 | type: String
9 | }
10 | }
11 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/loading/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/loading/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/loadmore/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{nodata_str||'暂无数据'}}
9 |
10 |
11 |
12 | 加载中...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/loadmore/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-loadmore {
2 | position: relative;
3 | width: 65%;
4 | margin: 21px auto;
5 | line-height: 20px;
6 | font-size: 14px;
7 | text-align: center;
8 | vertical-align: middle;
9 | }
10 |
11 | .zan-loading {
12 | width: 20px;
13 | height: 20px;
14 | display: inline-block;
15 | vertical-align: middle;
16 | animation: weuiLoading 1s steps(12,end) infinite;
17 | background: transparent url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iciIgd2lkdGg9JzEyMHB4JyBoZWlnaHQ9JzEyMHB4JyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj4KICAgIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBmaWxsPSJub25lIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxyZWN0IHg9JzQ2LjUnIHk9JzQwJyB3aWR0aD0nNycgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjRTlFOUU5JwogICAgICAgICAgdHJhbnNmb3JtPSdyb3RhdGUoMCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+CiAgICA8L3JlY3Q+CiAgICA8cmVjdCB4PSc0Ni41JyB5PSc0MCcgd2lkdGg9JzcnIGhlaWdodD0nMjAnIHJ4PSc1JyByeT0nNScgZmlsbD0nIzk4OTY5NycKICAgICAgICAgIHRyYW5zZm9ybT0ncm90YXRlKDMwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApJz4KICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0naW5kZWZpbml0ZScvPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyM5Qjk5OUEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSg2MCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+CiAgICAgICAgICAgICAgICAgcmVwZWF0Q291bnQ9J2luZGVmaW5pdGUnLz4KICAgIDwvcmVjdD4KICAgIDxyZWN0IHg9JzQ2LjUnIHk9JzQwJyB3aWR0aD0nNycgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjQTNBMUEyJwogICAgICAgICAgdHJhbnNmb3JtPSdyb3RhdGUoOTAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNBQkE5QUEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgxMjAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNCMkIyQjInCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgxNTAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNCQUI4QjknCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgxODAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNDMkMwQzEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgyMTAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNDQkNCQ0InCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgyNDAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNEMkQyRDInCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgyNzAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNEQURBREEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgzMDAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNFMkUyRTInCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgzMzAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0Pgo8L3N2Zz4=) no-repeat;
18 | background-size: 100%;
19 | }
20 |
21 | .zan-loadmore .zan-loading {
22 | margin-right: 4px;
23 | }
24 |
25 | .zan-loadmore__tips {
26 | display: inline-block;
27 | vertical-align: middle;
28 | height: 20px;
29 | line-height: 20px;
30 | }
31 |
32 | .zan-loadmore--nodata,.zan-loadmore--nomore {
33 | color: #999;
34 | }
35 |
36 | .zan-loadmore--nodata::after,.zan-loadmore--nomore::after {
37 | content: '';
38 | position: absolute;
39 | top: 0;
40 | left: 0;
41 | width: 200%;
42 | height: 200%;
43 | transform: scale(.5);
44 | transform-origin: 0 0;
45 | pointer-events: none;
46 | box-sizing: border-box;
47 | border: 0 solid #e5e5e5;
48 | border-top-width: 1px;
49 | }
50 |
51 | .zan-loadmore--nodata {
52 | margin-top: 120px;
53 | }
54 |
55 | .zan-loadmore--nodata .zan-loadmore__tips {
56 | position: relative;
57 | top: -11px;
58 | background: #f9f9f9;
59 | padding: 0 6px;
60 | z-index: 1;
61 | }
62 |
63 | .zan-loadmore--nomore .zan-loadmore__tips {
64 | position: relative;
65 | top: -11px;
66 | background: #f9f9f9;
67 | padding: 0 6px;
68 | z-index: 1;
69 | }
70 |
71 | .zan-loadmore__dot {
72 | position: absolute;
73 | left: 50%;
74 | top: 10px;
75 | margin-left: -2px;
76 | margin-top: -2px;
77 | content: " ";
78 | width: 4px;
79 | height: 4px;
80 | border-radius: 50%;
81 | background-color: #e5e5e5;
82 | display: inline-block;
83 | vertical-align: middle;
84 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/movable/movable.js:
--------------------------------------------------------------------------------
1 | var _wx$getSystemInfoSync = wx.getSystemInfoSync(), windowWidth = _wx$getSystemInfoSync.windowWidth, windowHeight = _wx$getSystemInfoSync.windowHeight;
2 |
3 | Component({
4 | properties: {
5 | x: {
6 | type: Number,
7 | value: 40
8 | },
9 | y: {
10 | type: Number,
11 | value: windowHeight - 200
12 | },
13 | post_img: {
14 | type: String
15 | },
16 | post_appid: {
17 | type: String
18 | },
19 | post_url: {
20 | type: String
21 | }
22 | },
23 | methods: {
24 | jumpToPage: function(t) {
25 | var e = t.currentTarget.dataset.url;
26 | -1 != e.indexOf("http") ? wx.navigateTo({
27 | url: "../ad/index?path=" + encodeURIComponent(e)
28 | }) : wx.navigateTo({
29 | url: e
30 | });
31 | }
32 | }
33 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/movable/movable.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/movable/movable.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/movable/movable.wxss:
--------------------------------------------------------------------------------
1 | .movable-box {
2 | width: 100vw;
3 | height: 90vh;
4 | }
5 |
6 | .movable-btn {
7 | position: fixed;
8 | width: 100px;
9 | height: 50px;
10 | }
11 |
12 | .movable-btn image {
13 | display: block;
14 | width: 100%;
15 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/noticebar/index.js:
--------------------------------------------------------------------------------
1 | var VALID_MODE = [ "closeable" ], FONT_COLOR = "#f60", BG_COLOR = "#fff7cc";
2 |
3 | Component({
4 | properties: {
5 | text: {
6 | type: String,
7 | value: ""
8 | },
9 | mode: {
10 | type: String,
11 | value: ""
12 | },
13 | url: {
14 | type: String,
15 | value: ""
16 | },
17 | openType: {
18 | type: String,
19 | value: "navigate"
20 | },
21 | delay: {
22 | type: Number,
23 | value: 0
24 | },
25 | speed: {
26 | type: Number,
27 | value: 40
28 | },
29 | scrollable: {
30 | type: Boolean,
31 | value: !1
32 | },
33 | leftIcon: {
34 | type: String,
35 | value: ""
36 | },
37 | color: {
38 | type: String,
39 | value: FONT_COLOR
40 | },
41 | backgroundColor: {
42 | type: String,
43 | value: BG_COLOR
44 | }
45 | },
46 | data: {
47 | show: !0,
48 | hasRightIcon: !1,
49 | width: void 0,
50 | wrapWidth: void 0,
51 | elapse: void 0,
52 | animation: null,
53 | resetAnimation: null,
54 | timer: null
55 | },
56 | attached: function() {
57 | var t = this.data.mode;
58 | t && this._checkMode(t) && this.setData({
59 | hasRightIcon: !0
60 | });
61 | },
62 | detached: function() {
63 | var t = this.data.timer;
64 | t && clearTimeout(t);
65 | },
66 | ready: function() {
67 | this._init();
68 | },
69 | methods: {
70 | _checkMode: function(t) {
71 | var e = ~VALID_MODE.indexOf(t);
72 | return e || console.warn("mode only accept value of " + VALID_MODE + ", now get " + t + "."),
73 | e;
74 | },
75 | _init: function() {
76 | var u = this;
77 | wx.createSelectorQuery().in(this).select(".zan-noticebar__content").boundingClientRect(function(t) {
78 | if (!t || !t.width) throw new Error("页面缺少 noticebar 元素");
79 | u.setData({
80 | width: t.width
81 | }), wx.createSelectorQuery().in(u).select(".zan-noticebar__content-wrap").boundingClientRect(function(t) {
82 | if (t && t.width) {
83 | var e = t.width, a = u.data, i = a.width, n = a.speed, o = a.scrollable, r = a.delay;
84 | if (o && e < i) {
85 | var l = i / n * 1e3, c = wx.createAnimation({
86 | duration: l,
87 | timeingFunction: "linear",
88 | delay: r
89 | }), s = wx.createAnimation({
90 | duration: 0,
91 | timeingFunction: "linear"
92 | });
93 | u.setData({
94 | elapse: l,
95 | wrapWidth: e,
96 | animation: c,
97 | resetAnimation: s
98 | }, function() {
99 | u._scroll();
100 | });
101 | }
102 | }
103 | }).exec();
104 | }).exec();
105 | },
106 | _scroll: function() {
107 | var t = this, e = this.data, a = e.animation, i = e.resetAnimation, n = e.wrapWidth, o = e.elapse, r = e.speed;
108 | i.translateX(n).step();
109 | var l = a.translateX(-o * r / 1e3).step();
110 | this.setData({
111 | animationData: i.export()
112 | }), setTimeout(function() {
113 | t.setData({
114 | animationData: l.export()
115 | });
116 | }, 100);
117 | var c = setTimeout(function() {
118 | t._scroll();
119 | }, o);
120 | this.setData({
121 | timer: c
122 | });
123 | },
124 | _handleButtonClick: function() {
125 | var t = this.data.timer;
126 | t && clearTimeout(t), this.setData({
127 | show: !1,
128 | timer: null
129 | });
130 | }
131 | }
132 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/noticebar/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "zan-icon": "../icon/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/noticebar/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{text}}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/noticebar/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-noticebar {
2 | display: flex;
3 | padding: 9px 10px;
4 | font-size: 12px;
5 | line-height: 1.5;
6 | }
7 |
8 | .zan-noticebar--within-icon {
9 | position: relative;
10 | padding-right: 30px;
11 | }
12 |
13 | .zan-noticebar__left-icon {
14 | height: 18px;
15 | min-width: 20px;
16 | padding-top: 1px;
17 | box-sizing: border-box;
18 | }
19 |
20 | .zan-noticebar__left-icon>image {
21 | width: 16px;
22 | height: 16px;
23 | }
24 |
25 | .zan-noticebar__right-icon {
26 | position: absolute;
27 | top: 10px;
28 | right: 10px;
29 | font-size: 15px;
30 | line-height: 1;
31 | }
32 |
33 | .zan-noticebar__content-wrap {
34 | position: relative;
35 | flex: 1;
36 | height: 18px;
37 | overflow: hidden;
38 | }
39 |
40 | .zan-noticebar__content {
41 | position: absolute;
42 | white-space: nowrap;
43 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/panel/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | title: {
4 | type: String,
5 | value: ""
6 | },
7 | hideTop: {
8 | type: Boolean,
9 | value: !1
10 | },
11 | hideBorder: {
12 | type: Boolean,
13 | value: !1
14 | }
15 | }
16 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/panel/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/panel/index.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{title}}
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/panel/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-panel {
2 | position: relative;
3 | overflow: hidden;
4 | }
5 |
6 | .zan-panel__title {
7 | font-size: 14px;
8 | line-height: 1;
9 | color: #999;
10 | padding: 20px 15px 10px 15px;
11 | }
12 |
13 | .zan-panel__content {
14 | position: relative;
15 | background: #fff;
16 | overflow: hidden;
17 | }
18 |
19 | .zan-panel__content::after {
20 | content: '';
21 | position: absolute;
22 | top: 0;
23 | left: 0;
24 | width: 200%;
25 | height: 200%;
26 | transform: scale(.5);
27 | transform-origin: 0 0;
28 | pointer-events: none;
29 | box-sizing: border-box;
30 | border: 0 solid #e5e5e5;
31 | border-top-width: 1px;
32 | border-bottom-width: 1px;
33 | }
34 |
35 | .zan-panel--without-border::after {
36 | border: 0 none;
37 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/popup/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | show: {
4 | type: Boolean,
5 | value: !1
6 | },
7 | overlay: {
8 | type: Boolean,
9 | value: !0
10 | },
11 | closeOnClickOverlay: {
12 | type: Boolean,
13 | value: !0
14 | },
15 | type: {
16 | type: String,
17 | value: "center"
18 | }
19 | },
20 | methods: {
21 | handleMaskClick: function() {
22 | this.triggerEvent("click-overlay", {}), this.data.closeOnClickOverlay && this.triggerEvent("close", {});
23 | }
24 | }
25 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/popup/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "pop-manager": "../common/pop-manager/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/popup/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/popup/index.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/libs/zanui/popup/index.wxss
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/row/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | externalClasses: [ "row-class" ],
3 | relations: {
4 | "../col/index": {
5 | type: "child"
6 | }
7 | }
8 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/row/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/row/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/row/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-row:after {
2 | content: "";
3 | display: table;
4 | clear: both;
5 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/select/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | items: {
4 | type: Array,
5 | value: []
6 | },
7 | name: {
8 | type: String,
9 | value: ""
10 | },
11 | checkedValue: {
12 | type: String,
13 | value: ""
14 | },
15 | activeColor: {
16 | type: String,
17 | value: "#ff4444"
18 | }
19 | },
20 | methods: {
21 | handleSelectChange: function(e) {
22 | var t = e.detail.value;
23 | this.triggerEvent("change", {
24 | value: t
25 | });
26 | }
27 | }
28 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/select/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "zan-icon": "../icon/index",
5 | "zan-cell": "../cell/index"
6 | }
7 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/select/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 | function getColor(color) {
12 | color = color || '#ff4444';
13 | return (color)
14 | };
15 | module.exports = ({
16 | getColor: getColor,
17 | getItemStyle: (function(item, checkedValue, activeColor) {
18 | var padding = item.padding * 10;
19 | var style = 'padding-left: ' + padding + 'px;';
20 | if (item.value === checkedValue) {
21 | style += 'color: ' + getColor(activeColor)
22 | };
23 | return (style)
24 | }),
25 | });
26 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/select/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-select__list .zan-select__radio {
2 | position: absolute;
3 | top: 0;
4 | bottom: 0;
5 | left: 0;
6 | right: 0;
7 | opacity: 0;
8 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/stepper/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | size: String,
4 | stepper: {
5 | type: Number,
6 | value: 1
7 | },
8 | min: {
9 | type: Number,
10 | value: 1
11 | },
12 | max: {
13 | type: Number,
14 | value: 1 / 0
15 | },
16 | step: {
17 | type: Number,
18 | value: 1
19 | }
20 | },
21 | methods: {
22 | handleZanStepperChange: function(e, t) {
23 | var n = e.currentTarget.dataset, a = (void 0 === n ? {} : n).disabled, i = this.data.step, r = this.data.stepper;
24 | if (a) return null;
25 | "minus" === t ? r -= i : "plus" === t && (r += i), this.triggerEvent("change", r),
26 | this.triggerEvent(t);
27 | },
28 | handleZanStepperMinus: function(e) {
29 | this.handleZanStepperChange(e, "minus");
30 | },
31 | handleZanStepperPlus: function(e) {
32 | this.handleZanStepperChange(e, "plus");
33 | },
34 | handleZanStepperBlur: function(e) {
35 | var t = this, n = e.detail.value, a = this.data, i = a.min, r = a.max;
36 | n ? (r < (n = +n) ? n = r : n < i && (n = i), this.triggerEvent("change", n)) : setTimeout(function() {
37 | t.triggerEvent("change", i);
38 | }, 16);
39 | }
40 | }
41 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/stepper/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/stepper/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 |
5 |
6 |
7 | +
8 |
9 |
10 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/stepper/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-stepper {
2 | color: #666;
3 | }
4 |
5 | .zan-stepper view {
6 | display: inline-block;
7 | line-height: 20px;
8 | padding: 5px 0;
9 | text-align: center;
10 | min-width: 40px;
11 | box-sizing: border-box;
12 | vertical-align: middle;
13 | font-size: 12px;
14 | border: 1rpx solid #999;
15 | }
16 |
17 | .zan-stepper .zan-stepper__minus {
18 | border-right: none;
19 | border-radius: 2px 0 0 2px;
20 | }
21 |
22 | .zan-stepper .zan-stepper__text {
23 | border: 1rpx solid #999;
24 | display: inline-block;
25 | text-align: center;
26 | vertical-align: middle;
27 | height: 30px;
28 | width: 40px;
29 | min-height: auto;
30 | font-size: 12px;
31 | line-height: 30px;
32 | }
33 |
34 | .zan-stepper .zan-stepper__plus {
35 | border-left: none;
36 | border-radius: 0 2px 2px 0;
37 | }
38 |
39 | .zan-stepper .zan-stepper--disabled {
40 | background: #f8f8f8;
41 | color: #bbb;
42 | border-color: #e8e8e8;
43 | }
44 |
45 | .zan-stepper--small view {
46 | min-width: 36px;
47 | line-height: 18px;
48 | }
49 |
50 | .zan-stepper--small .zan-stepper__text {
51 | width: 36px;
52 | line-height: 28px;
53 | height: 28px;
54 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/steps/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | type: {
4 | type: String,
5 | value: "horizon"
6 | },
7 | hasDesc: {
8 | type: Boolean,
9 | value: !1
10 | },
11 | steps: {
12 | type: Array,
13 | value: []
14 | },
15 | className: String
16 | }
17 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/steps/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/steps/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{step.text}}
4 | {{step.desc}}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/steps/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-steps--steps.zan-steps--5 .zan-steps__step {
2 | width: 25%;
3 | }
4 |
5 | .zan-steps--steps.zan-steps--4 .zan-steps__step {
6 | width: 33%;
7 | }
8 |
9 | .zan-steps--steps.zan-steps--3 .zan-steps__step {
10 | width: 50%;
11 | }
12 |
13 | .zan-steps--steps .zan-steps__step {
14 | position: relative;
15 | float: left;
16 | padding-bottom: 25px;
17 | color: #b1b1b1;
18 | }
19 |
20 | .zan-steps--steps .zan-steps__title {
21 | transform: translateX(-50%);
22 | font-size: 10px;
23 | text-align: center;
24 | }
25 |
26 | .zan-steps--steps .zan-steps__icons {
27 | position: absolute;
28 | top: 30px;
29 | left: -10px;
30 | padding: 0 8px;
31 | background-color: #fff;
32 | z-index: 10;
33 | }
34 |
35 | .zan-steps--steps .zan-steps__circle {
36 | display: block;
37 | position: relative;
38 | width: 5px;
39 | height: 5px;
40 | background-color: #e5e5e5;
41 | border-radius: 50%;
42 | }
43 |
44 | .zan-steps--steps .zan-steps__line {
45 | position: absolute;
46 | left: 0;
47 | top: 32px;
48 | width: 100%;
49 | height: 1px;
50 | background-color: #e5e5e5;
51 | }
52 |
53 | .zan-steps--steps .zan-steps__step--done {
54 | color: #333;
55 | }
56 |
57 | .zan-steps--steps .zan-steps__step--done .zan-steps__line {
58 | background-color: #06bf04;
59 | }
60 |
61 | .zan-steps--steps .zan-steps__step--done .zan-steps__circle {
62 | width: 5px;
63 | height: 5px;
64 | background-color: #09bb07;
65 | }
66 |
67 | .zan-steps--steps .zan-steps__step--cur .zan-steps__icons {
68 | top: 25px;
69 | left: -14px;
70 | }
71 |
72 | .zan-steps--steps .zan-steps__step--cur .zan-steps__circle {
73 | width: 13px;
74 | height: 13px;
75 | background-image: url(https://b.yzcdn.cn/v2/image/wap/success_small@2x.png);
76 | background-size: 13px 13px;
77 | }
78 |
79 | .zan-steps--steps .zan-steps__step--cur .zan-steps__line {
80 | background-color: #e5e5e5;
81 | }
82 |
83 | .zan-steps--steps .zan-steps__step--first-child .zan-steps__title {
84 | margin-left: 0;
85 | transform: none;
86 | text-align: left;
87 | }
88 |
89 | .zan-steps--steps .zan-steps__step--first-child .zan-steps__icons {
90 | left: -7px;
91 | }
92 |
93 | .zan-steps--steps .zan-steps__step--last-child {
94 | position: absolute;
95 | right: 0;
96 | top: 0;
97 | text-align: right;
98 | }
99 |
100 | .zan-steps--steps .zan-steps__step--last-child .zan-steps__title {
101 | transform: none;
102 | text-align: right;
103 | }
104 |
105 | .zan-steps--steps .zan-steps__step--last-child .zan-steps__icons {
106 | left: auto;
107 | right: -6px;
108 | }
109 |
110 | .zan-steps--steps .zan-steps__step--last-child .zan-steps__line {
111 | display: none;
112 | }
113 |
114 | .zan-steps--steps .zan-steps__step--db-title {
115 | min-height: 29px;
116 | }
117 |
118 | .zan-steps--steps .zan-steps__step--db-title .zan-steps__line {
119 | top: 45px;
120 | }
121 |
122 | .zan-steps--steps .zan-steps__step--db-title .zan-steps__icons {
123 | top: 43px;
124 | }
125 |
126 | .zan-steps--steps .zan-steps__step--db-title.zan-steps__step--cur .zan-steps__icons {
127 | top: 39px;
128 | }
129 |
130 | .zan-steps--vsteps {
131 | color: #999;
132 | font-size: 14px;
133 | }
134 |
135 | .zan-steps--vsteps .zan-steps__step {
136 | position: relative;
137 | padding: 15px 0;
138 | }
139 |
140 | .zan-steps--vsteps .zan-steps__step--done {
141 | color: #4b0;
142 | }
143 |
144 | .zan-steps--vsteps .zan-steps__line {
145 | position: absolute;
146 | top: 0;
147 | bottom: 0;
148 | left: 7px;
149 | width: 1px;
150 | background-color: #e5e5e5;
151 | }
152 |
153 | .zan-steps--vsteps .zan-steps__title {
154 | display: inline-block;
155 | line-height: 20px;
156 | padding-left: 27px;
157 | }
158 |
159 | .zan-steps--vsteps .zan-steps__title--desc {
160 | padding-left: 3px;
161 | }
162 |
163 | .zan-steps--vsteps .zan-steps__icons {
164 | position: absolute;
165 | left: 7px;
166 | top: 50%;
167 | transform: translate(-50%,-50%);
168 | z-index: 2;
169 | padding: 3px 0;
170 | background-color: #fff;
171 | }
172 |
173 | .zan-steps--vsteps .zan-steps__circle {
174 | width: 5px;
175 | height: 5px;
176 | background-color: #cacaca;
177 | border-radius: 10px;
178 | }
179 |
180 | .zan-steps--vsteps .zan-steps__step--done .zan-steps__circle {
181 | width: 5px;
182 | height: 5px;
183 | background-color: #09bb07;
184 | }
185 |
186 | .zan-steps--vsteps .zan-steps__step--cur .zan-steps__circle {
187 | width: 13px;
188 | height: 13px;
189 | background: transparent url(https://b.yzcdn.cn/v2/image/wap/success_small@2x.png);
190 | background-size: 13px 13px;
191 | border-radius: 0;
192 | }
193 |
194 | .zan-steps--vsteps .zan-steps__icon--active {
195 | width: 13px;
196 | height: 13px;
197 | }
198 |
199 | .zan-steps--vsteps .zan-steps__step--first-child .zan-steps__title::before {
200 | content: '';
201 | position: absolute;
202 | top: 0;
203 | bottom: 50%;
204 | left: 7px;
205 | width: 1px;
206 | background-color: #fff;
207 | z-index: 1;
208 | }
209 |
210 | .zan-steps--vsteps .zan-steps__step--last-child .zan-steps__title::after {
211 | content: '';
212 | position: absolute;
213 | top: 50%;
214 | bottom: 0;
215 | left: 7px;
216 | width: 1px;
217 | background-color: #fff;
218 | z-index: 1;
219 | }
220 |
221 | .zan-steps {
222 | position: relative;
223 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/switch/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | checked: {
4 | type: Boolean,
5 | value: !1
6 | },
7 | loading: {
8 | type: Boolean,
9 | value: !1
10 | },
11 | disabled: {
12 | type: Boolean,
13 | value: !1
14 | }
15 | },
16 | methods: {
17 | handleZanSwitchChange: function() {
18 | if (!this.data.loading && !this.data.disabled) {
19 | var e = !this.data.checked;
20 | this.triggerEvent("change", {
21 | checked: e,
22 | loading: this.data.loading
23 | });
24 | }
25 | }
26 | }
27 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/switch/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/switch/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/switch/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-switch {
2 | position: relative;
3 | display: inline-block;
4 | width: 52px;
5 | height: 32px;
6 | vertical-align: middle;
7 | box-sizing: border-box;
8 | border-radius: 16px;
9 | background: #44db5e;
10 | border: 1px solid #44db5e;
11 | }
12 |
13 | .zan-switch__circle {
14 | position: absolute;
15 | top: 0;
16 | left: 0;
17 | width: 30px;
18 | height: 30px;
19 | display: inline-block;
20 | background: #fff;
21 | border-radius: 15px;
22 | box-sizing: border-box;
23 | box-shadow: 0 0 0 1px rgba(0,0,0,.1),0 3px 1px 0 rgba(0,0,0,.05),0 2px 2px 0 rgba(0,0,0,.1),0 3px 3px 0 rgba(0,0,0,.05);
24 | transition: transform .35s cubic-bezier(.45,1,.4,1);
25 | z-index: 2;
26 | }
27 |
28 | .zan-switch__bg {
29 | position: absolute;
30 | top: -1px;
31 | left: -1px;
32 | width: 52px;
33 | height: 32px;
34 | background: #fff;
35 | border-radius: 26px;
36 | display: inline-block;
37 | border: 1px solid #e5e5e5;
38 | box-sizing: border-box;
39 | transition: transform .35s cubic-bezier(.45,1,.4,1);
40 | transform: scale(0);
41 | transform-origin: 36px 16px;
42 | }
43 |
44 | .zan-switch--on .zan-switch__circle {
45 | transform: translateX(20px);
46 | }
47 |
48 | .zan-switch--off .zan-switch__bg {
49 | transform: scale(1);
50 | }
51 |
52 | .zan-swtich--disabled {
53 | opacity: .4;
54 | }
55 |
56 | .zan-switch__loading {
57 | position: absolute;
58 | left: 7px;
59 | top: 7px;
60 | width: 16px;
61 | height: 16px;
62 | background: url(https://img.yzcdn.cn/public_files/2017/02/24/9acec77d91106cd15b8107c4633d9155.png) no-repeat;
63 | background-size: 16px 16px;
64 | animation: zan-switch-loading .8s infinite linear;
65 | }
66 |
67 | @keyframes zan-switch-loading {
68 | from {
69 | transform: rotate(0);
70 | }
71 |
72 | to {
73 | transform: rotate(360deg);
74 | }
75 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tab-line/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | externalClasses: "class",
3 | properties: {
4 | scroll: {
5 | type: Boolean,
6 | value: !1
7 | },
8 | fixed: {
9 | type: Boolean,
10 | value: !1
11 | },
12 | height: {
13 | type: Number,
14 | value: 0
15 | },
16 | list: {
17 | type: Array,
18 | value: []
19 | },
20 | selectedId: {
21 | type: [ String, Number ],
22 | value: ""
23 | }
24 | },
25 | methods: {
26 | _handleZanTabChange: function(e) {
27 | var t = e.currentTarget.dataset.itemId;
28 | this.setData({
29 | selectedId: t
30 | }), this.triggerEvent("tabchange", t);
31 | }
32 | }
33 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tab-line/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tab-line/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{item.title}}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tab-line/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-tab {
2 | height: 45px;
3 | margin-bottom: 20rpx;
4 | }
5 |
6 | .zan-tab__bd {
7 | width: 750rpx;
8 | display: flex;
9 | flex-direction: row;
10 | background: #fff;
11 | }
12 |
13 | .zan-tab__bd--fixed {
14 | position: fixed;
15 | top: 0;
16 | z-index: 2;
17 | }
18 |
19 | .zan-tab__item {
20 | flex: 1;
21 | display: inline-block;
22 | padding: 0 5px;
23 | line-height: 0;
24 | box-sizing: border-box;
25 | overflow: hidden;
26 | text-align: center;
27 | }
28 |
29 | .zan-tab__title {
30 | display: inline-block;
31 | max-width: 100%;
32 | height: 44px;
33 | line-height: 44px;
34 | overflow: hidden;
35 | text-overflow: ellipsis;
36 | box-sizing: border-box;
37 | word-break: keep-all;
38 | font-size: 14px;
39 | color: #666;
40 | }
41 |
42 | .zan-tab__item--selected .zan-tab__title {
43 | color: #f44;
44 | }
45 |
46 | .zan-tab__bd--scroll {
47 | display: block;
48 | white-space: nowrap;
49 | }
50 |
51 | .zan-tab__bd--scroll .zan-tab__item {
52 | min-width: 80px;
53 | }
54 |
55 | .zan-tab__item {
56 | border-right: 1px solid #ececec;
57 | }
58 |
59 | .zan-tab__item--selected {
60 | border-bottom: 1px solid #f44;
61 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tab/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | externalClasses: "class",
3 | properties: {
4 | scroll: {
5 | type: Boolean,
6 | value: !1
7 | },
8 | fixed: {
9 | type: Boolean,
10 | value: !1
11 | },
12 | height: {
13 | type: Number,
14 | value: 0
15 | },
16 | list: {
17 | type: Array,
18 | value: []
19 | },
20 | selectedId: {
21 | type: [ String, Number ],
22 | value: ""
23 | }
24 | },
25 | methods: {
26 | _handleZanTabChange: function(e) {
27 | var t = e.currentTarget.dataset.itemId;
28 | this.setData({
29 | selectedId: t
30 | }), this.triggerEvent("tabchange", t);
31 | }
32 | }
33 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tab/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{item.title}}
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tab/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-tab {
2 | height: 45px;
3 | margin-bottom: 20rpx;
4 | }
5 |
6 | .zan-tab__bd {
7 | width: 750rpx;
8 | display: flex;
9 | flex-direction: row;
10 | background: #fff;
11 | }
12 |
13 | .zan-tab__bd--fixed {
14 | position: fixed;
15 | top: 0;
16 | z-index: 2;
17 | }
18 |
19 | .zan-tab__item {
20 | flex: 1;
21 | display: inline-block;
22 | padding: 0 5px;
23 | line-height: 0;
24 | box-sizing: border-box;
25 | overflow: hidden;
26 | text-align: center;
27 | }
28 |
29 | .zan-tab__title {
30 | display: inline-block;
31 | max-width: 100%;
32 | height: 44px;
33 | line-height: 44px;
34 | overflow: hidden;
35 | text-overflow: ellipsis;
36 | box-sizing: border-box;
37 | word-break: keep-all;
38 | font-size: 14px;
39 | color: #666;
40 | }
41 |
42 | .zan-tab__item--selected .zan-tab__title {
43 | color: #f44;
44 | }
45 |
46 | .zan-tab__bd--scroll {
47 | display: block;
48 | white-space: nowrap;
49 | }
50 |
51 | .zan-tab__bd--scroll .zan-tab__item {
52 | min-width: 80px;
53 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tag/index.js:
--------------------------------------------------------------------------------
1 | Component({
2 | properties: {
3 | type: {
4 | type: String
5 | },
6 | plain: {
7 | type: Boolean,
8 | value: !1
9 | },
10 | disabled: {
11 | type: Boolean,
12 | value: !1
13 | }
14 | }
15 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tag/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tag/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/tag/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-tag {
2 | display: inline-block;
3 | position: relative;
4 | box-sizing: border-box;
5 | line-height: 16px;
6 | padding: 0 5px;
7 | border-radius: 2px;
8 | font-size: 11px;
9 | background: #c9c9c9;
10 | text-align: center;
11 | color: #fff;
12 | }
13 |
14 | .zan-tag::after {
15 | content: '';
16 | position: absolute;
17 | top: 0;
18 | left: 0;
19 | width: 200%;
20 | height: 200%;
21 | transform: scale(.5);
22 | transform-origin: 0 0;
23 | pointer-events: none;
24 | box-sizing: border-box;
25 | border: 0 solid #e5e5e5;
26 | border-width: 1px;
27 | border-radius: 4px;
28 | }
29 |
30 | .zan-tag--plain {
31 | color: #c9c9c9;
32 | background: #fff;
33 | }
34 |
35 | .zan-tag--primary {
36 | color: #fff;
37 | background-color: #4b0;
38 | }
39 |
40 | .zan-tag--primary::after {
41 | border-color: #4b0;
42 | }
43 |
44 | .zan-tag--primary.zan-tag--plain {
45 | color: #4b0;
46 | background: #fff;
47 | }
48 |
49 | .zan-tag--danger {
50 | color: #fff;
51 | background: #f44;
52 | }
53 |
54 | .zan-tag--danger::after {
55 | border-color: #f44;
56 | }
57 |
58 | .zan-tag--danger.zan-tag--plain {
59 | color: #f44;
60 | background: #fff;
61 | }
62 |
63 | .zan-tag--warn {
64 | color: #fff;
65 | background: #f85;
66 | }
67 |
68 | .zan-tag--warn::after {
69 | border-color: #f85;
70 | }
71 |
72 | .zan-tag--warn.zan-tag--plain {
73 | color: #f85;
74 | background: #fff;
75 | }
76 |
77 | .zan-tag--disabled {
78 | color: #999!important;
79 | background: #e5e5e5;
80 | }
81 |
82 | .zan-tag--disabled::after {
83 | border-color: #ccc;
84 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/toast/index.js:
--------------------------------------------------------------------------------
1 | var _extends = Object.assign || function(e) {
2 | for (var t = 1; t < arguments.length; t++) {
3 | var n = arguments[t];
4 | for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (e[s] = n[s]);
5 | }
6 | return e;
7 | }, DEFAULT_DATA = {
8 | show: !1,
9 | message: "",
10 | icon: "",
11 | image: "",
12 | mask: !1
13 | }, SUPPORT_TYPE = [ "loading", "success", "fail" ];
14 |
15 | Component({
16 | data: _extends({}, DEFAULT_DATA),
17 | methods: {
18 | show: function(e) {
19 | var t = _extends({}, e), n = e.icon || "", s = e.image || "";
20 | -1 < SUPPORT_TYPE.indexOf(e.type) && (n = e.type, s = ""), this.setData(_extends({}, t, {
21 | icon: n,
22 | image: s
23 | }));
24 | },
25 | clear: function() {
26 | this.setData(_extends({}, DEFAULT_DATA));
27 | }
28 | }
29 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/toast/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {
4 | "zan-icon": "../icon/index"
5 | }
6 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/toast/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{message}}
10 |
11 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/toast/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-toast {
2 | position: fixed;
3 | top: 35%;
4 | left: 50%;
5 | transform: translate3d(-50%,-50%,0);
6 | background: rgba(0,0,0,.7);
7 | color: #fff;
8 | font-size: 14px;
9 | line-height: 1.5em;
10 | margin: 0 auto;
11 | box-sizing: border-box;
12 | padding: 10px 18px;
13 | text-align: center;
14 | border-radius: 4px;
15 | z-index: 100;
16 | }
17 |
18 | .zan-toast--notitle {
19 | padding: 18px;
20 | }
21 |
22 | .zan-toast__icon {
23 | display: block;
24 | width: 40px;
25 | height: 40px;
26 | line-height: 40px;
27 | margin: 0 auto;
28 | padding: 12px 15px;
29 | font-size: 38px;
30 | text-align: center;
31 | }
32 |
33 | .zan-toast__icon-loading {
34 | line-height: 0;
35 | }
36 |
37 | .zan-loading {
38 | width: 20px;
39 | height: 20px;
40 | display: inline-block;
41 | vertical-align: middle;
42 | animation: weuiLoading 1s steps(12,end) infinite;
43 | background: transparent url(data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iciIgd2lkdGg9JzEyMHB4JyBoZWlnaHQ9JzEyMHB4JyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj4KICAgIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBmaWxsPSJub25lIiBjbGFzcz0iYmsiPjwvcmVjdD4KICAgIDxyZWN0IHg9JzQ2LjUnIHk9JzQwJyB3aWR0aD0nNycgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjRTlFOUU5JwogICAgICAgICAgdHJhbnNmb3JtPSdyb3RhdGUoMCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+CiAgICA8L3JlY3Q+CiAgICA8cmVjdCB4PSc0Ni41JyB5PSc0MCcgd2lkdGg9JzcnIGhlaWdodD0nMjAnIHJ4PSc1JyByeT0nNScgZmlsbD0nIzk4OTY5NycKICAgICAgICAgIHRyYW5zZm9ybT0ncm90YXRlKDMwIDUwIDUwKSB0cmFuc2xhdGUoMCAtMzApJz4KICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0naW5kZWZpbml0ZScvPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyM5Qjk5OUEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSg2MCA1MCA1MCkgdHJhbnNsYXRlKDAgLTMwKSc+CiAgICAgICAgICAgICAgICAgcmVwZWF0Q291bnQ9J2luZGVmaW5pdGUnLz4KICAgIDwvcmVjdD4KICAgIDxyZWN0IHg9JzQ2LjUnIHk9JzQwJyB3aWR0aD0nNycgaGVpZ2h0PScyMCcgcng9JzUnIHJ5PSc1JyBmaWxsPScjQTNBMUEyJwogICAgICAgICAgdHJhbnNmb3JtPSdyb3RhdGUoOTAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNBQkE5QUEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgxMjAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNCMkIyQjInCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgxNTAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNCQUI4QjknCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgxODAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNDMkMwQzEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgyMTAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNDQkNCQ0InCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgyNDAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNEMkQyRDInCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgyNzAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNEQURBREEnCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgzMDAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0PgogICAgPHJlY3QgeD0nNDYuNScgeT0nNDAnIHdpZHRoPSc3JyBoZWlnaHQ9JzIwJyByeD0nNScgcnk9JzUnIGZpbGw9JyNFMkUyRTInCiAgICAgICAgICB0cmFuc2Zvcm09J3JvdGF0ZSgzMzAgNTAgNTApIHRyYW5zbGF0ZSgwIC0zMCknPgogICAgPC9yZWN0Pgo8L3N2Zz4=) no-repeat;
44 | background-size: 100%;
45 | }
46 |
47 | .zan-toast__icon-loading .zan-loading {
48 | width: 40px;
49 | height: 40px;
50 | }
51 |
52 | .zan-toast__icon-image {
53 | background-size: 40px;
54 | background-position: center;
55 | background-repeat: no-repeat;
56 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/toast/toast.js:
--------------------------------------------------------------------------------
1 | var _extends = Object.assign || function(t) {
2 | for (var e = 1; e < arguments.length; e++) {
3 | var a = arguments[e];
4 | for (var o in a) Object.prototype.hasOwnProperty.call(a, o) && (t[o] = a[o]);
5 | }
6 | return t;
7 | };
8 |
9 | function _defineProperty(t, e, a) {
10 | return e in t ? Object.defineProperty(t, e, {
11 | value: a,
12 | enumerable: !0,
13 | configurable: !0,
14 | writable: !0
15 | }) : t[e] = a, t;
16 | }
17 |
18 | var TOAST_CONFIG_KEY = "zanui.__zanToastPageConfig", timeoutData = {
19 | timeoutId: 0,
20 | toastCtx: null
21 | }, globalToastUserConfig = {};
22 |
23 | function getPageCtx(t) {
24 | var e = t;
25 | if (!e) {
26 | var a = getCurrentPages();
27 | e = a[a.length - 1];
28 | }
29 | return e;
30 | }
31 |
32 | function getPageToastConfig(t) {
33 | return (t.data.zanui || {}).__zanToastPageConfig || {};
34 | }
35 |
36 | function Toast(t, e) {
37 | var a = t || {};
38 | "string" == typeof t && (a = {
39 | message: t
40 | });
41 | var o = getPageCtx(e), n = getPageToastConfig(o), i = _extends({}, globalToastUserConfig, n, a), r = o.selectComponent(i.selector);
42 | if (r) {
43 | timeoutData.timeoutId && Toast.clear(), r.show(_extends({}, i, {
44 | show: !0
45 | }));
46 | var s = setTimeout(function() {
47 | r.clear();
48 | }, i.timeout || 3e3);
49 | timeoutData = {
50 | timeoutId: s,
51 | toastCtx: r
52 | };
53 | } else console.error("无法找到对应的toast组件,请于页面中注册并在 wxml 中声明 toast 自定义组件");
54 | }
55 |
56 | Toast.setDefaultOptions = function() {
57 | var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, e = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : "page", a = {
58 | selector: t.selector || "",
59 | type: t.type || "",
60 | icon: t.icon || "",
61 | image: t.image || "",
62 | timeout: t.timeout || 3e3
63 | };
64 | if ("global" === e) globalToastUserConfig = _extends({}, a); else if ("page" === e) {
65 | getPageCtx().setData(_defineProperty({}, "" + TOAST_CONFIG_KEY, a));
66 | }
67 | }, Toast.resetDefaultOptions = function() {
68 | "global" === (0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : "page") ? globalToastUserConfig = {} : getPageCtx().setData(_defineProperty({}, "" + TOAST_CONFIG_KEY, {}));
69 | }, Toast.clear = function() {
70 | clearTimeout(timeoutData.timeoutId);
71 | try {
72 | timeoutData.toastCtx && timeoutData.toastCtx.clear();
73 | } catch (t) {}
74 | timeoutData = {
75 | timeoutId: 0,
76 | toastCtx: null
77 | };
78 | }, Toast.loading = function() {
79 | var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {};
80 | Toast(_extends({}, t, {
81 | type: "loading"
82 | }));
83 | }, module.exports = Toast;
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/toptips/index.js:
--------------------------------------------------------------------------------
1 | var _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
2 | return typeof t;
3 | } : function(t) {
4 | return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
5 | }, _extends = Object.assign || function(t) {
6 | for (var e = 1; e < arguments.length; e++) {
7 | var o = arguments[e];
8 | for (var r in o) Object.prototype.hasOwnProperty.call(o, r) && (t[r] = o[r]);
9 | }
10 | return t;
11 | }, FONT_COLOR = "#fff", BG_COLOR = "#e64340";
12 |
13 | function Toptips() {
14 | var t = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}, e = getCurrentPages(), o = e[e.length - 1];
15 | t = Object.assign({
16 | selector: "#zan-toptips",
17 | duration: 3e3
18 | }, parseParam(t));
19 | var r = o.selectComponent(t.selector);
20 | delete t.selector, r.setData(_extends({}, t)), r && r.show();
21 | }
22 |
23 | function parseParam(t) {
24 | return "object" === (void 0 === t ? "undefined" : _typeof(t)) ? t : {
25 | content: t
26 | };
27 | }
28 |
29 | Component({
30 | properties: {
31 | content: String,
32 | color: {
33 | type: String,
34 | value: FONT_COLOR
35 | },
36 | backgroundColor: {
37 | type: String,
38 | value: BG_COLOR
39 | },
40 | isShow: {
41 | type: Boolean,
42 | value: !1
43 | },
44 | duration: {
45 | type: Number,
46 | value: 3e3
47 | }
48 | },
49 | methods: {
50 | show: function() {
51 | var t = this, e = this.data.duration;
52 | this._timer && clearTimeout(this._timer), this.setData({
53 | isShow: !0
54 | }), 0 < e && e !== 1 / 0 && (this._timer = setTimeout(function() {
55 | t.hide();
56 | }, e));
57 | },
58 | hide: function() {
59 | this._timer = clearTimeout(this._timer), this.setData({
60 | isShow: !1
61 | });
62 | }
63 | }
64 | }), module.exports = Toptips;
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/toptips/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/toptips/index.wxml:
--------------------------------------------------------------------------------
1 | {{content}}
2 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/libs/zanui/toptips/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-toptips {
2 | display: block;
3 | position: fixed;
4 | -webkit-transform: translateZ(0) translateY(-100%);
5 | width: 100%;
6 | min-height: 32px;
7 | top: 0;
8 | line-height: 2.3;
9 | font-size: 14px;
10 | text-align: center;
11 | color: #fff;
12 | background-color: #e64340;
13 | z-index: 110;
14 | opacity: 0;
15 | transition: all .4s ease;
16 | }
17 |
18 | .zan-toptips--show {
19 | -webkit-transform: translateZ(0) translateY(0);
20 | opacity: 1;
21 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/cashier/index.js:
--------------------------------------------------------------------------------
1 | var app = getApp(), Toptips = require("../../libs/zanui/toptips/index");
2 |
3 | Page({
4 | data: {
5 | receiver: null,
6 | hasReceiver: !1,
7 | remarkOrder: {
8 | placeholder: "选填",
9 | inputCount: 0,
10 | maxlength: 100,
11 | inputValue: ""
12 | },
13 | showOpenSetting: !1
14 | },
15 | onLoad: function (e) {
16 | var t = this, a = wx.getStorageSync("loading_img");
17 | a && t.setData({
18 | loadingImg: a
19 | });
20 | var i = e.id, n = e.type;
21 | n && "wechat" == n && t.setData({
22 | wechatPay: !0
23 | }), app.util.request({
24 | url: "entry/wxapp/item",
25 | cachetime: "0",
26 | data: {
27 | act: "detail",
28 | id: i,
29 | m: "superman_hand2"
30 | },
31 | success: function (e) {
32 | e.data.errno ? t.showIconToast(e.data.errmsg) : t.setData({
33 | itemDetail: e.data.data.item,
34 | completed: !0
35 | });
36 | },
37 | fail: function (e) {
38 | t.setData({
39 | completed: !0
40 | }), t.showIconToast(e.data.errmsg);
41 | }
42 | });
43 | },
44 | setAddress: function () {
45 | var t = this;
46 | wx.chooseAddress({
47 | success: function (e) {
48 | t.setData({
49 | receiver: e,
50 | hasReceiver: !0
51 | });
52 | },
53 | fail: function (e) {
54 | console.log(e), t.data.showOpenSetting || t.setData({
55 | showOpenSetting: !0
56 | });
57 | }
58 | });
59 | },
60 | hideOpenSetting: function () {
61 | this.data.showOpenSetting && this.setData({
62 | showOpenSetting: !1
63 | });
64 | },
65 | confirmOpenSetting: function () {
66 | this.data.showOpenSetting && this.setData({
67 | showOpenSetting: !1
68 | });
69 | },
70 | submitOrder: function (e) {
71 | var a = this;
72 | if (a.data.hasReceiver) {
73 | var t = a.data.receiver.provinceName + a.data.receiver.cityName + a.data.receiver.countyName + a.data.receiver.detailInfo, i = e.detail.formId;
74 | app.util.request({
75 | url: "entry/wxapp/notice",
76 | cachetime: "0",
77 | data: {
78 | act: "formid",
79 | formid: i,
80 | m: "superman_hand2"
81 | },
82 | success: function (e) {
83 | 0 == e.data.errno ? console.log("formid已添加") : console.log(e.data.errmsg);
84 | },
85 | fail: function (e) {
86 | console.log(e.data.errmsg);
87 | }
88 | }), app.util.request({
89 | url: "entry/wxapp/item",
90 | data: {
91 | m: "superman_hand2",
92 | act: "submit",
93 | itemid: a.data.itemDetail.id,
94 | mobile: a.data.receiver.telNumber,
95 | address: t,
96 | name: a.data.receiver.userName,
97 | formId: i,
98 | payType: a.data.wechatPay ? "wechat" : "credit",
99 | reply: a.data.remarkOrder.inputValue ? a.data.remarkOrder.inputValue : ""
100 | },
101 | fail: function (e) {
102 | console.log(e), 20 == e.data.errno ? wx.showModal({
103 | title: "系统提示",
104 | content: e.data.errmsg + "(" + e.data.errno + ")",
105 | confirmText: "去赚积分",
106 | success: function (e) {
107 | e.confirm && wx.redirectTo({
108 | url: "../get_credit/index"
109 | });
110 | }
111 | }) : wx.showModal({
112 | title: "系统提示",
113 | content: e.data.errmsg + "(" + e.data.errno + ")"
114 | });
115 | },
116 | success: function (e) {
117 | if (a.data.wechatPay) {
118 | var t = {
119 | timeStamp: e.data.data.timeStamp,
120 | nonceStr: e.data.data.nonceStr,
121 | package: e.data.data.package,
122 | signType: e.data.data.signType,
123 | paySign: e.data.data.paySign
124 | };
125 | a.payment(t);
126 | } else wx.showToast({
127 | title: "兑换成功"
128 | }), setTimeout(function () {
129 | wx.redirectTo({
130 | url: "../my_order/index?type=buy"
131 | });
132 | }, 1e3);
133 | }
134 | });
135 | } else Toptips("未设置收货地址");
136 | },
137 | payment: function (e) {
138 | wx.requestPayment({
139 | timeStamp: e.timeStamp,
140 | nonceStr: e.nonceStr,
141 | package: e.package,
142 | signType: e.signType,
143 | paySign: e.paySign,
144 | success: function (e) {
145 | wx.showToast({
146 | title: "支付成功"
147 | }), setTimeout(function () {
148 | wx.redirectTo({
149 | url: "../my_order/index?type=buy"
150 | });
151 | }, 1e3);
152 | },
153 | fail: function (e) {
154 | console.log(e);
155 | }
156 | });
157 | },
158 | bindChangeRemarkOrder: function (e) {
159 | var t = e.detail.detail.value, a = t.length;
160 | this.setData({
161 | "remarkOrder.inputValue": t,
162 | "remarkOrder.inputCount": a
163 | });
164 | }
165 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/cashier/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "收银台",
3 | "enablePullDownRefresh": true,
4 | "usingComponents": {
5 | "zan-dialog": "../../libs/zanui/dialog/index",
6 | "zan-cell": "../../libs/zanui/cell/index",
7 | "zan-cell-group": "../../libs/zanui/cell-group/index",
8 | "zan-toptips": "../../libs/zanui/toptips/index",
9 | "zan-row": "../../libs/zanui/row/index",
10 | "zan-col": "../../libs/zanui/col/index",
11 | "zan-icon": "../../libs/zanui/icon/index",
12 | "zan-card": "../../libs/zanui/card/index",
13 | "zan-panel": "../../libs/zanui/panel/index",
14 | "zan-field": "../../libs/zanui/field/index"
15 | }
16 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/cashier/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 系统提示
5 |
6 | 请开启通讯地址开关,可以方便设置订单收货地址哦~
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/cashier/index.wxss:
--------------------------------------------------------------------------------
1 | .mask-layer {
2 | position: fixed;
3 | right: 0;
4 | bottom: 0;
5 | left: 0;
6 | top: 0;
7 | background: rgba(0,0,0,.5);
8 | text-align: center;
9 | z-index: 11;
10 | }
11 |
12 | .cashier-open-setting {
13 | background: #fff;
14 | width: 70%;
15 | margin: 50% auto;
16 | border-radius: 4px;
17 | }
18 |
19 | .cashier-open-setting-title {
20 | padding: 8px 0;
21 | color: #000;
22 | font-size: 16px;
23 | }
24 |
25 | .cashier-open-setting-msg {
26 | margin-top: -8px;
27 | padding: 15px 20px;
28 | color: #9c9c9c;
29 | font-size: 14px;
30 | }
31 |
32 | .cashier-open-setting-btn {
33 | border-top: 1px solid #e6e6e6;
34 | }
35 |
36 | .cashier-open-setting-btn button {
37 | background: none!important;
38 | font-size: 16px;
39 | }
40 |
41 | .cashier-open-setting-btn button:after {
42 | border: none!important;
43 | }
44 |
45 | .cashier-open-setting-btn-cancel {
46 | border-radius: 0;
47 | border-right: 1px solid #e6e6e6;
48 | }
49 |
50 | .cashier-open-setting-btn-cancel {
51 | color: #000;
52 | }
53 |
54 | .cashier-open-setting-btn-confirm {
55 | color: #4cbf1c;
56 | }
57 |
58 | .cashier-hd {
59 | background: #fff;
60 | position: relative;
61 | z-index: 0;
62 | padding-bottom: 5px;
63 | }
64 |
65 | .cashier-hd .cashier-address-bg {
66 | position: absolute;
67 | width: 100%;
68 | height: 2px;
69 | background-repeat: repeat-x;
70 | left: 0;
71 | bottom: 0;
72 | z-index: 1;
73 | }
74 |
75 | .cashier-hd .cashier-address-bg image {
76 | position: absolute;
77 | top: 0;
78 | left: 0;
79 | right: 0;
80 | bottom: 0;
81 | width: auto;
82 | height: auto;
83 | max-width: 100%;
84 | max-height: 100%;
85 | }
86 |
87 | .cashier-bd {
88 | margin-top: 8px;
89 | padding-bottom: 30px;
90 | }
91 |
92 | .cashier-bd .cashier-item {
93 | padding: 10px;
94 | background: #fff;
95 | }
96 |
97 | .cashier-bd .cashier-item .zan-card__thumb {
98 | width: 80px;
99 | height: 80px;
100 | }
101 |
102 | .cashier-bd .cashier-item-stepper {
103 | line-height: 100px;
104 | padding-right: 10px;
105 | }
106 |
107 | .cashier-bd .cashier-item-title {
108 | color: #353535;
109 | }
110 |
111 | .cashier-bd .cashier-item-sub-title {
112 | color: #888;
113 | max-height: 20px;
114 | line-height: 20px;
115 | overflow: hidden;
116 | text-overflow: ellipsis;
117 | display: -webkit-box;
118 | -webkit-line-clamp: 1;
119 | }
120 |
121 | .cashier-bd .cashier-delivery-type {
122 | position: relative;
123 | }
124 |
125 | .cashier-bd .cashier-delivery-fee {
126 | position: absolute;
127 | top: 20px;
128 | right: 10px;
129 | }
130 |
131 | .cashier-bd .order-free-shipping {
132 | text-decoration: line-through;
133 | }
134 |
135 | .cashier-bd .cashier-remark-order {
136 | margin-top: 5px;
137 | position: relative;
138 | }
139 |
140 | .cashier-bd .cashier-remark-order textarea {
141 | height: 65px!important;
142 | }
143 |
144 | .cashier-bd .cashier-remark-order .cashier-remark-order-wordcount {
145 | position: absolute;
146 | bottom: 2px;
147 | right: 2px;
148 | }
149 |
150 | .cashier-bd .cashier-anonymous {
151 | background: #fff;
152 | margin-top: 8px;
153 | }
154 |
155 | .cashier-ft {
156 | padding: 5px;
157 | }
158 |
159 | .bg-white {
160 | background: #fff;
161 | margin-top: 20rpx;
162 | }
163 |
164 | .weui-btn {
165 | background: #f60!important;
166 | }
167 |
168 | .item-cover {
169 | display: inline-block;
170 | vertical-align: middle;
171 | }
172 |
173 | .item-cover image {
174 | width: 100rpx;
175 | }
176 |
177 | .item-info {
178 | display: inline-block;
179 | margin-left: 10px;
180 | vertical-align: middle;
181 | }
182 |
183 | .item-title {
184 | font-size: 14px;
185 | font-weight: bold;
186 | margin-bottom: 3px;
187 | }
188 |
189 | .item-price {
190 | font-size: 12px;
191 | color: #f00;
192 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/detail/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "物品详情",
3 | "usingComponents": {
4 | "zan-panel": "../../libs/zanui/panel/index",
5 | "zan-cell": "../../libs/zanui/cell/index",
6 | "zan-cell-group": "../../libs/zanui/cell-group/index",
7 | "zan-row": "../../libs/zanui/row/index",
8 | "zan-col": "../../libs/zanui/col/index",
9 | "zan-icon": "../../libs/zanui/icon/index",
10 | "zan-card": "../../libs/zanui/card/index",
11 | "zan-actionsheet": "../../libs/zanui/actionsheet/index",
12 | "zan-toptips": "../../libs/zanui/toptips/index",
13 | "zan-popup": "../../libs/zanui/popup/index",
14 | "zan-toast": "../../libs/zanui/toast/index",
15 | "movable": "../../libs/zanui/movable/movable"
16 | }
17 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/home/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "首页",
3 | "enablePullDownRefresh": true,
4 | "usingComponents": {
5 | "zan-row": "../../libs/zanui/row/index",
6 | "zan-col": "../../libs/zanui/col/index",
7 | "zan-card": "../../libs/zanui/card/index",
8 | "zan-icon": "../../libs/zanui/icon/index",
9 | "zan-loading": "../../libs/zanui/loading/index",
10 | "zan-tab": "../../libs/zanui/tab/index",
11 | "zan-popup": "../../libs/zanui/popup/index",
12 | "zan-toast": "../../libs/zanui/toast/index",
13 | "movable": "../../libs/zanui/movable/movable"
14 | }
15 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/item_list/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "物品列表",
3 | "enablePullDownRefresh": true,
4 | "usingComponents": {
5 | "zan-badge": "../../libs/zanui/badge/index",
6 | "zan-cell": "../../libs/zanui/cell/index",
7 | "zan-cell-group": "../../libs/zanui/cell-group/index",
8 | "zan-toast": "../../libs/zanui/toast/index"
9 | }
10 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/item_list/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{item.title}}
11 |
12 | 待审核
13 | 待置顶
14 | 置顶过期
15 | 已上架
16 | 已交易
17 | 置顶中
18 |
19 |
20 |
21 | {{action?item.nickname:''}}发布于{{item.time_diff}}前
22 |
23 | 置顶记录
24 |
25 |
26 |
27 |
28 |
29 | 删除
30 |
31 | 空空如也
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/item_list/index.wxss:
--------------------------------------------------------------------------------
1 | .item-scroll {
2 | white-space: nowrap;
3 | }
4 |
5 | .list-item {
6 | width: 100%;
7 | background: #fff;
8 | position: relative;
9 | padding: 25rpx 35rpx;
10 | border-bottom: 1px solid #eee;
11 | display: inline-block;
12 | box-sizing: border-box;
13 | }
14 |
15 | .list-item .inline {
16 | vertical-align: middle;
17 | }
18 |
19 | .list-item .w20 {
20 | width: 18%;
21 | }
22 |
23 | .list-item .w80 {
24 | width: 82%;
25 | }
26 |
27 | ::-webkit-scrollbar {
28 | width: 0;
29 | height: 0;
30 | color: transparent;
31 | }
32 |
33 | .item-img {
34 | width: 100rpx;
35 | height: 100rpx;
36 | border-radius: 10rpx;
37 | margin-right: 20rpx;
38 | display: block;
39 | }
40 |
41 | .item-title {
42 | font-size: 14px;
43 | color: #333;
44 | margin-bottom: 10rpx;
45 | font-size: 15px;
46 | }
47 |
48 | .clearfix:after {
49 | content: '';
50 | width: 0;
51 | height: 0;
52 | display: block;
53 | clear: both;
54 | visibility: visible;
55 | }
56 |
57 | .list-item .inline .pull-left {
58 | width: 76%;
59 | white-space: nowrap;
60 | overflow: hidden;
61 | text-overflow: ellipsis;
62 | }
63 |
64 | .list-item .inline .pull-right {
65 | width: 24%;
66 | text-align: right;
67 | font-size: 14px;
68 | }
69 |
70 | .like-btn {
71 | background: #f60;
72 | color: #fff;
73 | font-size: 12px;
74 | border-radius: 10rpx;
75 | padding: 8rpx 0;
76 | text-align: center;
77 | }
78 |
79 | .scroll-hide {
80 | width: 110rpx;
81 | display: inline-block;
82 | text-align: center;
83 | color: #fff;
84 | height: 148rpx;
85 | line-height: 148rpx;
86 | vertical-align: top;
87 | font-size: 14px;
88 | }
89 |
90 | .delete-item {
91 | background: #ff4444;
92 | }
93 |
94 | .stick-item {
95 | background: #f60;
96 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/list/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "物品列表",
3 | "usingComponents": {
4 | "zan-popup": "../../libs/zanui/popup/index",
5 | "zan-row": "../../libs/zanui/row/index",
6 | "zan-col": "../../libs/zanui/col/index",
7 | "zan-card": "../../libs/zanui/card/index",
8 | "zan-icon": "../../libs/zanui/icon/index",
9 | "zan-tab": "../../libs/zanui/tab/index",
10 | "zan-loading": "../../libs/zanui/loading/index",
11 | "zan-toast": "../../libs/zanui/toast/index",
12 | "movable": "../../libs/zanui/movable/movable"
13 | }
14 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/list/index.wxss:
--------------------------------------------------------------------------------
1 | .swiper {
2 | margin-top: -20rpx;
3 | }
4 |
5 | .banner {
6 | height: 200px;
7 | overflow: hidden;
8 | }
9 |
10 | .swiper image {
11 | width: 100%;
12 | max-height: 100%;
13 | }
14 |
15 | .tab-panel {
16 | margin-bottom: -20rpx;
17 | border-bottom: 1px solid #eee;
18 | }
19 |
20 | .album-zan-col {
21 | position: relative;
22 | }
23 |
24 | .play-mask {
25 | position: absolute;
26 | top: 0;
27 | left: 0;
28 | bottom: 0;
29 | width: 94%;
30 | background: rgba(0,0,0,.4);
31 | text-align: center;
32 | line-height: 180rpx;
33 | z-index: 22;
34 | }
35 |
36 | .play-mask .iconfont {
37 | font-size: 60rpx;
38 | color: #fff;
39 | }
40 |
41 | .album-zan-col {
42 | margin-bottom: 15rpx;
43 | }
44 |
45 | .item-distance {
46 | font-size: 12px;
47 | color: #F60;
48 | position: absolute;
49 | top: 82rpx;
50 | right: 30rpx;
51 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/my/index.js:
--------------------------------------------------------------------------------
1 | var app = getApp(), Toast = require("../../libs/zanui/toast/toast");
2 |
3 | Page({
4 | data: {
5 | credit_on: !1,
6 | showCategoryPopup: !1,
7 | bindPhone: !1,
8 | recycle: {
9 | open: !1,
10 | style: []
11 | }
12 | },
13 | onLoad: function() {
14 | var t = this, a = wx.getStorageSync("loading_img");
15 | a && t.setData({
16 | loadingImg: a
17 | }), "" != t.setData({
18 | bindPhone: !0
19 | }), t.checkPlugin(), t.getMyInfo(), app.util.footer(t)
20 |
21 | ;
22 | },
23 | checkPlugin: function() {
24 | var e = this;
25 | app.util.request({
26 | url: "entry/wxapp/home",
27 | cachetime: "0",
28 | data: {
29 | act: "plugin",
30 | m: "superman_hand2"
31 | },
32 | success: function(t) {
33 | if (t.data.errno) e.showIconToast(t.data.errmsg); else {
34 | var a = t.data.data;
35 | e.setData({
36 | wechat_on: 1 == a.superman_hand2_plugin_wechat
37 | });
38 | }
39 | },
40 | fail: function(t) {
41 | e.showIconToast(t.data.errmsg);
42 | }
43 | });
44 | },
45 | getMyInfo: function() {
46 | var a = this;
47 | app.util.request({
48 | url: "entry/wxapp/home",
49 | cachetime: "0",
50 | data: {
51 | m: "superman_hand2"
52 | },
53 | success: function(t) {
54 | t.data.errno ? a.showIconToast(t.data.errmsg) : 1 == t.data.data.credit_setting.open && a.setData({
55 | credit_on: !0
56 | });
57 | }
58 | }), app.util.request({
59 | url: "entry/wxapp/my",
60 | cachetime: "0",
61 | data: {
62 | m: "superman_hand2"
63 | },
64 | success: function(t) {
65 | t.data.errno ? a.showIconToast(t.data.errmsg) : (console.log(t.data.data), a.setData({
66 | my: t.data.data,
67 | version: app.data.version,
68 | completed: !0
69 | }));
70 | },
71 | fail: function(t) {
72 | a.setData({
73 | completed: !0
74 | }), a.showIconToast(t.data.errmsg);
75 | }
76 | });
77 | },
78 | onPullDownRefresh: function() {
79 | this.getMyInfo(), wx.stopPullDownRefresh();
80 | },
81 | showPopup: function() {
82 | this.setData({
83 | showBottomPopup: !0
84 | });
85 | },
86 | toggleBottomPopup: function() {
87 | this.setData({
88 | showBottomPopup: !this.data.showBottomPopup
89 | });
90 | },
91 | toggleCategoryPopup: function() {
92 | this.setData({
93 | category: wx.getStorageSync("category") ? wx.getStorageSync("category") : [],
94 | showCategoryPopup: !this.data.showCategoryPopup
95 | });
96 | },
97 | showIconToast: function(t) {
98 | var a = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : "fail";
99 | Toast({
100 | type: a,
101 | message: t,
102 | selector: "#zan-toast"
103 | });
104 | },
105 | jumpToPage: function(t) {
106 | var a = t.currentTarget.dataset.url;
107 | -1 != a.indexOf("http") ? wx.navigateTo({
108 | url: "../ad/index?path=" + encodeURIComponent(a)
109 | }) : wx.navigateTo({
110 | url: a
111 | });
112 | },
113 | linktoWxapp: function(t) {
114 | var a = t.currentTarget.dataset.appid, e = t.currentTarget.dataset.path;
115 | wx.navigateToMiniProgram({
116 | appId: a,
117 | path: e,
118 | success: function(t) {
119 | console.log("打开成功");
120 | }
121 | });
122 | }
123 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/my/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "个人中心",
3 | "enablePullDownRefresh": true,
4 | "usingComponents": {
5 | "zan-popup": "../../libs/zanui/popup/index",
6 | "zan-badge": "../../libs/zanui/badge/index",
7 | "zan-cell": "../../libs/zanui/cell/index",
8 | "zan-cell-group": "../../libs/zanui/cell-group/index",
9 | "zan-toast": "../../libs/zanui/toast/index",
10 | "zan-icon": "../../libs/zanui/icon/index"
11 | }
12 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/my/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{my.nickname}}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | {{my.zan}}
17 |
18 | 点赞
19 |
20 |
21 |
22 |
23 |
24 |
25 | {{my.collect}}
26 |
27 | 收藏
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | {{my.sell_count}}
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | {{item.title}}
53 |
54 |
55 | 版本号:{{version}}
56 |
57 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | 友情提示
70 |
71 | 您需要登录之后才能浏览此页面
72 | 点击确定按钮登录
73 |
74 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 | {{item.title}}
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | 由于小程序不支持长按识别公众号二维码,请截屏保存到手机相册然后长按图片识别二维码关注公众号
99 |
100 |
101 |
102 |
103 |
104 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/my/index.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | }
3 |
4 | .container {
5 | }
6 |
7 | .avatar_wrap {
8 | width: 100%;
9 | }
10 |
11 | .avatar {
12 | position: relative;
13 | top: -150rpx;
14 | z-index: 9;
15 | text-align: center;
16 | border-bottom: 1px solid #eee;
17 | padding-bottom: 20rpx;
18 | }
19 |
20 | .member_wrap {
21 | margin-bottom: 15rpx;
22 | }
23 |
24 | .credit-box {
25 | margin: 5px 0 0;
26 | text-align: center;
27 | color: #aaa;
28 | font-size: 14px;
29 | }
30 |
31 | .like-btn {
32 | padding: 3px 8px;
33 | background: #f60;
34 | color: #fff;
35 | border-radius: 10px;
36 | display: inline-block;
37 | margin-left: 10px;
38 | font-size: 12px;
39 | }
40 |
41 | .nav_wrap {
42 | margin-top: -150rpx;
43 | }
44 |
45 | .my-avatar {
46 | width: 160rpx;
47 | height: 160rpx;
48 | border-radius: 50%;
49 | margin-bottom: 10rpx;
50 | }
51 |
52 | .my-panel {
53 | background: #fff;
54 | margin-bottom: 20rpx;
55 | width: 100%;
56 | overflow: hidden;
57 | }
58 |
59 | .nav_wrap {
60 | display: flex;
61 | text-align: center;
62 | justify-content: space-around;
63 | }
64 |
65 | .nav-list {
66 | }
67 |
68 | .nav-list navigator {
69 | padding: 20rpx 40rpx;
70 | }
71 |
72 | .list-icon {
73 | margin: 0 auto;
74 | }
75 |
76 | .list-icon image {
77 | width: 70rpx;
78 | height: 70rpx;
79 | }
80 |
81 | .nav-text {
82 | font-size: 14px;
83 | color: #666;
84 | }
85 |
86 | .my-icon,.wxapp-icon {
87 | width: 40rpx;
88 | height: 40rpx;
89 | margin-right: 10rpx;
90 | vertical-align: middle;
91 | }
92 |
93 | .wxapp-item {
94 | padding: 12px 15px;
95 | border-bottom: 1px solid #eee;
96 | font-size: 14px;
97 | position: relative;
98 | }
99 |
100 | .wxapp-item::after {
101 | position: absolute;
102 | top: 50%;
103 | right: 17px;
104 | content: " ";
105 | display: inline-block;
106 | height: 6px;
107 | width: 6px;
108 | border-width: 2px 2px 0 0;
109 | border-color: #c8c8c8;
110 | border-style: solid;
111 | transform: translateY(-50%) matrix(.71,.71,-.71,.71,0,0);
112 | }
113 |
114 | .wxapp-title {
115 | margin-left: 5px;
116 | display: inline-block;
117 | vertical-align: middle;
118 | }
119 |
120 | .version {
121 | text-align: center;
122 | font-size: 12px;
123 | color: #ccc;
124 | margin-bottom: 25px;
125 | }
126 |
127 | .freeze {
128 | margin-left: 5px;
129 | }
130 |
131 | .sell-count {
132 | position: absolute;
133 | right: 20px;
134 | top: -16px;
135 | height: 1.6em;
136 | min-width: 1.6em;
137 | line-height: 1.6;
138 | padding: 0 .4em;
139 | font-size: 20px;
140 | border-radius: .8em;
141 | background: #f44;
142 | color: #fff;
143 | text-align: center;
144 | white-space: nowrap;
145 | transform: translateX(50%) scale(.5);
146 | transform-origin: center;
147 | z-index: 10;
148 | box-shadow: 0 0 0 2px #fff;
149 | box-sizing: border-box;
150 | }
151 |
152 | .pop-img {
153 | width: 500rpx;
154 | }
155 |
156 | .bt-info {
157 | font-size: 14px;
158 | color: #f60;
159 | }
160 |
161 | .service {
162 | width: 100%;
163 | height: 40px;
164 | position: absolute;
165 | left: 0;
166 | top: 0;
167 | background-color: transparent;
168 | }
169 |
170 | .contact-btn {
171 | padding: 0;
172 | background-color: transparent;
173 | line-height: 80rpx;
174 | }
175 |
176 | .contact-btn .iconfont {
177 | font-size: 24px!important;
178 | }
179 |
180 | .contact-btn image {
181 | width: 60rpx;
182 | height: 60rpx;
183 | margin-top: 10rpx;
184 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/my_order/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "订单列表",
3 | "enablePullDownRefresh": true,
4 | "usingComponents": {
5 | "zan-cell": "../../libs/zanui/cell/index",
6 | "zan-cell-group": "../../libs/zanui/cell-group/index",
7 | "zan-card": "../../libs/zanui/card/index",
8 | "zan-toptips": "../../libs/zanui/toptips/index",
9 | "zan-button": "../../libs/zanui/btn/index",
10 | "zan-button-group": "../../libs/zanui/btn-group/index"
11 | }
12 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/my_order/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{item.title}}
9 | {{item.description}}
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 | 空空如也
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/my_order/index.wxss:
--------------------------------------------------------------------------------
1 | .container {
2 | padding-bottom: 0;
3 | }
4 |
5 | .order-list {
6 | overflow: hidden;
7 | }
8 |
9 | .order-item:first-child {
10 | margin-top: 0;
11 | }
12 |
13 | .order-item {
14 | margin-bottom: 8px;
15 | background: #fff;
16 | padding-top: 5px;
17 | }
18 |
19 | .test-card {
20 | padding: 10px 15px!important;
21 | border-bottom: 1px solid #eee;
22 | }
23 |
24 | .order-btn {
25 | padding: 3px 10px;
26 | font-size: 12px;
27 | background: #f60;
28 | line-height: 20px;
29 | color: #fff;
30 | display: inline-block;
31 | vertical-align: middle;
32 | margin-right: 5px;
33 | }
34 |
35 | .order-btn.bg-red {
36 | background: #f44;
37 | }
38 |
39 | .order-btn.bg-yellow {
40 | background: #F4D000;
41 | }
42 |
43 | .order-item .order-title .zan-cell__ft {
44 | color: #f00;
45 | }
46 |
47 | .order-item .order-item-cover {
48 | width: 80px;
49 | height: 80px;
50 | overflow: hidden;
51 | background-size: cover;
52 | position: relative;
53 | margin-left: auto;
54 | margin-right: auto;
55 | display: inline-block;
56 | margin-left: 8px;
57 | margin-top: 2px;
58 | }
59 |
60 | .order-item .order-item-cover:nth-child(4n+1) {
61 | margin-left: 0;
62 | }
63 |
64 | .order-item .order-item-cover image {
65 | position: absolute;
66 | top: 0;
67 | left: 0;
68 | right: 0;
69 | bottom: 0;
70 | width: auto;
71 | height: auto;
72 | max-width: 100%;
73 | max-height: 100%;
74 | }
75 |
76 | .order-item .order-button-group {
77 | margin: 0;
78 | }
79 |
80 | .order-card .zan-card__thumb .zan-card__image {
81 | border-radius: 0;
82 | }
83 |
84 | .list-item {
85 | width: 100%;
86 | background: #fff;
87 | position: relative;
88 | padding: 25rpx 0 0;
89 | margin-bottom: 10px;
90 | }
91 |
92 | .list-item navigator {
93 | padding: 0 35rpx 20rpx;
94 | border-bottom: 1px solid #eee;
95 | }
96 |
97 | .list-item .inline {
98 | vertical-align: middle;
99 | }
100 |
101 | .item-img {
102 | width: 100rpx;
103 | height: 100rpx;
104 | border-radius: 10rpx;
105 | margin-right: 20rpx;
106 | display: block;
107 | }
108 |
109 | .item-title {
110 | font-size: 14px;
111 | color: #333;
112 | margin-bottom: 10rpx;
113 | font-size: 15px;
114 | }
115 |
116 | .w80 {
117 | max-width: 80%;
118 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/notice/index.js:
--------------------------------------------------------------------------------
1 | var app = getApp(), Toast = require("../../libs/zanui/toast/toast");
2 |
3 | Page({
4 | data: {},
5 | onLoad: function(a) {
6 | var t = wx.getStorageSync("loading_img");
7 | t && this.setData({
8 | loadingImg: t
9 | });
10 | var e = a.id;
11 | this.getNoticeDetail(e);
12 | },
13 | getNoticeDetail: function(a) {
14 | var e = this;
15 | app.util.request({
16 | url: "entry/wxapp/notice",
17 | cachetime: "0",
18 | data: {
19 | id: a,
20 | m: "superman_hand2"
21 | },
22 | success: function(a) {
23 | if (a.data.errno) e.showIconToast(a.data.errmsg); else {
24 | console.log(a.data.data);
25 | var t = a.data.data.content;
26 | require("../../libs/wxParse/wxParse.js").wxParse("article", "html", t, e, 5), e.setData({
27 | detail: a.data.data,
28 | completed: !0
29 | });
30 | }
31 | },
32 | fail: function(a) {
33 | e.setData({
34 | completed: !0
35 | }), e.showIconToast(a.data.errmsg);
36 | }
37 | });
38 | },
39 | showIconToast: function(a) {
40 | var t = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : "fail";
41 | Toast({
42 | type: t,
43 | message: a,
44 | selector: "#zan-toast"
45 | });
46 | }
47 | });
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/notice/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "公告"
3 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/notice/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{detail.title}}
6 | {{detail.createtime}}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/notice/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-panel {
2 | padding: 20rpx;
3 | }
4 |
5 | .title {
6 | text-align: center;
7 | font-size: 18px;
8 | color: #333;
9 | }
10 |
11 | .time {
12 | text-align: center;
13 | font-size: 12px;
14 | color: #ccc;
15 | margin: 10rpx 0 20rpx;
16 | }
17 |
18 | .content {
19 | font-size: 14px;
20 | color: #666;
21 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/post/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "物品发布",
3 | "usingComponents": {
4 | "zan-popup": "../../libs/zanui/popup/index",
5 | "zan-toast": "../../libs/zanui/toast/index",
6 | "zan-toptips": "../../libs/zanui/toptips/index",
7 | "zan-actionsheet": "../../libs/zanui/actionsheet/index"
8 | }
9 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/post/index.wxss:
--------------------------------------------------------------------------------
1 | @import "../../__wuBaseWxss__/0.wxss";
2 |
3 | .container {
4 | border-top: 1px solid transparent;
5 | box-sizing: border-box;
6 | padding-bottom: 0;
7 | }
8 |
9 | .zan-panel {
10 | background: none;
11 | padding: 0;
12 | }
13 |
14 | .book-btnarea {
15 | margin: 40px 80px 0;
16 | }
17 |
18 | .book-btnarea .weui-btn {
19 | line-height: 2;
20 | }
21 |
22 | .weui-input,.weui-textarea,.weui-label,.weui-select {
23 | font-size: 14px;
24 | }
25 |
26 | .weui-btn {
27 | background: #f60!important;
28 | }
29 |
30 | .item-pop {
31 | width: 750rpx;
32 | background: #fff;
33 | box-sizing: border-box;
34 | padding: 20rpx;
35 | max-height: 50vh;
36 | overflow-y: scroll;
37 | }
38 |
39 | .pop-close {
40 | position: fixed;
41 | top: 10rpx;
42 | right: 10rpx;
43 | }
44 |
45 | .weui-uploader__bd {
46 | overflow: visible;
47 | margin-right: -5px;
48 | padding-top: 15rpx;
49 | }
50 |
51 | .weui-uploader__file {
52 | margin-right: 4px;
53 | position: relative;
54 | }
55 |
56 | .weui-uploader__input-box {
57 | margin-right: 4px;
58 | }
59 |
60 | .delete-img {
61 | width: 16px;
62 | height: 16px;
63 | border-radius: 50%;
64 | background: rgba(0,0,0,.5);
65 | position: absolute;
66 | top: 2rpx;
67 | right: 2rpx;
68 | line-height: 24rpx;
69 | color: #fff;
70 | z-index: 99;
71 | }
72 |
73 | .weui-uploader__input {
74 | text-align: center;
75 | color: #999;
76 | font-size: 14px;
77 | padding-top: 15px;
78 | }
79 |
80 | .post-info {
81 | padding: 20px;
82 | line-height: 22px;
83 | height: 100vh;
84 | box-sizing: border-box;
85 | background: #fff;
86 | overflow-y: scroll;
87 | }
88 |
89 | .margin-bottom {
90 | margin-bottom: 10px;
91 | }
92 |
93 | .post-category {
94 | display: flex;
95 | flex-wrap: wrap;
96 | justify-content: space-around;
97 | margin-top: 50px;
98 | }
99 |
100 | .cate-item {
101 | width: 33.3%;
102 | text-align: center;
103 | margin-bottom: 20px;
104 | }
105 |
106 | .cate-item .iconfont {
107 | font-size: 50px;
108 | color: #f60;
109 | }
110 |
111 | .cate-item image {
112 | max-width: 70%;
113 | }
114 |
115 | .item-name {
116 | font-size: 14px;
117 | margin-top: 20px;
118 | }
119 |
120 | .weui-btn-area {
121 | margin: 10px 15px 30px;
122 | }
123 |
124 | .cover-del {
125 | position: absolute;
126 | top: 2rpx;
127 | right: 2rpx;
128 | width: 16px;
129 | height: 16px;
130 | }
131 |
132 | .opacity-btn {
133 | padding: 0;
134 | line-height: 2.8;
135 | background-color: transparent!important;
136 | color: #888!important;
137 | font-size: 14px;
138 | text-align: left;
139 | }
140 |
141 | .input-middle {
142 | width: 50%;
143 | vertical-align: middle;
144 | }
145 |
146 | .select-last {
147 | width: 50%;
148 | vertical-align: middle;
149 | border-left: 1px solid #ccc;
150 | box-sizing: border-box;
151 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/pages/templates/cube.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/pages/templates/cube.wxss
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件",
3 | "packOptions": {
4 | "ignore": []
5 | },
6 | "setting": {
7 | "urlCheck": true,
8 | "es6": true,
9 | "postcss": true,
10 | "minified": true,
11 | "newFeature": true,
12 | "autoAudits": false
13 | },
14 | "compileType": "miniprogram",
15 | "libVersion": "2.6.1",
16 | "appid": "wx4f9589c459f3281b",
17 | "projectname": "fjnuusedbook",
18 | "debugOptions": {
19 | "hidedInDevtools": []
20 | },
21 | "isGameTourist": false,
22 | "condition": {
23 | "search": {
24 | "current": -1,
25 | "list": []
26 | },
27 | "conversation": {
28 | "current": -1,
29 | "list": []
30 | },
31 | "game": {
32 | "currentL": -1,
33 | "list": []
34 | },
35 | "miniprogram": {
36 | "current": -1,
37 | "list": []
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/siteinfo.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | name: "fjnuusedbook",
3 | uniacid: "2", //小程序的uniacid
4 | acid: "2",
5 | multiid: "0",
6 | version: "1.0.1",
7 | siteroot: "https://xxxx/app/index.php", //站点URL
8 | design_method: "3"
9 | };
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/pages/templates/footer.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{item.text}}
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{item.text}}
15 |
16 |
17 |
18 |
19 | {{item.text}}
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/pages/templates/footer.wxss:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/we7/pages/templates/footer.wxss
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/icon/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/we7/resource/icon/error.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/icon/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/we7/resource/icon/home.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/icon/homeselect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/we7/resource/icon/homeselect.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/icon/msg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/we7/resource/icon/msg.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/icon/msgselect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/we7/resource/icon/msgselect.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/icon/my.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/we7/resource/icon/my.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/icon/myselect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/we7/resource/icon/myselect.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/icon/pub.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/we7/resource/icon/pub.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/icon/pubselect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/williamhjc/usedbook/b039633ebca8b98f2314cef648937c2d2a8cae15/微信小程序二手书源码/usedbook/we7/resource/icon/pubselect.png
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/js/base64.js:
--------------------------------------------------------------------------------
1 | function base64_encode(r) {
2 | for (var e, a, t, o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", c = 0, h = r.length, d = ""; c < h; ) {
3 | if (e = 255 & r.charCodeAt(c++), c == h) {
4 | d += o.charAt(e >> 2), d += o.charAt((3 & e) << 4), d += "==";
5 | break;
6 | }
7 | if (a = r.charCodeAt(c++), c == h) {
8 | d += o.charAt(e >> 2), d += o.charAt((3 & e) << 4 | (240 & a) >> 4), d += o.charAt((15 & a) << 2),
9 | d += "=";
10 | break;
11 | }
12 | t = r.charCodeAt(c++), d += o.charAt(e >> 2), d += o.charAt((3 & e) << 4 | (240 & a) >> 4),
13 | d += o.charAt((15 & a) << 2 | (192 & t) >> 6), d += o.charAt(63 & t);
14 | }
15 | return d;
16 | }
17 |
18 | function base64_decode(r) {
19 | for (var e, a, t, o, c = new Array(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1), h = 0, d = r.length, f = ""; h < d; ) {
20 | for (;e = c[255 & r.charCodeAt(h++)], h < d && -1 == e; ) ;
21 | if (-1 == e) break;
22 | for (;a = c[255 & r.charCodeAt(h++)], h < d && -1 == a; ) ;
23 | if (-1 == a) break;
24 | f += String.fromCharCode(e << 2 | (48 & a) >> 4);
25 | do {
26 | if (61 == (t = 255 & r.charCodeAt(h++))) return f;
27 | t = c[t];
28 | } while (h < d && -1 == t);
29 | if (-1 == t) break;
30 | f += String.fromCharCode((15 & a) << 4 | (60 & t) >> 2);
31 | do {
32 | if (61 == (o = 255 & r.charCodeAt(h++))) return f;
33 | o = c[o];
34 | } while (h < d && -1 == o);
35 | if (-1 == o) break;
36 | f += String.fromCharCode((3 & t) << 6 | o);
37 | }
38 | return f;
39 | }
40 |
41 | module.exports = {
42 | base64_encode: base64_encode,
43 | base64_decode: base64_decode
44 | };
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/js/md5.js:
--------------------------------------------------------------------------------
1 | !function(n) {
2 | function v(n, r) {
3 | var t = (65535 & n) + (65535 & r);
4 | return (n >> 16) + (r >> 16) + (t >> 16) << 16 | 65535 & t;
5 | }
6 | function f(n, r, t, e, o, u) {
7 | return v((c = v(v(r, n), v(e, u))) << (f = o) | c >>> 32 - f, t);
8 | var c, f;
9 | }
10 | function g(n, r, t, e, o, u, c) {
11 | return f(r & t | ~r & e, n, r, o, u, c);
12 | }
13 | function l(n, r, t, e, o, u, c) {
14 | return f(r & e | t & ~e, n, r, o, u, c);
15 | }
16 | function d(n, r, t, e, o, u, c) {
17 | return f(r ^ t ^ e, n, r, o, u, c);
18 | }
19 | function C(n, r, t, e, o, u, c) {
20 | return f(t ^ (r | ~e), n, r, o, u, c);
21 | }
22 | function i(n, r) {
23 | var t, e, o, u, c;
24 | n[r >> 5] |= 128 << r % 32, n[14 + (r + 64 >>> 9 << 4)] = r;
25 | var f = 1732584193, i = -271733879, a = -1732584194, h = 271733878;
26 | for (t = 0; t < n.length; t += 16) i = C(i = C(i = C(i = C(i = d(i = d(i = d(i = d(i = l(i = l(i = l(i = l(i = g(i = g(i = g(i = g(o = i, a = g(u = a, h = g(c = h, f = g(e = f, i, a, h, n[t], 7, -680876936), i, a, n[t + 1], 12, -389564586), f, i, n[t + 2], 17, 606105819), h, f, n[t + 3], 22, -1044525330), a = g(a, h = g(h, f = g(f, i, a, h, n[t + 4], 7, -176418897), i, a, n[t + 5], 12, 1200080426), f, i, n[t + 6], 17, -1473231341), h, f, n[t + 7], 22, -45705983), a = g(a, h = g(h, f = g(f, i, a, h, n[t + 8], 7, 1770035416), i, a, n[t + 9], 12, -1958414417), f, i, n[t + 10], 17, -42063), h, f, n[t + 11], 22, -1990404162), a = g(a, h = g(h, f = g(f, i, a, h, n[t + 12], 7, 1804603682), i, a, n[t + 13], 12, -40341101), f, i, n[t + 14], 17, -1502002290), h, f, n[t + 15], 22, 1236535329), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 1], 5, -165796510), i, a, n[t + 6], 9, -1069501632), f, i, n[t + 11], 14, 643717713), h, f, n[t], 20, -373897302), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 5], 5, -701558691), i, a, n[t + 10], 9, 38016083), f, i, n[t + 15], 14, -660478335), h, f, n[t + 4], 20, -405537848), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 9], 5, 568446438), i, a, n[t + 14], 9, -1019803690), f, i, n[t + 3], 14, -187363961), h, f, n[t + 8], 20, 1163531501), a = l(a, h = l(h, f = l(f, i, a, h, n[t + 13], 5, -1444681467), i, a, n[t + 2], 9, -51403784), f, i, n[t + 7], 14, 1735328473), h, f, n[t + 12], 20, -1926607734), a = d(a, h = d(h, f = d(f, i, a, h, n[t + 5], 4, -378558), i, a, n[t + 8], 11, -2022574463), f, i, n[t + 11], 16, 1839030562), h, f, n[t + 14], 23, -35309556), a = d(a, h = d(h, f = d(f, i, a, h, n[t + 1], 4, -1530992060), i, a, n[t + 4], 11, 1272893353), f, i, n[t + 7], 16, -155497632), h, f, n[t + 10], 23, -1094730640), a = d(a, h = d(h, f = d(f, i, a, h, n[t + 13], 4, 681279174), i, a, n[t], 11, -358537222), f, i, n[t + 3], 16, -722521979), h, f, n[t + 6], 23, 76029189), a = d(a, h = d(h, f = d(f, i, a, h, n[t + 9], 4, -640364487), i, a, n[t + 12], 11, -421815835), f, i, n[t + 15], 16, 530742520), h, f, n[t + 2], 23, -995338651), a = C(a, h = C(h, f = C(f, i, a, h, n[t], 6, -198630844), i, a, n[t + 7], 10, 1126891415), f, i, n[t + 14], 15, -1416354905), h, f, n[t + 5], 21, -57434055), a = C(a, h = C(h, f = C(f, i, a, h, n[t + 12], 6, 1700485571), i, a, n[t + 3], 10, -1894986606), f, i, n[t + 10], 15, -1051523), h, f, n[t + 1], 21, -2054922799), a = C(a, h = C(h, f = C(f, i, a, h, n[t + 8], 6, 1873313359), i, a, n[t + 15], 10, -30611744), f, i, n[t + 6], 15, -1560198380), h, f, n[t + 13], 21, 1309151649), a = C(a, h = C(h, f = C(f, i, a, h, n[t + 4], 6, -145523070), i, a, n[t + 11], 10, -1120210379), f, i, n[t + 2], 15, 718787259), h, f, n[t + 9], 21, -343485551),
27 | f = v(f, e), i = v(i, o), a = v(a, u), h = v(h, c);
28 | return [ f, i, a, h ];
29 | }
30 | function a(n) {
31 | var r, t = "", e = 32 * n.length;
32 | for (r = 0; r < e; r += 8) t += String.fromCharCode(n[r >> 5] >>> r % 32 & 255);
33 | return t;
34 | }
35 | function h(n) {
36 | var r, t = [];
37 | for (t[(n.length >> 2) - 1] = void 0, r = 0; r < t.length; r += 1) t[r] = 0;
38 | var e = 8 * n.length;
39 | for (r = 0; r < e; r += 8) t[r >> 5] |= (255 & n.charCodeAt(r / 8)) << r % 32;
40 | return t;
41 | }
42 | function e(n) {
43 | var r, t, e = "0123456789abcdef", o = "";
44 | for (t = 0; t < n.length; t += 1) r = n.charCodeAt(t), o += e.charAt(r >>> 4 & 15) + e.charAt(15 & r);
45 | return o;
46 | }
47 | function t(n) {
48 | return unescape(encodeURIComponent(n));
49 | }
50 | function o(n) {
51 | return a(i(h(r = t(n)), 8 * r.length));
52 | var r;
53 | }
54 | function u(n, r) {
55 | return function(n, r) {
56 | var t, e, o = h(n), u = [], c = [];
57 | for (u[15] = c[15] = void 0, 16 < o.length && (o = i(o, 8 * n.length)), t = 0; t < 16; t += 1) u[t] = 909522486 ^ o[t],
58 | c[t] = 1549556828 ^ o[t];
59 | return e = i(u.concat(h(r)), 512 + 8 * r.length), a(i(c.concat(e), 640));
60 | }(t(n), t(r));
61 | }
62 | module.exports = function(n, r, t) {
63 | return r ? t ? u(r, n) : e(u(r, n)) : t ? o(n) : e(o(n));
64 | };
65 | }();
--------------------------------------------------------------------------------
/微信小程序二手书源码/usedbook/we7/resource/js/webview.js:
--------------------------------------------------------------------------------
1 | var app = getApp(), backApp = function(e) {
2 | if (e) try {
3 | wx.setStorageSync("we7_webview", e);
4 | } catch (e) {
5 | console.log(e);
6 | }
7 | var t = getCurrentPages();
8 | if (1 < t.length) for (var r in t) "wn_storex/pages/view/index" === t[r].__route__ && wx.navigateBack({
9 | data: t.length - r + 1
10 | });
11 | }, urlAddCode = function(n) {
12 | var e = wx.getStorageSync("userInfo"), t = function(e) {
13 | var t = getQueryString(n, "state");
14 | n.indexOf("http") || t || (n = n.replace(/index.php\?/, "index.php?from=wxapp&state=we7sid-" + e.sessionid + "&"));
15 | var r = getCurrentPages();
16 | r && (r = r[getCurrentPages().length - 1]), r.setData({
17 | url: n
18 | });
19 | };
20 | e.sessionid ? t(e) : app.util.getUserInfo(t);
21 | };
22 |
23 | function getQueryString(e, t) {
24 | e = e.replace(/(#\/)(.*)/, "");
25 | var r = new RegExp("(^|&)" + t + "=([^&]*)(&|$)", "i"), n = e.match(r);
26 | return null !== n ? unescape(n[2]) : null;
27 | }
28 |
29 | module.exports = {
30 | backApp: backApp,
31 | urlAddCode: urlAddCode
32 | };
--------------------------------------------------------------------------------