├── pages
├── myAddr
│ ├── myAddr.json
│ ├── myAddr.wxss
│ ├── myAddr.wxml
│ └── myAddr.js
├── start
│ ├── start.json
│ ├── start.wxss
│ ├── start.wxml
│ └── start.js
├── logs
│ ├── logs.json
│ ├── logs.wxss
│ ├── logs.wxml
│ └── logs.js
├── order
│ ├── order.json
│ ├── order.wxss
│ ├── order.js
│ └── order.wxml
├── pay
│ ├── pay.json
│ ├── pay.wxss
│ ├── pay.js
│ └── pay.wxml
├── myInfo
│ ├── myInfo.json
│ ├── myInfo.wxss
│ ├── myInfo.js
│ └── myInfo.wxml
├── myOrder
│ ├── myOrder.json
│ ├── myOrder.js
│ ├── myOrder.wxss
│ └── myOrder.wxml
├── shopSel
│ ├── shopSel.json
│ ├── shopSel.wxss
│ ├── shopSel.wxml
│ └── shopSel.js
├── addAddress
│ ├── addAddress.json
│ ├── addAddress.wxss
│ ├── addAddress.wxml
│ └── addAddress.js
├── deliver
│ ├── deliver.json
│ ├── deliver.wxss
│ ├── deliver.js
│ └── deliver.wxml
├── orderDetail
│ ├── orderDetail.json
│ ├── orderDetail.wxss
│ ├── orderDetail.js
│ └── orderDetail.wxml
├── ordersubmit
│ ├── ordersubmit.json
│ ├── ordersubmit.wxss
│ ├── ordersubmit.wxml
│ └── ordersubmit.js
├── suggestion
│ ├── suggestion.json
│ ├── suggestion.wxss
│ ├── suggestion.wxml
│ └── suggestion.js
└── index
│ ├── index.wxss
│ ├── index.wxml
│ └── index.js
├── README.md
├── images
├── 11.png
├── 22.png
├── add.png
├── edit.png
├── icon.jpg
├── mine.jpg
├── word.png
├── header.jpg
├── loca1.png
├── order.jpg
├── print.jpg
├── location.png
├── mine_cur.jpg
├── order_cur.jpg
├── print_cur.jpg
└── arrow_right.png
├── style
├── base
│ ├── fn.wxss
│ ├── mixin
│ │ ├── text.wxss
│ │ ├── setArrow.wxss
│ │ └── setOnepx.wxss
│ ├── variable
│ │ ├── color.wxss
│ │ ├── global.wxss
│ │ ├── weui-msg.wxss
│ │ ├── weui-button.wxss
│ │ ├── weui-cell.wxss
│ │ ├── weui-dialog.wxss
│ │ ├── weui-grid.wxss
│ │ └── weui-progress.wxss
│ └── reset.wxss
├── widget
│ ├── weui-cell
│ │ ├── weui-switch.wxss
│ │ ├── weui-check.wxss
│ │ ├── weui-form
│ │ │ ├── weui-vcode.wxss
│ │ │ ├── weui-form_common.wxss
│ │ │ ├── weui-select.wxss
│ │ │ └── weui-form-preview.wxss
│ │ ├── weui-access.wxss
│ │ ├── weui-uploader.wxss
│ │ ├── weui-cell.wxss
│ │ └── weui-form.wxss
│ ├── weui-flex
│ │ └── weui-flex.wxss
│ ├── weui-tips
│ │ ├── weui-badge.wxss
│ │ └── weui-loadmore.wxss
│ ├── weui-progress
│ │ └── weui-progress.wxss
│ ├── weui-page
│ │ ├── weui-article.wxss
│ │ └── weui-msg.wxss
│ ├── weui-agree
│ │ └── weui-agree.wxss
│ ├── weui-grid
│ │ └── weui-grid.wxss
│ ├── weui-footer
│ │ └── weui-footer.wxss
│ ├── weui-panel
│ │ └── weui-panel.wxss
│ ├── weui-tab
│ │ ├── weui-navbar.wxss
│ │ └── weui-tab.wxss
│ ├── weui-searchbar
│ │ └── weui-searchbar.wxss
│ ├── weui-animate
│ │ └── weui-animate.wxss
│ ├── weui-media-box
│ │ └── weui-media-box.wxss
│ ├── weui-button
│ │ └── weui-button.wxss
│ └── weui-loading
│ │ └── weui-loading.wxss
├── weui.wxss
└── iconfont.wxss
├── utils
└── util.js
├── app.wxss
├── app.json
└── app.js
/pages/myAddr/myAddr.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/start/start.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/start/start.wxss:
--------------------------------------------------------------------------------
1 | /* pages/start/start.wxss */
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # paperMemory
2 | paperMemory
3 | hello world
4 |
--------------------------------------------------------------------------------
/pages/logs/logs.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志"
3 | }
--------------------------------------------------------------------------------
/pages/order/order.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看订单"
3 | }
--------------------------------------------------------------------------------
/pages/pay/pay.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "纸张记忆"
3 | }
--------------------------------------------------------------------------------
/pages/myInfo/myInfo.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "个人中心"
3 | }
--------------------------------------------------------------------------------
/pages/myOrder/myOrder.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的订单"
3 | }
--------------------------------------------------------------------------------
/pages/shopSel/shopSel.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "纸张记忆"
3 | }
--------------------------------------------------------------------------------
/images/11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/11.png
--------------------------------------------------------------------------------
/images/22.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/22.png
--------------------------------------------------------------------------------
/pages/addAddress/addAddress.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "新增地址"
3 | }
--------------------------------------------------------------------------------
/pages/deliver/deliver.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "paperMemory"
3 | }
--------------------------------------------------------------------------------
/pages/orderDetail/orderDetail.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的订单"
3 | }
--------------------------------------------------------------------------------
/pages/ordersubmit/ordersubmit.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "纸张记忆"
3 | }
--------------------------------------------------------------------------------
/pages/suggestion/suggestion.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "意见反馈"
3 | }
--------------------------------------------------------------------------------
/images/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/add.png
--------------------------------------------------------------------------------
/images/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/edit.png
--------------------------------------------------------------------------------
/images/icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/icon.jpg
--------------------------------------------------------------------------------
/images/mine.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/mine.jpg
--------------------------------------------------------------------------------
/images/word.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/word.png
--------------------------------------------------------------------------------
/images/header.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/header.jpg
--------------------------------------------------------------------------------
/images/loca1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/loca1.png
--------------------------------------------------------------------------------
/images/order.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/order.jpg
--------------------------------------------------------------------------------
/images/print.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/print.jpg
--------------------------------------------------------------------------------
/images/location.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/location.png
--------------------------------------------------------------------------------
/images/mine_cur.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/mine_cur.jpg
--------------------------------------------------------------------------------
/images/order_cur.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/order_cur.jpg
--------------------------------------------------------------------------------
/images/print_cur.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/print_cur.jpg
--------------------------------------------------------------------------------
/images/arrow_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lemoncool/paperMemory/HEAD/images/arrow_right.png
--------------------------------------------------------------------------------
/pages/logs/logs.wxss:
--------------------------------------------------------------------------------
1 | .log-list {
2 | display: flex;
3 | flex-direction: column;
4 | padding: 40rpx;
5 | }
6 | .log-item {
7 | margin: 10rpx;
8 | }
9 |
--------------------------------------------------------------------------------
/style/base/fn.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/mixin/text.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/mixin/setArrow.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/mixin/setOnepx.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/variable/color.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/variable/global.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/variable/weui-msg.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/variable/weui-button.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/variable/weui-cell.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/variable/weui-dialog.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/variable/weui-grid.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/style/base/variable/weui-progress.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
--------------------------------------------------------------------------------
/pages/deliver/deliver.wxss:
--------------------------------------------------------------------------------
1 | .weui-label{
2 | width:190rpx;
3 | }
4 |
5 | /*隐藏 */
6 | .hide{
7 | display: none;
8 | }
9 | /*显示 */
10 | .show{
11 | display: block;
12 | }
--------------------------------------------------------------------------------
/pages/logs/logs.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{index + 1}}. {{log}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/style/widget/weui-cell/weui-switch.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-cell_switch{padding-top:6px;padding-bottom:6px}
--------------------------------------------------------------------------------
/pages/shopSel/shopSel.wxss:
--------------------------------------------------------------------------------
1 | /* pages/start/start.wxss */
2 | .swiper{
3 | height: 400rpx;
4 | }
5 | .slide-image{
6 | width: 100%;
7 | }
8 | ::-webkit-scrollbar{
9 | width:0;
10 | height:0;
11 | color: transparent;
12 | }
--------------------------------------------------------------------------------
/pages/start/start.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{message}}
3 | 我是主体
4 |
5 |
6 |
--------------------------------------------------------------------------------
/style/base/reset.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | page{line-height:1.6;font-family:-apple-system-font,Helvetica Neue,sans-serif}icon{vertical-align:middle}
--------------------------------------------------------------------------------
/style/widget/weui-flex/weui-flex.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-flex{display:-webkit-box;display:-webkit-flex;display:flex}.weui-flex__item{-webkit-box-flex:1;-webkit-flex:1;flex:1}
--------------------------------------------------------------------------------
/pages/start/start.js:
--------------------------------------------------------------------------------
1 | //test.js
2 | //获取应用实例
3 | var app = getApp()
4 | Page({
5 | data: {
6 | userInfo: {},
7 | message: 'Hello MINA!'
8 | },
9 | onLoad: function () {
10 | console.log('onLoad test');
11 | },
12 | tapName: function (event) {
13 | console.log(event)
14 | }
15 | })
--------------------------------------------------------------------------------
/pages/logs/logs.js:
--------------------------------------------------------------------------------
1 | //logs.js
2 | const util = require('../../utils/util.js')
3 |
4 | Page({
5 | data: {
6 | logs: []
7 | },
8 | onLoad: function () {
9 | this.setData({
10 | logs: (wx.getStorageSync('logs') || []).map(log => {
11 | return util.formatTime(new Date(log))
12 | })
13 | })
14 | }
15 | })
16 |
--------------------------------------------------------------------------------
/pages/suggestion/suggestion.wxss:
--------------------------------------------------------------------------------
1 | /* pages/suggestion/suggestion.wxss */
2 |
3 | .textBox {
4 | padding: 20rpx 30rpx;
5 | box-sizing: border-box;
6 | width: 100%;
7 | height: 185px;
8 | position: relative;
9 | }
10 |
11 | .inputCount {
12 | position: absolute;
13 | bottom: 5px;
14 | right: 15px;
15 | color: #808080;
16 | }
17 |
--------------------------------------------------------------------------------
/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | .userinfo {
3 | display: flex;
4 | flex-direction: column;
5 | align-items: center;
6 | }
7 |
8 | .userinfo-avatar {
9 | width: 128rpx;
10 | height: 128rpx;
11 | margin: 20rpx;
12 | border-radius: 50%;
13 | }
14 |
15 | .userinfo-nickname {
16 | color: #aaa;
17 | }
18 |
19 | .usermotto {
20 | margin-top: 200px;
21 | }
--------------------------------------------------------------------------------
/pages/pay/pay.wxss:
--------------------------------------------------------------------------------
1 | .weui-label {
2 | width: 190rpx;
3 | }
4 |
5 | /*隐藏 */
6 |
7 | .hide {
8 | display: none;
9 | }
10 |
11 | /*显示 */
12 |
13 | .show {
14 | display: block;
15 | }
16 |
17 | .infoItem {
18 | margin-right: 50rpx;
19 | font-size: 14px;
20 | }
21 |
22 | .infoIcon {
23 | position: absolute;
24 | top: 48%;
25 | right: 40rpx;
26 | }
27 |
--------------------------------------------------------------------------------
/style/widget/weui-tips/weui-badge.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-badge{display:inline-block;padding:.15em .4em;min-width:8px;border-radius:18px;background-color:#e64340;color:#fff;line-height:1.2;text-align:center;font-size:12px;vertical-align:middle}.weui-badge_dot{padding:.4em;min-width:0}
--------------------------------------------------------------------------------
/style/widget/weui-progress/weui-progress.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-progress{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-progress__bar{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-progress__opr{margin-left:15px;font-size:0}
--------------------------------------------------------------------------------
/pages/myAddr/myAddr.wxss:
--------------------------------------------------------------------------------
1 | .userAddr{
2 | color: #B0B0B0;
3 | margin-top: 10rpx;
4 | /* color:#0ABA07; */
5 | }
6 | .addrItem{
7 | width: 85%;
8 | border-right: 1px solid #eee;
9 | margin-right: 8px;
10 | font-size: 16px;
11 | }
12 | image{
13 | width:30px;
14 | height:30px;
15 | }
16 | .img{
17 | vertical-align: middle;
18 | margin-right: 10px;
19 | }
20 | .addItem{
21 | width:90%;
22 | }
--------------------------------------------------------------------------------
/pages/ordersubmit/ordersubmit.wxss:
--------------------------------------------------------------------------------
1 | .weui-cell_select {
2 | position: relative;
3 | }
4 |
5 | .selectArea {
6 | z-index: 100;
7 | position: absolute;
8 | right: 60rpx;
9 | top: 90rpx;
10 | }
11 |
12 | .select_one {
13 | text-align: center;
14 | background-color: rgb(239, 239, 239);
15 | width: 500rpx;
16 | height: 80rpx;
17 | line-height: 80rpx;
18 | border-bottom: 2rpx solid #fff;
19 | }
20 |
--------------------------------------------------------------------------------
/pages/myOrder/myOrder.js:
--------------------------------------------------------------------------------
1 | //test.js
2 | //获取应用实例
3 | var app = getApp()
4 | Page({
5 | data: {
6 | message: 'Hello MINA!'
7 | },
8 | onLoad: function () {
9 | console.log('onLoad test');
10 | },
11 | goOrderDetail: function (e) {
12 | // var shopId = e.currentTarget.dataset.shopid;
13 | // console.log(shopId);
14 | wx.navigateTo({
15 | url: '../orderDetail/orderDetail'
16 | })
17 | }
18 | })
--------------------------------------------------------------------------------
/pages/myInfo/myInfo.wxss:
--------------------------------------------------------------------------------
1 | /* pages/start/start.wxss */
2 | .weui-header{
3 | height: 260rpx;
4 | width:100%;
5 | border-bottom: 1px solid #efeff4;
6 | }
7 | .holder{
8 | height:45rpx;
9 | }
10 | .weui-head{
11 | margin: 0 auto;
12 | text-align: center;
13 | }
14 | .headPic{
15 | width: 100rpx;
16 | height: 100rpx;
17 | border-radius: 100%;
18 | }
19 | .weui-name{
20 | font-size: 15px;
21 | color: #383838;
22 | margin-top: 10rpx;
23 | }
24 |
--------------------------------------------------------------------------------
/style/widget/weui-cell/weui-check.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-icon-radio{margin-left:3.2px;margin-right:3.2px}.weui-icon-checkbox_circle,.weui-icon-checkbox_success{margin-left:4.6px;margin-right:4.6px}.weui-check__label:active{background-color:#ececec}.weui-check{position:absolute;left:-9999px}.weui-check__hd_in-checkbox{padding-right:.35em}.weui-cell__ft_in-radio{padding-left:.35em}
--------------------------------------------------------------------------------
/style/widget/weui-cell/weui-form/weui-vcode.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-cell_vcode{padding-right:0}.weui-vcode-btn,.weui-vcode-img{margin-left:5px;height:2.58823529em;vertical-align:middle}.weui-vcode-btn{display:inline-block;padding:0 .6em 0 .7em;border-left:1px solid #e5e5e5;line-height:2.58823529em;font-size:17px;color:#3cc51f;white-space:nowrap}.weui-vcode-btn:active{color:#52a341}
--------------------------------------------------------------------------------
/style/widget/weui-page/weui-article.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-article{padding:20px 15px;font-size:15px}.weui-article__section{margin-bottom:1.5em}.weui-article__h1{font-size:18px;font-weight:400;margin-bottom:.9em}.weui-article__h2{font-size:16px;font-weight:400;margin-bottom:.34em}.weui-article__h3{font-weight:400;font-size:15px;margin-bottom:.34em}.weui-article__p{margin:0 0 .8em}
--------------------------------------------------------------------------------
/pages/suggestion/suggestion.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/utils/util.js:
--------------------------------------------------------------------------------
1 | const formatTime = date => {
2 | const year = date.getFullYear()
3 | const month = date.getMonth() + 1
4 | const day = date.getDate()
5 | const hour = date.getHours()
6 | const minute = date.getMinutes()
7 | const second = date.getSeconds()
8 |
9 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
10 | }
11 |
12 | const formatNumber = n => {
13 | n = n.toString()
14 | return n[1] ? n : '0' + n
15 | }
16 |
17 | module.exports = {
18 | formatTime: formatTime
19 | }
20 |
--------------------------------------------------------------------------------
/style/widget/weui-agree/weui-agree.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-agree{display:block;padding:.5em 15px;font-size:13px}.weui-agree__text{color:#999}.weui-agree__link{display:inline;color:#586c94}.weui-agree__checkbox{position:absolute;left:-9999px}.weui-agree__checkbox-icon{position:relative;top:2px;display:inline-block;border:1px solid #d1d1d1;background-color:#fff;border-radius:3px;width:11px;height:11px}.weui-agree__checkbox-icon-check{position:absolute;top:1px;left:1px}
--------------------------------------------------------------------------------
/pages/myOrder/myOrder.wxss:
--------------------------------------------------------------------------------
1 | .fileIcon {
2 | vertical-align: top;
3 | width: 50px;
4 | height: 50px;
5 | margin-right: 8px;
6 | }
7 |
8 | .arrow {
9 | width: 10px;
10 | height: 10px;
11 | }
12 |
13 | .desc {
14 | width: 70%;
15 | margin-right: 15rpx;
16 | }
17 |
18 | .btn_mini {
19 | width: 160rpx;
20 | height: 68rpx;
21 | line-height: 70rpx;
22 | border-radius: 5px;
23 | text-align: center;
24 | font-size: 14px;
25 | color: #fff;
26 | margin-right: 20rpx;
27 | display: inline-block;
28 | vertical-align: middle;
29 | }
30 |
--------------------------------------------------------------------------------
/pages/order/order.wxss:
--------------------------------------------------------------------------------
1 | .weui-cell_select {
2 | position: relative;
3 | }
4 |
5 | .selectArea {
6 | z-index: 100;
7 | position: absolute;
8 | right: 60rpx;
9 | top: 90rpx;
10 | }
11 |
12 | .select_one {
13 | text-align: center;
14 | background-color: rgb(239, 239, 239);
15 | width: 500rpx;
16 | height: 80rpx;
17 | line-height: 80rpx;
18 | border-bottom: 2rpx solid #fff;
19 | }
20 |
21 | .weui-btn {
22 | width: 94% !important;
23 | margin: 0 auto;
24 | }
25 | .totalMoney{
26 | width: 40%;
27 | text-align: center;
28 | margin: 50rpx auto;
29 | color:#808080;
30 | font-size: 18px;
31 | }
--------------------------------------------------------------------------------
/style/widget/weui-grid/weui-grid.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-grids{border-top:1rpx solid #d9d9d9;border-left:1rpx solid #d9d9d9;overflow:hidden}.weui-grid{position:relative;float:left;padding:20px 10px;width:33.33333333%;box-sizing:border-box;border-right:1rpx solid #d9d9d9;border-bottom:1rpx solid #d9d9d9}.weui-grid_active{background-color:#ececec}.weui-grid__icon{display:block;width:28px;height:28px;margin:0 auto}.weui-grid__label{margin-top:5px;display:block;text-align:center;color:#000;font-size:14px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
--------------------------------------------------------------------------------
/style/widget/weui-page/weui-msg.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-msg{padding-top:36px;text-align:center}.weui-msg__link{display:inline;color:#586c94}.weui-msg__icon-area{margin-bottom:30px}.weui-msg__text-area{margin-bottom:25px;padding:0 20px}.weui-msg__title{margin-bottom:5px;font-weight:400;font-size:20px}.weui-msg__desc{font-size:14px;color:#999}.weui-msg__opr-area{margin-bottom:25px}.weui-msg__extra-area{margin-bottom:15px;font-size:14px;color:#999}@media screen and (min-height:438px){.weui-msg__extra-area{position:fixed;left:0;bottom:0;width:100%;text-align:center}}
--------------------------------------------------------------------------------
/style/widget/weui-cell/weui-access.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-cell_access{color:inherit}.weui-cell__ft_in-access{padding-right:13px;position:relative}.weui-cell__ft_in-access:after{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;margin-top:-4px;right:2px}.weui-cell_link{color:#586c94;font-size:14px}.weui-cell_link:active{background-color:#ececec}.weui-cell_link:first-child:before{display:block}
--------------------------------------------------------------------------------
/style/widget/weui-footer/weui-footer.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-footer{color:#999;font-size:14px;text-align:center}.weui-footer_fixed-bottom{position:fixed;bottom:.52em;left:0;right:0}.weui-footer__links{font-size:0}.weui-footer__link{display:inline-block;vertical-align:top;margin:0 .62em;position:relative;font-size:14px;color:#586c94}.weui-footer__link:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #c7c7c7;color:#c7c7c7;left:-.65em;top:.36em;bottom:.36em}.weui-footer__link:first-child:before{display:none}.weui-footer__text{padding:0 .34em;font-size:12px}
--------------------------------------------------------------------------------
/pages/deliver/deliver.js:
--------------------------------------------------------------------------------
1 | //order.js
2 | Page({
3 | data: {
4 | isDeliver: false, //需要配送
5 | deliverType: [
6 | { name: 'notDeliver', value: '到店自取', checked: 'true' },
7 | { name: 'deliver', value: '送货上门' }
8 | ],
9 | primarySize: 'default',
10 | disabled: false,
11 |
12 | money: 500
13 | },
14 | // 黑白彩色单选按钮
15 | deliverChange: function (e) {
16 | // console.log('传过来的value值为:', e.detail.value)
17 | if (e.detail.value == 'notDeliver') { //自取
18 | this.setData({
19 | isDeliver : false
20 | })
21 | } else {
22 | this.setData({
23 | isDeliver: true
24 | })
25 | }
26 | },
27 |
28 | })
29 |
30 |
--------------------------------------------------------------------------------
/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{userInfo.nickName}}
8 |
9 |
10 |
11 | {{motto}}
12 |
13 |
14 | 跳转start页面
15 |
16 |
17 |
--------------------------------------------------------------------------------
/style/widget/weui-panel/weui-panel.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-panel{background-color:#fff;margin-top:10px;position:relative;overflow:hidden}.weui-panel:first-child{margin-top:0}.weui-panel:before{top:0;border-top:1rpx solid #e5e5e5}.weui-panel:after,.weui-panel:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#e5e5e5}.weui-panel:after{bottom:0;border-bottom:1rpx solid #e5e5e5}.weui-panel__hd{padding:14px 15px 10px;color:#999;font-size:13px;position:relative}.weui-panel__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #e5e5e5;color:#e5e5e5;left:15px}
--------------------------------------------------------------------------------
/pages/addAddress/addAddress.wxss:
--------------------------------------------------------------------------------
1 | .weui-cell_select {
2 | position: relative;
3 | }
4 |
5 | .selectArea {
6 | z-index: 100;
7 | position: absolute;
8 | right: 60rpx;
9 | top: 90rpx;
10 | }
11 |
12 | .select_one {
13 | text-align: center;
14 | background-color: rgb(239, 239, 239);
15 | width: 500rpx;
16 | height: 80rpx;
17 | line-height: 80rpx;
18 | border-bottom: 2rpx solid #fff;
19 | }
20 |
21 | .addrTitle {
22 | width: 180rpx;
23 | word-wrap: break-word;
24 | word-break: break-all;
25 | }
26 |
27 | .save{
28 | position: fixed;
29 | left:3%;
30 | bottom: 1%;
31 | }
32 | image{
33 | width:30px;
34 | height:30px;
35 | }
36 | .myImg{
37 | vertical-align: middle;
38 | }
--------------------------------------------------------------------------------
/pages/myInfo/myInfo.js:
--------------------------------------------------------------------------------
1 | //test.js
2 | //获取应用实例
3 | var app = getApp()
4 | Page({
5 | data: {
6 | userInfo: {},
7 | },
8 | onLoad: function () {
9 | // console.log('app.globalData.userInfo', app.globalData.userInfo);
10 | this.setData({
11 | userInfo: app.globalData.userInfo,
12 | hasUserInfo: true
13 | })
14 | },
15 | goTel: function () {
16 | wx.makePhoneCall({
17 | phoneNumber: '1340000' //假数据 后期需要真实联系方式
18 | })
19 | },
20 | goSuggestion: function () {
21 | wx.navigateTo({
22 | url: '../suggestion/suggestion'
23 | })
24 | },
25 | goAddress: function () {
26 | wx.navigateTo({
27 | url: '../myAddr/myAddr'
28 | })
29 | },
30 | })
--------------------------------------------------------------------------------
/style/widget/weui-tips/weui-loadmore.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-loadmore{width:65%;margin:1.5em auto;line-height:1.6em;font-size:14px;text-align:center}.weui-loadmore__tips{display:inline-block;vertical-align:middle}.weui-loadmore_line{border-top:1px solid #e5e5e5;margin-top:2.4em}.weui-loadmore__tips_in-line{position:relative;top:-.9em;padding:0 .55em;background-color:#fff;color:#999}.weui-loadmore__tips_in-dot{position:relative;padding:0 .16em;width:4px;height:1.6em}.weui-loadmore__tips_in-dot:before{content:" ";position:absolute;top:50%;left:50%;margin-top:-1px;margin-left:-2px;width:4px;height:4px;border-radius:50%;background-color:#e5e5e5}
--------------------------------------------------------------------------------
/style/widget/weui-cell/weui-form/weui-form_common.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-cell_input{padding-top:0;padding-bottom:0}.weui-label{width:105px;word-wrap:break-word;word-break:break-all}.weui-input{height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em}.weui-toptips{position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);top:0;left:0;right:0;padding:5px;font-size:14px;text-align:center;color:#fff;z-index:5000;word-wrap:break-word;word-break:break-all}.weui-toptips_warn{background-color:#e64340}.weui-textarea{display:block;width:100%}.weui-textarea-counter{color:#b2b2b2;text-align:right}.weui-cell_warn,.weui-textarea-counter_warn{color:#e64340}
--------------------------------------------------------------------------------
/style/widget/weui-cell/weui-form/weui-select.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-cell_select{padding:0}.weui-select{position:relative;padding-left:15px;padding-right:30px;height:2.58823529em;min-height:2.58823529em;line-height:2.58823529em;border-right:1rpx solid #d9d9d9}.weui-select:before{content:" ";display:inline-block;height:6px;width:6px;border-width:2px 2px 0 0;border-color:#c8c8cd;border-style:solid;-webkit-transform:matrix(.71,.71,-.71,.71,0,0);transform:matrix(.71,.71,-.71,.71,0,0);position:relative;top:-2px;position:absolute;top:50%;right:15px;margin-top:-4px}.weui-select_in-select-after{padding-left:0}.weui-cell__bd_in-select-before,.weui-cell__hd_in-select-after{padding-left:15px}
--------------------------------------------------------------------------------
/pages/myOrder/myOrder.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 打印任务1.doc
7 |
8 | 1个文件
9 | 订单制作中
10 |
11 |
12 | ¥10
13 | 去支付
14 | 取消
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/style/widget/weui-tab/weui-navbar.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-navbar{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;z-index:500;top:0;width:100%;border-bottom:1rpx solid #ccc}.weui-navbar__item{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:13px 0;text-align:center;font-size:0}.weui-navbar__item.weui-bar__item_on{color:#1aad19}.weui-navbar__slider{position:absolute;content:" ";left:0;bottom:0;width:6em;height:3px;background-color:#1aad19;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.weui-navbar__title{display:inline-block;font-size:15px;max-width:8em;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}
--------------------------------------------------------------------------------
/pages/shopSel/shopSel.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
19 |
20 |
--------------------------------------------------------------------------------
/style/widget/weui-tab/weui-tab.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-navbar{display:-webkit-box;display:-webkit-flex;display:flex;position:absolute;z-index:500;top:0;width:100%;border-bottom:1rpx solid #ccc}.weui-navbar__item{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;padding:13px 0;text-align:center;font-size:0}.weui-navbar__item.weui-bar__item_on{color:#1aad19}.weui-navbar__slider{position:absolute;content:" ";left:0;bottom:0;width:6em;height:3px;background-color:#1aad19;-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.weui-navbar__title{display:inline-block;font-size:15px;max-width:8em;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal}.weui-tab{position:relative;height:100%}.weui-tab__panel{box-sizing:border-box;height:100%;padding-top:50px;overflow:auto;-webkit-overflow-scrolling:touch}
--------------------------------------------------------------------------------
/pages/myAddr/myAddr.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
--------------------------------------------------------------------------------
/pages/myAddr/myAddr.js:
--------------------------------------------------------------------------------
1 | // pages/myAddr/myAddr.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | goAdd: function () {
12 | wx.navigateTo({
13 | url: '../addAddress/addAddress'
14 | })
15 | },
16 | goEdit: function () {
17 | wx.navigateTo({
18 | url: '../addAddress/addAddress'
19 | })
20 | },
21 |
22 | /**
23 | * 生命周期函数--监听页面加载
24 | */
25 | onLoad: function (options) {
26 |
27 | },
28 |
29 | /**
30 | * 生命周期函数--监听页面初次渲染完成
31 | */
32 | onReady: function () {
33 |
34 | },
35 |
36 | /**
37 | * 生命周期函数--监听页面显示
38 | */
39 | onShow: function () {
40 |
41 | },
42 |
43 | /**
44 | * 生命周期函数--监听页面隐藏
45 | */
46 | onHide: function () {
47 |
48 | },
49 |
50 | /**
51 | * 生命周期函数--监听页面卸载
52 | */
53 | onUnload: function () {
54 |
55 | },
56 |
57 | /**
58 | * 页面相关事件处理函数--监听用户下拉动作
59 | */
60 | onPullDownRefresh: function () {
61 |
62 | },
63 |
64 | /**
65 | * 页面上拉触底事件的处理函数
66 | */
67 | onReachBottom: function () {
68 |
69 | },
70 |
71 | /**
72 | * 用户点击右上角分享
73 | */
74 | onShareAppMessage: function () {
75 |
76 | }
77 | })
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | @import 'style/weui.wxss';
3 | @import 'style/iconfont.wxss';
4 |
5 | .container {
6 | height: 100%;
7 | display: flex;
8 | flex-direction: column;
9 | align-items: center;
10 | justify-content: space-between;
11 | padding: 200rpx 0;
12 | box-sizing: border-box;
13 | }
14 |
15 | .block {
16 | height: 30rpx;
17 | width: 100%;
18 | background-color: #f8f8f8;
19 | display: block;
20 | }
21 |
22 | .radio {
23 | margin-right: 10rpx;
24 | height: 2em;
25 | min-height: 2em;
26 | line-height: 2em;
27 | }
28 |
29 | .totalMoney {
30 | width: 40%;
31 | text-align: center;
32 | margin: 50rpx auto;
33 | color: #808080;
34 | font-size: 18px;
35 | }
36 |
37 | .box_desc {
38 | margin-right: 20rpx;
39 | }
40 |
41 | .weui-btn {
42 | width: 94% !important;
43 | margin: 0 auto;
44 | }
45 |
46 | .padding-box {
47 | padding-bottom: 5px;
48 | }
49 |
50 | .dataPicker {
51 | width: 100%;
52 | }
53 |
54 | .infoArea {
55 | position: relative;
56 | margin-left: 15px;
57 | padding: 10px 0;
58 | border-bottom: 1px solid #f8f8f8;
59 | }
60 |
61 | .docName {
62 | margin-bottom: 5px;
63 | }
64 |
65 |
66 | .rt {
67 | float: right;
68 | }
69 |
--------------------------------------------------------------------------------
/style/widget/weui-searchbar/weui-searchbar.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-search-bar{position:relative;padding:8px 10px;display:-webkit-box;display:-webkit-flex;display:flex;box-sizing:border-box;background-color:#efeff4;border-top:1rpx solid #d7d6dc;border-bottom:1rpx solid #d7d6dc}.weui-icon-search{margin-right:8px;font-size:inherit}.weui-icon-search_in-box{position:absolute;left:10px;top:7px}.weui-search-bar__text{display:inline-block;font-size:14px;vertical-align:middle}.weui-search-bar__form{position:relative;-webkit-box-flex:1;-webkit-flex:auto;flex:auto;border-radius:5px;background:#fff;border:1rpx solid #e6e6ea}.weui-search-bar__box{position:relative;padding-left:30px;padding-right:30px;width:100%;box-sizing:border-box;z-index:1}.weui-search-bar__input{height:28px;line-height:28px;font-size:14px}.weui-icon-clear{position:absolute;top:0;right:0;padding:7px 8px;font-size:0}.weui-search-bar__label{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;border-radius:3px;text-align:center;color:#9b9b9b;background:#fff;line-height:28px}.weui-search-bar__cancel-btn{margin-left:10px;line-height:28px;color:#09bb07;white-space:nowrap}
--------------------------------------------------------------------------------
/style/widget/weui-animate/weui-animate.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | @-webkit-keyframes a{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes a{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}.weui-animate-slide-up{-webkit-animation:a ease .3s forwards;animation:a ease .3s forwards}@-webkit-keyframes b{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes b{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.weui-animate-slide-down{-webkit-animation:b ease .3s forwards;animation:b ease .3s forwards}@-webkit-keyframes c{0%{opacity:0}to{opacity:1}}@keyframes c{0%{opacity:0}to{opacity:1}}.weui-animate-fade-in{-webkit-animation:c ease .3s forwards;animation:c ease .3s forwards}@-webkit-keyframes d{0%{opacity:1}to{opacity:0}}@keyframes d{0%{opacity:1}to{opacity:0}}.weui-animate-fade-out{-webkit-animation:d ease .3s forwards;animation:d ease .3s forwards}
--------------------------------------------------------------------------------
/pages/myInfo/myInfo.wxml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
38 |
--------------------------------------------------------------------------------
/pages/shopSel/shopSel.js:
--------------------------------------------------------------------------------
1 | //test.js
2 | //获取应用实例
3 | var app = getApp()
4 | Page({
5 | data: {
6 | imgUrls: [
7 | {
8 | // link: '/pages/index/index',
9 | url: 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg'
10 | },
11 | {
12 | url: 'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg'
13 | },
14 | {
15 | url: 'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'
16 | }
17 | ],
18 | shopAdd: [
19 | '农大店', '师院店'
20 | ],
21 | indicatorDots: true,
22 | autoplay: true,
23 | interval: 5000,
24 | duration: 1000,
25 | shopIndex: '',
26 | // message: 'Hello MINA!'
27 | },
28 | onLaunch: function () {
29 | wx.getUserInfo({
30 | success: function (res) {
31 | console.log('获取到的信息', res);
32 | // that.setData({
33 | // nickName: res.userInfo.nickName,
34 | // avatarUrl: res.userInfo.avatarUrl,
35 | // })
36 | }
37 | })
38 |
39 | },
40 | goShop: function (e) {
41 | var shopId = e.currentTarget.dataset.shopid;
42 | wx.setStorage({
43 | key: "shopIndex",
44 | data: shopId
45 | })
46 | // console.log(shopId);
47 | wx.navigateTo({
48 | url: '../ordersubmit/ordersubmit'
49 | })
50 | }
51 | })
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/shopSel/shopSel",
4 | "pages/myInfo/myInfo",
5 |
6 | "pages/ordersubmit/ordersubmit",
7 |
8 | "pages/myOrder/myOrder",
9 | "pages/orderDetail/orderDetail",
10 | "pages/pay/pay",
11 | "pages/myAddr/myAddr",
12 | "pages/addAddress/addAddress",
13 |
14 | "pages/suggestion/suggestion",
15 | "pages/index/index"
16 | ],
17 | "window": {
18 | "backgroundTextStyle": "light",
19 | "navigationBarBackgroundColor": "#fff",
20 | "navigationBarTitleText": "WeChat",
21 | "navigationBarTextStyle": "black"
22 | },
23 | "tabBar": {
24 | "color": "#666",
25 | "selectedColor": "#4EDF80",
26 | "backgroundColor": "#fff",
27 | "borderStyle": "black",
28 | "list": [
29 | {
30 | "text": "首页",
31 | "pagePath": "pages/shopSel/shopSel",
32 | "iconPath": "images/print.jpg",
33 | "selectedIconPath": "images/print_cur.jpg"
34 | },
35 | {
36 | "text": "订单",
37 | "pagePath": "pages/myOrder/myOrder",
38 | "iconPath": "images/order.jpg",
39 | "selectedIconPath": "images/order_cur.jpg"
40 | },
41 | {
42 | "text": "我的",
43 | "pagePath": "pages/myInfo/myInfo",
44 | "iconPath": "images/mine.jpg",
45 | "selectedIconPath": "images/mine_cur.jpg"
46 | }
47 | ],
48 | "position": "bottom"
49 | }
50 | }
--------------------------------------------------------------------------------
/pages/index/index.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | const app = getApp()
4 |
5 | Page({
6 | data: {
7 | motto: 'Hello World',
8 | userInfo: {},
9 | hasUserInfo: false,
10 | canIUse: wx.canIUse('button.open-type.getUserInfo')
11 | },
12 | //事件处理函数
13 | bindViewTap: function() {
14 | wx.navigateTo({
15 | url: '../logs/logs'
16 | })
17 | },
18 | onLoad: function () {
19 | if (app.globalData.userInfo) {
20 | this.setData({
21 | userInfo: app.globalData.userInfo,
22 | hasUserInfo: true
23 | })
24 | } else if (this.data.canIUse){
25 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
26 | // 所以此处加入 callback 以防止这种情况
27 | app.userInfoReadyCallback = res => {
28 | this.setData({
29 | userInfo: res.userInfo,
30 | hasUserInfo: true
31 | })
32 | }
33 | } else {
34 | // 在没有 open-type=getUserInfo 版本的兼容处理
35 | wx.getUserInfo({
36 | success: res => {
37 | app.globalData.userInfo = res.userInfo
38 | this.setData({
39 | userInfo: res.userInfo,
40 | hasUserInfo: true
41 | })
42 | }
43 | })
44 | }
45 | },
46 | getUserInfo: function(e) {
47 | console.log(e)
48 | app.globalData.userInfo = e.detail.userInfo
49 | this.setData({
50 | userInfo: e.detail.userInfo,
51 | hasUserInfo: true
52 | })
53 | }
54 | })
55 |
--------------------------------------------------------------------------------
/pages/order/order.js:
--------------------------------------------------------------------------------
1 | //order.js
2 | Page({
3 | data: {
4 | selectArea: true,
5 | defaultType: 'A4',
6 | papeTypeList: ['A4','B4','A3'],
7 | colorType: [
8 | { name: 'pure', value: '黑白' },
9 | { name: 'colorful', value: '彩色', checked: 'true' }
10 | ],
11 | sideType:[
12 | { name: 'single', value: '单面打印' },
13 | { name: 'double', value: '双面打印', checked: 'true' }
14 | ],
15 | primarySize: 'default',
16 | disabled: false,
17 | money:500
18 | },
19 | // 黑白彩色单选按钮
20 | colorChange: function (e) {
21 | console.log('radio发生change事件,携带value值为:', e.detail.value)
22 | },
23 | // 单双面单选
24 | sideChange: function (e) {
25 | console.log('单双面发生change事件,携带value值为:', e.detail.value)
26 | },
27 | //点击选择类型
28 | clickPaperType: function () {
29 | var selectArea = this.data.selectArea;
30 | if (selectArea) {
31 | this.setData({
32 | selectArea: false,
33 | })
34 | } else {
35 | this.setData({
36 | selectArea: true,
37 | })
38 | }
39 | },
40 | //点击切换
41 | mySelect: function (e) {
42 | this.setData({
43 | defaultType: e.target.dataset.me,
44 | selectArea: true,
45 | })
46 | },
47 | onLoad: function (options) {
48 | // 页面初始化 options为页面跳转所带来的参数
49 | },
50 | onReady: function () {
51 | // 页面渲染完成
52 | },
53 | onShow: function () {
54 | // 页面显示
55 | },
56 | onHide: function () {
57 | // 页面隐藏
58 | },
59 | onUnload: function () {
60 | // 页面关闭
61 | }
62 | })
63 |
64 |
--------------------------------------------------------------------------------
/style/widget/weui-media-box/weui-media-box.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-media-box{margin-left:12px;padding:12px 0 12px 12px;position:relative;border-bottom:0.5rpx solid #e5e5e5;}.weui-media-box:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;color:#e5e5e5;left:15px}.weui-media-box:first-child:before{display:none}.weui-media-box__title{font-weight:400;font-size:17px;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;word-wrap:break-word;word-break:break-all}.weui-media-box__desc{margin-top:10rpx;color:#999;font-size:15px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;}.weui-media-box__info{margin-top:15px;padding-bottom:5px;font-size:13px;color:#cecece;line-height:1em;list-style:none;overflow:hidden}.weui-media-box__info__meta{float:left;padding-right:1em}.weui-media-box__info__meta_extra{padding-left:1em;border-left:1px solid #cecece}.weui-media-box__title_in-text{margin-bottom:8px}.weui-media-box_appmsg{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-media-box__thumb{width:100%;height:100%;vertical-align:top}.weui-media-box__hd_in-appmsg{margin-right:.8em;width:60px;height:60px;line-height:60px;text-align:center}.weui-media-box__bd_in-appmsg{-webkit-box-flex:1;-webkit-flex:1;flex:1;min-width:0}.weui-media-box_small-appmsg{padding:0}.weui-cells_in-small-appmsg{margin-top:0}.weui-cells_in-small-appmsg:before{display:none}
--------------------------------------------------------------------------------
/style/widget/weui-cell/weui-uploader.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-uploader__hd{display:-webkit-box;display:-webkit-flex;display:flex;padding-bottom:10px;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.weui-uploader__title{-webkit-box-flex:1;-webkit-flex:1;flex:1}.weui-uploader__info{color:#b2b2b2}.weui-uploader__bd{margin-bottom:-4px;margin-right:-9px;overflow:hidden}.weui-uploader__file{float:left;margin-right:9px;margin-bottom:9px}.weui-uploader__img{display:block;width:79px;height:79px}.weui-uploader__file_status{position:relative}.weui-uploader__file_status:before{content:" ";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(0,0,0,.5)}.weui-uploader__file-content{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);color:#fff}.weui-uploader__input-box{float:left;position:relative;margin-right:9px;margin-bottom:9px;width:77px;height:77px;border:1px solid #d9d9d9}.weui-uploader__input-box:after,.weui-uploader__input-box:before{content:" ";position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);background-color:#d9d9d9}.weui-uploader__input-box:before{width:2px;height:39.5px}.weui-uploader__input-box:after{width:39.5px;height:2px}.weui-uploader__input-box:active{border-color:#999}.weui-uploader__input-box:active:after,.weui-uploader__input-box:active:before{background-color:#999}.weui-uploader__input{position:absolute;z-index:1;top:0;left:0;width:100%;height:100%;opacity:0}
--------------------------------------------------------------------------------
/pages/addAddress/addAddress.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 联系人
4 |
23 |
24 | 收货地址
25 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/pages/addAddress/addAddress.js:
--------------------------------------------------------------------------------
1 | //order.js
2 | Page({
3 | data: {
4 | sexType: [
5 | { name: 'male', value: '先生' },
6 | { name: 'female', value: '女士', checked: 'true' }
7 | ],
8 | disabled: false,
9 | location: {},
10 | imgHide: false,
11 | },
12 | // 性别单选按钮
13 | sexChangee: function (e) {
14 | console.log('radio发生change事件,携带value值为:', e.detail.value)
15 | },
16 | backMyAddr: function () {
17 | wx.navigateTo({
18 | url: '../myAddr/myAddr'
19 | })
20 | },
21 | // mapViewTap: function () {
22 | // wx.getLocation({
23 | // type: 'gcj02', //返回可以用于wx.openLocation的经纬
24 | // success: function (res) {
25 | // console.log(res)
26 | // wx.openLocation({
27 | // latitude: res.latitude,
28 | // longitude: res.longitude,
29 | // scale: 28
30 | // })
31 | // }
32 | // })
33 | // },
34 | getLocation: function () {
35 | var that = this;
36 | wx.chooseLocation({
37 | success: function (res) {
38 | console.log(res)
39 | that.setData({
40 | location: {
41 | latitude: res.latitude,
42 | longitude: res.longitude,
43 | name: res.name.substr(0, 8) + "..."
44 | }
45 | });
46 | if (that.data.location.name) {
47 | that.setData({
48 | imgHide:true
49 | })
50 | }
51 | }
52 | })
53 | },
54 | onLoad: function (options) {
55 | // 页面初始化 options为页面跳转所带来的参数
56 | },
57 | onReady: function () {
58 | // 页面渲染完成
59 | },
60 | onShow: function () {
61 | // 页面显示
62 | },
63 | onHide: function () {
64 | // 页面隐藏
65 | },
66 | onUnload: function () {
67 | // 页面关闭
68 | }
69 | })
70 |
71 |
--------------------------------------------------------------------------------
/style/widget/weui-cell/weui-form/weui-form-preview.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-form-preview{position:relative;background-color:#fff}.weui-form-preview:before{top:0;border-top:1rpx solid #d9d9d9}.weui-form-preview:after,.weui-form-preview:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-form-preview:after{bottom:0;border-bottom:1rpx solid #d9d9d9}.weui-form-preview__value{font-size:14px}.weui-form-preview__value_in-hd{font-size:26px}.weui-form-preview__hd{position:relative;padding:10px 15px;text-align:right;line-height:2.5em}.weui-form-preview__hd:after{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid #d9d9d9;color:#d9d9d9;left:15px}.weui-form-preview__bd{padding:10px 15px;font-size:.9em;text-align:right;color:#999;line-height:2}.weui-form-preview__ft{position:relative;line-height:50px;display:-webkit-box;display:-webkit-flex;display:flex}.weui-form-preview__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__item{overflow:hidden}.weui-form-preview__label{float:left;margin-right:1em;min-width:4em;color:#999;text-align:justify;text-align-last:justify}.weui-form-preview__value{display:block;overflow:hidden;word-break:normal;word-wrap:break-word}.weui-form-preview__btn{position:relative;display:block;-webkit-box-flex:1;-webkit-flex:1;flex:1;color:#3cc51f;text-align:center}.weui-form-preview__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #d5d5d6;color:#d5d5d6}.weui-form-preview__btn:first-child:after{display:none}.weui-form-preview__btn_active{background-color:#eee}.weui-form-preview__btn_default{color:#999}.weui-form-preview__btn_primary{color:#0bb20c}
--------------------------------------------------------------------------------
/pages/deliver/deliver.wxml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/pages/orderDetail/orderDetail.wxss:
--------------------------------------------------------------------------------
1 | .track-rcol {
2 | padding: 20rpx 0 20rpx 40rpx;
3 | font-size: 17px;
4 | }
5 |
6 | .proItem {
7 | position: relative;
8 | width: 100%;
9 | padding: 20rpx 0 0 30rpx;
10 | height: 80rpx;
11 | line-height: 55rpx;
12 | border-left: 1px solid #d9d9d9;
13 | color: #999;
14 | }
15 |
16 | .proItem_now {
17 | position: relative;
18 | width: 100%;
19 | padding: 20rpx 0 0 30rpx;
20 | height: 80rpx;
21 | line-height: 55rpx;
22 | border-left: 1px solid #d9d9d9;
23 | color: #0aba07;
24 | }
25 |
26 | .proItem_now .node-icon {
27 | background-color: #0aba07;
28 | }
29 |
30 | .node-icon {
31 | width: 20rpx;
32 | height: 20rpx;
33 | border-radius: 50%;
34 | background-color: #999;
35 | position: absolute;
36 | left: -5px;
37 | top: 38%;
38 | }
39 |
40 | .proItem .time {
41 | margin-right: 20rpx;
42 | }
43 |
44 | .proItem_now .time {
45 | margin-right: 20rpx;
46 | }
47 |
48 | .infoItem {
49 | margin-right: 100rpx;
50 | font-size: 16px;
51 | }
52 |
53 | .shopName {
54 | padding: 15rpx 15px 0 15px;
55 | }
56 |
57 | .orderItem {
58 | padding: 15rpx 15px;
59 | background: #f8f8f8;
60 | margin-top: 15rpx;
61 | }
62 |
63 | .orderItemBox {
64 | font-size: 14px;
65 | margin-right: 40rpx;
66 | color: #9f9f9f;
67 | }
68 |
69 | .orderExtra {
70 | font-size: 15px;
71 | padding: 15px;
72 | }
73 |
74 | .extraItem {
75 | padding-top: 15rpx;
76 | }
77 |
78 | .extraItem:first {
79 | padding-top: 0;
80 | }
81 |
82 | .extraTitle {
83 | color: #9f9f9f;
84 | }
85 |
86 | .totalFee {
87 | color: #f74d52;
88 | font-size: 17px;
89 | }
90 |
91 | .totalFeeBox {
92 | padding: 15px;
93 | }
94 |
95 | .telIcon {
96 | width: 60rpx;
97 | height: 60rpx;
98 | vertical-align: middle;
99 | }
100 |
--------------------------------------------------------------------------------
/style/weui.wxss:
--------------------------------------------------------------------------------
1 | /**
2 | * Tencent is pleased to support the open source community by making
3 | * WeUI-WXSS available.
4 | *
5 | * Copyright (C) 2017 THL A29 Limited, a Tencent company.
6 | * All rights reserved.
7 | *
8 | * Licensed under the MIT License (the "License"); you may not use
9 | * this file except in compliance with the License. You may obtain a copy of
10 | * the License at
11 | *
12 | * http://opensource.org/licenses/MIT
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | */
20 |
21 | @import "./base/reset.wxss";
22 |
23 | @import "widget/weui-cell/weui-cell.wxss";
24 | @import "widget/weui-cell/weui-access.wxss";
25 | @import "widget/weui-cell/weui-check.wxss";
26 | @import "widget/weui-cell/weui-form.wxss";
27 | @import "widget/weui-cell/weui-switch.wxss";
28 | @import "widget/weui-cell/weui-uploader.wxss";
29 |
30 | @import "./widget/weui-page/weui-article.wxss";
31 | @import "./widget/weui-page/weui-msg.wxss";
32 |
33 | @import "widget/weui-flex/weui-flex.wxss";
34 |
35 | @import "widget/weui-button/weui-button.wxss";
36 |
37 | @import "./widget/weui-agree/weui-agree.wxss";
38 |
39 | @import "./widget/weui-footer/weui-footer.wxss";
40 |
41 | @import "./widget/weui-grid/weui-grid.wxss";
42 |
43 | @import "./widget/weui-loading/weui-loading.wxss";
44 |
45 | @import "./widget/weui-tips/weui-badge.wxss";
46 | @import "./widget/weui-tips/weui-loadmore.wxss";
47 |
48 | @import "./widget/weui-panel/weui-panel.wxss";
49 |
50 | @import "./widget/weui-media-box/weui-media-box.wxss";
51 |
52 | @import "./widget/weui-progress/weui-progress.wxss";
53 |
54 | @import "./widget/weui-tab/weui-tab.wxss";
55 |
56 | @import "./widget/weui-searchbar/weui-searchbar.wxss";
--------------------------------------------------------------------------------
/pages/suggestion/suggestion.js:
--------------------------------------------------------------------------------
1 | var app = getApp();
2 | Page({
3 | data: {
4 | evaContent: '',
5 | noteMaxLen: 200,
6 | disabled: false,
7 | len: 0,
8 | inputValue: '',
9 | },
10 | onLoad: function () {
11 | },
12 | onReady: function () {
13 | // 页面渲染完成
14 | },
15 | onShow: function () {
16 | // 页面显示
17 | },
18 | onHide: function () {
19 | // 页面隐藏
20 | },
21 | onUnload: function () {
22 | // 页面关闭
23 | },
24 | //字数限制
25 | bindWordLimit: function (e) {
26 | this.data.inputValue = e.detail.value;
27 | this.data.len = parseInt(this.data.inputValue.length);
28 | if (this.data.len > this.data.noteMaxLen) return;
29 | this.setData({
30 | currentNoteLen: this.data.len //当前字数
31 | });
32 | },
33 | modalcnt: function () {
34 | wx.showModal({
35 | title: '提示',
36 | content: '输入信息不可为空',
37 | showCancel:false,
38 | success: function (res) {
39 | if (res.confirm) {
40 | return
41 | } else if (res.cancel) {
42 | return
43 | }
44 | }
45 | })
46 | },
47 | //提交事件
48 | suggSubmit: function (e) {
49 | if (this.data.len <= 0) {
50 | this.modalcnt();
51 | } else {
52 | this.submitSucc();
53 | }
54 |
55 | },
56 | submitSucc: function () {
57 | wx.showToast({
58 | title: '反馈成功',
59 | icon: 'success',
60 | duration: 1200
61 | })
62 | setTimeout(function () {
63 | wx.switchTab({
64 | url: '../myInfo/myInfo'
65 | })
66 | },1200)
67 | },
68 | evaSubmit: function (e) {
69 |
70 | }
71 | // var that = this;
72 | // //提交(自定义的get方法)
73 | // app.func.req('http://localhost:1111/ffeva/complaint?content=''+this.data.evaContent),get,function(res){
74 | // console.log(res);
75 | // if (res.result === '1') {
76 | // //跳转到首页
77 | // app.func.showToast('提交成功', 'loading', 1200);
78 | // } else {
79 | // app.func.showToast('提交失败', 'loading', 1200);
80 | // }
81 | // });
82 | })
--------------------------------------------------------------------------------
/pages/orderDetail/orderDetail.js:
--------------------------------------------------------------------------------
1 | //test.js
2 | //获取应用实例
3 | var app = getApp()
4 | Page({
5 | data: {
6 | orderItem: [
7 | { title: '打印1.doc', type: 'A4', colorType: '彩色双面', count: 2, pages: 20, money: 11 },
8 | { title: '打印1.doc', type: 'A4', colorType: '彩色双面', count: 2, pages: 20, money: 50 },
9 | ],
10 | shopName: '',
11 | deliverFee: 12,
12 | deliverAddr: '朝阳区朝阳区',
13 | totalFee: 62,
14 | orderCode: 123456778,
15 | extra: '尽快送达',
16 | shopAddr: '创业孵化中心',
17 | deliverByselfCode: '120236548795',
18 | },
19 | onLoad: function (options) {
20 | var that = this;
21 | // 自取时取出缓存中商铺id判断自取点的文本
22 | wx.getStorage({
23 | key: 'shopIndex',
24 | success: function (res) {
25 | if (res.data == '0') {
26 | that.setData({
27 | shopName: '农大店'
28 | })
29 | } else if (res.data == '1') {
30 | that.setData({
31 | shopName: '师院店'
32 | })
33 | }
34 | }
35 | });
36 | // 取出店铺地址
37 | // wx.getStorage({
38 | // key: 'shopAddr',
39 | // success: function (res) {
40 | // console.log('shopAddr', res.data)
41 | // }
42 | // })
43 |
44 | },
45 | contactShop: function () {
46 | wx.makePhoneCall({
47 | phoneNumber: '1340000' //假数据 后期需要真实联系方式
48 | })
49 | },
50 | // markertap: function () {
51 | // wx.getLocation({
52 | // type: 'wgs84',
53 | // success: (res) => {
54 | // var latitude = res.latitude // 经度
55 | // var longitude = res.longitude // 纬度
56 | // }
57 | // })
58 | // },
59 | /**
60 | * 生命周期函数--监听页面显示
61 | **/
62 | // getData: function () {
63 | // var that = this;
64 | // wx.request({
65 | // url: "https://www.easy-mock.com/mock/596257bc9adc231f357c4664/restaurant/info",//接口链接
66 | // method: "GET",
67 | // success: function (res) {//成功得到数据,对数据进行处理
68 | // that.setData({//将数据发送到data中
69 | // restaurant: res.data.data.restaurant,
70 | // location: wx.getStorageSync('location')
71 | // })
72 | // }
73 | // });
74 | // }
75 | })
--------------------------------------------------------------------------------
/pages/order/order.wxml:
--------------------------------------------------------------------------------
1 |
2 | 订单详情
3 |
17 |
18 | 打印参数
19 |
50 |
51 | ¥{{money}}
52 |
53 |
--------------------------------------------------------------------------------
/pages/ordersubmit/ordersubmit.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 订单详情
4 |
18 |
19 | 打印参数
20 |
51 |
52 | ¥{{money}}
53 |
54 |
55 |
--------------------------------------------------------------------------------
/style/iconfont.wxss:
--------------------------------------------------------------------------------
1 |
2 | @font-face {font-family: "iconfont";
3 | src: url('iconfont.eot?t=1515999810040'); /* IE9*/
4 | src: url('iconfont.eot?t=1515999810040#iefix') format('embedded-opentype'), /* IE6-IE8 */
5 | url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAAUUAAsAAAAAB2AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZW7khSY21hcAAAAYAAAABeAAABhprYBr5nbHlmAAAB4AAAAUUAAAFIx63bbmhlYWQAAAMoAAAALwAAADYQJCpmaGhlYQAAA1gAAAAcAAAAJAfeA4RobXR4AAADdAAAAAwAAAAMC+kAAGxvY2EAAAOAAAAACAAAAAgAdgCkbWF4cAAAA4gAAAAfAAAAIAESAF1uYW1lAAADqAAAAUUAAAJtPlT+fXBvc3QAAATwAAAAJAAAADXN8jx7eJxjYGRgYOBikGPQYWB0cfMJYeBgYGGAAJAMY05meiJQDMoDyrGAaQ4gZoOIAgCKIwNPAHicY2Bk/sE4gYGVgYOpk+kMAwNDP4RmfM1gxMjBwMDEwMrMgBUEpLmmMDgwVDzLYG7438AQw9zA0AAUZgTJAQArFAzUeJzFkMENgDAMAy9t6QMxCA8G4sW7I3TirlFMKA8mqCXHimMpUYAFiOIhJrAL48Ep19yPrO4nz2SpEait9K7+U0U0y65BJTMNNm/1H5vXfXT6CnVQJ7byknADWo4NLwAAeJwNjztPwlAYQO93S28Lllb6un3QQilQDIqxVjAxFAdjlKghGgdHE1dIdGExkYXEwcHdxRiNg3+B0T9idDCubppUe3KGsx7EIvT3xswYAymogVbQFhogBKQJFRE74AVRCzdB81iNqiIT+IHH+ZUW0wVaIaoetqM6JRyRQAQXVr2wHbRwAGtRjDcg1B0A07aO5FpRZm4hZwTuNOnjB9BKflGKl5LdxZ4alhV+LMiyKcs3PGFZHuOMJMKQ6lk2myPJIytZ2qy0gEsgmIG1d5Iv2/LpdTRyajQLMJmAYpfF517BKqReWroim9x8njesvF9VYfwxZyiCU39HKTh9vWNemT7SkJ5e6oRzgcbQoWmRKsKdGKgCZ4y7CS/3mUP6S4KrafKdfO00mhfsEHfxdk34PCADPMqcry8/QR/s430gyc8/x2A4lwAAAHicY2BkYGAAYtWXM+bH89t8ZeBmYQCBa03FTgj6/2wWBmYvIJeDgQkkCgArCwoFAHicY2BkYGBu+N/AEMPCAAJAkpEBFTADAEcJAmwEAAAAA+kAAAQAAAAAAAAAAHYApHicY2BkYGBgZghkYGUAASYg5gJCBob/YD4DABD3AXAAeJxlj01OwzAQhV/6B6QSqqhgh+QFYgEo/RGrblhUavdddN+mTpsqiSPHrdQDcB6OwAk4AtyAO/BIJ5s2lsffvHljTwDc4Acejt8t95E9XDI7cg0XuBeuU38QbpBfhJto41W4Rf1N2MczpsJtdGF5g9e4YvaEd2EPHXwI13CNT+E69S/hBvlbuIk7/Aq30PHqwj7mXle4jUcv9sdWL5xeqeVBxaHJIpM5v4KZXu+Sha3S6pxrW8QmU4OgX0lTnWlb3VPs10PnIhVZk6oJqzpJjMqt2erQBRvn8lGvF4kehCblWGP+tsYCjnEFhSUOjDFCGGSIyujoO1Vm9K+xQ8Jee1Y9zed0WxTU/3OFAQL0z1xTurLSeTpPgT1fG1J1dCtuy56UNJFezUkSskJe1rZUQuoBNmVXjhF6XNGJPyhnSP8ACVpuyAAAAHicY2BigAAuBuyAmZGJkZmRhYGxgj0lMzEvozSRgQEAGdADdg==') format('woff'),
6 | url('iconfont.ttf?t=1515999810040') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7 | url('iconfont.svg?t=1515999810040#iconfont') format('svg'); /* iOS 4.1- */
8 | }
9 |
10 | .iconfont {
11 | font-family:"iconfont" !important;
12 | font-size:16px;
13 | font-style:normal;
14 | -webkit-font-smoothing: antialiased;
15 | -moz-osx-font-smoothing: grayscale;
16 | }
17 |
18 | .icon-dianhua:before { content: "\e668"; }
19 |
20 |
--------------------------------------------------------------------------------
/pages/orderDetail/orderDetail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 2016-03-10 18:07
6 | 订单已完成
7 |
8 |
9 |
10 | 2016-03-10 18:07
11 | 正在配送
12 |
13 |
14 |
15 | 2016-03-10 18:07
16 | 店家已接单
17 |
18 |
19 |
20 |
21 | {{shopName}}
22 |
23 |
24 | {{item.title}}
25 | ¥{{item.money}}
26 |
27 |
28 | {{item.type}}
29 | {{item.colorType}}
30 | {{item.count}}份
31 | {{item.pages}}页/份
32 |
33 |
41 |
42 |
43 | 配送费:
44 | ¥{{deliverFee}}
45 |
46 |
47 | 合计:
48 | ¥{{totalFee}}
49 |
50 |
54 |
55 |
79 |
80 |
--------------------------------------------------------------------------------
/pages/pay/pay.js:
--------------------------------------------------------------------------------
1 | //order.js
2 | Page({
3 | data: {
4 | isDeliver: false, //需要配送
5 | deliverType: [
6 | { name: 'notDeliver', value: '到店自取', checked: 'true' },
7 | { name: 'deliver', value: '送货上门' }
8 | ],
9 | infoArea: [
10 | { title: '打印1', type: 'A4', colorType: '彩色双面', count: 2, pages: 20, total: 40 },
11 | { title: '打印2', type: 'B5', colorType: '黑白单面', count: 3, pages: 10, total: 30 }
12 | ],
13 | money: 0,
14 | shopAddr: "",
15 | },
16 | // 配送方式选择
17 | deliverChange: function (e) {
18 | // console.log('传过来的value值为:', e.detail.value)
19 | if (e.detail.value == 'notDeliver') { //自取
20 | this.setData({
21 | isDeliver: false
22 | })
23 | } else {
24 | this.setData({
25 | isDeliver: true
26 | })
27 | }
28 | },
29 | // 叉号删除
30 | deleteInfo: function (e) {
31 | var infoId = e.currentTarget.dataset.infoid;
32 | // console.log('infoId', infoId);
33 | this.data.infoArea.splice(infoId, 1);
34 | this.setData({
35 | infoArea: this.data.infoArea
36 | })
37 | this.totalMoney()
38 | },
39 | // 时间控件
40 | bindTimeChange: function (e) {
41 | var method = e.currentTarget.dataset.method;
42 | console.log('传过来的参数为', method);
43 | switch (method) {
44 | case '1':
45 | this.setData({
46 | time1: e.detail.value
47 | })
48 | console.log('自取方式携带时间值为', e.detail.value)
49 | break;
50 | case '2':
51 | this.setData({
52 | time2: e.detail.value
53 | })
54 | console.log('配送方式携带时间值为', e.detail.value)
55 | break;
56 | }
57 | },
58 | totalMoney: function () {
59 | this.data.money = 0;
60 | var infoList = this.data.infoArea;
61 | for (var i = 0; i < infoList.length; i++) {
62 | // console.log(i, infoList[i].total);
63 | this.setData({
64 | money: this.data.money + infoList[i].total
65 | })
66 | // console.log(this.data.money);
67 | }
68 | },
69 | onLoad: function (options) {
70 | var that = this;
71 | // 自取时取出缓存中商铺id判断自取点的文本
72 | wx.getStorage({
73 | key: 'shopIndex',
74 | success: function (res) {
75 | if (res.data == '0') {
76 | that.setData({
77 | shopAddr: '农大创业孵化基地'
78 | })
79 | // 将店铺地址存入缓存,以便订单信息中读取
80 | wx.setStorage({
81 | key: "shopAddr",
82 | data: that.data.shopAddr
83 | })
84 | } else if (res.data == '1') {
85 | that.setData({
86 | shopAddr: '师院创业孵化基地'
87 | })
88 | // 将店铺地址存入缓存,以便订单信息中读取
89 | wx.setStorage({
90 | key: "shopAddr",
91 | data: that.data.shopAddr
92 | })
93 | }
94 | }
95 | })
96 | // 重新计算总钱数
97 | this.totalMoney()
98 | },
99 | commitPay: function () {
100 | console.log(1111);
101 | }
102 | })
103 |
--------------------------------------------------------------------------------
/pages/pay/pay.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | {{shopAddr}}
29 |
30 |
31 |
32 |
33 | 自取时间
34 | {{time1}}
35 |
36 |
37 |
38 |
39 |
40 |
58 |
59 |
60 |
61 |
62 | {{item.title}}
63 |
64 | 类型:{{item.type}}
65 | 规则:{{item.colorType}}
66 |
67 |
68 | 份数:{{item.count}}份
69 | 页数:{{item.pages}}页/份
70 |
71 |
72 | 合计:{{item.total}}元
73 |
74 |
75 |
76 |
¥{{money}}
77 |
78 |
79 |
--------------------------------------------------------------------------------
/pages/ordersubmit/ordersubmit.js:
--------------------------------------------------------------------------------
1 | //order.js
2 | Page({
3 | data: {
4 | selectArea: true,
5 | defaultType: 'A4',
6 | papeTypeList: ['A4', 'B4', 'A3'],
7 | colorType: [
8 | { name: 'pure', value: '黑白' },
9 | { name: 'colorful', value: '彩色', checked: 'true' }
10 | ],
11 | sideType: [
12 | { name: 'single', value: '单面打印' },
13 | { name: 'double', value: '双面打印', checked: 'true' }
14 | ],
15 | primarySize: 'default',
16 | disabled: false,
17 | money: 500,
18 | src: "../../images/header.jpg", //绑定image组件的src
19 | },
20 | // 黑白彩色单选按钮
21 | colorChange: function (e) {
22 | console.log('radio发生change事件,携带value值为:', e.detail.value)
23 | },
24 | // 单双面单选
25 | sideChange: function (e) {
26 | console.log('单双面发生change事件,携带value值为:', e.detail.value)
27 | },
28 | //点击选择类型
29 | clickPaperType: function () {
30 | var selectArea = this.data.selectArea;
31 | if (selectArea) {
32 | this.setData({
33 | selectArea: false,
34 | })
35 | } else {
36 | this.setData({
37 | selectArea: true,
38 | })
39 | }
40 | },
41 | //点击切换
42 | mySelect: function (e) {
43 | this.setData({
44 | defaultType: e.target.dataset.me,
45 | selectArea: true,
46 | })
47 | },
48 | jumpToPay: function () {
49 | wx.navigateTo({
50 | url: '../pay/pay'
51 | })
52 | },
53 | onLoad: function (options) {
54 | // 页面初始化 options为页面跳转所带来的参数
55 | },
56 | onReady: function () {
57 | // 页面渲染完成
58 | },
59 | onShow: function () {
60 | // 页面显示
61 | },
62 | onHide: function () {
63 | // 页面隐藏
64 | },
65 | onUnload: function () {
66 | // 页面关闭
67 | },
68 | // 调用传图片接口
69 | uploadImage: function () {
70 | console.log('进入了选择图片方法');
71 | var that = this;
72 | wx.chooseImage({
73 | count: 1, // 默认9
74 | sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
75 | sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
76 | success: function (res) {
77 | // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
78 | var tempFilePaths = res.tempFilePaths;
79 | console.log('开始upload方法');
80 | upload(that, tempFilePaths);
81 | console.log('结束upload方法');
82 | }
83 | })
84 | },
85 | // 上传
86 | upload: function (page, path) {
87 | wx.showToast({
88 | icon: "loading",
89 | title: "正在上传"
90 | }),
91 | wx.uploadFile({
92 | url: constant.SERVER_URL + "/FileUploadServlet",
93 | filePath: path[0],
94 | name: 'file',
95 | header: { "Content-Type": "multipart/form-data" },
96 | success: function (res) {
97 | console.log(res);
98 | if (res.statusCode != 200) {
99 | wx.showModal({
100 | title: '提示',
101 | content: '上传失败',
102 | showCancel: false
103 | })
104 | return;
105 | }
106 | var data = res.data
107 | page.setData({ //上传成功修改显示头像
108 | src: path[0]
109 | })
110 | },
111 | fail: function (e) {
112 | console.log(e);
113 | wx.showModal({
114 | title: '提示',
115 | content: '上传失败',
116 | showCancel: false
117 | })
118 | },
119 | })
120 | }
121 | })
--------------------------------------------------------------------------------
/style/widget/weui-cell/weui-cell.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
7 | .weui-cells {
8 | position: relative;
9 | margin-top: 1.17647059em;
10 | background-color: #fff;
11 | line-height: 1.41176471;
12 | font-size: 17px;
13 | }
14 |
15 | .weui-cells:before {
16 | top: 0;
17 | border-top: 1rpx solid #d9d9d9;
18 | }
19 |
20 | .weui-cells:after, .weui-cells:before {
21 | content: " ";
22 | position: absolute;
23 | left: 0;
24 | right: 0;
25 | height: 1px;
26 | color: #d9d9d9;
27 | }
28 |
29 | .weui-cells:after {
30 | bottom: 0;
31 | border-bottom: 1rpx solid #d9d9d9;
32 | }
33 |
34 | .weui-cells__title {
35 | margin-top: 0.77em;
36 | margin-bottom: 0.3em;
37 | padding-left: 15px;
38 | padding-right: 15px;
39 | color: #999;
40 | font-size: 18px;
41 | }
42 |
43 | .weui-cells_after-title {
44 | margin-top: 0;
45 | }
46 |
47 | .weui-cells__tips {
48 | margin-top: 0.3em;
49 | color: #999;
50 | padding-left: 15px;
51 | padding-right: 15px;
52 | font-size: 14px;
53 | }
54 |
55 | .weui-cell {
56 | padding: 10px 15px;
57 | position: relative;
58 | display: -webkit-box;
59 | display: -webkit-flex;
60 | display: flex;
61 | -webkit-box-align: center;
62 | -webkit-align-items: center;
63 | align-items: center;
64 | }
65 | .weui-cell:before {
66 | content: " ";
67 | position: absolute;
68 | left: 0;
69 | top: 0;
70 | right: 0;
71 | height: 1px;
72 | border-top: 1px solid #e5e5e5;
73 | color: #e5e5e5;
74 | -webkit-transform-origin: 0 0;
75 | transform-origin: 0 0;
76 | -webkit-transform: scaleY(0.5);
77 | transform: scaleY(0.5);
78 | left: 15px;
79 | z-index: 2;
80 | }
81 |
82 |
83 | .weui-cell:first-child:before {
84 | display: none;
85 | }
86 |
87 | .weui-cell_active {
88 | background-color: #ececec;
89 | }
90 |
91 | .weui-cell_primary {
92 | -webkit-box-align: start;
93 | -webkit-align-items: flex-start;
94 | align-items: flex-start;
95 | }
96 |
97 | .weui-cell__bd {
98 | -webkit-box-flex: 1;
99 | -webkit-flex: 1;
100 | flex: 1;
101 | }
102 |
103 | .weui-cell__ft {
104 | text-align: right;
105 | color: #999;
106 | }
107 |
108 | .weui-cell_access .weui-cell__ft:after {
109 | content: " ";
110 | display: inline-block;
111 | height: 6px;
112 | width: 6px;
113 | border-width: 2px 2px 0 0;
114 | border-color: #c8c8cd;
115 | border-style: solid;
116 | -webkit-transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
117 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
118 | position: relative;
119 | top: -2px;
120 | position: absolute;
121 | top: 50%;
122 | margin-top: -4px;
123 | right: 2px;
124 | }
125 |
126 | .weui-cell_access {
127 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
128 | color: inherit;
129 | }
130 |
131 | .weui-cell_access:active {
132 | background-color: #ececec;
133 | }
134 |
135 | .weui-cell_access .weui-cell__ft {
136 | padding-right: 13px;
137 | position: relative;
138 | }
139 |
140 |
141 | .weui-cell_select-before .weui-cell__bd {
142 | padding-left: 15px;
143 | }
144 |
145 | .weui-cells_form .weui-cell__ft {
146 | font-size: 0;
147 | }
148 |
149 | .weui-cells_form .weui-icon-warn {
150 | display: none;
151 | }
152 |
153 | .weui-input::-webkit-outer-spin-button, .weui-input::-webkit-inner-spin-button {
154 | -webkit-appearance: none;
155 | margin: 0;
156 | }
157 |
158 |
159 | .weui-cell_select .weui-select{
160 | padding-right:30px;
161 | }
162 | .weui-cell_select .weui-cell__bd:after{
163 | content:" ";
164 | display:inline-block;
165 | height:6px;
166 | width:6px;
167 | border-width:2px 2px 0 0;
168 | border-color:#C8C8CD;
169 | border-style:solid;
170 | -webkit-transform:matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
171 | transform:matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
172 | position:relative;
173 | top:-2px;
174 | position:absolute;
175 | top:50%;
176 | right:15px;
177 | margin-top:-4px;
178 | }
179 | .weui-cell_select-before{
180 | padding-right:15px;
181 | }
--------------------------------------------------------------------------------
/style/widget/weui-button/weui-button.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-btn{margin-top:15px}.weui-btn:first-child{margin-top:0}.weui-btn-area{margin:1.17647059em 15px .3em}
7 | .weui-btn{
8 | position:relative;
9 | display:block;
10 | margin-left:auto;
11 | margin-right:auto;
12 | padding-left:14px;
13 | padding-right:14px;
14 | box-sizing:border-box;
15 | font-size:18px;
16 | text-align:center;
17 | text-decoration:none;
18 | color:#FFFFFF;
19 | line-height:2.55555556;
20 | border-radius:5px;
21 | -webkit-tap-highlight-color:rgba(0, 0, 0, 0);
22 | overflow:hidden;
23 | }
24 | .weui-btn:after{
25 | content:" ";
26 | width:200%;
27 | height:200%;
28 | position:absolute;
29 | top:0;
30 | left:0;
31 | border:1px solid rgba(0, 0, 0, 0.2);
32 | -webkit-transform:scale(0.5);
33 | transform:scale(0.5);
34 | -webkit-transform-origin:0 0;
35 | transform-origin:0 0;
36 | box-sizing:border-box;
37 | border-radius:10px;
38 | }
39 | .weui-btn_inline{
40 | display:inline-block;
41 | }
42 | .weui-btn_default{
43 | color:#000000;
44 | background-color:#F8F8F8;
45 | }
46 | .weui-btn_default:not(.weui-btn_disabled):visited{
47 | color:#000000;
48 | }
49 | .weui-btn_default:not(.weui-btn_disabled):active{
50 | color:rgba(0, 0, 0, 0.6);
51 | background-color:#DEDEDE;
52 | }
53 | .weui-btn_primary{
54 | background-color:#1AAD19;
55 | }
56 | .weui-btn_primary:not(.weui-btn_disabled):visited{
57 | color:#FFFFFF;
58 | }
59 | .weui-btn_primary:not(.weui-btn_disabled):active{
60 | color:rgba(255, 255, 255, 0.6);
61 | background-color:#179B16;
62 | }
63 | .weui-btn_warn{
64 | background-color:#E64340;
65 | }
66 | .weui-btn_warn:not(.weui-btn_disabled):visited{
67 | color:#FFFFFF;
68 | }
69 | .weui-btn_warn:not(.weui-btn_disabled):active{
70 | color:rgba(255, 255, 255, 0.6);
71 | background-color:#CE3C39;
72 | }
73 | .weui-btn_disabled{
74 | color:rgba(255, 255, 255, 0.6);
75 | }
76 | .weui-btn_disabled.weui-btn_default{
77 | color:rgba(0, 0, 0, 0.3);
78 | background-color:#F7F7F7;
79 | }
80 | .weui-btn_disabled.weui-btn_primary{
81 | background-color:#9ED99D;
82 | }
83 | .weui-btn_disabled.weui-btn_warn{
84 | background-color:#EC8B89;
85 | }
86 | .weui-btn_loading .weui-loading{
87 | margin:-0.2em 0.34em 0 0;
88 | }
89 | .weui-btn_loading.weui-btn_primary,
90 | .weui-btn_loading.weui-btn_warn{
91 | color:rgba(255, 255, 255, 0.6);
92 | }
93 | .weui-btn_loading.weui-btn_primary{
94 | background-color:#179B16;
95 | }
96 | .weui-btn_loading.weui-btn_warn{
97 | background-color:#CE3C39;
98 | }
99 | .weui-btn_plain-primary{
100 | color:#1aad19;
101 | border:1px solid #1aad19;
102 | }
103 | .weui-btn_plain-primary:not(.weui-btn_plain-disabled):active{
104 | color:rgba(26, 173, 25, 0.6);
105 | border-color:rgba(26, 173, 25, 0.6);
106 | }
107 | .weui-btn_plain-primary:after{
108 | border-width:0;
109 | }
110 | .weui-btn_plain-default{
111 | color:#353535;
112 | border:1px solid #353535;
113 | }
114 | .weui-btn_plain-default:not(.weui-btn_plain-disabled):active{
115 | color:rgba(53, 53, 53, 0.6);
116 | border-color:rgba(53, 53, 53, 0.6);
117 | }
118 | .weui-btn_plain-default:after{
119 | border-width:0;
120 | }
121 | .weui-btn_plain-disabled{
122 | color:rgba(0, 0, 0, 0.2);
123 | border-color:rgba(0, 0, 0, 0.2);
124 | }
125 | button.weui-btn,
126 | input.weui-btn{
127 | width:100%;
128 | border-width:0;
129 | outline:0;
130 | -webkit-appearance:none;
131 | }
132 | button.weui-btn:focus,
133 | input.weui-btn:focus{
134 | outline:0;
135 | }
136 | button.weui-btn_inline,
137 | input.weui-btn_inline,
138 | button.weui-btn_mini,
139 | input.weui-btn_mini{
140 | width:auto;
141 | }
142 | button.weui-btn_plain-primary,
143 | input.weui-btn_plain-primary,
144 | button.weui-btn_plain-default,
145 | input.weui-btn_plain-default{
146 | border-width:1px;
147 | background-color:transparent;
148 | }
149 | .weui-btn_mini{
150 | display:inline-block;
151 | padding:0 1.32em;
152 | line-height:2.3;
153 | font-size:13px;
154 | }
--------------------------------------------------------------------------------
/style/widget/weui-loading/weui-loading.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 | .weui-loading{margin:0 5px;width:20px;height:20px;display:inline-block;vertical-align:middle;-webkit-animation:a 1s steps(12) infinite;animation:a 1s steps(12) infinite;background:transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;background-size:100%}.weui-loading.weui-loading_transparent{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect xmlns='http://www.w3.org/2000/svg' width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.56)' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.5)' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.43)' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.38)' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.32)' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.28)' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.25)' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.2)' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.17)' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.14)' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.1)' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='rgba(255,255,255,.03)' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E")}@-webkit-keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | globalData: {
4 | userInfo: null
5 | },
6 | onLaunch: function () {
7 | // 展示本地存储能力
8 | var logs = wx.getStorageSync('logs') || []
9 | logs.unshift(Date.now())
10 | wx.setStorageSync('logs', logs)
11 |
12 | // 登录
13 | wx.login({
14 | success: res => {
15 | var code = res.code;
16 | console.log('code', code)
17 | // 发送 res.code 到后台换取 openId, sessionKey, unionId
18 | wx.getUserInfo({
19 | success: function (res) {
20 | //平台登录
21 | console.log('res', res)
22 |
23 | },
24 | fail: function (res) {
25 | wx.showModal({
26 | title: '警告',
27 | content: '您点击了拒绝授权,将无法正常使用纸张记忆的功能体验;点击重新授权,则可正常使用;否则请删除小程序重新进入',
28 | // content: '必须授权登陆之后才能操作呢,是否重新授权登陆?',
29 | showCancel:true,
30 | cancelText:'不授权',
31 | cancelColor:'#333',
32 | confirmText:'重新授权',
33 | confirmColor:'#4EDF80',
34 | success: function (res) {
35 | if (res.confirm) {
36 | console.log('用户点击确定');
37 | wx.openSetting({
38 | success: function (res) {
39 | console.log('确认重新授权');
40 | //尝试再次登录
41 | wx.login();
42 | }
43 | })
44 | }
45 | }
46 | })
47 |
48 | }
49 | })
50 | }
51 | })
52 | // 获取用户信息
53 | // wx.getSetting({
54 | // success: res => {
55 | // if (res.authSetting['scope.userInfo']) {
56 | // // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
57 | // wx.getUserInfo({
58 | // success: res => {
59 | // // 可以将 res 发送给后台解码出 unionId
60 | // this.globalData.userInfo = res.userInfo
61 | // console.log('this.globalData.userInfo', this.globalData.userInfo);
62 | // // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
63 | // // 所以此处加入 callback 以防止这种情况
64 | // if (this.userInfoReadyCallback) {
65 | // this.userInfoReadyCallback(res)
66 | // }
67 | // }
68 | // })
69 | // }
70 | // }
71 | // })
72 | wx.getSetting({
73 | success: res => {
74 | console.log('进入getsetting');
75 | console.log(res.authSetting['scope.userInfo']);
76 | console.log(!res.authSetting['scope.userInfo']);
77 | if (!res.authSetting['scope.userInfo']) {
78 | console.log('未授权');
79 | wx.authorize({
80 | scope: 'scope.userInfo',
81 | success() {
82 | console.log('同意');
83 | // 用户已经同意小程序使用录音功能,后续调用 wx.startRecord 接口不会弹窗询问
84 | // wx.startRecord()
85 | }
86 | })
87 | }
88 | console.log('走入已经授权');
89 | if (res.authSetting['scope.userInfo']) {
90 | console.log('已经授权');
91 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
92 | wx.getUserInfo({
93 | success: res => {
94 | // 可以将 res 发送给后台解码出 unionId
95 | this.globalData.userInfo = res.userInfo
96 | console.log('this.globalData.userInfo', this.globalData.userInfo);
97 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
98 | // 所以此处加入 callback 以防止这种情况
99 | if (this.userInfoReadyCallback) {
100 | this.userInfoReadyCallback(res)
101 | }
102 | }
103 | })
104 | }
105 | }
106 | })
107 | },
108 |
109 | onLoad: function () {
110 | if (app.globalData.userInfo) {
111 | this.setData({
112 | userInfo: app.globalData.userInfo,
113 | hasUserInfo: true
114 | })
115 | } else if (this.data.canIUse) {
116 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
117 | // 所以此处加入 callback 以防止这种情况
118 | app.userInfoReadyCallback = res => {
119 | this.setData({
120 | userInfo: res.userInfo,
121 | hasUserInfo: true
122 | })
123 | }
124 | } else {
125 | // 在没有 open-type=getUserInfo 版本的兼容处理
126 | wx.getUserInfo({
127 | success: res => {
128 | app.globalData.userInfo = res.userInfo
129 | this.setData({
130 | userInfo: res.userInfo,
131 | hasUserInfo: true
132 | })
133 | }
134 | })
135 | }
136 | }
137 | })
--------------------------------------------------------------------------------
/style/widget/weui-cell/weui-form.wxss:
--------------------------------------------------------------------------------
1 | /*!
2 | * WeUI v1.1.1 (https://github.com/weui/weui-wxss)
3 | * Copyright 2017 Tencent, Inc.
4 | * Licensed under the MIT license
5 | */
6 |
7 | .weui-cell_input {
8 | padding-top: 0;
9 | padding-bottom: 0;
10 | }
11 |
12 | .weui-label {
13 | width: 170rpx;
14 | word-wrap: break-word;
15 | word-break: break-all;
16 | }
17 |
18 | .weui-input {
19 | height: 2em;
20 | min-height: 2em;
21 | line-height: 2em;
22 | }
23 |
24 | .weui-toptips {
25 | position: fixed;
26 | -webkit-transform: translateZ(0);
27 | transform: translateZ(0);
28 | top: 0;
29 | left: 0;
30 | right: 0;
31 | padding: 5px;
32 | font-size: 14px;
33 | text-align: center;
34 | color: #fff;
35 | z-index: 5000;
36 | word-wrap: break-word;
37 | word-break: break-all;
38 | }
39 |
40 | .weui-toptips_warn {
41 | background-color: #e64340;
42 | }
43 |
44 | .weui-textarea {
45 | display: block;
46 | width: 100%;
47 |
48 | }
49 |
50 | .weui-textarea-counter {
51 | color: #b2b2b2;
52 | text-align: right;
53 | }
54 |
55 | .weui-cell_warn, .weui-textarea-counter_warn {
56 | color: #e64340;
57 | }
58 |
59 | .weui-form-preview {
60 | position: relative;
61 | background-color: #fff;
62 | }
63 |
64 | .weui-form-preview:before {
65 | top: 0;
66 | border-top: 1rpx solid #d9d9d9;
67 | }
68 |
69 | .weui-form-preview:after, .weui-form-preview:before {
70 | content: " ";
71 | position: absolute;
72 | left: 0;
73 | right: 0;
74 | height: 1px;
75 | color: #d9d9d9;
76 | }
77 |
78 | .weui-form-preview:after {
79 | bottom: 0;
80 | border-bottom: 1rpx solid #d9d9d9;
81 | }
82 |
83 | .weui-form-preview__value {
84 | font-size: 14px;
85 | }
86 |
87 | .weui-form-preview__value_in-hd {
88 | font-size: 26px;
89 | }
90 |
91 | .weui-form-preview__hd {
92 | position: relative;
93 | padding: 10px 15px;
94 | text-align: right;
95 | line-height: 2.5em;
96 | }
97 |
98 | .weui-form-preview__hd:after {
99 | content: " ";
100 | position: absolute;
101 | left: 0;
102 | bottom: 0;
103 | right: 0;
104 | height: 1px;
105 | border-bottom: 1rpx solid #d9d9d9;
106 | color: #d9d9d9;
107 | left: 15px;
108 | }
109 |
110 | .weui-form-preview__bd {
111 | padding: 10px 15px;
112 | font-size: 0.9em;
113 | text-align: right;
114 | color: #999;
115 | line-height: 2;
116 | }
117 |
118 | .weui-form-preview__ft {
119 | position: relative;
120 | line-height: 50px;
121 | display: -webkit-box;
122 | display: -webkit-flex;
123 | display: flex;
124 | }
125 |
126 | .weui-form-preview__ft:after {
127 | content: " ";
128 | position: absolute;
129 | left: 0;
130 | top: 0;
131 | right: 0;
132 | height: 1px;
133 | border-top: 1rpx solid #d5d5d6;
134 | color: #d5d5d6;
135 | }
136 |
137 | .weui-form-preview__item {
138 | overflow: hidden;
139 | }
140 |
141 | .weui-form-preview__label {
142 | float: left;
143 | margin-right: 1em;
144 | min-width: 4em;
145 | color: #999;
146 | text-align: justify;
147 | text-align-last: justify;
148 | }
149 |
150 | .weui-form-preview__value {
151 | display: block;
152 | overflow: hidden;
153 | word-break: normal;
154 | word-wrap: break-word;
155 | }
156 |
157 | .weui-form-preview__btn {
158 | position: relative;
159 | display: block;
160 | -webkit-box-flex: 1;
161 | -webkit-flex: 1;
162 | flex: 1;
163 | color: #3cc51f;
164 | text-align: center;
165 | }
166 |
167 | .weui-form-preview__btn:after {
168 | content: " ";
169 | position: absolute;
170 | left: 0;
171 | top: 0;
172 | width: 1px;
173 | bottom: 0;
174 | border-left: 1rpx solid #d5d5d6;
175 | color: #d5d5d6;
176 | }
177 |
178 | .weui-form-preview__btn:first-child:after {
179 | display: none;
180 | }
181 |
182 | .weui-form-preview__btn_active {
183 | background-color: #eee;
184 | }
185 |
186 | .weui-form-preview__btn_default {
187 | color: #999;
188 | }
189 |
190 | .weui-form-preview__btn_primary {
191 | color: #0bb20c;
192 | }
193 |
194 | .weui-select {
195 | position: relative;
196 | padding-left: 15px;
197 | padding-right: 30px;
198 | height: 2.58823529em;
199 | min-height: 2.58823529em;
200 | line-height: 2.58823529em;
201 | /* border-right: 1rpx solid #d9d9d9; */
202 | }
203 |
204 | .weui-select:before {
205 | content: " ";
206 | display: inline-block;
207 | height: 6px;
208 | width: 6px;
209 | border-width: 2px 2px 0 0;
210 | border-color: #c8c8cd;
211 | border-style: solid;
212 | -webkit-transform: matrix(0.71, 0.71, -.71, 0.71, 0, 0);
213 | transform: matrix(0.71, 0.71, -.71, 0.71, 0, 0);
214 | position: relative;
215 | top: -2px;
216 | position: absolute;
217 | top: 50%;
218 | right: 15px;
219 | margin-top: -4px;
220 | }
221 |
222 | .weui-select_in-select-after {
223 | padding-left: 0;
224 | }
225 |
226 | .weui-cell__bd_in-select-before, .weui-cell__hd_in-select-after {
227 | padding-left: 15px;
228 | }
229 |
230 | .weui-cell_vcode {
231 | padding-right: 0;
232 | }
233 |
234 | .weui-vcode-btn, .weui-vcode-img {
235 | margin-left: 5px;
236 | height: 2.58823529em;
237 | vertical-align: middle;
238 | }
239 |
240 | .weui-vcode-btn {
241 | display: inline-block;
242 | padding: 0 0.6em 0 0.7em;
243 | border-left: 1px solid #e5e5e5;
244 | line-height: 2.58823529em;
245 | font-size: 17px;
246 | color: #3cc51f;
247 | white-space: nowrap;
248 | }
249 |
250 | .weui-vcode-btn:active {
251 | color: #52a341;
252 | }
253 |
--------------------------------------------------------------------------------