├── pages
├── index
│ ├── index.wxss
│ ├── index.json
│ ├── index.js
│ └── index.wxml
├── bbs
│ ├── home
│ │ ├── home.wxss
│ │ ├── home.json
│ │ ├── home.wxml
│ │ └── home.js
│ ├── followed
│ │ ├── followed.json
│ │ ├── followed.wxss
│ │ ├── followed.wxml
│ │ └── followed.js
│ ├── follows
│ │ ├── follows.json
│ │ ├── follows.wxss
│ │ ├── follows.wxml
│ │ └── follows.js
│ ├── editor
│ │ ├── editor.json
│ │ ├── assets
│ │ │ └── print.png
│ │ ├── editor.wxss
│ │ └── editor.wxml
│ ├── index
│ │ ├── index.json
│ │ └── index.wxss
│ └── article_detail
│ │ ├── articleDetail.json
│ │ └── articleDetail.wxss
├── shop
│ ├── test
│ │ ├── test.wxss
│ │ ├── test.json
│ │ ├── test.wxml
│ │ └── test.js
│ ├── home
│ │ ├── home.json
│ │ ├── home.wxss
│ │ ├── home.wxml
│ │ └── home.js
│ ├── order
│ │ ├── order.json
│ │ ├── order.wxss
│ │ └── order.js
│ ├── category
│ │ ├── category.json
│ │ ├── category.wxss
│ │ ├── category.js
│ │ └── category.wxml
│ ├── deliver
│ │ ├── deliver.json
│ │ ├── deliver.wxss
│ │ ├── deliver.js
│ │ └── deliver.wxml
│ ├── detail
│ │ ├── detail.json
│ │ ├── detail.wxss
│ │ └── detail.js
│ ├── refund
│ │ ├── refund.json
│ │ ├── refund.wxss
│ │ ├── refund.wxml
│ │ └── refund.js
│ ├── search
│ │ ├── search.json
│ │ ├── search.wxss
│ │ ├── search.js
│ │ └── search.wxml
│ ├── waybill
│ │ ├── waybill.json
│ │ ├── waybill.wxss
│ │ ├── waybill.wxml
│ │ └── waybill.js
│ ├── goods_list
│ │ ├── goodsList.json
│ │ ├── goodsList.wxss
│ │ ├── goodsList.wxml
│ │ └── goodsList.js
│ ├── pay_result
│ │ ├── payResult.json
│ │ ├── payResult.js
│ │ ├── payResult.wxss
│ │ └── payResult.wxml
│ └── order_detail
│ │ ├── orderDetail.json
│ │ ├── orderDetail.js
│ │ └── orderDetail.wxss
├── activity
│ ├── home
│ │ ├── home.json
│ │ ├── home.wxss
│ │ ├── home.wxml
│ │ └── home.js
│ ├── detail
│ │ ├── detail.json
│ │ ├── detail.wxss
│ │ ├── detail.js
│ │ └── detail.wxml
│ ├── enter
│ │ ├── enter.json
│ │ └── enter.wxss
│ ├── refund
│ │ ├── refund.json
│ │ ├── refund.wxss
│ │ ├── refund.wxml
│ │ └── refund.js
│ ├── search
│ │ ├── search.json
│ │ ├── search.wxss
│ │ ├── search.js
│ │ └── search.wxml
│ ├── category
│ │ ├── category.json
│ │ ├── category.wxss
│ │ ├── category.wxml
│ │ └── category.js
│ ├── pay_result
│ │ ├── payResult.json
│ │ ├── payResult.wxss
│ │ ├── payResult.js
│ │ └── payResult.wxml
│ ├── activity_list
│ │ ├── activityList.json
│ │ ├── activityList.wxss
│ │ ├── activityList.wxml
│ │ └── activityList.js
│ └── order_detail
│ │ ├── orderDetail.json
│ │ ├── orderDetail.wxss
│ │ └── orderDetail.js
└── personal
│ ├── aorder
│ ├── aorder.json
│ ├── aorder.wxss
│ └── aorder.js
│ ├── gorder
│ ├── gorder.json
│ ├── gorder.wxss
│ └── gorder.js
│ ├── home
│ ├── home.json
│ ├── home.wxss
│ ├── home.js
│ └── home.wxml
│ ├── likes
│ ├── likes.json
│ ├── likes.wxss
│ ├── likes.wxml
│ └── likes.js
│ ├── login
│ ├── login.json
│ ├── login.wxss
│ ├── login.wxml
│ └── login.js
│ ├── address
│ ├── address.json
│ ├── address_form
│ │ ├── addressForm.json
│ │ ├── addressForm.wxss
│ │ ├── addressForm.wxml
│ │ └── addressForm.js
│ ├── address.wxss
│ ├── address.wxml
│ └── address.js
│ ├── article
│ ├── article.json
│ ├── article.wxss
│ └── article.wxml
│ ├── feedback
│ ├── feedback.json
│ ├── feedback.wxss
│ ├── feedback.wxml
│ └── feedback.js
│ ├── followed
│ ├── followed.json
│ ├── followed.wxss
│ ├── followed.wxml
│ └── followed.js
│ ├── follows
│ ├── follows.json
│ ├── follows.wxss
│ ├── follows.wxml
│ └── follows.js
│ └── coupon
│ ├── coupon.json
│ ├── coupon.wxss
│ └── coupon.wxml
├── colorui
├── components
│ ├── cu-custom.wxss
│ ├── cu-custom.json
│ ├── cu-custom.wxml
│ └── cu-custom.js
└── animation.wxss
├── images
├── bags.png
├── like.png
├── logo.jpg
├── wave.gif
├── qrcode.jpg
├── empty_box.png
├── likefill.png
├── default_head.jpg
├── icon-like-full.svg
└── icon-like.svg
├── parser.min
├── trees
│ ├── trees.json
│ ├── handler.wxs
│ ├── trees.wxss
│ ├── trees.js
│ └── trees.wxml
├── parser.json
├── parser.wxss
├── parser.wxml
└── libs
│ ├── config.js
│ └── CssHandler.js
├── brickLayout
├── components
│ ├── brickLayout.json
│ ├── brickLayout.wxml
│ ├── tpl
│ │ ├── tpl.js
│ │ ├── tpl-album.wxml
│ │ └── tpl-default.wxml
│ └── brickLayout.wxss
├── lib
│ ├── utils.js
│ └── config.js
└── asset
│ └── icon
│ ├── icon-like-full.svg
│ └── icon-like.svg
├── app.wxss
├── sitemap.json
├── sitemap51.json
├── editor
├── foot.wxml
├── head.wxml
└── index.wxss
├── utils
├── util.js
└── http.js
├── README.md
├── app.js
└── app.json
/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/bbs/home/home.wxss:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/pages/bbs/home/home.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/pages/shop/test/test.wxss:
--------------------------------------------------------------------------------
1 | /* pages/shop/test/test.wxss */
--------------------------------------------------------------------------------
/pages/activity/home/home.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true
3 | }
--------------------------------------------------------------------------------
/pages/shop/home/home.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/order/order.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/test/test.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/activity/detail/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/activity/enter/enter.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/activity/refund/refund.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/activity/search/search.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/bbs/followed/followed.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/bbs/follows/follows.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/bbs/follows/follows.wxss:
--------------------------------------------------------------------------------
1 | /* pages/bbs/follows/follows.wxss */
--------------------------------------------------------------------------------
/pages/personal/aorder/aorder.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/personal/gorder/gorder.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/personal/home/home.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/personal/likes/likes.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/personal/login/login.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/category/category.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/deliver/deliver.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/detail/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/refund/refund.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/refund/refund.wxss:
--------------------------------------------------------------------------------
1 | /* pages/shop/refund/refund.wxss */
--------------------------------------------------------------------------------
/pages/shop/search/search.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/waybill/waybill.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/waybill/waybill.wxss:
--------------------------------------------------------------------------------
1 | /* pages/shop/waybill/waybill.wxss */
--------------------------------------------------------------------------------
/colorui/components/cu-custom.wxss:
--------------------------------------------------------------------------------
1 | /* colorui/components/cu-custom.wxss */
--------------------------------------------------------------------------------
/pages/activity/category/category.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/activity/refund/refund.wxss:
--------------------------------------------------------------------------------
1 | /* pages/activity/refund/refund.wxss */
--------------------------------------------------------------------------------
/pages/activity/search/search.wxss:
--------------------------------------------------------------------------------
1 | /* pages/activity/search/search.wxss */
--------------------------------------------------------------------------------
/pages/bbs/followed/followed.wxss:
--------------------------------------------------------------------------------
1 | /* pages/bbs/followed/followed.wxss */
--------------------------------------------------------------------------------
/pages/personal/address/address.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/personal/article/article.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/personal/feedback/feedback.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/personal/followed/followed.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/personal/follows/follows.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/goods_list/goodsList.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/shop/pay_result/payResult.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/activity/pay_result/payResult.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/bbs/editor/editor.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "发表文章"
3 | }
--------------------------------------------------------------------------------
/pages/personal/follows/follows.wxss:
--------------------------------------------------------------------------------
1 | /* pages/personal/follows/follows.wxss */
--------------------------------------------------------------------------------
/pages/shop/order_detail/orderDetail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/images/bags.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ENothing/mini-sf/HEAD/images/bags.png
--------------------------------------------------------------------------------
/images/like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ENothing/mini-sf/HEAD/images/like.png
--------------------------------------------------------------------------------
/images/logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ENothing/mini-sf/HEAD/images/logo.jpg
--------------------------------------------------------------------------------
/images/wave.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ENothing/mini-sf/HEAD/images/wave.gif
--------------------------------------------------------------------------------
/pages/activity/activity_list/activityList.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/activity/category/category.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | background-color: #fff;
3 | }
--------------------------------------------------------------------------------
/pages/activity/order_detail/orderDetail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/pages/personal/feedback/feedback.wxss:
--------------------------------------------------------------------------------
1 | /* pages/personal/feedback/feedback.wxss */
--------------------------------------------------------------------------------
/pages/personal/followed/followed.wxss:
--------------------------------------------------------------------------------
1 | /* pages/personal/followed/followed.wxss */
--------------------------------------------------------------------------------
/parser.min/trees/trees.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"trees":"./trees"}}
--------------------------------------------------------------------------------
/images/qrcode.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ENothing/mini-sf/HEAD/images/qrcode.jpg
--------------------------------------------------------------------------------
/pages/personal/address/address_form/addressForm.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {}
3 | }
--------------------------------------------------------------------------------
/parser.min/parser.json:
--------------------------------------------------------------------------------
1 | {"component":true,"usingComponents":{"trees":"./trees/trees"}}
--------------------------------------------------------------------------------
/colorui/components/cu-custom.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/images/empty_box.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ENothing/mini-sf/HEAD/images/empty_box.png
--------------------------------------------------------------------------------
/images/likefill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ENothing/mini-sf/HEAD/images/likefill.png
--------------------------------------------------------------------------------
/pages/bbs/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "disableScroll":true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/images/default_head.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ENothing/mini-sf/HEAD/images/default_head.jpg
--------------------------------------------------------------------------------
/brickLayout/components/brickLayout.json:
--------------------------------------------------------------------------------
1 | {
2 | "component": true,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/personal/coupon/coupon.json:
--------------------------------------------------------------------------------
1 | {
2 | "onReachBottomDistance":50,
3 | "usingComponents": {}
4 | }
--------------------------------------------------------------------------------
/pages/personal/address/address_form/addressForm.wxss:
--------------------------------------------------------------------------------
1 | /* pages/personal/address/address_form/addressForm.wxss */
--------------------------------------------------------------------------------
/pages/bbs/editor/assets/print.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ENothing/mini-sf/HEAD/pages/bbs/editor/assets/print.png
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 | @import "colorui/main.wxss";
2 | @import "colorui/icon.wxss";
3 | @import "iconfont/iconfont.wxss";
4 |
5 |
6 |
--------------------------------------------------------------------------------
/pages/bbs/index/index.wxss:
--------------------------------------------------------------------------------
1 | .item{
2 | margin: 15rpx 30rpx !important ;
3 | }
4 |
5 | .nothing{
6 | font-size: 350rpx
7 | }
--------------------------------------------------------------------------------
/pages/bbs/article_detail/articleDetail.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "parser": "/../../parser.min/parser"
4 | }
5 | }
--------------------------------------------------------------------------------
/pages/personal/likes/likes.wxss:
--------------------------------------------------------------------------------
1 | .item{
2 | margin: 15rpx 30rpx !important ;
3 | }
4 |
5 | .nothing{
6 | font-size: 350rpx
7 | }
--------------------------------------------------------------------------------
/pages/personal/article/article.wxss:
--------------------------------------------------------------------------------
1 | .item{
2 | margin: 15rpx 30rpx !important ;
3 | }
4 |
5 | .nothing{
6 | font-size: 350rpx
7 | }
--------------------------------------------------------------------------------
/parser.min/parser.wxss:
--------------------------------------------------------------------------------
1 | :host{display:block;overflow:scroll;webkit-overflow-scrolling:touch}.top{display:inherit}@keyframes show{0%{opacity:0}100%{opacity:1}}
--------------------------------------------------------------------------------
/pages/shop/search/search.wxss:
--------------------------------------------------------------------------------
1 | .tags{
2 | font-family: STKaiti;
3 | }
4 | /* .search{
5 | position: fixed;
6 | z-index:100;
7 | width:100%
8 | } */
9 |
10 |
--------------------------------------------------------------------------------
/sitemap.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/sitemap51.json:
--------------------------------------------------------------------------------
1 | {
2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
3 | "rules": [{
4 | "action": "allow",
5 | "page": "*"
6 | }]
7 | }
--------------------------------------------------------------------------------
/brickLayout/lib/utils.js:
--------------------------------------------------------------------------------
1 | import dateUtil from './ifanrx-npm/date'
2 |
3 | const relativeTime = function(date) {
4 | return dateUtil.relativeTime(date)
5 | }
6 |
7 | export const utils = {
8 | relativeTime
9 | }
10 |
--------------------------------------------------------------------------------
/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "usingComponents": {
3 | "activity": "/pages/activity/home/home",
4 | "bbs": "/pages/bbs/home/home",
5 | "shop": "/pages/shop/home/home",
6 | "personal": "/pages/personal/home/home"
7 | }
8 | }
--------------------------------------------------------------------------------
/editor/foot.wxml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
--------------------------------------------------------------------------------
/editor/head.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 | {{desc}}
6 |
7 |
8 |
--------------------------------------------------------------------------------
/pages/personal/login/login.wxss:
--------------------------------------------------------------------------------
1 | /* pages/personal/login/login.wxss */
2 |
3 | .logo_container{
4 | margin-top: 150rpx
5 | }
6 |
7 |
8 | .logo{
9 | height: 150rpx
10 | }
11 |
12 | .slogan{
13 | font-size: 1.2rem;
14 | font-style:oblique;
15 | font-weight: bold;
16 | font-family:SimHei;
17 | }
--------------------------------------------------------------------------------
/pages/shop/test/test.wxml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/parser.min/parser.wxml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/parser.min/trees/handler.wxs:
--------------------------------------------------------------------------------
1 | "use strict";var inlineTags={abbr:1,b:1,big:1,code:1,del:1,em:1,i:1,ins:1,label:1,q:1,small:1,span:1,strong:1};module.exports={load:function(e){e.target.dataset.auto&&e.instance.setStyle({width:e.detail.width+"px"})},visited:function(e,i){e.instance.hasClass("_visited")||e.instance.addClass("_visited"),i.callMethod("linkpress",e)},useRichText:function(e){return!e.c&&!inlineTags[e.name]&&-1==(e.attrs.style||"").indexOf("display:inline")}};
--------------------------------------------------------------------------------
/pages/bbs/home/home.wxml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/pages/shop/deliver/deliver.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | background: #fff;
3 | }
4 |
5 | .deliverNo_container {
6 | height: 40rpx;
7 | background: #fff;
8 | padding: 40rpx 40rpx 60rpx 40rpx;
9 | }
10 |
11 | .deliverNo {
12 | font-size: 0.9rem;
13 | }
14 |
15 | .copyDeliverNoButton {
16 | border: 1rpx solid #000;
17 | border-radius: 10rpx;
18 | font-size: 0.6rem;
19 | padding: 5rpx 15rpx;
20 | }
21 |
22 | .deliver_empty{
23 | font-size:10rem
24 | }
25 |
--------------------------------------------------------------------------------
/brickLayout/components/brickLayout.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/pages/activity/category/category.wxml:
--------------------------------------------------------------------------------
1 |
2 | 活动类型
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{item.name}}
12 |
13 |
--------------------------------------------------------------------------------
/pages/shop/pay_result/payResult.js:
--------------------------------------------------------------------------------
1 | // pages/shop/pay_result/payResult.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | order_id:0,
9 | status:1
10 | },
11 |
12 | /**
13 | * 生命周期函数--监听页面加载
14 | */
15 | onLoad: function (options) {
16 | var order_id = options.order_id
17 | this.setData({
18 | order_id:order_id
19 | })
20 | },
21 | goToOrderDetail(){
22 | wx.navigateTo({
23 | url: '/pages/shop/order_detail/orderDetail?id='+this.data.order_id,
24 |
25 | })
26 | }
27 | })
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/brickLayout/lib/config.js:
--------------------------------------------------------------------------------
1 | export default {
2 | // color set of topic card
3 | colorWheel: [
4 | '#F5B7B1',
5 | '#F1948A',
6 | '#EC7063',
7 | '#E74C3C',
8 | '#F7DC6F',
9 | '#F1C40F',
10 | '#D4AC0D',
11 | '#B7950B',
12 | '#EDBB99',
13 | '#E59866',
14 | '#EB984E',
15 | '#E67E22',
16 | '#D7BDE2',
17 | '#C39BD3',
18 | '#AF7AC5',
19 | '#9B59B6',
20 | '#A9CCE3',
21 | '#7FB3D5',
22 | '#5499C7',
23 | '#2980B9',
24 | '#A2D9CE',
25 | '#73C6B6',
26 | '#45B39D',
27 | '#16A085'
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/pages/personal/address/address.wxss:
--------------------------------------------------------------------------------
1 | .address_container{
2 | border-bottom: 40rpx solid #f1f1f1;
3 | }
4 |
5 | .address_info{
6 |
7 | padding: 20rpx 40rpx;
8 | border-bottom: 2rpx solid #f1f1f1;
9 | line-height: 60rpx
10 |
11 | }
12 | .address_op{
13 | padding: 20rpx 40rpx
14 | }
15 |
16 | .default_address{
17 | font-size: 1.1rem;
18 | align-items: center;
19 | margin: 10rpx 0 0 0
20 |
21 | }
22 | .default_address_text{
23 | align-items: center;
24 | }
25 |
26 | .item{
27 | margin: 15rpx 30rpx !important ;
28 | }
29 |
30 | .nothing{
31 | font-size: 350rpx
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/pages/activity/refund/refund.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 申请退款
4 |
5 |
6 |
--------------------------------------------------------------------------------
/pages/activity/category/category.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | activityCates:[]
10 |
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 | api.activityCates().then(data => {
18 | this.setData({
19 | activityCates: data
20 | })
21 | })
22 | },
23 | goToActivityList(e) {
24 | var cate_id = e.currentTarget.dataset.id
25 | console.log(e)
26 | wx.navigateTo({
27 | url: '/pages/activity/activity_list/activityList?cate_id=' + cate_id,
28 | })
29 | }
30 | })
--------------------------------------------------------------------------------
/pages/shop/pay_result/payResult.wxss:
--------------------------------------------------------------------------------
1 | .bags_container {
2 | margin-top: 177rpx;
3 | }
4 |
5 | .bags {
6 | width: 416rpx;
7 | height: 426rpx;
8 | }
9 |
10 | .res_container {
11 | margin-top: 64rpx;
12 | }
13 |
14 | .res {
15 | font-family: Metropolis;
16 | font-size: 2rem;
17 | color: #000;
18 | text-shadow: 0px 8rpx 8rpx rgba(0, 0, 0, 0.25);
19 | }
20 |
21 | .res_remark_container {
22 | margin-top: 27rpx
23 | }
24 |
25 | .res_remark {
26 | font-family: Metropolis;
27 | font-size: 28rpx;
28 | }
29 |
30 | .button_container{
31 | margin-top: 200rpx
32 |
33 | }
34 |
35 | .shibai {
36 | font-size: 200rpx;
37 | margin: 250rpx 0 0 0;
38 | }
--------------------------------------------------------------------------------
/pages/activity/detail/detail.wxss:
--------------------------------------------------------------------------------
1 | .UCenter-bg {
2 | /* background-image: url(http://img.daimg.com/uploads/allimg/190215/3-1Z2151A121.jpg); */
3 | background-size: 100% 400rpx;
4 | background-repeat:no-repeat;
5 | display: flex;
6 | justify-content: center;
7 | overflow: hidden;
8 | position: relative;
9 | flex-direction: column;
10 | align-items: center;
11 | /* font-weight: 300; */
12 | text-shadow: 0 0 6rpx rgba(0,0,0,0.3);
13 | }
14 |
15 | .Content-border{
16 |
17 | width: 100%;
18 | background-color: white;
19 | min-height: 800rpx;
20 | margin-top: 350rpx;
21 | border-top-left-radius: 50rpx;
22 | border-top-right-radius: 50rpx;
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/pages/personal/login/login.wxml:
--------------------------------------------------------------------------------
1 |
2 | 登录
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | 旅行 · 新引擎
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/pages/shop/waybill/waybill.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 填写运单信息
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # mini-sf
2 |
3 | #### 介绍
4 | 灵魂火—微信小程序(旅游、社区、商城)
5 |
6 | #### 软件架构
7 | 原生开发微信小程序
8 |
9 |
10 | #### 安装教程
11 | ```
12 | git clone https://gitee.com/EricNothing/mini-sf.git
13 | ```
14 |
15 | #### 使用说明
16 |
17 | 修改appid,在小程序中打开即可,请注意个别板块(旅游消费、社区、商城)在个人公众号无法过审
18 |
19 | #### 特殊
20 |
21 | 1. 引入colorui作为ui框架
22 | 2. 引入brickLayout做流布局
23 | 3. 引入parser做富文本
24 | 4. 自封装http请求
25 |
26 | #### 预览
27 | 
28 | 
29 | 
30 | 
31 |
--------------------------------------------------------------------------------
/colorui/components/cu-custom.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/pages/activity/detail/detail.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 |
4 | // pages/activity/detail/detail.js
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | id:"",
12 | activity:""
13 | },
14 |
15 | /**
16 | * 生命周期函数--监听页面加载
17 | */
18 | onLoad: function (options) {
19 | var id = options.id
20 | api.activityDetail(id).then(data => {
21 | console.log(data)
22 | this.setData({
23 | activity: data
24 | })
25 |
26 | })
27 |
28 | this.setData({
29 | id: id
30 | })
31 | },
32 | goToEnter(e){
33 | var id = e.currentTarget.dataset.id
34 | wx.navigateTo({
35 | url: '/pages/activity/enter/enter?id=' + id,
36 | })
37 | },
38 | call(e){
39 | console.log(e)
40 | var mobile = e.currentTarget.dataset.mobile
41 | wx.makePhoneCall({
42 | phoneNumber: mobile //仅为示例,并非真实的电话号码
43 | })
44 | },
45 | likeOrUnlike(e){
46 | }
47 | })
--------------------------------------------------------------------------------
/pages/activity/pay_result/payResult.wxss:
--------------------------------------------------------------------------------
1 | .bags_container {
2 | margin-top: 177rpx;
3 | }
4 |
5 | .bags {
6 | width: 416rpx;
7 | height: 426rpx;
8 | }
9 |
10 | .res_container {
11 | margin-top: 64rpx;
12 | }
13 |
14 | .res {
15 | font-family: Metropolis;
16 | font-size: 2rem;
17 | color: #000;
18 | text-shadow: 0px 8rpx 8rpx rgba(0, 0, 0, 0.25);
19 | }
20 |
21 | .res_remark_container {
22 | margin-top: 27rpx;
23 | }
24 |
25 | .res_remark {
26 | font-family: Metropolis;
27 | font-size: 28rpx;
28 | }
29 |
30 | .success_container {
31 | width: 100%;
32 | }
33 |
34 | .button_container {
35 | padding-top: 100rpx;
36 | width: 100%;
37 | }
38 |
39 | .action_qr {
40 | display: flex;
41 | justify-content: center;
42 | }
43 |
44 | .action_qr image {
45 | width: 350rpx;
46 | height: 350rpx;
47 | }
48 |
49 | .nothing {
50 | font-size: 200rpx;
51 | margin: 150rpx 0 0 0;
52 | }
53 |
54 | .shibai {
55 | font-size: 200rpx;
56 | margin: 250rpx 0 0 0;
57 | }
58 |
--------------------------------------------------------------------------------
/pages/shop/category/category.wxss:
--------------------------------------------------------------------------------
1 | /* pages/component/nav/nav.wxss */
2 | .VerticalNav.nav {
3 | width: 200rpx;
4 | white-space: initial;
5 | }
6 |
7 | .VerticalNav.nav .cu-item {
8 | width: 100%;
9 | text-align: center;
10 | background-color: #f1f1f1;
11 | margin: 0;
12 | border: none;
13 | height: 50px;
14 | position: relative;
15 | line-height: 105rpx;
16 |
17 | }
18 |
19 | .VerticalNav.nav .cu-item.cur {
20 | background-color: #fff;
21 | }
22 | .VerticalNav.nav .cu-item.cur::after {
23 | content: "";
24 | width: 8rpx;
25 | height: 100rpx;
26 | position: absolute;
27 | top: 0;
28 | right: 0rpx;
29 | bottom: 0;
30 | margin: auto;
31 | }
32 | .VerticalBox{
33 | display: flex;
34 | }
35 | .VerticalMain{
36 | background-color: #f1f1f1;
37 | }
38 |
39 | .cate_main_title{
40 | font-size: .8rem;
41 | margin-left: 165rpx;
42 | white-space:nowrap;
43 | }
44 |
45 | .cu-list.grid>.cu-item::after{
46 | border-bottom: unset;
47 | border-right: unset;
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/pages/personal/home/home.wxss:
--------------------------------------------------------------------------------
1 | .UCenter-bg {
2 | /* background-image: url(https://image.weilanwl.com/color2.0/index.jpg); */
3 | background-size: cover;
4 | height: 300rpx;
5 | display: flex;
6 | justify-content: center;
7 | padding-top: 40rpx;
8 | overflow: hidden;
9 | position: relative;
10 | flex-direction: column;
11 | align-items: center;
12 | color: #fff;
13 | font-weight: 300;
14 | text-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
15 | background-color: #2d2d2d
16 | }
17 |
18 | .UCenter-bg text {
19 | opacity: 0.8;
20 | }
21 |
22 | .UCenter-bg image {
23 | width: 200rpx;
24 | height: 200rpx;
25 | }
26 |
27 | .UCenter-bg .gif-wave{
28 | position: absolute;
29 | width: 100%;
30 | bottom: 0;
31 | left: 0;
32 | z-index: 99;
33 | mix-blend-mode: screen;
34 | height: 100rpx;
35 | }
36 |
37 | map,.mapBox{
38 | left: 0;
39 | z-index: 99;
40 | mix-blend-mode: screen;
41 | height: 100rpx;
42 | }
43 |
44 | map,.mapBox{
45 | width: 750rpx;
46 | height: 300rpx;
47 | }
--------------------------------------------------------------------------------
/colorui/components/cu-custom.js:
--------------------------------------------------------------------------------
1 | const app = getApp();
2 | Component({
3 | /**
4 | * 组件的一些选项
5 | */
6 | options: {
7 | addGlobalClass: true,
8 | multipleSlots: true
9 | },
10 | /**
11 | * 组件的对外属性
12 | */
13 | properties: {
14 | bgColor: {
15 | type: String,
16 | default: ''
17 | },
18 | isCustom: {
19 | type: [Boolean, String],
20 | default: false
21 | },
22 | isBack: {
23 | type: [Boolean, String],
24 | default: false
25 | },
26 | bgImage: {
27 | type: String,
28 | default: ''
29 | },
30 | },
31 | /**
32 | * 组件的初始数据
33 | */
34 | data: {
35 | StatusBar: app.globalData.StatusBar,
36 | CustomBar: app.globalData.CustomBar,
37 | Custom: app.globalData.Custom
38 | },
39 | /**
40 | * 组件的方法列表
41 | */
42 | methods: {
43 | BackPage() {
44 | wx.navigateBack({
45 | delta: 1
46 | });
47 | },
48 | toHome(){
49 | wx.reLaunch({
50 | url: '/pages/index/index',
51 | })
52 | }
53 | }
54 | })
--------------------------------------------------------------------------------
/pages/activity/pay_result/payResult.js:
--------------------------------------------------------------------------------
1 | // pages/shop/pay_result/payResult.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | order_id: 0,
9 | qr:"",
10 | key:"",
11 | status:1
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: function (options) {
18 | var jsonData = options.jsonData
19 | jsonData = JSON.parse(jsonData)
20 | console.log(jsonData)
21 | this.setData({
22 | order_id: jsonData.order_id,
23 | qr: jsonData.qr,
24 | key:jsonData.key,
25 | status: jsonData.status
26 | })
27 | },
28 | goToOrderDetail() {
29 | wx.navigateTo({
30 | url: '/pages/activity/order_detail/orderDetail?id=' + this.data.order_id,
31 | })
32 | },
33 | copyOrderNo: function (e) {
34 | wx.setClipboardData({
35 | data: e.currentTarget.dataset.text,
36 | success: function (res) {
37 | wx.getClipboardData({
38 | success: function (res) {
39 | wx.showToast({
40 | title: '复制成功'
41 | })
42 | }
43 | })
44 | }
45 | })
46 | },
47 | })
--------------------------------------------------------------------------------
/images/icon-like-full.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/shop/deliver/deliver.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | order_id: 0,
9 | token: "",
10 | deliver:""
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function(options) {
17 | var order_id = options.order_id
18 |
19 | var token = wx.getStorageSync('token')
20 | this.setData({
21 | order_id: order_id,
22 | token: token
23 | })
24 |
25 | wx.showLoading({
26 | title: '获取中...',
27 | })
28 | api.shopDeliver({
29 | order_id: order_id,
30 | token: token
31 | }).then(data => {
32 | this.setData({
33 | deliver:data
34 | })
35 | wx.hideLoading()
36 | })
37 |
38 |
39 | },
40 | copyDeliverNo: function(e) {
41 | wx.setClipboardData({
42 | data: e.currentTarget.dataset.text,
43 | success: function(res) {
44 | wx.getClipboardData({
45 | success: function(res) {
46 | wx.showToast({
47 | title: '复制成功'
48 | })
49 | }
50 | })
51 | }
52 | })
53 | }
54 | })
--------------------------------------------------------------------------------
/pages/shop/home/home.wxss:
--------------------------------------------------------------------------------
1 | .shop-home.icon-search {
2 | padding-left: 260rpx;
3 | }
4 |
5 |
6 | .shop-home.swiper{
7 | height: 100rpx
8 | }
9 |
10 | .shop-home.screen-swiper{
11 | min-height: 310rpx
12 | }
13 |
14 | .shop-home.grid.col-2>view {
15 |
16 | padding: 10rpx;
17 |
18 | }
19 |
20 | .shop-home.image>image{
21 |
22 | height: 350rpx
23 | }
24 |
25 | .cu-list.grid>.cu-item text{
26 | color: unset
27 | }
28 |
29 | .trade-name{
30 | width: 100%;
31 | height: 80rpx;
32 | font-family: STKaiti;
33 | font-weight: 100 !important;
34 | text-overflow: -o-ellipsis-lastline;
35 | overflow: hidden;
36 | text-overflow: ellipsis;
37 | display: -webkit-box;
38 | -webkit-line-clamp: 2;
39 | -webkit-box-orient: vertical;
40 | align-content: center;
41 | }
42 |
43 | .trade-price{
44 | font-size: .9rem !important;
45 | font-weight: bold;
46 | color: black !important
47 | }
48 |
49 | .trade-people{
50 | color:gray !important;
51 | font-size: .7rem !important;
52 | }
53 |
54 | .shop-icon{
55 | width:100rpx;
56 | height:100rpx;
57 | border-radius:50%
58 | }
59 |
60 | .goods_thumb{
61 | border-radius: 10px
62 | }
--------------------------------------------------------------------------------
/brickLayout/asset/icon/icon-like-full.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/bbs/editor/editor.wxss:
--------------------------------------------------------------------------------
1 | @import "/editor/lib/weui.wxss";
2 | @import "./assets/iconfont.wxss";
3 |
4 | .container {
5 | position: absolute;
6 | height: 400px !important;
7 | left: 0;
8 | width: 100%;
9 | padding: 0 0 100px 0
10 | }
11 |
12 | .ql-container {
13 | box-sizing: border-box;
14 | width: 100%;
15 | height: 100%;
16 | font-size: 16px;
17 | line-height: 1.5;
18 | overflow: auto;
19 | padding: 10px 10px 20px 10px;
20 | /* border: 1px solid #000; */
21 | background: #fff;
22 | }
23 |
24 | .ql-active {
25 | color: #22C704;
26 | }
27 |
28 | .iconfont {
29 | display: inline-block;
30 | width: 30px;
31 | height: 30px;
32 | cursor: pointer;
33 | font-size: 20px;
34 | }
35 |
36 | .toolbar {
37 | box-sizing: border-box;
38 | padding: 0 10px;
39 | height: 50px;
40 | width: 100%;
41 | /* position: fixed; */
42 | left: 0;
43 | right: 100%;
44 | bottom: 0;
45 | display: flex;
46 | align-items: center;
47 | justify-content: space-between;
48 | /* border: 1px solid #ECECEC; */
49 | border-left: none;
50 | border-right: none;
51 | }
52 |
53 |
54 | .cu-bar.foot{
55 |
56 | box-shadow: unset
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/pages/shop/pay_result/payResult.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 支付成功
8 |
9 |
10 |
18 |
19 |
20 |
21 |
22 |
23 | 支付失败
24 | 如遇技术问题请联系客服
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/pages/personal/coupon/coupon.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | padding-top: 60rpx;
3 | }
4 |
5 | .coupon_item{
6 | width: 100%
7 | }
8 |
9 |
10 | .c_left{
11 | width: 70%;
12 | height: 200rpx;
13 | position:relative;
14 | overflow:hidden;
15 | }
16 | .c_left::before{
17 | position:absolute;
18 | width:70%;
19 | height:200rpx;
20 | top:-210px;
21 | right:-210px;
22 | border-radius:50%;
23 | border:200px solid #252525;/*边框只要能够覆盖整个容器就行*/
24 | }
25 |
26 | .c_right{
27 | width: 30%;
28 | height: 200rpx;
29 | /* background: red; */
30 | line-height: 200rpx;
31 | border-left: 1px dashed #fafafa;
32 | position: relative;
33 | }
34 |
35 | .c_right::before{
36 | position: absolute;
37 | top: 0px;
38 | margin-left: -7.5px;
39 | left: 0;
40 | width: 15px;
41 | height: 7.5px;
42 | background: #eee;
43 | border-radius: 0 0 15px 15px;
44 |
45 | content: '';
46 | }
47 | .c_right::after{
48 | position: absolute;
49 | bottom: 0;
50 | margin-left: -7.5px;
51 | left: 0;
52 | width: 15px;
53 | height: 7.5px;
54 | background: #eee;
55 | border-radius: 15px 15px 0 0 ;
56 |
57 | content: '';
58 | }
59 | .c_rule{
60 | text-decoration: underline
61 | }
--------------------------------------------------------------------------------
/pages/shop/category/category.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | const app = getApp()
4 | Page({
5 | data: {
6 | StatusBar: app.globalData.StatusBar,
7 | CustomBar: app.globalData.CustomBar,
8 | Custom: app.globalData.Custom,
9 | scrollHeight: app.globalData.scrollHeight,
10 | TabCur: 0,
11 | MainCur: 0,
12 | VerticalNavTop: 0,
13 | list: [],
14 | load: true,
15 | },
16 | onLoad() {
17 | wx.showLoading({
18 | title: '加载中...',
19 | mask: true
20 | });
21 | api.catesWithBrands().then(data => {
22 | this.setData({
23 | list: data,
24 | listCur: data[0],
25 | })
26 | })
27 | },
28 | onReady() {
29 | wx.hideLoading()
30 | },
31 | tabSelect(e) {
32 | let index = e.currentTarget.dataset.id
33 | this.setData({
34 | TabCur: index,
35 | listCur: this.data.list[index],
36 | })
37 | },
38 | goToGoodsList(e){
39 | var brand_id = e.currentTarget.dataset.id
40 | var cate_id = e.currentTarget.dataset.cateId
41 | wx.navigateTo({
42 | url: '/pages/shop/goods_list/goodsList?brand_id=' + brand_id + '&cate_id=' + cate_id,
43 | })
44 | }
45 | })
--------------------------------------------------------------------------------
/pages/shop/deliver/deliver.wxml:
--------------------------------------------------------------------------------
1 |
2 | 订单跟踪
3 |
4 |
5 |
6 |
7 | {{deliver.expressName}}:{{deliver.delivery_n}}
8 | 复制
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{item.time}}
19 |
20 | {{item.context}}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | ╮(๑•́ ₃•̀๑)小主别急,再等等~
29 |
--------------------------------------------------------------------------------
/pages/activity/refund/refund.js:
--------------------------------------------------------------------------------
1 | // pages/shop/refund/refund.js
2 | import http from '../../../utils/http.js'
3 | import api from '../../../utils/api.js'
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | order_id: 0,
11 | token:""
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: function (options) {
18 | var order_id = options.order_id
19 | var token = wx.getStorageSync('token')
20 | this.setData({
21 | order_id: order_id,
22 | token:token
23 | })
24 | },
25 | formSubmit: function (e) {
26 | var order_id = this.data.order_id
27 | var reason = e.detail.value.reason
28 | if (reason == "" || reason == undefined) {
29 | wx.showToast({
30 | icon: "none",
31 | title: "申请原因不能为空哦~"
32 | })
33 | return
34 | }
35 | api.activityInitiateRefund({token:this.data.token,order_id:order_id,reason:reason}).then(data => {
36 | wx.showToast({
37 | icon: "none",
38 | title: "申请退款成功,等待审批",
39 | duration: 2000,
40 | success: function () {
41 | wx.navigateBack({
42 | delta: 1
43 | })
44 | }
45 | })
46 | })
47 |
48 | },
49 | })
--------------------------------------------------------------------------------
/pages/bbs/followed/followed.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ta的粉丝
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{item.nickname}}
18 |
19 |
20 | {{item.created_at_format}}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/pages/bbs/follows/follows.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ta的关注
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{item.nickname}}
18 |
19 |
20 | {{item.created_at_format}}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/pages/personal/follows/follows.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 我的关注
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{item.nickname}}
18 |
19 |
20 | {{item.created_at_format}}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/pages/personal/followed/followed.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 我的粉丝
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{item.nickname}}
18 |
19 |
20 | {{item.created_at_format}}
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/pages/index/index.js:
--------------------------------------------------------------------------------
1 | import api from '../../utils/api.js'
2 | const app = getApp();
3 | Page({
4 | data: {
5 | PageCur: 'activity',
6 | userInfo: {},
7 | userStatistics: {}
8 | },
9 | onLoad(options) {
10 | var pageCur = options.PageCur
11 | if (pageCur != undefined) {
12 | this.setData({
13 | PageCur: pageCur
14 | })
15 | }
16 | },
17 | onReachBottom() {
18 | if (this.data.PageCur == "activity") {
19 | this.selectComponent("#activity").getList();
20 | }
21 | if (this.data.PageCur == "shop") {
22 | this.selectComponent("#shop").getList();
23 | }
24 | },
25 | NavChange(e) {
26 | this.setData({
27 | PageCur: e.currentTarget.dataset.cur
28 | })
29 | },
30 | GoToEditor(e) {
31 | var token = wx.getStorageSync('token')
32 | if (!token){
33 |
34 | wx.showToast({
35 | icon: "none",
36 | title: "请先登录",
37 | duration: 1000,
38 | success: function () {
39 | wx.navigateTo({
40 | url: '/pages/personal/login/login',
41 | })
42 | }
43 | })
44 | return
45 |
46 | }
47 |
48 |
49 | wx.navigateTo({
50 | url: '/pages/bbs/editor/editor',
51 | })
52 |
53 | }
54 |
55 | })
--------------------------------------------------------------------------------
/brickLayout/components/tpl/tpl.js:
--------------------------------------------------------------------------------
1 | function init(config) {
2 | let _this = this;
3 |
4 | // 暴露点击卡片事件给用户
5 |
6 | _this.onBrickItemTap = e => {
7 | let card_id = e.currentTarget.dataset.cardId
8 | this.triggerEvent('tapCard', {
9 | card_id
10 | })
11 | }
12 |
13 | _this.onLikeButtonTap = e => {
14 | var card_id = e.currentTarget.dataset.cardId
15 | let liked = e.currentTarget.dataset.liked
16 | var rawData = this.data.rawData
17 | var token = wx.getStorageSync('token')
18 | console.log(token)
19 | this.triggerEvent('tapLike', {
20 | card_id,
21 | liked
22 | })
23 | if(!token){
24 |
25 | return;
26 | }
27 |
28 | for (var index in rawData) {
29 | if (rawData[index].id == card_id) {
30 | rawData[index].liked = liked == true ? false : true
31 | rawData[index].likes = liked == true ? rawData[index].likes-1 : rawData[index].likes+1
32 | }
33 | }
34 |
35 | this.setData({
36 | rawData: rawData
37 | })
38 |
39 |
40 | }
41 |
42 | _this.onUserAreaTap = e => {
43 | console.log(e)
44 | let user_id = e.currentTarget.dataset.userId
45 | this.triggerEvent('tapUser', {
46 | user_id
47 | })
48 | }
49 | }
50 |
51 | module.exports = {
52 | init
53 | }
--------------------------------------------------------------------------------
/pages/activity/activity_list/activityList.wxss:
--------------------------------------------------------------------------------
1 | .search-keywords {
2 | margin: auto !important;
3 | }
4 |
5 | .activity_conditions {
6 | height: 80rpx;
7 | }
8 |
9 |
10 |
11 |
12 | .activity_list {
13 | margin-top: 30rpx;
14 | }
15 |
16 | .activity_item {
17 | height: 320rpx;
18 | width: 100%;
19 | border-bottom: 10px solid rgb(241, 241, 241);
20 | }
21 |
22 | .activity_all_content {
23 | padding: 24rpx 24rpx;
24 | }
25 |
26 | .activity_tag {
27 | font-size: 20rpx;
28 | letter-spacing: 3rpx;
29 | }
30 |
31 | .activity_title {
32 | font-size: 0.7rem;
33 | font-weight: bold;
34 | }
35 |
36 | .activity_content {
37 | text-overflow: -o-ellipsis-lastline;
38 | overflow: hidden;
39 | text-overflow: ellipsis;
40 | display: -webkit-box;
41 | -webkit-line-clamp: 3;
42 | -webkit-box-orient: vertical;
43 | font-size: 0.55rem;
44 | color: rgb(128, 128, 128);
45 | margin-top: 16rpx;
46 | }
47 |
48 | .activity_miscellaneous {
49 | margin-top: 60rpx;
50 | }
51 |
52 | .activity_date {
53 | font-size: 0.56rem;
54 | letter-spacing: 2rpx;
55 | }
56 |
57 | .activity_data {
58 | font-size: 0.56rem;
59 | padding-left: 40rpx;
60 | }
61 |
62 | .activity-icon {
63 | border-radius: 50%;
64 | }
65 |
66 | .item{
67 | margin: 15rpx 30rpx !important ;
68 | }
69 |
70 | .nothing{
71 | font-size: 350rpx
72 | }
73 |
--------------------------------------------------------------------------------
/parser.min/trees/trees.wxss:
--------------------------------------------------------------------------------
1 | ._a{color:#366092;display:inline;padding:1.5px 0 1.5px 0;word-break:break-all}._hover{opacity:.7;text-decoration:underline}._visited{color:#551a8b}._img{height:100px;max-width:100%}:host{display:inline}._blockquote,._div,._p,._ul,._ol,._li{display:block}._b,._strong{font-weight:bold}._code{font-family:monospace}._del{text-decoration:line-through}._em,._i{font-style:italic}._h1{font-size:2em}._h2{font-size:1.5em}._h3{font-size:1.17em}._h5{font-size:.83em}._h6{font-size:.67em}._h1,._h2,._h3,._h4,._h5,._h6{display:block;font-weight:bold}._ins{text-decoration:underline}._li{flex:1;width:0}._ol-bef{margin-right:5px;text-align:right;width:36px}._ul-bef{line-height:normal;margin:0 12px 0 23px}._ol-bef,._ul_bef{flex:none;user-select:none}._ul-p1{display:inline-block;height:.3em;line-height:.3em;overflow:hidden;width:.3em}._ul-p2{border:.05em solid black;border-radius:50%;display:inline-block;height:.23em;width:.23em}._q::before{content:'"'}._q::after{content:'"'}._sub{font-size:smaller;vertical-align:sub}._sup{font-size:smaller;vertical-align:super}.__bdi,.__bdo,.__ruby,.__rt,._svg{display:inline-block}._video{background-color:black;display:inline-block;height:225px;position:relative;width:300px}._video::after{border-left-color:white;border-style:solid;border-width:15px 0 15px 30px;content:'';left:50%;margin:-15px 0 0 -15px;position:absolute;top:50%}
--------------------------------------------------------------------------------
/pages/activity/enter/enter.wxss:
--------------------------------------------------------------------------------
1 | .UCenter-bg {
2 | background-image: url(http://img.daimg.com/uploads/allimg/190215/3-1Z2151A121.jpg);
3 | background-size: 100% 500rpx;
4 | background-repeat: no-repeat;
5 | border-bottom-left-radius: 20%;
6 | border-bottom-right-radius: 20%;
7 | height: 500rpx;
8 | }
9 |
10 | .Text-logo {
11 | display: flex;
12 | justify-content: center;
13 | padding-top: 280rpx;
14 | overflow: hidden;
15 | position: relative;
16 | flex-direction: column;
17 | align-items: center;
18 | color: #fff;
19 | font-size: 1.2rem;
20 | font-family: 微软雅黑;
21 | text-shadow: 0 0 6rpx rgba(0,0,0,0.3);
22 | font-weight: 600
23 |
24 | }
25 |
26 | .cu-item.shadow.container {
27 | margin-top: 75rpx;
28 | }
29 |
30 | .cu-form-group .title {
31 | min-width: calc(4em + 30rpx);
32 | }
33 |
34 | .agreement{
35 | color: rgb(83, 51, 226);
36 | text-decoration: underline
37 | }
38 |
39 | .protocol-model{
40 | display: flex;
41 |
42 | z-index: 9999;
43 | position: relative;
44 |
45 | }
46 |
47 | .total_price_container {
48 | width: 70%;
49 | padding-left: 30rpx;
50 | }
51 |
52 | .total_price_text {
53 | font-weight: bold;
54 | }
55 |
56 | .total_price {
57 | font-size: 1.3rem;
58 | font-weight: bolder;
59 | font-stretch: condensed;
60 | }
61 |
62 | .confirm-button{
63 | border-radius: unset;
64 | font-size: unset
65 | }
66 |
--------------------------------------------------------------------------------
/pages/shop/category/category.wxml:
--------------------------------------------------------------------------------
1 |
2 | 分类
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{item.name}}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | — {{listCur.name}} —
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | {{item.name}}
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 | SoulFire
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | 首页
13 |
14 |
15 | 论坛
16 |
17 |
18 |
19 | 发布
20 |
21 |
22 |
23 |
24 | 商城
25 |
26 |
27 |
28 |
29 | 个人
30 |
31 |
--------------------------------------------------------------------------------
/pages/activity/order_detail/orderDetail.wxss:
--------------------------------------------------------------------------------
1 | .order_status {
2 | height: 150rpx;
3 | background: #ee4662;
4 | }
5 |
6 | .o_status {
7 | color: #fff;
8 | padding: 30rpx 0 0 50rpx;
9 | font-weight: bold;
10 | font-size: 1.2rem;
11 | }
12 |
13 | .toline{
14 | width:360rpx;
15 | margin:0 auto;
16 | border: 0;
17 | height: 0;
18 | border-top: 1px solid rgba(0, 0, 0, 0.1);
19 | border-bottom: 1px solid rgba(255, 255, 255, 0.3);
20 |
21 | }
22 |
23 | .order_info {
24 | margin-top: 20rpx;
25 | }
26 |
27 | .order_info_title {
28 | font-size: 0.9rem !important;
29 | }
30 |
31 | .order_info_container {
32 | background: #fff;
33 | }
34 |
35 | .order_info_item {
36 | padding: 10rpx 50rpx;
37 | }
38 |
39 | .order_price_container {
40 | border-bottom: 8rpx solid #f1f1f1;
41 | }
42 |
43 | .order_price {
44 | font-size: 1.2rem;
45 | font-weight: bold;
46 | }
47 |
48 | .order_item_1.order_item_2.order_item_3 {
49 | font-size: 0.8rem;
50 | }
51 |
52 | .modal-button {
53 | background-color: rgb(247, 247, 247);
54 | border-radius: 0rpx;
55 | padding: 0rpx;
56 | margin: 0rpx;
57 | /* display: inline-block; */
58 | line-height: unset;
59 | font-size: 0.75rem;
60 | color: rgb(233, 104, 66)
61 | }
62 |
63 | .modal-button::after {
64 | /*button的边框样式是通过::after方式实现的*/
65 | border: none;
66 | }
67 |
68 | .modal-button-hover {
69 | /*点击后样式*/
70 | color: #f1f1f1;
71 | background-color: rgb(247, 247, 247);
72 | }
73 |
74 |
--------------------------------------------------------------------------------
/pages/activity/pay_result/payResult.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 支付成功
6 | 感谢您选择我们!
7 |
8 |
9 |
10 |
11 |
12 |
13 | 扫码回复关键字入群:
14 |
15 |
16 | {{key}}
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | 支付失败
25 | 如遇技术问题请联系客服
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/pages/personal/address/address_form/addressForm.wxml:
--------------------------------------------------------------------------------
1 |
2 | 编辑地址
3 | 添加地址
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | App({
3 | onLaunch: function() {
4 | // 展示本地存储能力
5 | var logs = wx.getStorageSync('logs') || []
6 | logs.unshift(Date.now())
7 | wx.setStorageSync('logs', logs)
8 |
9 | // 登录
10 | wx.login({
11 | success: res => {
12 | // 发送 res.code 到后台换取 openId, sessionKey, unionId
13 | }
14 | })
15 | // 获取用户信息
16 | wx.getSetting({
17 | success: res => {
18 | if (res.authSetting['scope.userInfo']) {
19 | // 已经授权,可以直接调用 getUserInfo 获取头像昵称,不会弹框
20 | wx.getUserInfo({
21 | success: res => {
22 | // 可以将 res 发送给后台解码出 unionId
23 | this.globalData.userInfo = res.userInfo
24 |
25 | // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
26 | // 所以此处加入 callback 以防止这种情况
27 | if (this.userInfoReadyCallback) {
28 | this.userInfoReadyCallback(res)
29 | }
30 | }
31 | })
32 | }
33 | }
34 | })
35 | // 获取系统状态栏信息
36 | wx.getSystemInfo({
37 | success: e => {
38 | this.globalData.StatusBar = e.statusBarHeight;
39 | let custom = wx.getMenuButtonBoundingClientRect();
40 | this.globalData.Custom = custom;
41 | this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
42 | this.globalData.scrollHeight = e.windowHeight;
43 | }
44 | })
45 | },
46 | globalData: {
47 | userInfo: null
48 | }
49 | })
--------------------------------------------------------------------------------
/pages/personal/feedback/feedback.wxml:
--------------------------------------------------------------------------------
1 |
2 | 反馈及建议
3 |
4 |
5 |
--------------------------------------------------------------------------------
/pages/personal/gorder/gorder.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | padding-top: 60rpx;
3 | }
4 |
5 |
6 | .order_status {
7 | border-bottom: 2rpx solid #fafafa;
8 | padding: 20rpx 20rpx;
9 | color: #000
10 | }
11 |
12 | .goods_thumb_container {
13 | width: 30% !important;
14 | height: 240rpx;
15 | padding: 20rpx 0rpx 20rpx 20rpx;
16 | }
17 |
18 | .goods_thumb {
19 | width: 200rpx;
20 | height: 100%;
21 | border: 2rpx solid #f4f4f4;
22 | }
23 |
24 | .miscellaneous_container {
25 | width: 70% !important;
26 | padding: 20rpx 30rpx 20rpx 10rpx;
27 | }
28 |
29 | .goods_name {
30 | font-size: 1rem;
31 | text-overflow: -o-ellipsis-lastline;
32 | overflow: hidden;
33 | text-overflow: ellipsis;
34 | display: -webkit-box;
35 | -webkit-line-clamp: 2;
36 | -webkit-box-orient: vertical;
37 | line-height: 40rpx;
38 | color: #000
39 | }
40 |
41 | .size_num_price_container {
42 | margin-top: 80rpx;
43 | }
44 |
45 | .size_and_num {
46 | color: #1a1a1a;
47 | }
48 |
49 | .price {
50 | font-size: 0.85rem;
51 | }
52 |
53 | .op{
54 | border-top: 2rpx solid #fafafa
55 | }
56 |
57 | .op_buttons{
58 | padding: 20rpx 20rpx;
59 | margin-left: 20rpx
60 | }
61 |
62 | .checkpay{
63 | border: 2rpx solid rgb(105, 103, 103);
64 | padding: 10rpx 20rpx;
65 | font-size: .68rem
66 | }
67 |
68 | .main_container{
69 | margin-top: 50rpx
70 | }
71 | .f_order_container{
72 | margin-top: 20rpx
73 | }
74 |
75 | .item{
76 | margin: 15rpx 30rpx !important ;
77 | }
78 |
79 | .nothing{
80 | font-size: 350rpx
81 | }
--------------------------------------------------------------------------------
/images/icon-like.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/activity/home/home.wxss:
--------------------------------------------------------------------------------
1 | .notify_container {
2 | height: 50rpx;
3 | line-height: 50rpx;
4 | text-align: center;
5 | background: rgb(36, 35, 35);
6 | color: white;
7 | font-size: 22rpx;
8 | padding: 0 40rpx;
9 | text-overflow: ellipsis;
10 | white-space: nowrap;
11 | overflow: hidden;
12 | font-weight: 100;
13 | font-family: Yuanti SC;
14 | }
15 |
16 | .search_input{
17 | text-align: center
18 | }
19 |
20 | .activity_pic {
21 | height: 220rpx;
22 | width: 50%;
23 | display: inline-block;
24 | }
25 |
26 | .activity_list {
27 | margin-top: 30rpx;
28 | }
29 |
30 | .activity_item {
31 | height: 320rpx;
32 | width: 100%;
33 | border-bottom: 10px solid rgb(241, 241, 241);
34 | }
35 |
36 | .activity_all_content {
37 | padding: 24rpx 24rpx;
38 | }
39 |
40 | .activity_tag {
41 | font-size: 20rpx;
42 | letter-spacing: 3rpx;
43 | }
44 |
45 | .activity_title {
46 | font-size: 0.7rem;
47 | font-weight: bold;
48 | }
49 |
50 | .activity_content {
51 | text-overflow: -o-ellipsis-lastline;
52 | overflow: hidden;
53 | text-overflow: ellipsis;
54 | display: -webkit-box;
55 | -webkit-line-clamp: 3;
56 | -webkit-box-orient: vertical;
57 | font-size: .5rem;
58 | color: rgb(128, 128, 128);
59 | margin-top: 16rpx
60 | }
61 |
62 | .activity_miscellaneous{
63 | margin-top: 60rpx
64 | }
65 |
66 | .activity_date{
67 | font-size: 0.56rem;
68 | letter-spacing:2rpx
69 | }
70 |
71 | .activity_data{
72 | font-size: .56rem;
73 | padding-left: 40rpx
74 | }
75 |
76 | .activity-icon{
77 | border-radius: 50%
78 | }
--------------------------------------------------------------------------------
/brickLayout/asset/icon/icon-like.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/shop/goods_list/goodsList.wxss:
--------------------------------------------------------------------------------
1 | .search-keywords{
2 | margin: auto !important
3 | }
4 |
5 |
6 | .goods_conditions{
7 | height: 80rpx
8 | }
9 |
10 | .p_updown{
11 | height: 10rpx;
12 | padding-left: 7rpx;
13 | padding-top: 5rpx;
14 |
15 | }
16 | .p_up{
17 | width: unset !important;
18 | font-size: .5rem !important;
19 | }
20 |
21 | .p_down{
22 | width: unset !important;
23 | font-size: .5rem !important;
24 | margin-top: unset!important;
25 | }
26 | .shop-home{
27 | margin-top: 10rpx !important
28 |
29 | }
30 |
31 | .shop-home.icon-search {
32 | padding-left: 260rpx;
33 | }
34 |
35 |
36 | .shop-home.swiper{
37 | height: 100rpx
38 | }
39 |
40 | .shop-home.screen-swiper{
41 | min-height: 310rpx
42 | }
43 |
44 | .shop-home.grid.col-2>view {
45 |
46 | padding: 5rpx;
47 |
48 | }
49 |
50 | .image{
51 |
52 | height: 350rpx;
53 | border-radius:10px
54 | }
55 |
56 | .shop-home.grid>.cu-item text{
57 | color: unset;
58 | margin-top: 5rpx
59 | }
60 |
61 | .trade-name{
62 | width: 100%;
63 | height: 80rpx;
64 | font-family: STKaiti;
65 | font-weight: 100 !important;
66 | text-overflow: -o-ellipsis-lastline;
67 | overflow: hidden;
68 | text-overflow: ellipsis;
69 | display: -webkit-box;
70 | -webkit-line-clamp: 2;
71 | -webkit-box-orient: vertical;
72 | align-content: center;
73 | }
74 |
75 | .trade-price{
76 | font-size: .9rem !important;
77 | font-weight: bold;
78 | color: black !important
79 | }
80 |
81 | .trade-people{
82 | color:gray !important;
83 | font-size: .7rem !important;
84 | }
85 |
86 | .no-found{
87 | margin-top: 200rpx
88 | }
--------------------------------------------------------------------------------
/pages/activity/order_detail/orderDetail.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | order_id:0,
10 | order:"",
11 | token:""
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: function (options) {
18 | var order_id = options.id
19 | var token = wx.getStorageSync('token')
20 | this.setData({
21 | order_id:order_id,
22 | token:token
23 | })
24 |
25 | },
26 | onShow: function (options) {
27 | var token = wx.getStorageSync('token')
28 | api.activityOrderDetail({token:token,id:this.data.order_id}).then(data => {
29 | this.setData({
30 | order: data
31 | })
32 | })
33 | },
34 | showModal(e) {
35 | this.setData({
36 | modalName: e.currentTarget.dataset.target
37 | })
38 | },
39 | hideModal(e) {
40 | this.setData({
41 | modalName: null
42 | })
43 | },
44 | copyOrderNo: function (e) {
45 | wx.setClipboardData({
46 | data: e.currentTarget.dataset.text,
47 | success: function (res) {
48 | wx.getClipboardData({
49 | success: function (res) {
50 | wx.showToast({
51 | title: '复制成功'
52 | })
53 | }
54 | })
55 | }
56 | })
57 | },
58 | goToRefund(){
59 | wx.navigateTo({
60 | url: '/pages/activity/refund/refund?order_id=' + this.data.order_id,
61 | })
62 | },
63 | finishOrder(){
64 | api.activityFinish({token:this.data.token,id:this.data.order_id}).then(data => {
65 | this.onShow()
66 | })
67 | }
68 | })
--------------------------------------------------------------------------------
/pages/shop/waybill/waybill.js:
--------------------------------------------------------------------------------
1 | // pages/shop/waybill/waybill.js
2 | import api from '../../../utils/api.js'
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | refund_id: 0,
10 | expressArr: [{
11 | id: 745,
12 | name: "顺丰速运",
13 | },
14 | {
15 | id: 779,
16 | name: "申通快递",
17 | },
18 | ],
19 | e_index: 0,
20 | token: ""
21 | },
22 |
23 | /**
24 | * 生命周期函数--监听页面加载
25 | */
26 | onLoad: function (options) {
27 | var token = wx.getStorageSync('token')
28 | var refund_id = options.refund_id
29 | this.setData({
30 | refund_id: refund_id,
31 | token: token
32 | })
33 |
34 | },
35 | PickerChange(e) {
36 | this.setData({
37 | e_index: e.detail.value
38 | })
39 | },
40 | formSubmit(e) {
41 | var refund_id = this.data.refund_id
42 | var express_n = e.detail.value.express_n
43 | var express_id = e.detail.value.express_id
44 |
45 | if (express_n == "" || express_n == undefined) {
46 | wx.showToast({
47 | icon: "none",
48 | title: "运单号不能为空",
49 | })
50 | return;
51 | }
52 |
53 | api.shopReturnInfo({
54 | token: this.data.token,
55 | refund_id: refund_id,
56 | express_n: express_n,
57 | express_id: express_id
58 | }).then(data => {
59 | wx.showToast({
60 | icon: "none",
61 | title: "填写运单完成,等待审核",
62 | duration: 1000,
63 | success: function () {
64 | wx.navigateBack({
65 | delta: 1
66 | })
67 | }
68 | })
69 | })
70 | }
71 |
72 |
73 |
74 | })
--------------------------------------------------------------------------------
/pages/personal/likes/likes.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 喜好
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{item.title}}
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ╮(๑•́ ₃•̀๑)╭再怎么找也没有啦
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 取消收藏
36 |
37 |
38 | 取消
39 |
40 |
41 |
--------------------------------------------------------------------------------
/pages/personal/address/address.wxml:
--------------------------------------------------------------------------------
1 |
2 | 收货地址
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{item.name}}
10 | {{item.mobile}}
11 |
12 | {{item.province}}{{item.city}}{{item.district}}{{item.detail_address}}
13 |
14 |
15 |
16 |
17 | 默认地址
18 |
19 |
20 | 编辑
21 | 删除
22 |
23 |
24 |
25 |
26 |
27 |
28 | ╮(๑•́ ₃•̀๑)╭赶快去添加新地址吧
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | 添加新地址
40 |
--------------------------------------------------------------------------------
/pages/personal/login/login.js:
--------------------------------------------------------------------------------
1 | // pages/personal/login/login.js
2 | import api from '../../../utils/api.js'
3 | const app = getApp()
4 |
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 |
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: function(options) {
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | },
26 |
27 | getUserInfo: function(e) {
28 |
29 |
30 | wx.login({
31 | success: res => {
32 |
33 | var code = res.code
34 | wx.getUserInfo({
35 | success: info => {
36 | console.log(info)
37 | wx.setStorage({
38 | key: "user",
39 | data: info.userInfo
40 | })
41 | if (this.userInfoReadyCallback) {
42 | this.userInfoReadyCallback(info)
43 | }
44 | var iv = info.iv
45 | var encryptedData = info.encryptedData
46 | wx.showLoading({
47 | title: '登录中',
48 | })
49 | api.userLogin(code, iv, encryptedData).then(data => {
50 | wx.setStorage({
51 | key: "token",
52 | data: data
53 | })
54 | wx.hideLoading()
55 | wx.showToast({
56 | icon: "none",
57 | title: "登录成功",
58 | duration: 1000,
59 | success: function() {
60 | // wx.navigateTo({
61 | // url: '/pages/index/index?PageCur=personal',
62 | // })
63 |
64 | wx.navigateBack({
65 | delta: 1
66 | })
67 | }
68 | })
69 | })
70 |
71 | }
72 | })
73 | }
74 | })
75 | },
76 | })
--------------------------------------------------------------------------------
/pages/personal/likes/likes.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 | Page({
3 | data: {
4 | activity: [],
5 | last_page: 1,
6 | page: 1,
7 | modalName: "",
8 | choose_id: 0,
9 | token: ""
10 | },
11 | onLoad: function (options) {
12 | var token = wx.getStorageSync('token')
13 | this.setData({
14 | token: token
15 | })
16 | api.per_collect({ token: token, page: 1 }).then(data => {
17 | console.log(data)
18 | this.setData({
19 | activity: data.list,
20 | last_page: data.last_page,
21 | })
22 |
23 | })
24 | },
25 | onReachBottom: function () {
26 | if (this.data.last_page == this.data.page) {
27 | return
28 | }
29 | this.setData({
30 | page: this.data.page + 1
31 | })
32 | var that = this;
33 | api.per_collect({ token: that.data.token, page: that.data.page }).then(data => {
34 | var arr1 = that.data.activity;
35 | var arr2 = data.list
36 | arr1 = arr1.concat(arr2);
37 | that.setData({
38 | activity: arr1
39 | })
40 | })
41 | },
42 | showModal(e) {
43 | console.log(e)
44 | var id = e.currentTarget.dataset.id
45 |
46 | this.setData({
47 | choose_id: id,
48 | modalName: e.currentTarget.dataset.target
49 | })
50 | },
51 | hideModal(e) {
52 | this.setData({
53 | modalName: null
54 | })
55 | },
56 | unlike() {
57 | this.setData({
58 | modalName: null
59 | })
60 | api.articlelike({token:this.data.token,id:this.data.choose_id}).then(data => {
61 | this.onLoad()
62 | })
63 | },
64 | goToAritlceDetial(e) {
65 | var id = e.currentTarget.dataset.id
66 | wx.navigateTo({
67 | url: '/pages/bbs/article_detail/articleDetail?id=' + id,
68 | })
69 | }
70 | })
--------------------------------------------------------------------------------
/pages/personal/aorder/aorder.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | padding-top: 60rpx;
3 | }
4 |
5 | .order_container {
6 | margin-top: 50rpx;
7 | }
8 |
9 | .order_status {
10 | border-bottom: 2rpx solid #fafafa;
11 | padding: 20rpx 20rpx;
12 | color: #000;
13 | }
14 |
15 | .goods_thumb_container {
16 | width: 30% !important;
17 | height: 240rpx;
18 | padding: 20rpx 0rpx 20rpx 20rpx;
19 | }
20 |
21 | .goods_thumb {
22 | width: 200rpx;
23 | height: 100%;
24 | border: 2rpx solid #f4f4f4;
25 | }
26 |
27 | .miscellaneous_container {
28 | width: 70% !important;
29 | padding: 20rpx 30rpx 20rpx 10rpx;
30 | }
31 |
32 | .goods_name {
33 | font-size: 1rem;
34 | text-overflow: -o-ellipsis-lastline;
35 | overflow: hidden;
36 | text-overflow: ellipsis;
37 | display: -webkit-box;
38 | -webkit-line-clamp: 2;
39 | -webkit-box-orient: vertical;
40 | line-height: 40rpx;
41 | color: #000;
42 | }
43 |
44 | .size_num_price_container {
45 | margin-top: 80rpx;
46 | }
47 |
48 | .size_and_num {
49 | color: #1a1a1a;
50 | }
51 |
52 | .price {
53 | font-size: 0.85rem;
54 | }
55 |
56 | .op {
57 | border-top: 2rpx solid #fafafa;
58 | }
59 |
60 | .op_buttons {
61 | padding: 20rpx 20rpx;
62 | }
63 |
64 | .checkpay {
65 | border: 2rpx solid rgb(105, 103, 103);
66 | padding: 10rpx 20rpx;
67 | font-size: 0.68rem;
68 | }
69 |
70 | .main_container {
71 | margin-top: 50rpx;
72 | }
73 |
74 | .f_order_container {
75 | margin-top: 15rpx;
76 | border-radius: 5px;
77 | margin: 0 20rpx;
78 | }
79 |
80 | .toline {
81 | width: 340rpx;
82 | margin: 0 auto;
83 | border: 0;
84 | height: 0;
85 | border-top: 1px solid rgba(0, 0, 0, 0.1);
86 | border-bottom: 1px solid rgba(255, 255, 255, 0.3);
87 | }
88 |
89 |
90 | .item{
91 | margin: 15rpx 30rpx !important ;
92 | }
93 |
94 | .nothing{
95 | font-size: 350rpx
96 | }
--------------------------------------------------------------------------------
/parser.min/libs/config.js:
--------------------------------------------------------------------------------
1 | "use strict";function makeMap(e){for(var a={},t=e.split(","),l=t.length;l--;)a[t[l]]=!0;return a}var canIUse=wx.canIUse("editor");module.exports={filter:null,highlight:null,onText:null,blankChar:makeMap(" , ,\t,\r,\n,\f"),blockTags:makeMap("address,article,aside,body,caption,center,cite,footer,header,html,nav,section"+(canIUse?"":",pre")),ignoreTags:makeMap("area,base,basefont,canvas,command,embed,frame,iframe,input,isindex,keygen,link,map,meta,param,script,source,style,svg,textarea,title,track,use,wbr"+(canIUse?",rp":"")),richOnlyTags:makeMap("a,colgroup,fieldset,legend,picture,table"+(canIUse?",bdi,bdo,rt,ruby":"")),selfClosingTags:makeMap("area,base,basefont,br,col,circle,ellipse,embed,frame,hr,img,input,isindex,keygen,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),trustAttrs:makeMap("align,alt,app-id,author,autoplay,border,cellpadding,cellspacing,class,color,colspan,controls,data-src,dir,face,height,href,id,ignore,loop,media,muted,name,path,poster,rowspan,size,span,src,start,style,type,unit-id,unitId,width,xmlns"),boolAttrs:makeMap("autoplay,controls,ignore,loop,muted"),trustTags:makeMap("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"+(canIUse?",bdi,bdo,caption,pre,rt,ruby":"")),userAgentStyles:{address:"font-style:italic",big:"display:inline;font-size:1.2em",blockquote:"background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px",caption:"display:table-caption;text-align:center",center:"text-align:center",cite:"font-style:italic",dd:"margin-left:40px",mark:"background-color:yellow",pre:"font-family:monospace;white-space:pre;overflow:scroll",s:"text-decoration:line-through",small:"display:inline;font-size:0.8em",u:"text-decoration:underline"}};
--------------------------------------------------------------------------------
/pages/personal/gorder/gorder.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | const app = getApp();
4 | Page({
5 | data: {
6 | CustomBar: app.globalData.CustomBar,
7 | page: 1,
8 | orders:[],
9 | last_page: 1,
10 | status: "",
11 | token: ""
12 | },
13 | onLoad: function (options) {
14 | var token = wx.getStorageSync('token')
15 | this.setData({
16 | token: token
17 | })
18 | api.shopOrderList({ token: token, page: 1, status: this.data.status }).then(data => {
19 | this.setData({
20 | orders: data.orders,
21 | last_page: data.last_page
22 | })
23 |
24 | })
25 | },
26 | onReachBottom: function () {
27 | if (this.data.last_page == this.data.page) {
28 | return
29 | }
30 | this.setData({
31 | page: this.data.page + 1
32 | })
33 | var that = this;
34 | api.shopOrderList({ token: that.data.token, page: this.data.page, status: this.data.status }).then(data => {
35 | var arr1 = that.data.orders;
36 | var arr2 = data.orders
37 | arr1 = arr1.concat(arr2);
38 | that.setData({
39 | orders: arr1
40 | })
41 | })
42 | },
43 | tabSelect(e) {
44 | var status = e.currentTarget.dataset.id
45 | api.shopOrderList({token:this.data.token,page:1,status:status}).then(data => {
46 | console.log(data)
47 | this.setData({
48 | orders: data.orders,
49 | last_page: data.last_page,
50 | page: 1
51 | })
52 | })
53 | this.setData({
54 | status: status,
55 | })
56 | },
57 | goToOrderDetail(e) {
58 | var id = e.currentTarget.dataset.id
59 | wx.navigateTo({
60 | url: '/pages/shop/order_detail/orderDetail?id=' + id,
61 | })
62 | },
63 | goToShop(){
64 | wx.navigateTo({
65 | url: '/pages/index/index?PageCur=shop',
66 | })
67 | }
68 | })
--------------------------------------------------------------------------------
/pages/activity/detail/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 | 活动详情
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{activity.title}}
10 |
11 |
12 |
13 | {{activity.intro}}
14 |
15 |
16 |
17 |
18 | {{activity.created_at_format}}
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/pages/shop/search/search.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 | const app = getApp();
3 |
4 | Page({
5 | data: {
6 | CustomBar: app.globalData.CustomBar,
7 | inputkey:"",
8 | history:"",
9 | hot:null,
10 | dynamic:null,
11 | token:""
12 | },
13 | onLoad: function (options) {
14 | var token = wx.getStorageSync('token')
15 | this.setData({
16 | token: token
17 | })
18 | api.shopSearchHistory(token).then(data => {
19 | this.setData({
20 | history:data.history,
21 | hot:data.hot
22 | })
23 | })
24 | },
25 | bindKeyInput(e){
26 | var key = e.detail.value.replace(/\s+/g, '')
27 | if(key){
28 | api.shopDynamicHistory(key).then(data => {
29 | this.setData({
30 | dynamic: data,
31 | })
32 | })
33 | }else{
34 | this.setData({
35 | dynamic: null,
36 | })
37 | }
38 | this.setData({
39 | inputkey: key
40 | })
41 | },
42 | clearInput(){
43 | this.setData({
44 | inputkey: "",
45 | dynamic: null,
46 | })
47 | },
48 | goToGoodsList(e){
49 | var kword = e.currentTarget.dataset.kword
50 | wx.navigateTo({
51 | url: '/pages/shop/goods_list/goodsList?kword=' + kword,
52 | })
53 | },
54 | searchSubmit(e){
55 | var kword = e.detail.value.replace(/\s+/g, '')
56 | if (kword) {
57 | wx.navigateTo({
58 | url: '/pages/shop/goods_list/goodsList?kword=' + kword,
59 | })
60 | }
61 | },
62 | delHistory(){
63 | var that = this
64 | api.delShopSearchHistory(this.data.token).then(data => {
65 | wx.showToast({
66 | icon: "none",
67 | title: "清除历史搜索成功~",
68 | success: function () {
69 | that.setData({
70 | history: "",
71 | })
72 | }
73 | })
74 | })
75 | }
76 | })
--------------------------------------------------------------------------------
/pages/shop/refund/refund.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 申请退款
4 |
5 |
6 |
--------------------------------------------------------------------------------
/pages/personal/followed/followed.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | last_page: 1,
10 | page: 1,
11 | users: [],
12 | token: ""
13 | },
14 |
15 | /**
16 | * 生命周期函数--监听页面加载
17 | */
18 | onLoad: function (options) {
19 | var token = wx.getStorageSync('token')
20 | this.setData({
21 | token: token
22 | })
23 | api.followedList({ token: token, page: 1 }).then(data => {
24 | console.log(data)
25 | this.setData({
26 | users: data.list,
27 | last_page: data.last_page
28 | })
29 | })
30 | },
31 | onShow() {
32 | var token = wx.getStorageSync('token')
33 | this.setData({
34 | token: token
35 | })
36 | },
37 | onReachBottom: function () {
38 | if (this.data.last_page == this.data.page) {
39 | return
40 | }
41 | this.setData({
42 | page: this.data.page + 1
43 | })
44 | var that = this;
45 | api.followedList({token:that.data.token,page:that.data.page}).then(data => {
46 | var arr1 = that.data.users;
47 | var arr2 = data.list
48 | arr1 = arr1.concat(arr2);
49 | that.setData({
50 | users: arr1
51 | })
52 | })
53 | },
54 | goToPerIndex(e) {
55 | var user_id = e.currentTarget.dataset.userId
56 | wx.navigateTo({
57 | url: '/pages/bbs/index/index?id=' + user_id,
58 | })
59 | },
60 | followAndUnfollow(e) {
61 | var user_id = e.currentTarget.dataset.userId
62 |
63 | api.userFollows({token:this.data.token,follow_id:user_id}).then(data => {
64 | var users = this.data.users
65 | for (var index in users) {
66 | if (users[index].user_id == user_id) {
67 | users[index].attention = users[index].attention == 0 ? 1 : 0
68 | }
69 | }
70 | this.setData({
71 | users: users,
72 | })
73 | })
74 | }
75 | })
--------------------------------------------------------------------------------
/pages/shop/order_detail/orderDetail.js:
--------------------------------------------------------------------------------
1 | // pages/shop/order_detail/orderDetail.js
2 | import api from '../../../utils/api.js'
3 |
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | order:"",
11 | refund_order:"",
12 | order_id:0,
13 | token:""
14 | },
15 |
16 | /**
17 | * 生命周期函数--监听页面加载
18 | */
19 | onLoad: function (options) {
20 | var token = wx.getStorageSync('token')
21 | var id = options.id
22 | this.setData({
23 | order_id: id,
24 | token: token
25 | })
26 | },
27 | onShow:function(options){
28 | var id = this.data.order_id
29 | var token = wx.getStorageSync('token')
30 | this.setData({
31 | token: token
32 | })
33 | api.shopOrderDetail({token:token,id:id}).then(data => {
34 | this.setData({
35 | order: data.order,
36 | refund_order: data.refund_order
37 | })
38 | })
39 | },
40 | goToDeliver(e){
41 | wx.navigateTo({
42 | url: '/pages/shop/deliver/deliver?order_id='+this.data.order_id,
43 | })
44 | },
45 | goToRefund(){
46 | wx.navigateTo({
47 | url: '/pages/shop/refund/refund?order_id=' + this.data.order_id,
48 | })
49 | },
50 | goToWaybill(e){
51 | console.log(e)
52 | var refund_id = e.currentTarget.dataset.refundId
53 | wx.navigateTo({
54 | url: '/pages/shop/waybill/waybill?refund_id=' + refund_id,
55 | })
56 | },
57 | showModal(e) {
58 | this.setData({
59 | modalName: e.currentTarget.dataset.target
60 | })
61 | },
62 | hideModal(e) {
63 | this.setData({
64 | modalName: null
65 | })
66 | },
67 | copyOrderNo: function (e) {
68 | wx.setClipboardData({
69 | data: e.currentTarget.dataset.text,
70 | success: function (res) {
71 | wx.getClipboardData({
72 | success: function (res) {
73 | wx.showToast({
74 | title: '复制成功'
75 | })
76 | }
77 | })
78 | }
79 | })
80 | }
81 | })
--------------------------------------------------------------------------------
/pages/bbs/followed/followed.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | last_page: 1,
10 | page: 1,
11 | users: [],
12 | attention: 1,
13 | id: 0
14 | },
15 |
16 | /**
17 | * 生命周期函数--监听页面加载
18 | */
19 | onLoad: function (options) {
20 | var id = options.id
21 | var token = wx.getStorageSync('token')
22 | this.setData({
23 | id: id,
24 | token: token
25 | })
26 |
27 |
28 | api.bbsFollowedList({token:token,id:id,page:1}).then(data => {
29 | this.setData({
30 | users: data.list,
31 | last_page: data.last_page
32 | })
33 |
34 | })
35 |
36 | },
37 | onShow() {
38 | var token = wx.getStorageSync('token')
39 | this.setData({
40 | token: token
41 | })
42 | },
43 | onReachBottom: function () {
44 | if (this.data.last_page == this.data.page) {
45 | return
46 | }
47 | this.setData({
48 | page: this.data.page + 1
49 | })
50 | var that = this;
51 | api.bbsFollowedList({token:that.data.token,id:that.data.id,page:that.data.page}).then(data => {
52 | var arr1 = that.data.users;
53 | var arr2 = data.list
54 | arr1 = arr1.concat(arr2);
55 | that.setData({
56 | users: arr1
57 | })
58 | })
59 | },
60 | goToPerIndex(e) {
61 | var user_id = e.currentTarget.dataset.userId
62 | wx.navigateTo({
63 | url: '/pages/bbs/index/index?id=' + user_id,
64 | })
65 | },
66 | followAndUnfollow(e) {
67 | var user_id = e.currentTarget.dataset.userId
68 | api.userFollows({token:this.data.token,follow_id:user_id}).then(data => {
69 | var users = this.data.users
70 | for (var index in users) {
71 | if (users[index].user_id == user_id) {
72 | users[index].attention = users[index].attention == 0 ? 1 : 0
73 | }
74 | }
75 | this.setData({
76 | users: users,
77 | })
78 | })
79 | }
80 | })
--------------------------------------------------------------------------------
/pages/shop/detail/detail.wxss:
--------------------------------------------------------------------------------
1 | .screen-swiper {
2 | min-height: 500rpx;
3 | }
4 |
5 | .trade-name {
6 | font-family: 幼圆;
7 | font-weight: 100 !important;
8 | font-size: 1.2rem;
9 | overflow: hidden;
10 | width: 90%;
11 | margin: 0 auto;
12 | padding-bottom: 12rpx;
13 | }
14 |
15 | .trade-price {
16 | font-size: 1.3rem !important;
17 | font-weight: bold;
18 | color: black !important;
19 | letter-spacing: -2rpx;
20 | }
21 |
22 | .cu-modal {
23 | z-index: 99 !important;
24 | }
25 |
26 | .buy-button {
27 | z-index: 1 !important;
28 | position: absolute;
29 | }
30 |
31 | .mini-img {
32 | border: 0.1rpx solid #ededed;
33 | width: 160rpx;
34 | height: 150rpx;
35 | }
36 |
37 | .mark2 {
38 | white-space: nowrap;
39 | }
40 |
41 | .goods-block {
42 | padding: 10rpx;
43 | }
44 |
45 | .modal-close {
46 | font-size: 32rpx;
47 | padding-bottom: 100rpx;
48 | }
49 |
50 | .goods-dialog {
51 | height: 670rpx;
52 | background-color: rgb(248, 248, 248);
53 | }
54 |
55 | .goods-tags {
56 | background-color: rgb(248, 248, 248) !important;
57 | }
58 |
59 | .goods-tag {
60 | border: 10rpx solid rgb(248, 248, 248);
61 | background-color: #fff;
62 | }
63 |
64 | .goods-tag.goods-tag-border {
65 | border: 10rpx solid #000;
66 | }
67 |
68 | .goods-size {
69 | font-size: 1.1rem !important;
70 | color: black !important;
71 | font-weight: bold;
72 | }
73 |
74 | .goods-price {
75 | letter-spacing: -1rpx;
76 | font-size: 1rem !important;
77 | }
78 |
79 | .modal-buy-button {
80 | z-index: 999;
81 | }
82 |
83 | .button-show {
84 | display: unset;
85 | }
86 |
87 | .button-hide {
88 | display: none;
89 | }
90 |
91 | .share {
92 | position: absolute;
93 | right: 0;
94 | border-left: 1px solid #000;
95 | border-top: 1px solid #000;
96 | border-bottom: 1px solid #000;
97 | padding: 5rpx 5rpx 5rpx 8rpx;
98 | border-radius: 30% 0 0 30%;
99 | box-shadow: 1px 2px 1px 1px;
100 | }
101 |
--------------------------------------------------------------------------------
/pages/personal/follows/follows.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | last_page: 1,
10 | page: 1,
11 | users: [],
12 | attention:1,
13 | token:""
14 | },
15 |
16 | /**
17 | * 生命周期函数--监听页面加载
18 | */
19 | onLoad: function(options) {
20 | var token = wx.getStorageSync('token')
21 | this.setData({
22 | token: token
23 | })
24 | api.followList({token:token,page:1}).then(data => {
25 | this.setData({
26 | users: data.list,
27 | last_page: data.last_page
28 | })
29 | })
30 | },
31 | onShow() {
32 | var token = wx.getStorageSync('token')
33 | this.setData({
34 | token: token
35 | })
36 | },
37 | onReachBottom: function() {
38 | if (this.data.last_page == this.data.page) {
39 | return
40 | }
41 | this.setData({
42 | page: this.data.page + 1
43 | })
44 | var that = this;
45 | api.followList({token:that.data.token,page:that.data.page}).then(data => {
46 | var arr1 = that.data.users;
47 | var arr2 = data.list
48 | arr1 = arr1.concat(arr2);
49 | that.setData({
50 | users: arr1
51 | })
52 | })
53 | },
54 | goToPerIndex(e) {
55 | var user_id = e.currentTarget.dataset.userId
56 | wx.navigateTo({
57 | url: '/pages/bbs/index/index?id=' + user_id,
58 | })
59 | },
60 | followAndUnfollow(e) {
61 | var atten = this.data.attention
62 | var user_id = e.currentTarget.dataset.userId
63 |
64 | api.userFollows({token:this.data.token,follow_id:user_id}).then(data => {
65 | var users = this.data.users
66 | for (var index in users) {
67 | if (users[index].follow_id == user_id && (users[index].status == 0 || users[index].status == undefined)) {
68 | users[index].status = 1
69 | }else{
70 | users[index].status = 0
71 | }
72 | this.setData({
73 | users: users,
74 | })
75 | }
76 | })
77 | }
78 | })
--------------------------------------------------------------------------------
/pages/bbs/follows/follows.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | last_page: 1,
10 | page: 1,
11 | users: [],
12 | attention: 1,
13 | id: 0,
14 | token:""
15 | },
16 |
17 | /**
18 | * 生命周期函数--监听页面加载
19 | */
20 | onLoad: function(options) {
21 | var id = options.id
22 | var token = wx.getStorageSync('token')
23 | this.setData({
24 | id: id,
25 | token: token
26 | })
27 |
28 |
29 | api.bbsFollowsList({token:token,id:id,page:1}).then(data => {
30 | console.log(data)
31 | this.setData({
32 | users: data.list,
33 | last_page: data.last_page
34 | })
35 |
36 | })
37 |
38 | },
39 | onShow() {
40 | var token = wx.getStorageSync('token')
41 | this.setData({
42 | token: token
43 | })
44 | },
45 | onReachBottom: function() {
46 | if (this.data.last_page == this.data.page) {
47 | return
48 | }
49 | this.setData({
50 | page: this.data.page + 1
51 | })
52 | var that = this;
53 | api.bbsFollowsList({token:that.data.token,id:that.data.id,page:that.data.page}).then(data => {
54 | var arr1 = that.data.users;
55 | var arr2 = data.list
56 | arr1 = arr1.concat(arr2);
57 | that.setData({
58 | users: arr1
59 | })
60 | })
61 | },
62 | goToPerIndex(e) {
63 | var user_id = e.currentTarget.dataset.userId
64 | wx.navigateTo({
65 | url: '/pages/bbs/index/index?id=' + user_id,
66 | })
67 | },
68 | followAndUnfollow(e) {
69 | var user_id = e.currentTarget.dataset.userId
70 |
71 | api.userFollows({token:this.data.token,follow_id:user_id}).then(data => {
72 | var users = this.data.users
73 | for (var index in users) {
74 | if (users[index].follow_id == user_id) {
75 | users[index].attention = users[index].attention == 0 ? 1 : 0
76 |
77 | }
78 | }
79 | this.setData({
80 | users: users,
81 | })
82 | })
83 | }
84 | })
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/activity/home/home",
5 | "pages/activity/detail/detail",
6 | "pages/activity/enter/enter",
7 | "pages/shop/home/home",
8 | "pages/personal/home/home",
9 | "pages/bbs/home/home",
10 | "pages/shop/detail/detail",
11 | "pages/shop/search/search",
12 | "pages/shop/category/category",
13 | "pages/shop/order/order",
14 | "pages/shop/pay_result/payResult",
15 | "pages/shop/order_detail/orderDetail",
16 | "pages/shop/goods_list/goodsList",
17 | "pages/shop/deliver/deliver",
18 | "pages/personal/address/address",
19 | "pages/personal/address/address_form/addressForm",
20 | "pages/personal/feedback/feedback",
21 | "pages/bbs/editor/editor",
22 | "pages/bbs/article_detail/articleDetail",
23 | "pages/personal/coupon/coupon",
24 | "pages/personal/login/login",
25 | "pages/personal/aorder/aorder",
26 | "pages/personal/gorder/gorder",
27 | "pages/shop/refund/refund",
28 | "pages/shop/waybill/waybill",
29 | "pages/activity/category/category",
30 | "pages/activity/search/search",
31 | "pages/activity/activity_list/activityList",
32 | "pages/activity/order_detail/orderDetail",
33 | "pages/activity/pay_result/payResult",
34 | "pages/activity/refund/refund",
35 | "pages/personal/likes/likes",
36 | "pages/bbs/index/index",
37 | "pages/personal/follows/follows",
38 | "pages/personal/followed/followed",
39 | "pages/bbs/follows/follows",
40 | "pages/bbs/followed/followed",
41 | "pages/personal/article/article",
42 | "pages/shop/test/test"
43 | ],
44 | "window": {
45 | "backgroundTextStyle": "light",
46 | "navigationBarBackgroundColor": "#fff",
47 | "navigationBarTitleText": "ColorUI",
48 | "navigationStyle": "custom",
49 | "navigationBarTextStyle": "white"
50 | },
51 | "usingComponents": {
52 | "cu-custom": "/colorui/components/cu-custom",
53 | "brick-layout": "/brickLayout/components/brickLayout"
54 | },
55 | "sitemapLocation": "sitemap51.json"
56 | }
--------------------------------------------------------------------------------
/pages/activity/search/search.js:
--------------------------------------------------------------------------------
1 | // pages/shop/search/search.js
2 | import api from '../../../utils/api.js'
3 | const app = getApp();
4 |
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | CustomBar: app.globalData.CustomBar,
12 | inputkey: "",
13 | history: "",
14 | hot: null,
15 | dynamic: null,
16 | token:""
17 | },
18 |
19 | /**
20 | * 生命周期函数--监听页面加载
21 | */
22 | onLoad: function (options) {
23 | var token = wx.getStorageSync('token')
24 | this.setData({
25 | token: token
26 | })
27 | api.activitySearchHistory(token).then(data => {
28 | this.setData({
29 | history: data.history,
30 | hot: data.hot
31 | })
32 | })
33 | },
34 | bindKeyInput(e) {
35 | var key = e.detail.value.replace(/\s+/g, '')
36 | console.log(key)
37 | if (key) {
38 | api.activityDynamicHistory(key).then(data => {
39 | this.setData({
40 | dynamic: data,
41 | })
42 | })
43 | } else {
44 | this.setData({
45 | dynamic: null,
46 | })
47 | }
48 |
49 |
50 | this.setData({
51 | inputkey: key
52 | })
53 | },
54 | clearInput() {
55 | this.setData({
56 | inputkey: "",
57 | dynamic: null,
58 | })
59 | },
60 | goToGoodsList(e) {
61 | var kword = e.currentTarget.dataset.kword
62 | console.log(e)
63 | wx.navigateTo({
64 | url: '/pages/activity/activity_list/activityList?kword=' + kword,
65 | })
66 | },
67 | searchSubmit(e) {
68 | var kword = e.detail.value.replace(/\s+/g, '')
69 | // if (kword) {
70 | wx.navigateTo({
71 | url: '/pages/activity/activity_list/activityList?kword=' + kword,
72 | })
73 | // }
74 | },
75 | delHistory() {
76 | var that = this
77 | api.delactivitySearchHistory(this.data.token).then(data => {
78 | wx.showToast({
79 | icon: "none",
80 | title: "清除历史搜索成功~",
81 | success: function () {
82 | that.setData({
83 | history: "",
84 | })
85 | }
86 | })
87 | })
88 | }
89 | })
--------------------------------------------------------------------------------
/pages/activity/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 | 搜索
3 |
4 |
5 |
14 |
15 |
16 |
17 | 历史搜索
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | {{item.kword}}
26 |
27 |
28 |
29 | 热门搜索
30 |
31 |
32 |
33 |
34 | {{item.kword}}
35 |
36 |
37 |
38 |
39 |
40 |
41 |
48 |
--------------------------------------------------------------------------------
/pages/personal/aorder/aorder.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 | const app = getApp();
3 | Page({
4 | data: {
5 | CustomBar: app.globalData.CustomBar,
6 | page: 1,
7 | orders: [],
8 | last_page: 1,
9 | status: "",
10 | token: ""
11 | },
12 | onLoad: function (options) {
13 | var token = wx.getStorageSync('token')
14 | this.setData({
15 | token: token
16 | })
17 | api.activityOrderList({ token: token, page: 1, status: this.data.status }).then(data => {
18 | this.setData({
19 | orders: data.orders,
20 | last_page: data.last_page,
21 | page: 1
22 | })
23 |
24 | })
25 | },
26 | onShow() {
27 | var token = wx.getStorageSync('token')
28 | this.setData({
29 | token: token
30 | })
31 | },
32 | onReachBottom: function () {
33 | if (this.data.last_page == this.data.page) {
34 | return
35 | }
36 | this.setData({
37 | page: this.data.page + 1
38 | })
39 | var that = this;
40 | api.activityOrderList(
41 | {
42 | token: that.data.token,
43 | page: this.data.page,
44 | status: this.data.status
45 | }
46 | ).then(data => {
47 | var arr1 = that.data.orders;
48 | var arr2 = data.orders
49 | arr1 = arr1.concat(arr2);
50 | that.setData({
51 | orders: arr1
52 | })
53 | })
54 | },
55 | tabSelect(e) {
56 | var status = e.currentTarget.dataset.id
57 | api.activityOrderList(
58 | {
59 | token: this.data.token,
60 | page: 1,
61 | status: status
62 | }
63 | ).then(data => {
64 | this.setData({
65 | orders: data.orders,
66 | last_page: data.last_page,
67 | page: 1
68 | })
69 | })
70 | this.setData({
71 | status: status,
72 | })
73 | },
74 | goToOrderDetail(e) {
75 | var id = e.currentTarget.dataset.id
76 | wx.navigateTo({
77 | url: '/pages/activity/order_detail/orderDetail?id=' + id,
78 | })
79 | },
80 | goToActivity(){
81 | wx.navigateTo({
82 | url: '/pages/index/index',
83 | })
84 | }
85 | })
--------------------------------------------------------------------------------
/pages/shop/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 | 搜索
3 |
4 |
5 |
14 |
15 |
16 |
17 | 历史搜索
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | {{item.kword}}
26 |
27 |
28 |
29 | 热门搜索
30 |
31 |
32 |
33 |
34 | {{item.kword}}
35 |
36 |
37 |
38 |
39 |
40 |
41 |
48 |
--------------------------------------------------------------------------------
/pages/bbs/article_detail/articleDetail.wxss:
--------------------------------------------------------------------------------
1 | .author_container{
2 |
3 | background: #fff
4 |
5 | }
6 |
7 | .screen-swiper{
8 | min-height: 800rpx
9 | }
10 |
11 | .user_info{
12 |
13 | padding-left: 20rpx
14 |
15 | }
16 |
17 | .username{
18 | font-size: .85rem
19 | }
20 |
21 | .fans{
22 | font-size: .73rem;
23 | color: #918e8e
24 | }
25 |
26 | .article_content{
27 | padding: 0 30rpx 30rpx 30rpx;
28 | border-bottom: 1px solid #f1f1f1;
29 | }
30 |
31 | .comment_container{
32 | width: 100%;
33 | border-bottom: 1px solid #f1f1f1;
34 | padding-bottom: 20rpx;
35 | }
36 | .comment_avatar{
37 | width: 15%;
38 | padding: 30rpx 0 0 20rpx
39 | }
40 | .comment_info{
41 | width: 100%;
42 | }
43 |
44 | .comment_content{
45 | padding-top: 0
46 | }
47 | .reply_container{
48 | width: 97%
49 | }
50 | .reply_content{
51 | padding: 0 0 10rpx 15rpx
52 | }
53 |
54 | .back-page {
55 | position: fixed;
56 | top: 0;
57 | left: 0;
58 | right: 0;
59 | bottom: 0;
60 | z-index: 10000;
61 | /* background: rgba(0,0,0,0.40); */
62 | }
63 |
64 | .release {
65 | display: flex;
66 | align-items: center;
67 | justify-content: space-between;
68 | box-sizing: border-box;
69 | position: absolute;
70 | left: 0;
71 | bottom: 0;
72 | width: 100%;
73 | padding: 10rpx 12rpx;
74 | background: #FFFFFF;
75 | }
76 |
77 | .release .text {
78 | background: #F7F7F7;
79 | border-radius: 8rpx;
80 | width: 560rpx;
81 | min-height: 40rpx;
82 | max-height: 120rpx;
83 | border-width: 10rpx 20rpx;
84 | border-style: solid;
85 | border-color: #F7F7F7;
86 | line-height: 50rpx;
87 | font-family: PingFangSC-Regular;
88 | font-size: 28rpx;
89 | color: #333333;
90 | }
91 |
92 | .release .submit {
93 | width: 138rpx;
94 | font-family: PingFangSC-Regular;
95 |
96 | }
97 |
98 | .input_null {
99 | margin-left: 12rpx;
100 | font-family: PingFangSC-Regular;
101 | font-size: 28rpx;
102 | color: #939393;
103 | }
104 |
105 | .sofa {
106 | font-size: 5rem
107 |
108 |
109 |
110 |
111 |
112 | }
--------------------------------------------------------------------------------
/pages/shop/test/test.js:
--------------------------------------------------------------------------------
1 | // pages/shop/test/test.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | this.createNImg()
23 |
24 | },
25 |
26 | createNImg() {
27 |
28 | // var path = "http://soulfire-media.ericnothing.cn/images/O1CN01LaHvrD1WgghA9wisT_!!0-item_pic.jpg_180x180.jpg";
29 | // var path = "https://pic.ibaotu.com/homeSp/20200414/5e957a34660b7.jpg"
30 | var path = "http://img0.imgtn.bdimg.com/it/u=3841322606,2022499346&fm=26&gp=0.jpg"
31 | // var path = "/images/thumb.jpg"
32 | var logo = "/images/logo.jpg"
33 | var path5 = "/images/qrcode.jpg";
34 |
35 | var that = this;
36 | var context = wx.createCanvasContext('mycanvas');
37 | context.setFillStyle("#fff")
38 | context.fillRect(0, 0, 375, 667)
39 |
40 |
41 | wx.getImageInfo({
42 | src: path,
43 | success(re) {
44 | console.log(re)
45 | context.drawImage(re.path, 15, 100, 350, 350);
46 | },
47 |
48 | })
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | context.drawImage(logo, 0, 0, 20, 20);
60 | var name = "123";
61 |
62 | //绘制左下角文字
63 | context.setFontSize(14);
64 | context.setFillStyle('#333');
65 | context.setTextAlign('left');
66 | context.fillText("长按识别小程序", 70, 560);
67 | context.stroke();
68 | context.setFontSize(14);
69 | context.setFillStyle('#333');
70 | context.setTextAlign('left');
71 | context.fillText("跟我一起来学习吧~~", 70, 580);
72 | context.stroke();
73 |
74 | //绘制右下角小程序二维码
75 | context.drawImage(path5, 230, 530, 80, 80);
76 |
77 | context.draw();
78 | //将生成好的图片保存到本地
79 | setTimeout(function () {
80 | wx.canvasToTempFilePath({
81 | canvasId: 'mycanvas',
82 | success: function (res) {
83 | var tempFilePath = res.tempFilePath;
84 | that.setData({
85 | imagePath: tempFilePath,
86 | });
87 | },
88 | fail: function (res) {
89 | console.log(res);
90 | }
91 | });
92 | }, 200);
93 | },
94 |
95 | })
--------------------------------------------------------------------------------
/pages/shop/goods_list/goodsList.wxml:
--------------------------------------------------------------------------------
1 |
2 | 商品列表
3 |
4 |
5 |
6 |
7 | {{kword == ""?'搜索商品':kword}}
8 |
9 |
10 |
11 |
12 |
13 | 销量
14 |
15 |
16 | 价格
17 |
18 |
19 |
20 |
21 |
22 |
23 | 新品
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | {{item.name}}
34 |
35 |
36 | ¥{{item.cur_price}}
37 | {{item.sold}}人付款
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 暂未找到您想要的商品~
49 |
50 |
51 |
--------------------------------------------------------------------------------
/editor/index.wxss:
--------------------------------------------------------------------------------
1 | .index-hd {
2 | padding: 80rpx;
3 | text-align: center;
4 | }
5 | .index-bd {
6 | padding: 0 30rpx 40rpx;
7 | }
8 | .index-ft {
9 | padding-bottom: 20rpx;
10 | text-align: center;
11 | }
12 | .index-logo {
13 | width: 86rpx;
14 | height: 86rpx;
15 | }
16 | .index-desc {
17 | margin-top: 20rpx;
18 | color: #888888;
19 | font-size: 28rpx;
20 | }
21 |
22 |
23 | .navigator-box {
24 | opacity: 0;
25 | position: relative;
26 | background-color: #FFFFFF;
27 | line-height: 1.41176471;
28 | font-size: 34rpx;
29 |
30 | transform: translateY(-50%);
31 | transition: .3s;
32 | }
33 | .navigator-box-show {
34 | opacity: 1;
35 | transform: translateY(0);
36 | }
37 | .navigator {
38 | padding: 20rpx 30rpx;
39 | position: relative;
40 | display: flex;
41 | align-items: center;
42 | }
43 | .navigator:before {
44 | content: " ";
45 | position: absolute;
46 | left: 30rpx;
47 | top: 0;
48 | right: 30rpx;
49 | height: 1px;
50 | border-top: 1rpx solid #D8D8D8;
51 | color: #D8D8D8;
52 | }
53 | .navigator:first-child:before {
54 | display: none;
55 | }
56 | .navigator-text {
57 | flex: 1;
58 | }
59 | .navigator-arrow {
60 | padding-right: 26rpx;
61 | position: relative;
62 | }
63 | .navigator-arrow:after {
64 | content: " ";
65 | display: inline-block;
66 | height: 18rpx;
67 | width: 18rpx;
68 | border-width: 2rpx 2rpx 0 0;
69 | border-color: #888888;
70 | border-style: solid;
71 | transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
72 | position: absolute;
73 | top: 50%;
74 | margin-top: -8rpx;
75 | right: 28rpx;
76 | }
77 |
78 |
79 | .kind-list-item {
80 | margin: 20rpx 0;
81 | background-color: #FFFFFF;
82 | border-radius: 4rpx;
83 | overflow: hidden;
84 | }
85 | .kind-list-item:first-child {
86 | margin-top: 0;
87 | }
88 | .kind-list-text{
89 | flex: 1;
90 | }
91 | .kind-list-img {
92 | width: 60rpx;
93 | height: 60rpx;
94 | }
95 | .kind-list-item-hd {
96 | padding: 30rpx;
97 | display: flex;
98 | align-items: center;
99 |
100 | transition: opacity .3s;
101 | }
102 | .kind-list-item-hd-show {
103 | opacity: .2;
104 | }
105 | .kind-list-item-bd {
106 | height: 0;
107 | overflow: hidden;
108 | }
109 | .kind-list-item-bd-show {
110 | height: auto;
111 | }
--------------------------------------------------------------------------------
/parser.min/trees/trees.js:
--------------------------------------------------------------------------------
1 | // 小程序富文本插件 https://github.com/jin-yufeng/Parser
2 | "use strict";function _defineProperty(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var _extends=Object.assign||function(t){for(var e=1;e1&&this.top.data.autopause)for(var e=this.top.videoContexts.length;e--;)this.top.videoContexts[e].id!=t.currentTarget.id&&this.top.videoContexts[e].pause()},imgtap:function(t){var e=t.target.dataset.attrs;if(!e.ignore){var r=!0;if(this.top.triggerEvent("imgtap",{id:t.target.id,src:e.src,ignore:function(){return r=!1}}),r){if(this.top.group)return this.top.group.preview(this.top.i,e.i);var i=this.top.imgList,a=i[e.i]?i[e.i]:(i=[e.src],e.src);wx.previewImage({current:a,urls:i})}}},linkpress:function(t){var e=!0,r=t.currentTarget.dataset.attrs;r.ignore=function(){return e=!1},this.top.triggerEvent("linkpress",r),e&&(r["app-id"]?wx.navigateToMiniProgram({appId:r["app-id"],path:r.path}):r.href&&("#"==r.href[0]?this.top.navigateTo({id:r.href.substring(1)}):0==r.href.indexOf("http")||0==r.href.indexOf("//")?wx.setClipboardData({data:r.href,success:function(){return wx.showToast({title:"链接已复制"})}}):wx.navigateTo({url:r.href})))},error:function(t){var e,r,i=t.target.dataset.source,a=t.target.dataset.i,s=this.data.nodes[a];if("video"==i||"audio"==i){var o=(s.i||0)+1;if(o {
7 | //返回promise 对象
8 | return new Promise((resolve, reject) => {
9 | wx.request({
10 | url: apiUrl + params.url,//服务器url+参数中携带的接口具体地址
11 | data: params.data,//请求参数
12 | header: params.header || {
13 | "Content-Type": "application/x-www-form-urlencoded"//设置后端需要的常用的格式就好,特殊情况调用的时候单独设置
14 | },
15 | method: params.method || 'POST',//默认为GET,可以不写,如常用请求格式为POST,可以设置POST为默认请求方式
16 | dataType: params.dataType,//返回的数据格式,默认为JSON,特殊格式可以在调用的时候传入参数
17 | responseType: params.responseType,//响应的数据类型
18 | success: function (res) {
19 | //接口访问正常返回数据
20 | if (res.statusCode == 200) {
21 | //1. 操作成功返回数据,原则上只针对服务器端返回成功的状态(如本例中为000000)
22 | if (res.data.code == 0) {
23 | resolve(res.data.data)
24 | } else if (res.data.code == "10305") {//支付结果未知
25 |
26 | wx.showToast({
27 | icon: "none",
28 | title: res.data.message,
29 | success:function(){
30 | wx.navigateTo({
31 | url: '/pages/personal/login/login',
32 | })
33 | }
34 | })
35 |
36 | }else if (params.url == "/order/result" && res.data.retCode == "800020") {//支付结果未知
37 | //需要特殊处理的接口,可以单独列出来返回数据
38 | resolve(res.data)
39 | } else {
40 | wx.showToast({
41 | icon: "none",
42 | title: res.data.message
43 | })
44 | return
45 | console.log(res.data)
46 | }
47 | } else {
48 | //2. 操作不成功返回数据,以toast方式弹出响应信息,如后端未格式化非操作成功异常信息,则可以统一定义异常提示
49 | var errMsg = res.data.message
50 | wx.showToast({
51 | icon: "none",
52 | title: res.data.message,
53 | success:function(){
54 | wx.navigateTo({
55 | url: 'pages/index/index?pageCur=personal',
56 | })
57 | }
58 | })
59 | console.log(res.data)
60 | }
61 | },
62 | fail: function (e) {
63 | wx.showToast({
64 | icon: "none",
65 | title: "网络错误,请重试"
66 | })
67 | return
68 | }
69 | })
70 | })
71 | }
72 | module.exports = {
73 | http: http,
74 | apiUrl: apiUrl
75 | }
--------------------------------------------------------------------------------
/pages/shop/home/home.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 搜索商品
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 | {{item.name}}
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | 人气单品
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | {{item.name}}
53 |
54 |
55 | ¥{{item.cur_price}}
56 | {{item.sold}}人付款
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/brickLayout/components/tpl/tpl-album.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{content_list[item].title}}
9 |
10 |
11 | {{content_list[item].content}}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{content_list[item].user.username}}
20 |
21 |
22 | {{content_list[item]._dateTime}}
23 |
24 |
25 |
26 |
27 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/pages/activity/activity_list/activityList.wxml:
--------------------------------------------------------------------------------
1 |
2 | 活动列表
3 |
4 |
5 |
6 |
7 | {{kword == ""?'搜索活动':kword}}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{a_index?activityCates[a_index].name:'活动类型'}}
20 |
21 |
22 |
23 |
24 |
25 | 时间
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | SOULFIRE
38 | {{item.title}}
39 | {{item.intro}}
40 |
41 | {{item.created_at_format}}
42 |
43 |
44 |
45 | {{item.view}}
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ╮(๑•́ ₃•̀๑)╭再怎么找也没有啦
56 |
--------------------------------------------------------------------------------
/parser.min/libs/CssHandler.js:
--------------------------------------------------------------------------------
1 | // 小程序富文本插件 https://github.com/jin-yufeng/Parser
2 | "use strict";function _classCallCheck(t,s){if(!(t instanceof s))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function t(t,s){for(var i=0;i="a"&&t<="z"||t>="A"&&t<="Z"},this.data=s,this.floor=0,this.i=0,this.list=[],this.res=i,this.state=this.Space}return _createClass(t,[{key:"parse",value:function(){for(var t;t=this.data[this.i];this.i++)this.state(t);return this.res}},{key:"Space",value:function(t){"."==t||"#"==t||this.isLetter(t)?(this.start=this.i,this.state=this.Name):"/"==t&&"*"==this.data[this.i+1]?this.Comment():cfg.blankChar[t]||";"==t||(this.state=this.Ignore)}},{key:"Comment",value:function(){this.i=this.data.indexOf("*/",this.i)+1,this.i||(this.i=this.data.length),this.state=this.Space}},{key:"Ignore",value:function(t){"{"==t?this.floor++:"}"!=t||--this.floor||(this.state=this.Space)}},{key:"Name",value:function(t){cfg.blankChar[t]?(this.list.push(this.section()),this.state=this.NameSpace):"{"==t?(this.list.push(this.section()),this.Content()):","==t?(this.list.push(this.section()),this.Comma()):!this.isLetter(t)&&(t<"0"||t>"9")&&"-"!=t&&"_"!=t&&(this.state=this.Ignore)}},{key:"NameSpace",value:function(t){"{"==t?this.Content():","==t?this.Comma():cfg.blankChar[t]||(this.state=this.Ignore)}},{key:"Comma",value:function(){for(;cfg.blankChar[this.data[++this.i]];);"{"==this.data[this.i]?this.Content():(this.start=this.i--,this.state=this.Name)}},{key:"Content",value:function(){this.start=++this.i,-1==(this.i=this.data.indexOf("}",this.i))&&(this.i=this.data.length);for(var t,s=this.section(),i=0;t=this.list[i++];)this.res[t]?this.res[t]+=";"+s:this.res[t]=s;this.list=[],this.state=this.Space}}]),t}();
--------------------------------------------------------------------------------
/pages/shop/home/home.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true,
6 | },
7 | data: {
8 | gridCol: 4,
9 | skin: false,
10 | goods_cates: "",
11 | shop_banners: "",
12 | goodsList: "",
13 | page: 1,
14 | last_page: 1,
15 | token: ""
16 | },
17 | attached() {
18 | var token = wx.getStorageSync('token')
19 | this.setData({
20 | token: token
21 | })
22 | wx.showLoading({
23 | title: '正在加载...',
24 | })
25 | api.shopIndex().then(data => {
26 | this.setData({
27 | shop_banners: data.shop_banners,
28 | goods_cates: data.goods_cates
29 | })
30 | })
31 |
32 | api.shopGoodsList({
33 | token: token,
34 | page: this.data.page,
35 | cate_id: 0,
36 | brand_id: 0,
37 | kword: "",
38 | sort: 0,
39 | sort_type: 1
40 | }).then(data => {
41 | this.setData({
42 | goodsList: data.goods,
43 | last_page: data.last_page
44 | })
45 | wx.hideLoading()
46 | })
47 |
48 |
49 |
50 |
51 |
52 | wx.pageScrollTo({
53 | scrollTop: 0,
54 | duration: 0
55 | })
56 | },
57 | methods: {
58 | goToGoodslist(e) {
59 | var cate_id = e.currentTarget.dataset.id
60 | wx.navigateTo({
61 | url: '/pages/shop/goods_list/goodsList?cate_id=' + cate_id,
62 | })
63 |
64 | },
65 | getList() {
66 | if (this.data.last_page == this.data.page) {
67 | return
68 | }
69 | this.setData({
70 | page: this.data.page + 1
71 | })
72 | api.shopGoodsList(
73 | {
74 | token: this.data.token,
75 | page: this.data.page,
76 | cate_id: 0,
77 | brand_id: 0,
78 | kword: "",
79 | sort: 0,
80 | sort_type: 1
81 | }
82 | ).then(data => {
83 | var that = this;
84 | var arr1 = that.data.goodsList; //从data获取当前datalist数组
85 | var arr2 = data.goods
86 | arr1 = arr1.concat(arr2); //合并数组
87 | that.setData({
88 | goodsList: arr1 //合并后更新datalist
89 | })
90 | })
91 | },
92 | GoToGoodsDetail: function (res) {
93 | var id = res.currentTarget.dataset.id;
94 | wx.navigateTo({
95 | url: '/pages/shop/detail/detail?id=' + id,
96 | })
97 |
98 | },
99 | goToAllCategory: function () {
100 |
101 | wx.navigateTo({
102 | url: '/pages/shop/detail/detail',
103 | })
104 |
105 | }
106 |
107 |
108 | }
109 | })
--------------------------------------------------------------------------------
/brickLayout/components/tpl/tpl-default.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{content_list[item].title}}
10 |
11 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/parser.min/trees/trees.wxml:
--------------------------------------------------------------------------------
1 | {{item.text}}\n{{item.num}}██
--------------------------------------------------------------------------------
/pages/shop/detail/detail.js:
--------------------------------------------------------------------------------
1 | // pages/shop/detail/detail.js
2 | import api from '../../../utils/api.js'
3 |
4 | const app = getApp()
5 | Page({
6 |
7 | /**
8 | * 页面的初始数据
9 | */
10 | data: {
11 | modalName: null,
12 | modalButton: null,
13 | choose_key: null,
14 | choose_name: null,
15 | id: "",
16 | shop_goods_detail: "",
17 | purchasers: "",
18 | p_total: 0,
19 | token: "",
20 | poster:0,
21 | imagePath:""
22 | },
23 | onLoad(options) {
24 |
25 | var token = wx.getStorageSync('token')
26 | var id = options.id
27 | this.setData({
28 | id: id,
29 | token: token
30 | })
31 |
32 | api.shopGoodsDetail(id).then(data => {
33 | console.log(data)
34 | this.setData({
35 | shop_goods_detail: data.shop_goods_detail,
36 | shop_goods_spus: data.shop_goods_spus,
37 | purchasers: data.purchasers,
38 | p_total: data.p_total,
39 | })
40 |
41 | })
42 |
43 |
44 | wx.hideLoading()
45 |
46 | },
47 | onShow(){
48 | var token = wx.getStorageSync('token')
49 | this.setData({
50 | token: token
51 | })
52 | },
53 | showModal(e) {
54 | this.setData({
55 | modalName: e.currentTarget.dataset.target
56 | })
57 | },
58 | hideModal(e) {
59 | this.setData({
60 | modalName: null,
61 | modalButton: null
62 | })
63 | },
64 | showButtonModal(e) {
65 | var id = e.currentTarget.dataset.id
66 | if (this.data.choose_key == id) {
67 | this.setData({
68 | modalButton: null,
69 | choose_key: null,
70 | choose_name: null,
71 | })
72 | } else {
73 | this.setData({
74 | modalButton: e.currentTarget.dataset.target,
75 | choose_key: id,
76 | choose_name: e.currentTarget.dataset.name,
77 | })
78 | }
79 |
80 | },
81 |
82 | goToOrder(e) {
83 |
84 | if (this.data.token == "") {
85 | wx.showToast({
86 | icon: "none",
87 | title: "请先登录",
88 | duration: 1000,
89 | success: function () {
90 | wx.navigateTo({
91 | url: '/pages/personal/login/login',
92 | })
93 | }
94 | })
95 | return
96 | }
97 | wx.navigateTo({
98 | url: '/pages/shop/order/order?id=' + this.data.choose_key,
99 | })
100 | },
101 |
102 | share(){
103 | var id = this.data.id
104 |
105 |
106 |
107 |
108 |
109 | },
110 | showPosterModal(e) {
111 | console.log(e)
112 |
113 |
114 | this.setData({
115 | poster: e.currentTarget.dataset.target
116 | })
117 |
118 | },
119 | hidePosterModal(e) {
120 | this.setData({
121 | poster: 0
122 | })
123 | },
124 |
125 |
126 | })
--------------------------------------------------------------------------------
/pages/personal/article/article.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 我的作品
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | 待发布
13 | 待审核
14 | 审核通过
15 |
16 |
17 |
18 |
19 | {{item.title}}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ╮(๑•́ ₃•̀๑)╭还没有发布作品哦~
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 | 发布新作品
42 |
43 |
44 | 发布
45 |
46 |
47 | 编辑
48 |
49 |
50 | 删除
51 |
52 |
53 | 取消
54 |
55 |
56 |
--------------------------------------------------------------------------------
/pages/personal/feedback/feedback.js:
--------------------------------------------------------------------------------
1 | import http from '../../../utils/http.js'
2 | import api from '../../../utils/api.js'
3 | Page({
4 | data: {
5 | imgList: [],
6 | token: ""
7 | },
8 | onLoad: function (options) {
9 | var token = wx.getStorageSync('token')
10 | this.setData({
11 | token: token
12 | })
13 | },
14 | ChooseImage() {
15 | wx.chooseImage({
16 | count: 3, //默认9
17 | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
18 | sourceType: ['album'], //从相册选择
19 | success: (res) => {
20 | for (var i = 0; i < res.tempFilePaths.length; i++) {
21 | var imgUrl = res.tempFilePaths[i];
22 | wx.uploadFile({
23 | url: http.apiUrl + '/user/upload',
24 | filePath: imgUrl,
25 | name: 'file',
26 | header: {
27 | token: this.data.token,
28 | },
29 | success: (res) => {
30 | var jsonStr = res.data;
31 | var obj = JSON.parse(jsonStr);
32 | if (res.statusCode == 200) {
33 | if (obj.code == 0) {
34 | this.setData({
35 | imgList: this.data.imgList.concat(obj.data)
36 | })
37 | } else {
38 | wx.showToast({
39 | icon: "none",
40 | title: obj.message
41 | })
42 | }
43 | } else {
44 | wx.showToast({
45 | icon: "none",
46 | title: obj.message,
47 | })
48 | }
49 | },
50 | fail: function (e) {
51 | wx.showToast({
52 | icon: "none",
53 | title: "网络错误,请重试"
54 | })
55 | return
56 | }
57 | })
58 | }
59 | }
60 | });
61 | },
62 | ViewImage(e) {
63 | wx.previewImage({
64 | urls: this.data.imgList,
65 | current: e.currentTarget.dataset.url
66 | });
67 | },
68 | DelImg(e) {
69 | this.data.imgList.splice(e.currentTarget.dataset.index, 1);
70 | this.setData({
71 | imgList: this.data.imgList
72 | })
73 | },
74 | formSubmit(e) {
75 |
76 | var data = {
77 | title: e.detail.value.title,
78 | content: e.detail.value.content,
79 | imgList: JSON.stringify(this.data.imgList),
80 | token: this.data.token
81 | }
82 | api.feedback(data).then(resData => {
83 |
84 | wx.showToast({
85 | title: '您的反馈及建议已发出~',
86 | icon: 'none',
87 | duration: 1000, //持续的时间
88 | success: (res) => {
89 | setTimeout(function () {
90 | wx.navigateBack({
91 | delta: 1
92 | })
93 | }, 1000)
94 |
95 | }
96 | })
97 | })
98 |
99 |
100 |
101 |
102 |
103 |
104 | }
105 | })
--------------------------------------------------------------------------------
/pages/personal/coupon/coupon.wxml:
--------------------------------------------------------------------------------
1 |
2 | 优惠券
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{tabNav[index]}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | {{item.coupon.reduction_price}}
23 |
24 | {{item.coupon.name}}
25 | {{item.receive_time_format}}-{{item.end_time_format}}
26 |
27 |
28 |
29 |
30 |
31 | 去使用
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | {{item.coupon.reduction_price}}
44 |
45 | {{item.coupon.name}}
46 | {{item.receive_time_format}}-{{item.end_time_format}}
47 |
48 |
49 |
50 |
51 |
52 | 已使用
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | {{item.coupon.reduction_price}}
62 |
63 | {{item.coupon.name}}
64 | {{item.receive_time_format}}-{{item.end_time_format}}
65 |
66 |
67 |
68 |
69 |
70 | 已过期
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/pages/personal/address/address.js:
--------------------------------------------------------------------------------
1 | // pages/personal/address/address.js
2 | import api from '../../../utils/api.js'
3 |
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | addresses:[],
11 | last_page:0,
12 | checked:0,
13 | page_status:0,
14 | goods_spu_id:0,
15 | token:""
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面加载
20 | */
21 | onLoad: function (options) {
22 | var token = wx.getStorageSync('token')
23 | this.setData({
24 | token: token
25 | })
26 | var status = options.status
27 | var goods_spu_id = options.goods_spu_id
28 | if (status != undefined && goods_spu_id != undefined && goods_spu_id != 0){
29 | this.setData({
30 | page_status:1,
31 | goods_spu_id: goods_spu_id,
32 | })
33 | }
34 | },
35 | onShow:function(){
36 | var token = wx.getStorageSync('token')
37 | this.setData({
38 | token: token
39 | })
40 | var checked = 0
41 | api.addressList(token).then(data => {
42 | if (data.default_count == 0) {
43 | var checked = null
44 | }
45 | this.setData({
46 | addresses: data.ship_addresses,
47 | last_page: data.last_page,
48 | checked: checked
49 | })
50 | })
51 | },
52 | goToForm(e){
53 | var id = e.currentTarget.dataset.id;
54 | console.log(id)
55 |
56 | var url = '/pages/personal/address/address_form/addressForm'
57 |
58 | if(id != undefined){
59 |
60 | url = url + "?id=" + id
61 |
62 | }
63 | wx.navigateTo({
64 | url: url,
65 | })
66 |
67 | },
68 |
69 | delAddress(e){
70 | var id = e.currentTarget.dataset.id;
71 | var that = this
72 |
73 | wx.showModal({
74 | title: '删除地址',
75 | cancelText: '取消',
76 | confirmText: '确定',
77 | success: res => {
78 | if (res.confirm) {
79 | api.delAddress({token:that.data.token,id:id}).then(data => {
80 | this.setData({
81 | checked: null,
82 | })
83 | wx.showToast({
84 | icon: "none",
85 | title: "删除地址成功",
86 | duration: 1000,
87 | })
88 | })
89 | this.onShow()
90 | }
91 | }
92 | })
93 | },
94 | setDefaultAddress(e){
95 | var index = e.currentTarget.dataset.index
96 | var id = e.currentTarget.dataset.id
97 |
98 | api.updateDefaultAddress({token:this.data.token,id:id}).then(data => {
99 | wx.showToast({
100 | icon: "none",
101 | title: "设置默认地址成功",
102 | duration: 1000,
103 | })
104 | this.setData({
105 | checked: index,
106 | })
107 |
108 | })
109 | },
110 | needGoToOrder(e){
111 | var id = e.currentTarget.dataset.id
112 | if(this.data.page_status != 0){
113 | wx.navigateTo({
114 | url: '/pages/shop/order/order?id=' + this.data.goods_spu_id + "&address_id=" + id,
115 | })
116 |
117 | }
118 | }
119 |
120 | })
--------------------------------------------------------------------------------
/brickLayout/components/brickLayout.wxss:
--------------------------------------------------------------------------------
1 | /* plugin/components/brickLayout.wxss */
2 | /* list container */
3 | .list-container {
4 | display: flex;
5 | flex-direction: row;
6 | padding: 20rpx 10rpx 0 10rpx;
7 | }
8 |
9 | .list-side-box {
10 | display: flex;
11 | flex: 1;
12 | flex-direction: column;
13 | }
14 |
15 | .list-side-box {
16 | margin-right: 24rpx;
17 | }
18 |
19 | .list-side-box:last-child {
20 | margin-right: 0;
21 | }
22 |
23 | .list-item {
24 | break-inside: avoid;
25 | box-sizing: border-box;
26 | padding-bottom: 14rpx;
27 | }
28 |
29 | /* list-box themeA */
30 | .list-box {
31 | position: relative;
32 | /* padding: 8px; */
33 | border-radius: 4px;
34 | color: #fff;
35 | }
36 |
37 | .list-box_header {
38 | height: 32px;
39 | overflow: hidden;
40 | padding: 0 10rpx 0 10rpx;
41 | box-sizing: border-box;
42 | width:110px;
43 | }
44 |
45 | .list-box_header .user-avatar {
46 | float: left;
47 | width: 25px;
48 | height: 25px;
49 | border-radius: 50%;
50 | background-size: cover;
51 | }
52 |
53 | .list-box_header .user-info {
54 | font-size: 12px;
55 | font-weight: bold;
56 | margin-left: 34px;
57 | line-height: 26px;
58 | }
59 |
60 | .list-box_header .user-info .user-name {
61 | overflow: hidden;
62 | text-overflow: ellipsis;
63 | -webkit-line-clamp: 1;
64 | -webkit-box-orient: vertical;
65 | height: 20px;
66 | /* width: 60% */
67 | }
68 |
69 | .list-box_header .user-info .time {
70 | font-size: 10px;
71 | font-weight: 400;
72 | overflow: hidden;
73 | text-overflow: ellipsis;
74 | -webkit-line-clamp: 1;
75 | -webkit-box-orient: vertical;
76 | height: 20px;
77 | }
78 |
79 | .list-box.is-expand .list-box_content {
80 | height: auto;
81 | }
82 |
83 | .list-box_content {
84 | height: 71px;
85 | min-height: 71px;
86 | font-size: 15px;
87 | line-height: 24px;
88 | overflow: hidden;
89 | }
90 |
91 | .list-box_footer {
92 | display: flex;
93 | align-items: center;
94 | justify-content: space-between;
95 | font-size: 12px;
96 | padding: 7.5px 0 0 0;
97 | line-height: 25px
98 |
99 | }
100 |
101 | .expand-btn {
102 | line-height: 20px;
103 | font-size: 12px;
104 | margin-top: 16px;
105 | text-align: right;
106 | }
107 |
108 | .approve-btn {
109 | font-size: 12px;
110 | }
111 |
112 | .approve-btn .approve-btn_wrapper {
113 | min-width: 43px;
114 | padding-right: 14rpx;
115 |
116 | }
117 |
118 | .approve-btn .approve-btn-icon {
119 | width: 15px;
120 | height: 13px;
121 | margin-right: 14rpx
122 | }
123 |
124 | .media-previewer image {
125 | margin-top: 8px;
126 | width: 100%;
127 | border-radius: 4px;
128 | line-height: 13px
129 | }
130 |
131 | .media-previewer image:first-child {
132 | margin-top: 0;
133 | }
134 |
135 | /*新增*/
136 | .album-text-area_title {
137 | font-weight: bold;
138 | font-size: 0.80rem;
139 | padding: 0 10rpx;
140 | overflow: hidden;
141 | text-overflow: ellipsis;
142 | -webkit-line-clamp: 2;
143 | -webkit-box-orient: vertical;
144 | }
145 |
--------------------------------------------------------------------------------
/pages/bbs/home/home.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | const app = getApp()
4 | Component({
5 | options: {
6 | addGlobalClass: true,
7 | },
8 | data: {
9 | scrollHeight: app.globalData.scrollHeight,
10 | brick_option: {
11 | backgroundColor: "#fafafa",
12 | defaultExpandStatus: true,
13 | imageFillMode: 'widthFix',
14 | columns: 2,
15 | forceRepaint: false,
16 | icon: {
17 | fill: '/images/likefill.png',
18 | default: '/images/like.png',
19 | },
20 | fontColor: 'black'
21 | },
22 | page: 1,
23 | last_page: 0,
24 | articles: "",
25 | token: ""
26 | },
27 | attached() {
28 | var token = wx.getStorageSync('token')
29 | console.log(token)
30 | this.setData({
31 | token: token
32 | })
33 | wx.showLoading({
34 | title: '正在加载...',
35 | })
36 | var that = this
37 | api.articleList({
38 | token: token,
39 | page: 1
40 | }).then(data => {
41 | that.setData({
42 | last_page: data.last_page,
43 | articles: data.articles,
44 | })
45 | wx.hideLoading()
46 | })
47 | },
48 | pageLifetimes: {
49 | show: function() {
50 | var token = wx.getStorageSync('token')
51 | this.setData({
52 | token: token
53 | })
54 | },
55 | },
56 | methods: {
57 | tapCard: function(event) {
58 | wx.navigateTo({
59 | url: '/pages/bbs/article_detail/articleDetail?id=' + event.detail.card_id,
60 | })
61 |
62 | },
63 | handleLike: function(e) {
64 | var liked = e.detail.liked
65 | var id = e.detail.card_id
66 |
67 |
68 | api.articlelike({
69 | token: this.data.token,
70 | id: id
71 | }).then(data => {
72 |
73 | if (liked) {
74 | wx.showToast({
75 | icon: "none",
76 | title: "不喜欢!",
77 | })
78 | } else {
79 | wx.showToast({
80 | icon: "none",
81 | title: "喜欢!",
82 | })
83 | }
84 |
85 | })
86 |
87 | },
88 |
89 | // 点击用户头像区域
90 | handleUserEvent: function(e) {
91 | var user_id = e.detail.user_id
92 | wx.navigateTo({
93 | url: '/pages/bbs/index/index?id=' + user_id,
94 | })
95 | },
96 |
97 | scrollBottom(e) {
98 | if (this.data.last_page == this.data.page) {
99 | return
100 | }
101 | this.setData({
102 | page: this.data.page + 1
103 | })
104 | api.articleList({
105 | token: this.data.token,
106 | page: this.data.page
107 | }).then(data => {
108 |
109 | var that = this;
110 |
111 | var arr1 = that.data.articles; //从data获取当前datalist数组
112 | var arr2 = data.articles
113 | arr1 = arr1.concat(arr2); //合并数组
114 | that.setData({
115 | articles: arr1 //合并后更新datalist
116 | })
117 | })
118 |
119 | }
120 |
121 | }
122 | })
--------------------------------------------------------------------------------
/pages/activity/home/home.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | {{item.content}}
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | {{item.name}}
34 |
35 |
36 |
37 |
38 |
39 | 看更多
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | SOULFIRE
57 | {{item.title}}
58 | {{item.intro}}
59 |
60 | {{item.created_at_format}}
61 |
62 |
63 | {{item.view}}
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
--------------------------------------------------------------------------------
/pages/shop/goods_list/goodsList.js:
--------------------------------------------------------------------------------
1 | // pages/shop/goods_list/goodsList.js
2 | import api from '../../../utils/api.js'
3 |
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | goodsList: null,
11 | last_page: 1,
12 | page: 1,
13 | updown: 0,
14 | cate_id: 0,
15 | brand_id: 0,
16 | kword: "",
17 | sort: 0,
18 | sort_type: 1,
19 | token: ""
20 | },
21 |
22 | /**
23 | * 生命周期函数--监听页面加载
24 | */
25 | onLoad: function (options) {
26 | var token = wx.getStorageSync('token')
27 | var brand_id = options.brand_id
28 | var cate_id = options.cate_id
29 | var kword = options.kword
30 | this.setData({
31 | cate_id: cate_id,
32 | brand_id: brand_id,
33 | kword: kword,
34 | token: token
35 | })
36 |
37 | api.shopGoodsList(
38 | {
39 | token: token,
40 | page: this.data.page,
41 | cate_id: this.data.cate_id,
42 | brand_id: this.data.brand_id,
43 | kword: this.data.kword,
44 | sort: this.data.sort,
45 | sort_type: this.data.sort_type
46 | }
47 | ).then(data => {
48 | this.setData({
49 | goodsList: data.goods,
50 | last_page: data.last_page
51 | })
52 | })
53 |
54 | },
55 | onReachBottom: function () {
56 |
57 | if (this.data.last_page == this.data.page) {
58 | return
59 | }
60 | this.setData({
61 | page: this.data.page + 1
62 | })
63 | var that = this;
64 |
65 | api.shopGoodsList({
66 | token: that.data.token,
67 | page: this.data.page,
68 | cate_id: this.data.cate_id,
69 | brand_id: this.data.brand_id,
70 | kword: this.data.kword,
71 | sort: this.data.sort,
72 | sort_type: this.data.sort_type
73 | }).then(data => {
74 | var arr1 = that.data.goodsList;
75 | var arr2 = data.goods
76 | arr1 = arr1.concat(arr2);
77 | that.setData({
78 | goodsList: arr1
79 | })
80 | })
81 | },
82 | GoToGoodsDetail: function (res) {
83 | var id = res.currentTarget.dataset.id;
84 | wx.navigateTo({
85 | url: '/pages/shop/detail/detail?id=' + id,
86 | })
87 | },
88 | tabSelect(e) {
89 | var sort_type = e.currentTarget.dataset.sortType
90 | var updown = e.currentTarget.dataset.updown
91 | this.setData({
92 | sort_type: sort_type,
93 | })
94 | if (sort_type == 2) {
95 | this.setData({
96 | updown: updown == 0 ? 1 : 0,
97 | })
98 | } else {
99 | this.setData({
100 | updown: 0,
101 | })
102 | }
103 | api.shopGoodsList({
104 | token: this.data.token,
105 | page: 1,
106 | cate_id: this.data.cate_id,
107 | brand_id: this.data.brand_id,
108 | kword: this.data.kword,
109 | sort: this.data.sort,
110 | sort_type: sort_type
111 | }).then(data => {
112 | this.setData({
113 | goodsList: data.goods,
114 | sort: this.data.sort == 0 ? 1 : 0,
115 | page: 1,
116 | last_page: data.last_page
117 | })
118 | })
119 | }
120 | })
--------------------------------------------------------------------------------
/pages/personal/address/address_form/addressForm.js:
--------------------------------------------------------------------------------
1 | import api from '../../../../utils/api.js'
2 |
3 | Page({
4 |
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | id: 0,
10 | region: ['四川省', '成都市', '锦江区'],
11 | address: "",
12 | name: "",
13 | mobile: "",
14 | detail_address: "",
15 | token:""
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面加载
20 | */
21 | onLoad: function (options) {
22 | var token = wx.getStorageSync('token')
23 | var id = options.id
24 | this.setData({
25 | id:id,
26 | token: token
27 | })
28 | if (id != undefined) {
29 | api.addressDetail({token:token,id:id}).then(data => {
30 | this.setData({
31 | id: options.id,
32 | name: data.name,
33 | mobile: data.mobile,
34 | detail_address: data.detail_address,
35 | region: [data.province, data.city, data.district]
36 | })
37 |
38 | })
39 | }
40 | },
41 | onShow:function(){
42 | var token = wx.getStorageSync('token')
43 | this.setData({
44 | token: token
45 | })
46 | },
47 | RegionChange: function (e) {
48 | this.setData({
49 | region: e.detail.value
50 | })
51 | },
52 | formSubmit(e) {
53 | var name = e.detail.value.name
54 | var mobile = e.detail.value.mobile
55 | var region = e.detail.value.region
56 | var detail_address = e.detail.value.detail_address
57 |
58 | if(name == ""){
59 | wx.showToast({
60 | icon: "none",
61 | title: "姓名不能为空哦~",
62 | })
63 | return;
64 | }
65 | if (mobile == "") {
66 | wx.showToast({
67 | icon: "none",
68 | title: "手机号不能为空哦~",
69 | })
70 | return;
71 | }
72 | if (detail_address == "") {
73 | wx.showToast({
74 | icon: "none",
75 | title: "详细地址不能为空哦~",
76 | })
77 | return;
78 | }
79 |
80 | if (this.data.id != 0) {
81 | api.updateAddress({
82 | token: this.data.token,
83 | id: this.data.id,
84 | name: name,
85 | mobile: mobile,
86 | province: region[0],
87 | city: region[1],
88 | district: region[2],
89 | detail_address: detail_address
90 | }
91 | ).then(data => {
92 | if (data == null) {
93 | wx.showToast({
94 | icon: "none",
95 | title: "修改地址成功",
96 | duration: 1000,
97 | })
98 | wx.navigateBack({
99 | delta: 1
100 | })
101 | }
102 | })
103 |
104 | } else {
105 |
106 | api.addAddress({
107 | name: name,
108 | mobile: mobile,
109 | province: region[0],
110 | city: region[1],
111 | district: region[2],
112 | detail_address: detail_address,
113 | token:this.data.token
114 | }).then(data => {
115 | if (data == null) {
116 | wx.showToast({
117 | icon: "none",
118 | title: "新增地址成功",
119 | duration: 1000,
120 | })
121 | wx.navigateBack({
122 | delta: 1
123 | })
124 | }
125 | })
126 | }
127 | }
128 |
129 | })
--------------------------------------------------------------------------------
/pages/bbs/editor/editor.wxml:
--------------------------------------------------------------------------------
1 |
2 | 文章发布
3 |
4 |
5 |
--------------------------------------------------------------------------------
/pages/shop/order/order.wxss:
--------------------------------------------------------------------------------
1 | .address_contaniner {
2 | padding: 24rpx 26rpx 30rpx 26rpx;
3 | line-height: 47rpx;
4 | background: #fff;
5 | border-bottom: 4rpx solid transparent;
6 | background: linear-gradient(white, white) padding-box,
7 | repeating-linear-gradient(-45deg, red 0, red 12.5%, transparent 0, transparent 25%, #58a 0, #58a 37.5%, transparent 0, transparent 50%) 0/3em 3em;
8 | }
9 |
10 | .reveiver_name {
11 | font-weight: bold;
12 | }
13 |
14 | .cuIcon-deliver {
15 | font-size: 1.1rem;
16 | }
17 |
18 | .phone {
19 | font-weight: bold;
20 | }
21 |
22 | .cuIcon-right {
23 | font-size: 0.9rem;
24 | }
25 |
26 | .address {
27 | padding-left: 55rpx;
28 | }
29 |
30 | .total_price_container {
31 | width: 70%;
32 | padding-left: 30rpx;
33 | }
34 |
35 | .total_price_text {
36 | font-weight: bold;
37 | }
38 |
39 | .total_price {
40 | font-size: 1.3rem;
41 | font-weight: bolder;
42 | font-stretch: condensed;
43 | }
44 |
45 | .confirm-button {
46 | letter-spacing: 2rpx;
47 | width: 340%;
48 | }
49 |
50 | .cu-list{
51 | margin-top: 20rpx
52 | }
53 |
54 | .goods_thumb_container{
55 | width: 30% !important;
56 | height: 240rpx;
57 | padding: 32rpx 20rpx 32rpx 0
58 | }
59 |
60 |
61 | .goods_thumb{
62 | width: 200rpx;
63 | height: 100%;
64 | border:2rpx solid #f4f4f4
65 | }
66 |
67 | .miscellaneous_container{
68 | width: 70% !important;
69 | padding: 44rpx 0 40rpx 0
70 | }
71 |
72 | .goods_name{
73 | font-size: 1rem;
74 | text-overflow: -o-ellipsis-lastline;
75 | overflow: hidden;
76 | text-overflow: ellipsis;
77 | display: -webkit-box;
78 | -webkit-line-clamp:2;
79 | -webkit-box-orient: vertical;
80 | line-height: 40rpx
81 | }
82 |
83 | .size_num_price_container{
84 | margin-top: 40rpx
85 | }
86 |
87 | .size_and_num{
88 | color:#1a1a1a
89 | }
90 |
91 | .price{
92 | font-size: .85rem
93 | }
94 |
95 | .title{
96 | color: #5D5C62;
97 | font-size: .9rem
98 | }
99 |
100 |
101 | .coupon_item{
102 | width: 100%
103 | }
104 |
105 |
106 | .c_left{
107 | width: 70%;
108 | height: 200rpx;
109 | position:relative;
110 | overflow:hidden;
111 | }
112 | .c_left::before{
113 | position:absolute;
114 | width:70%;
115 | height:200rpx;
116 | top:-210px;
117 | right:-210px;
118 | border-radius:50%;
119 | border:200px solid #252525;/*边框只要能够覆盖整个容器就行*/
120 | }
121 |
122 | .c_right{
123 | width: 30%;
124 | height: 200rpx;
125 | /* background: red; */
126 | line-height: 200rpx;
127 | border-left: 1px dashed #eee;
128 | position: relative;
129 | }
130 |
131 | .c_right::before{
132 | position: absolute;
133 | top: 0px;
134 | margin-left: -7.5px;
135 | left: 0;
136 | width: 15px;
137 | height: 7.5px;
138 | background: rgb(248, 248, 248);
139 | border-radius: 0 0 15px 15px;
140 |
141 | content: '';
142 | }
143 | .c_right::after{
144 | position: absolute;
145 | bottom: 0;
146 | margin-left: -7.5px;
147 | left: 0;
148 | width: 15px;
149 | height: 7.5px;
150 | background: rgb(248, 248, 248);
151 | border-radius: 15px 15px 0 0 ;
152 |
153 | content: '';
154 | }
155 | .coupon-price{
156 | font-size: 2rem
157 | }
158 | .coupon-check{
159 | font-size: 50rpx
160 | }
--------------------------------------------------------------------------------
/pages/shop/order_detail/orderDetail.wxss:
--------------------------------------------------------------------------------
1 | .order_status {
2 | height: 150rpx;
3 | background: #ee4662;
4 | }
5 |
6 | .o_status {
7 | color: #fff;
8 | padding: 30rpx 0 0 50rpx;
9 | font-weight: bold;
10 | font-size: 1.2rem;
11 | }
12 |
13 | .address_contaniner {
14 | padding: 24rpx 26rpx 30rpx 26rpx;
15 | line-height: 47rpx;
16 | background: #fff;
17 | border-bottom: 4rpx solid transparent;
18 | }
19 |
20 | .reveiver_name {
21 | font-weight: bold;
22 | }
23 |
24 | .cuIcon-deliver {
25 | font-size: 1.1rem;
26 | }
27 |
28 | .cuIcon-location {
29 | font-size: 1.1rem;
30 | }
31 |
32 | .phone {
33 | font-weight: bold;
34 | }
35 |
36 | .cuIcon-right {
37 | font-size: 0.9rem;
38 | }
39 |
40 | .address {
41 | padding-left: 60rpx;
42 | font-size: 0.85rem;
43 | }
44 |
45 | .deliver_contaniner {
46 | padding: 24rpx 26rpx 30rpx 26rpx;
47 | line-height: 47rpx;
48 | background: #fff;
49 | border-bottom: 1rpx solid #f1f1f1;
50 | }
51 |
52 | .cuIcon-location {
53 | font-size: 1.1rem;
54 | }
55 |
56 | .deliver_follow {
57 | color: #adabab;
58 | }
59 |
60 | .cuIcon-right {
61 | font-size: 0.9rem;
62 | }
63 |
64 | .deliver_time {
65 | padding-left: 60rpx;
66 | font-size: 0.85rem;
67 | }
68 |
69 | .order_goods_container {
70 | height: 208rpx;
71 | width: 90%;
72 | margin: auto;
73 | margin-top: 20rpx;
74 | display: flex;
75 | padding: 10rpx 30rpx 10rpx 30rpx;
76 | }
77 |
78 | .goods_img {
79 | width: 30%;
80 | height: 100%;
81 | border: 0.2rpx solid #f1f1f1;
82 | }
83 |
84 | .goods_info {
85 | width: 70%;
86 | padding-left: 20rpx;
87 | }
88 |
89 | .goods_title {
90 | overflow: hidden;
91 | text-overflow: ellipsis;
92 | display: -webkit-box;
93 | -webkit-line-clamp: 2;
94 | -webkit-box-orient: vertical;
95 | }
96 |
97 | .goods_param {
98 | padding-top: 15rpx;
99 | }
100 |
101 | .goods_size {
102 | padding-top: 12rpx;
103 | font-size: 0.75rem;
104 | color: #000;
105 | }
106 |
107 | .goods_num {
108 | font-size: 0.75rem;
109 | color: #000;
110 | }
111 |
112 | .goods_price {
113 | font-weight: bold;
114 | font-size: 1rem;
115 | color: #000;
116 | }
117 |
118 | .order_info {
119 | margin-top: 20rpx;
120 | }
121 |
122 | .order_info_title {
123 | font-size: 0.9rem !important;
124 | }
125 |
126 | .order_info_container {
127 | background: #fff;
128 | }
129 |
130 | .order_info_item {
131 | padding: 10rpx 50rpx;
132 | }
133 |
134 | .order_price_container {
135 | border-bottom: 8rpx solid #f1f1f1;
136 | }
137 |
138 | .order_price {
139 | font-size: 1.2rem;
140 | font-weight: bold;
141 | }
142 |
143 | .order_item_1.order_item_2.order_item_3 {
144 | font-size: 0.8rem;
145 | }
146 |
147 | .order_item_2 {
148 | color: #9b9b9b;
149 | }
150 |
151 | .modal-button {
152 | background-color: rgb(247, 247, 247);
153 | border-radius: 0rpx;
154 | padding: 0rpx;
155 | margin: 0rpx;
156 | /* display: inline-block; */
157 | line-height: unset;
158 | font-size: 0.75rem;
159 | color: rgb(233, 104, 66)
160 | }
161 |
162 | .modal-button::after {
163 | /*button的边框样式是通过::after方式实现的*/
164 | border: none;
165 | }
166 |
167 | .modal-button-hover {
168 | /*点击后样式*/
169 | color: #f1f1f1;
170 | background-color: rgb(247, 247, 247);
171 | }
172 |
--------------------------------------------------------------------------------
/colorui/animation.wxss:
--------------------------------------------------------------------------------
1 | /*
2 | Animation 微动画
3 | 基于ColorUI组建库的动画模块 by 文晓港 2019年3月26日19:52:28
4 | */
5 |
6 | /* css 滤镜 控制黑白底色gif的 */
7 | .gif-black{
8 | mix-blend-mode: screen;
9 | }
10 | .gif-white{
11 | mix-blend-mode: multiply;
12 | }
13 |
14 |
15 | /* Animation css */
16 | [class*=animation-] {
17 | animation-duration: .5s;
18 | animation-timing-function: ease-out;
19 | animation-fill-mode: both
20 | }
21 |
22 | .animation-fade {
23 | animation-name: fade;
24 | animation-duration: .8s;
25 | animation-timing-function: linear
26 | }
27 |
28 | .animation-scale-up {
29 | animation-name: scale-up
30 | }
31 |
32 | .animation-scale-down {
33 | animation-name: scale-down
34 | }
35 |
36 | .animation-slide-top {
37 | animation-name: slide-top
38 | }
39 |
40 | .animation-slide-bottom {
41 | animation-name: slide-bottom
42 | }
43 |
44 | .animation-slide-left {
45 | animation-name: slide-left
46 | }
47 |
48 | .animation-slide-right {
49 | animation-name: slide-right
50 | }
51 |
52 | .animation-shake {
53 | animation-name: shake
54 | }
55 |
56 | .animation-reverse {
57 | animation-direction: reverse
58 | }
59 |
60 | @keyframes fade {
61 | 0% {
62 | opacity: 0
63 | }
64 |
65 | 100% {
66 | opacity: 1
67 | }
68 | }
69 |
70 | @keyframes scale-up {
71 | 0% {
72 | opacity: 0;
73 | transform: scale(.2)
74 | }
75 |
76 | 100% {
77 | opacity: 1;
78 | transform: scale(1)
79 | }
80 | }
81 |
82 | @keyframes scale-down {
83 | 0% {
84 | opacity: 0;
85 | transform: scale(1.8)
86 | }
87 |
88 | 100% {
89 | opacity: 1;
90 | transform: scale(1)
91 | }
92 | }
93 |
94 | @keyframes slide-top {
95 | 0% {
96 | opacity: 0;
97 | transform: translateY(-100%)
98 | }
99 |
100 | 100% {
101 | opacity: 1;
102 | transform: translateY(0)
103 | }
104 | }
105 |
106 | @keyframes slide-bottom {
107 | 0% {
108 | opacity: 0;
109 | transform: translateY(100%)
110 | }
111 |
112 | 100% {
113 | opacity: 1;
114 | transform: translateY(0)
115 | }
116 | }
117 |
118 | @keyframes shake {
119 |
120 | 0%,
121 | 100% {
122 | transform: translateX(0)
123 | }
124 |
125 | 10% {
126 | transform: translateX(-9px)
127 | }
128 |
129 | 20% {
130 | transform: translateX(8px)
131 | }
132 |
133 | 30% {
134 | transform: translateX(-7px)
135 | }
136 |
137 | 40% {
138 | transform: translateX(6px)
139 | }
140 |
141 | 50% {
142 | transform: translateX(-5px)
143 | }
144 |
145 | 60% {
146 | transform: translateX(4px)
147 | }
148 |
149 | 70% {
150 | transform: translateX(-3px)
151 | }
152 |
153 | 80% {
154 | transform: translateX(2px)
155 | }
156 |
157 | 90% {
158 | transform: translateX(-1px)
159 | }
160 | }
161 |
162 | @keyframes slide-left {
163 | 0% {
164 | opacity: 0;
165 | transform: translateX(-100%)
166 | }
167 |
168 | 100% {
169 | opacity: 1;
170 | transform: translateX(0)
171 | }
172 | }
173 |
174 | @keyframes slide-right {
175 | 0% {
176 | opacity: 0;
177 | transform: translateX(100%)
178 | }
179 |
180 | 100% {
181 | opacity: 1;
182 | transform: translateX(0)
183 | }
184 | }
--------------------------------------------------------------------------------
/pages/activity/home/home.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 | Component({
4 | options: {
5 | addGlobalClass: true,
6 | },
7 | data: {
8 | swiperList: [],
9 | msgList: [],
10 | activityList: [],
11 | iconList:"",
12 | video_url: "",
13 | page:1,
14 | last_page:1,
15 | skin: false,
16 | token:""
17 | },
18 | attached() {
19 | var token = wx.getStorageSync('token')
20 | this.setData({
21 | token:token
22 | })
23 | wx.showLoading({
24 | title: '正在加载...',
25 | })
26 | api.activityIndex().then(data=>{
27 | this.setData({
28 | swiperList: data.activity_banners,
29 | msgList: data.activity_ann,
30 | video_url: data.activity_video.video_url,
31 | iconList: data.activity_cates
32 | })
33 | })
34 |
35 |
36 | var obj = {
37 | page: 1,
38 | cate_id: 0,
39 | sort: 0,
40 | title: "",
41 | token:token
42 | }
43 |
44 | api.activityList(obj).then(data => {
45 | this.setData({
46 | last_page: data.last_page,
47 | activityList: data.activities
48 | })
49 | wx.hideLoading()
50 |
51 | })
52 |
53 | wx.pageScrollTo({
54 | scrollTop: 0,
55 | duration: 0
56 | })
57 | },
58 | pageLifetimes: {
59 | show: function () {
60 | var token = wx.getStorageSync('token')
61 | this.setData({
62 | token: token
63 | })
64 | var obj = {
65 | page: 1,
66 | cate_id: 0,
67 | sort: 0,
68 | title: "",
69 | token: token
70 | }
71 |
72 | api.activityList(obj).then(data => {
73 | this.setData({
74 | last_page: data.last_page,
75 | activityList: data.activities
76 | })
77 | wx.hideLoading()
78 |
79 | })
80 | },
81 | },
82 | methods: {
83 | showModal(e) {
84 | this.setData({
85 | modalName: e.currentTarget.dataset.target
86 | })
87 | },
88 | hideModal(e) {
89 | this.setData({
90 | modalName: null
91 | })
92 | },
93 |
94 |
95 | getList(){
96 | var token = wx.getStorageSync('token')
97 | this.setData({
98 | token:token
99 | })
100 | if (this.data.last_page == this.data.page){
101 | return;
102 | }
103 | this.setData({
104 | page:this.data.page+1
105 | })
106 | var obj = {
107 | page: this.data.page,
108 | cate_id: 0,
109 | sort: 0,
110 | title: "",
111 | token:token
112 | }
113 | api.activityList(obj).then(data => {
114 |
115 | var that = this;
116 |
117 | var arr1 = that.data.activityList; //从data获取当前datalist数组
118 | var arr2 = data.activities
119 | arr1 = arr1.concat(arr2); //合并数组
120 | that.setData({
121 | activityList: arr1 //合并后更新datalist
122 | })
123 | })
124 | },
125 |
126 | goToActivityCates(){
127 | wx.navigateTo({
128 | url: '/pages/activity/category/category'
129 | })
130 | },
131 | goToSearch() {
132 | wx.navigateTo({
133 | url: '/pages/activity/search/search'
134 | })
135 | },
136 | goToActivityList(e){
137 | var cate_id = e.currentTarget.dataset.id
138 | console.log(e)
139 | wx.navigateTo({
140 | url: '/pages/activity/activity_list/activityList?cate_id=' + cate_id,
141 | })
142 | }
143 | },
144 |
145 | })
--------------------------------------------------------------------------------
/pages/personal/home/home.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 |
3 |
4 |
5 | Component({
6 | options: {
7 | addGlobalClass: true,
8 | },
9 | data: {
10 | userInfo: "",
11 | follows: 0,
12 | is_followed: 0,
13 | aorder: 0,
14 | sorder: 0,
15 | },
16 | attached() {
17 | var token = wx.getStorageSync('token')
18 | var userInfo = wx.getStorageSync('user')
19 | this.setData({
20 | token,
21 | userInfo
22 | })
23 | if (!token) {
24 | wx.navigateTo({
25 | url: '/pages/personal/login/login',
26 | })
27 | }
28 |
29 | api.userInfo(token).then(data => {
30 | this.setData({
31 | follows: data.user_info.follows,
32 | is_followed: data.user_info.is_followed,
33 | aorder: data.aorder_unpay,
34 | sorder: data.sorder_unpay,
35 | userInfo: userInfo
36 | })
37 | })
38 | },
39 |
40 | pageLifetimes: {
41 | show: function() {
42 | var token = wx.getStorageSync('token')
43 | var userInfo = wx.getStorageSync('user')
44 | api.userInfo(token).then(data => {
45 | // console.log(data)
46 | this.setData({
47 | follows: data.user_info.follows,
48 | is_followed: data.user_info.is_followed,
49 | aorder: data.aorder_unpay,
50 | sorder: data.sorder_unpay,
51 | userInfo: userInfo,
52 | token: token
53 | })
54 | })
55 | this.setData({
56 | token: token
57 | })
58 | },
59 | },
60 |
61 | methods: {
62 | follows() {
63 | if (this.toLogin()) {
64 | wx.navigateTo({
65 | url: '/pages/personal/follows/follows',
66 | })
67 | }
68 |
69 | },
70 | followed() {
71 | if (this.toLogin()) {
72 | wx.navigateTo({
73 | url: '/pages/personal/followed/followed',
74 | })
75 | }
76 | },
77 | goToAOrder() {
78 | if (this.toLogin()) {
79 | wx.navigateTo({
80 | url: '/pages/personal/aorder/aorder',
81 | })
82 | }
83 | },
84 | goToGorder() {
85 | if (this.toLogin()) {
86 | wx.navigateTo({
87 | url: '/pages/personal/gorder/gorder',
88 | })
89 | }
90 | },
91 | goToCoupon() {
92 | if (this.toLogin()) {
93 | wx.navigateTo({
94 | url: '/pages/personal/coupon/coupon',
95 | })
96 | }
97 | },
98 | goToLikes() {
99 | if (this.toLogin()) {
100 | wx.navigateTo({
101 | url: '/pages/personal/likes/likes',
102 | })
103 | }
104 | },
105 | goToAddress() {
106 | if (this.toLogin()) {
107 | wx.navigateTo({
108 | url: '/pages/personal/address/address',
109 | })
110 | }
111 | },
112 | goToFeedback() {
113 | if (this.toLogin()) {
114 | wx.navigateTo({
115 | url: '/pages/personal/feedback/feedback',
116 | })
117 | }
118 | },
119 | goToArticle() {
120 | if (this.toLogin()) {
121 | wx.navigateTo({
122 | url: '/pages/personal/article/article',
123 | })
124 | }
125 | },
126 | toLogin() {
127 | if (!this.data.token) {
128 | wx.showToast({
129 | icon: "none",
130 | title: "请先授权",
131 | duration: 1000,
132 | success: function() {
133 | wx.navigateTo({
134 | url: '/pages/personal/login/login',
135 | })
136 | }
137 | })
138 | return false
139 | } else {
140 | return true
141 | }
142 | }
143 | },
144 |
145 | })
--------------------------------------------------------------------------------
/pages/shop/refund/refund.js:
--------------------------------------------------------------------------------
1 | // pages/shop/refund/refund.js
2 | import http from '../../../utils/http.js'
3 | import api from '../../../utils/api.js'
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | rTypeArr: [{
11 | type: 1,
12 | text: "仅退款",
13 | },
14 | {
15 | type: 2,
16 | text: "退款退货",
17 | },
18 | ],
19 | r_index: 0,
20 | order_id: 0,
21 | imgList: [],
22 | token: ""
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面加载
27 | */
28 | onLoad: function (options) {
29 | var order_id = options.order_id
30 | var token = wx.getStorageSync('token')
31 | this.setData({
32 | order_id: order_id,
33 | token: token
34 | })
35 | },
36 | bindPickerChange(e) {
37 | this.setData({
38 | r_index: e.detail.value
39 | })
40 | },
41 | formSubmit: function (e) {
42 | var order_id = this.data.order_id
43 | var r_type = e.detail.value.rtype
44 | var reason = e.detail.value.reason
45 | var imgs = this.data.imgList
46 | if (reason == "" || reason == undefined) {
47 | wx.showToast({
48 | icon: "none",
49 | title: "申请原因不能为空哦~"
50 | })
51 | return
52 | }
53 | api.initiateRefund({
54 | token: this.data.token,
55 | order_id: order_id,
56 | reason: reason,
57 | r_type: r_type,
58 | imgs: imgs
59 | }).then(data => {
60 |
61 | wx.showToast({
62 | icon: "none",
63 | title: "申请退款成功,等待审批",
64 | duration: 1000,
65 | success: function () {
66 | wx.navigateBack({
67 | delta: 1
68 | })
69 | }
70 | })
71 | })
72 |
73 | },
74 | ChooseImage() {
75 | var token = wx.getStorageSync('token')
76 |
77 | wx.chooseImage({
78 | count: 3, //默认9
79 | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
80 | sourceType: ['album'], //从相册选择
81 | success: (res) => {
82 | for (var i = 0; i < res.tempFilePaths.length; i++) {
83 | var imgUrl = res.tempFilePaths[i];
84 | wx.uploadFile({
85 | url: http.apiUrl + '/shop/upload',
86 | filePath: imgUrl,
87 | name: 'file',
88 | header: {
89 | token: token,
90 | },
91 | success: (res) => {
92 | var jsonStr = res.data;
93 | var obj = JSON.parse(jsonStr);
94 | if (res.statusCode == 200) {
95 | if (obj.code == 0) {
96 | this.setData({
97 | imgList: this.data.imgList.concat(obj.data)
98 | })
99 | } else {
100 | wx.showToast({
101 | icon: "none",
102 | title: obj.message
103 | })
104 | }
105 | } else {
106 | wx.showToast({
107 | icon: "none",
108 | title: obj.message,
109 | })
110 | }
111 | },
112 | fail: function (e) {
113 | wx.showToast({
114 | icon: "none",
115 | title: "网络错误,请重试"
116 | })
117 | return
118 | }
119 | })
120 | }
121 | }
122 | });
123 | },
124 | ViewImage(e) {
125 | wx.previewImage({
126 | urls: this.data.imgList,
127 | current: e.currentTarget.dataset.url
128 | });
129 | },
130 | DelImg(e) {
131 | this.data.imgList.splice(e.currentTarget.dataset.index, 1);
132 | this.setData({
133 | imgList: this.data.imgList
134 | })
135 | },
136 | })
--------------------------------------------------------------------------------
/pages/personal/home/home.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{userInfo == '' ? '请先登录':userInfo.nickName}}
5 |
6 |
7 |
8 |
9 |
10 | {{follows}}
11 |
12 | 关注
13 |
14 |
15 | {{is_followed}}
16 |
17 | 粉丝
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/pages/shop/order/order.js:
--------------------------------------------------------------------------------
1 | // pages/shop/order/order.js
2 | import api from '../../../utils/api.js'
3 |
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | goods_spu_id: 0,
11 | goods_spu: null,
12 | coupons: "",
13 | address: "",
14 | coupon_price: 0,
15 | real_price: 0,
16 | checked: 0,
17 | address_id: 0,
18 | coupon_id: 0,
19 | goods_id: 0,
20 | token:""
21 | },
22 |
23 | /**
24 | * 生命周期函数--监听页面加载
25 | */
26 | onLoad: function (options) {
27 | var id = options.id
28 | var address_id = options.address_id
29 |
30 | var token = wx.getStorageSync('token')
31 | this.setData({
32 | token: token
33 | })
34 |
35 | api.preOrderDetail(id, token).then(data => {
36 |
37 | var coupon_price = 0
38 | var real_price = 0
39 |
40 |
41 | if (data.coupons.length != 0) {
42 | switch (data.coupons[0].coupon_type) {
43 | case 1:
44 | coupon_price = data.coupons[0].reduction_price
45 | break;
46 | case 2:
47 | coupon_price = data.coupons[0].immediately_price
48 | break;
49 | case 3:
50 | coupon_price = (this.goods_spu.price * (1 - data.coupons[0].discount)).toFixed(2)
51 | break;
52 | }
53 |
54 | this.setData({
55 | coupon_id: data.coupons[0].coupon_id
56 | })
57 | }
58 |
59 |
60 | real_price = data.goods_spu.price + data.goods_spu.post_price - coupon_price
61 |
62 | this.setData({
63 | goods_spu: data.goods_spu,
64 | coupons: data.coupons,
65 | coupon_price: coupon_price,
66 | real_price: real_price,
67 | goods_id: data.goods_spu.goods_id,
68 | goods_spu_id: id
69 | })
70 |
71 | })
72 |
73 |
74 | api.detailToOrder({ token: token, id: address_id }).then(data => {
75 | console.log(data)
76 | this.setData({
77 | address: data,
78 | address_id: data.id
79 | })
80 | })
81 |
82 | },
83 | goToSubmit(e) {
84 | console.log(this.data.address_id)
85 | if(this.data.address_id == 0){
86 | wx.showToast({
87 | icon: "none",
88 | title: "还没有选择地址哦~",
89 | })
90 | return;
91 | }
92 |
93 | api.shopBuy({
94 | token: this.data.token,
95 | num: 1,
96 | goodsSpuId: this.data.goods_spu_id,
97 | addressId: this.data.address_id,
98 | goodsId: this.data.goods_id,
99 | couponId: this.data.coupon_id
100 | }
101 | ).then(data => {
102 | wx.navigateTo({
103 | url: '/pages/shop/pay_result/payResult?order_id=' + data,
104 | })
105 | })
106 |
107 | },
108 | chooseCoupon(e) {
109 | var index = e.currentTarget.dataset.index
110 | var coupon_price = 0
111 | var real_price = 0
112 |
113 | switch (this.data.coupons[index].coupon_type) {
114 | case 1:
115 | coupon_price = this.data.coupons[index].reduction_price
116 | break;
117 | case 2:
118 | coupon_price = this.data.coupons[index].immediately_price
119 | break;
120 | case 3:
121 | coupon_price = (this.goods_spu.price * (1 - this.data.coupons[index].discount)).toFixed(2)
122 | break;
123 | }
124 |
125 | real_price = this.data.goods_spu.price + this.data.goods_spu.post_price - coupon_price
126 |
127 | this.setData({
128 | checked: index,
129 | real_price: real_price,
130 | coupon_price: coupon_price,
131 | modalName: null
132 | })
133 |
134 |
135 | },
136 | showModal(e) {
137 | this.setData({
138 | modalName: e.currentTarget.dataset.target
139 | })
140 | },
141 | hideModal(e) {
142 | this.setData({
143 | modalName: null
144 | })
145 | },
146 | goToChooseAddress(e) {
147 | wx.navigateTo({
148 | url: '/pages/personal/address/address?status=1&goods_spu_id=' + this.data.goods_spu_id,
149 | })
150 | }
151 |
152 | })
--------------------------------------------------------------------------------
/pages/activity/activity_list/activityList.js:
--------------------------------------------------------------------------------
1 | import api from '../../../utils/api.js'
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | activityList: [],
9 | page: 1,
10 | last_page: 0,
11 | sort: 0,
12 | cate_id:0,
13 | time_sort:0,
14 | activityCates: [{
15 | id: 0,
16 | name: "全部",
17 | }],
18 | a_index: 0,
19 | kword:"",
20 | token:""
21 | },
22 |
23 | /**
24 | * 生命周期函数--监听页面加载
25 | */
26 | onLoad: function (options) {
27 | var kword = options.kword
28 | var cate_id = options.cate_id
29 | var token = wx.getStorageSync('token')
30 | this.setData({
31 | kword: kword == undefined ? "" : kword,
32 | cate_id: cate_id == undefined ? 0:cate_id,
33 | token: token
34 | })
35 |
36 |
37 | var that = this
38 | api.activityCates().then(data => {
39 | var arr1 = that.data.activityCates; //从data获取当前datalist数组
40 | var arr2 = data
41 | arr1 = arr1.concat(arr2); //合并数组
42 | this.setData({
43 | activityCates: arr1
44 | })
45 | if(cate_id != 0 && cate_id != undefined){
46 | for(var i = 0;i {
63 | console.log(data)
64 | this.setData({
65 | last_page: data.last_page,
66 | activityList: data.activities
67 | })
68 | })
69 | },
70 |
71 |
72 | /**
73 | * 页面上拉触底事件的处理函数
74 | */
75 | onReachBottom: function () {
76 | if (this.data.last_page == this.data.page) {
77 | return
78 | }
79 | this.setData({
80 | page: this.data.page + 1
81 | })
82 | var obj = {
83 | page: this.data.page,
84 | cateId: this.data.cate_id,
85 | sort: this.data.time_sort,
86 | kword: this.data.kword,
87 | token:this.data.token
88 | }
89 | api.activityList(obj).then(data => {
90 |
91 | var that = this;
92 |
93 | var arr1 = that.data.activityList; //从data获取当前datalist数组
94 | var arr2 = data.activities
95 | arr1 = arr1.concat(arr2); //合并数组
96 | that.setData({
97 | activityList: arr1 //合并后更新datalist
98 | })
99 | })
100 | },
101 | bindPickerChange(e){
102 | console.log(e)
103 | var a_index = e.detail.value
104 |
105 | var obj = {
106 | page: 1,
107 | cateId: this.data.activityCates[a_index].id,
108 | sort: 0,
109 | kword: this.data.kword,
110 | token:this.data.token
111 | }
112 | api.activityList(obj).then(data => {
113 | this.setData({
114 | page: 1,
115 | last_page: data.last_page,
116 | activityList: data.activities
117 | })
118 | })
119 | this.setData({
120 | a_index: a_index,
121 | cate_id: this.data.activityCates[a_index].id
122 | })
123 | },
124 | tabSelect(e) {
125 | console.log(e)
126 | var sort = e.currentTarget.dataset.sort
127 | var time_sort = e.currentTarget.dataset.timeSort
128 | this.setData({
129 | sort: sort,
130 | })
131 | if (sort != 0){
132 |
133 | time_sort = time_sort == 1 ? 0 : 1
134 | var obj = {
135 | page: 1,
136 | cateId: this.data.cate_id,
137 | sort: time_sort,
138 | kword: this.data.kword,
139 | token:this.data.token
140 | }
141 | api.activityList(obj).then(data => {
142 | console.log(data)
143 | this.setData({
144 | page:1,
145 | last_page: data.last_page,
146 | activityList: data.activities,
147 | time_sort: time_sort
148 | })
149 | })
150 | }
151 | }
152 |
153 | })
--------------------------------------------------------------------------------