guhongwei 2 tahun lalu
induk
melakukan
8f4ae516f2

+ 14 - 8
app.json

@@ -1,34 +1,40 @@
 {
     "pages": [
-    
-
+      
         "pages/index/index",
         "pages/register/index",
         "pages/home/index",
         "pages/news/index",
+   
+
         "pages/topic/index",
+
         "pages/my/index",
         "pages/my/userInfo",
+
         "pages/user/index",
+
         "pages/usermymatch/index",
+        "pages/usermyorder/index",
+
         "pages/setting/index",
         "pages/setting/basic",
         "pages/setting/contact",
+        
         "pages/match/index",
         "pages/match/mess",
         "pages/match/matchadd",
+        "pages/match/matchgroup",
         "pages/match/project",
         "pages/match/projectadd",
-        "pages/match/matchgroup",
-        "pages/match/shteam",
-        
+     
         "pages/match/sign",
+        "pages/match/shteam",
+
+        "pages/order/index",
         
         "pages/matchInfo/index",
         "pages/matchInfo/sign",
-      
-        "pages/order/index",
-        "pages/usermyorder/index",
         "pages/test/index"
     ],
     "usingComponents": {

+ 6 - 4
pages/match/sign.js

@@ -113,10 +113,12 @@ Page({
     toRefund: async function (e) {
         const that = this;
         const { item } = e.currentTarget.dataset;
-        const res = await app.$post('/newCourt/api/payOrder/toRefund', { id: item._id })
-        if (app.$checkRes(res)) {
-            wx.showToast({ title: '退款成功' })
-            this.search();
+        const arr = await app.$post('/newCourt/api/payOrder/toRefund', { id: item.pay_id })
+        if (arr.errcode == '0') {
+            wx.showToast({ title: `退款成功`, icon: 'success', duration: 2000 });
+            that.watchLogin();
+        } else {
+            wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 });
         }
     },
     // 关闭弹框

+ 1 - 1
pages/match/sign.wxml

@@ -25,7 +25,7 @@
                         <view class="btn">
                             <button type="primary" size="mini" bindtap="toView" data-item="{{item}}">详细信息</button>
                             <button type="primary" size="mini" bindtap="toEdit" data-item="{{item}}">信息维护</button>
-                            <button type="warn" size="mini" bindtap="toRefund" data-item="{{item}}">退款</button>
+                            <button type="warn" size="mini" bindtap="toRefund" data-item="{{item}}" wx:if="{{item.pay_status=='1'}}">退款</button>
                         </view>
                     </view>
                 </view>

+ 89 - 0
pages/news copy/index.js

@@ -0,0 +1,89 @@
+const app = getApp()
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        frameStyle: { useTop: true, name: '资讯', leftArrow: false, useBar: true },
+        tabs: {
+            active: 'a',
+            list: [
+                { title: '推荐', name: 'a' },
+                { title: '羽毛球', name: 'b' },
+            ],
+        },
+        //查询条件
+        searchInfo: {},
+        list: [{ id: "1" }],
+    },
+    // 跳转菜单
+    tabPath(e) {
+        let { route } = e.detail.detail;
+        if (route) wx.redirectTo({ url: `/${route}` })
+    },
+    // 选项卡
+    tabsChange: function (e) {
+        const that = this;
+        that.setData({ 'tabs.active': e.detail.name });
+    },
+    //搜索
+    onSearch() {
+        console.log("搜索");
+    },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad: function (options) {
+        const that = this;
+
+    },
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide: function () {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload: function () {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh: function () {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom: function () {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage: function () {
+
+    }
+})

+ 7 - 0
pages/news copy/index.json

@@ -0,0 +1,7 @@
+{
+  "component": true,
+  "usingComponents": {
+    "mobile-main": "/commpents/mobile-frame/index",
+    "e-tabs": "/commpents/tabs/index"
+  }
+}

+ 79 - 0
pages/news copy/index.less

@@ -0,0 +1,79 @@
+.main {
+    height: 80.8vh;
+
+    .one {
+        width: 100%;
+    }
+
+    .two {
+        width: 100%;
+        margin: 2px;
+    }
+
+    .thr {
+        width: 96vw;
+        flex-grow: 1;
+        position: relative;
+        background-color: #ffffff;
+
+        .scroll-view {
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            bottom: 0;
+
+            .list-scroll-view {
+                display: flex;
+                flex-wrap: wrap;
+                align-content: flex-start;
+                justify-content: space-between;
+
+                .list {
+                    display: flex;
+                    width: 96vw;
+                    margin: 10px 0;
+                    border-bottom: 0.1px solid #D1CFCF;
+
+                    .image {
+                        display: flex;
+                        justify-content: center;
+                        align-items: center;
+                        width: 30vw;
+
+                        image {
+                            width: 20vw;
+                            height: 20vw;
+                            border-radius: 5px;
+                        }
+                    }
+
+                    .content {
+                        padding: 5px;
+
+                        .name {
+                            font-size: 14px;
+                            font-weight: bold;
+                            padding: 2px 0;
+                            list-style: disc;
+                        }
+
+                        .title {
+                            font-size: 12px;
+                            color: #666;
+                            padding: 2px 0;
+                            display: -webkit-box;
+                            overflow: hidden;
+                            -webkit-line-clamp: 3;
+                            -webkit-box-orient: vertical;
+
+                            text {
+                                padding: 0 10px;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}

+ 34 - 0
pages/news copy/index.wxml

@@ -0,0 +1,34 @@
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
+    <view slot="info" class="container main">
+        <view class="one">
+            <e-tabs tabs="{{tabs}}" bind:tabsChange="tabsChange"></e-tabs>
+        </view>
+        <view class="two">
+            <input type="text" value="{{searchInfo.name}}" placeholder="请输入关键词" />
+        </view>
+        <view class="thr">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view wx:if="{{tabs.active=='a'}}">
+                        a
+                        <!-- <view class="list" wx:for="{{list}}" wx:key="item">
+                            <view class="content">
+                                <view class="name">
+                                    <van-icon name="stop" size="10px" />{{item.name}}
+                                </view>
+                                <view class="title">{{item.content}}</view>
+                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
+                            </view>
+                            <view class="image" wx:if="{{item.src}}">
+                                <image src="{{item.src}}"></image>
+                            </view>
+                        </view> -->
+                    </view>
+                    <view wx:if="{{tabs.active=='b'}}">
+                        b
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
+    </view>
+</mobile-main>

+ 67 - 0
pages/news copy/index.wxss

@@ -0,0 +1,67 @@
+.main {
+  height: 80.8vh;
+}
+.main .one {
+  width: 100%;
+}
+.main .two {
+  width: 100%;
+  margin: 2px;
+}
+.main .thr {
+  width: 96vw;
+  flex-grow: 1;
+  position: relative;
+  background-color: #ffffff;
+}
+.main .thr .scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.main .thr .scroll-view .list-scroll-view {
+  display: flex;
+  flex-wrap: wrap;
+  align-content: flex-start;
+  justify-content: space-between;
+}
+.main .thr .scroll-view .list-scroll-view .list {
+  display: flex;
+  width: 96vw;
+  margin: 10px 0;
+  border-bottom: 0.1px solid #D1CFCF;
+}
+.main .thr .scroll-view .list-scroll-view .list .image {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  width: 30vw;
+}
+.main .thr .scroll-view .list-scroll-view .list .image image {
+  width: 20vw;
+  height: 20vw;
+  border-radius: 5px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content {
+  padding: 5px;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .name {
+  font-size: 14px;
+  font-weight: bold;
+  padding: 2px 0;
+  list-style: disc;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .title {
+  font-size: 12px;
+  color: #666;
+  padding: 2px 0;
+  display: -webkit-box;
+  overflow: hidden;
+  -webkit-line-clamp: 3;
+  -webkit-box-orient: vertical;
+}
+.main .thr .scroll-view .list-scroll-view .list .content .title text {
+  padding: 0 10px;
+}

File diff ditekan karena terlalu besar
+ 9 - 15
pages/news/index.js


+ 83 - 61
pages/news/index.less

@@ -1,74 +1,95 @@
 .main {
-    height: 80.8vh;
+    height: 81.9vh;
 
-    .one {
-        width: 100%;
+    .zero {
+        width: 96vw;
+        margin: 0 0 2vw 0;
     }
 
-    .two {
-        width: 100%;
-        margin: 2px;
+    .zero:last-child {
+        margin: 0;
     }
 
-    .thr {
-        width: 96vw;
-        flex-grow: 1;
-        position: relative;
-        background-color: #ffffff;
-
-        .scroll-view {
-            position: absolute;
-            top: 0;
-            left: 0;
-            right: 0;
-            bottom: 0;
-
-            .list-scroll-view {
-                display: flex;
-                flex-wrap: wrap;
-                align-content: flex-start;
-                justify-content: space-between;
-
-                .list {
-                    display: flex;
-                    width: 96vw;
-                    margin: 10px 0;
-                    border-bottom: 0.1px solid #D1CFCF;
-
-                    .image {
+    .two {
+        .a {
+            display: flex;
+            flex-direction: column;
+            height: 74vh;
+
+            .two_1 {
+                background-color: #f1f1f1;
+                width: 92vw;
+                padding: 2vw;
+
+                input {
+                    font-size: 14px;
+                }
+            }
+
+            .two_2 {
+                width: 96vw;
+                flex-grow: 1;
+                position: relative;
+
+
+                .scroll-view {
+                    position: absolute;
+                    top: 0;
+                    left: 0;
+                    right: 0;
+                    bottom: 0;
+
+                    .list-scroll-view {
                         display: flex;
-                        justify-content: center;
-                        align-items: center;
-                        width: 30vw;
-
-                        image {
-                            width: 20vw;
-                            height: 20vw;
-                            border-radius: 5px;
-                        }
-                    }
+                        flex-wrap: wrap;
+                        align-content: flex-start;
+                        justify-content: space-between;
 
-                    .content {
-                        padding: 5px;
+                        .list {
+                            background-color: #ffffff;
+                            margin: 0 0 2vw 0;
+                            display: flex;
+                            flex-direction: row;
+                            justify-content: space-between;
+                            width: 92vw;
+                            padding: 2vw;
 
-                        .name {
-                            font-size: 14px;
-                            font-weight: bold;
-                            padding: 2px 0;
-                            list-style: disc;
-                        }
+                            .list_1 {
+                                width: 70vw;
+
+                                .name {
+                                    font-size: 16px;
+                                    font-weight: bold;
+                                    margin: 0 0 1vw 0;
+                                }
 
-                        .title {
-                            font-size: 12px;
-                            color: #666;
-                            padding: 2px 0;
-                            display: -webkit-box;
-                            overflow: hidden;
-                            -webkit-line-clamp: 3;
-                            -webkit-box-orient: vertical;
-
-                            text {
-                                padding: 0 10px;
+                                .brief {
+                                    margin: 0 0 1vw 0;
+                                    font-size: 12px;
+                                    color: #858585;
+                                    overflow: hidden;
+                                    text-overflow: ellipsis;
+                                    -webkit-line-clamp: 3;
+                                    word-break: break-all;
+                                    display: -webkit-box;
+                                    -webkit-box-orient: vertical;
+                                }
+
+                                .other {
+                                    font-size: 14px;
+                                    color: #858585;
+                                }
+                            }
+
+                            .list_2 {
+                                text-align: right;
+
+                                .image {
+                                    width: 100px;
+                                    height: 100px;
+                                    overflow: hidden;
+                                    border-radius: 10px;
+                                }
                             }
                         }
                     }
@@ -76,4 +97,5 @@
             }
         }
     }
+
 }

+ 41 - 84
pages/news/index.wxml

@@ -1,100 +1,57 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
     <view slot="info" class="container main">
-        <view class="one">
+        <view class="zero one">
             <e-tabs tabs="{{tabs}}" bind:tabsChange="tabsChange"></e-tabs>
         </view>
-        <view class="two">
-            <van-search value="{{ searchInfo.name }}" input-align="center" bind:search="onSearch" placeholder="请输入咨询标题" />
-        </view>
-        <view class="thr">
-            <scroll-view scroll-y="true" class="scroll-view">
-                <view class="list-scroll-view">
-                    <view wx:if="{{tabs.active=='a'}}">
-                        <view class="list" wx:for="{{list}}" wx:key="item">
-                            <view class="content">
-                                <view class="name">
-                                    <van-icon name="stop" size="10px" />{{item.name}}
-                                </view>
-                                <view class="title">{{item.content}}</view>
-                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
-                            </view>
-                            <view class="image" wx:if="{{item.src}}">
-                                <image src="{{item.src}}"></image>
-                            </view>
-                        </view>
-                    </view>
-                    <view wx:if="{{tabs.active=='b'}}">
-                        <view class="list" wx:for="{{list}}" wx:key="item">
-                            <view class="content">
-                                <view class="name">
-                                    <van-icon name="stop" size="10px" />{{item.name}}
-                                </view>
-                                <view class="title">{{item.content}}</view>
-                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
-                            </view>
-                            <view class="image" wx:if="{{item.src}}">
-                                <image src="{{item.src}}"></image>
-                            </view>
-                        </view>
-                    </view>
-                    <view wx:if="{{tabs.active=='c'}}">
-                        <view class="list" wx:for="{{list}}" wx:key="item">
-                            <view class="content">
-                                <view class="name">
-                                    <van-icon name="stop" size="10px" />{{item.name}}
+        <view class="zero two">
+            <view class="a" wx:if="{{tabs.active=='a'}}">
+                <view class="two_1">
+                    <input type="text" value="{{searchInfo.name}}" placeholder="请输入关键词" />
+                </view>
+                <view class="two_2">
+                    <scroll-view scroll-y="true" class="scroll-view">
+                        <view class="list-scroll-view">
+                            <view class="list" wx:for="{{list}}" wx:key="item">
+                                <view class="list_1">
+                                    <view class="name">{{item.name}}</view>
+                                    <view class="brief">{{item.brief}}</view>
+                                    <view class="other">
+                                        <text>{{item.type}}</text>
+                                        <text>来源:{{item.origin}}</text>
+                                    </view>
                                 </view>
-                                <view class="title">{{item.content}}</view>
-                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
-                            </view>
-                            <view class="image" wx:if="{{item.src}}">
-                                <image src="{{item.src}}"></image>
-                            </view>
-                        </view>
-                    </view>
-                    <view wx:if="{{tabs.active=='d'}}">
-                        <view class="list" wx:for="{{list}}" wx:key="item">
-                            <view class="content">
-                                <view class="name">
-                                    <van-icon name="stop" size="10px" />{{item.name}}
+                                <view class="list_2">
+                                    <image class="image" src="{{item.img_url&&item.img_url.length>0?item.img_url[0].url:''}}"></image>
                                 </view>
-                                <view class="title">{{item.content}}</view>
-                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
-                            </view>
-                            <view class="image" wx:if="{{item.src}}">
-                                <image src="{{item.src}}"></image>
                             </view>
                         </view>
-                    </view>
-                    <view wx:if="{{tabs.active=='e'}}">
-                        <view class="list" wx:for="{{list}}" wx:key="item">
-                            <view class="content">
-                                <view class="name">
-                                    <van-icon name="stop" size="10px" />{{item.name}}
+                    </scroll-view>
+                </view>
+            </view>
+            <view class="a" wx:elif="{{tabs.active=='b'}}">
+                <view class="two_1">
+                    <input type="text" value="{{searchInfo.name}}" placeholder="请输入关键词" />
+                </view>
+                <view class="two_2">
+                    <scroll-view scroll-y="true" class="scroll-view">
+                        <view class="list-scroll-view">
+                            <view class="list" wx:for="{{list}}" wx:key="item">
+                                <view class="list_1">
+                                    <view class="name">{{item.name}}</view>
+                                    <view class="brief">{{item.brief}}</view>
+                                    <view class="other">
+                                        <text>{{item.type}}</text>
+                                        <text>来源:{{item.origin}}</text>
+                                    </view>
                                 </view>
-                                <view class="title">{{item.content}}</view>
-                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
-                            </view>
-                            <view class="image" wx:if="{{item.src}}">
-                                <image src="{{item.src}}"></image>
-                            </view>
-                        </view>
-                    </view>
-                    <view wx:if="{{tabs.active=='f'}}">
-                        <view class="list" wx:for="{{list}}" wx:key="item">
-                            <view class="content">
-                                <view class="name">
-                                    <van-icon name="stop" size="10px" />{{item.name}}
+                                <view class="list_2">
+                                    <image class="image" src="{{item.img_url&&item.img_url.length>0?item.img_url[0].url:''}}"></image>
                                 </view>
-                                <view class="title">{{item.content}}</view>
-                                <view class="title">{{item.status=='0'?'其他':'原创'}}<text>来源:{{item.source}}</text></view>
-                            </view>
-                            <view class="image" wx:if="{{item.src}}">
-                                <image src="{{item.src}}"></image>
                             </view>
                         </view>
-                    </view>
+                    </scroll-view>
                 </view>
-            </scroll-view>
+            </view>
         </view>
     </view>
 </mobile-main>

+ 52 - 37
pages/news/index.wxss

@@ -1,67 +1,82 @@
 .main {
-  height: 80.8vh;
+  height: 81.9vh;
 }
-.main .one {
-  width: 100%;
+.main .zero {
+  width: 96vw;
+  margin: 0 0 2vw 0;
+}
+.main .zero:last-child {
+  margin: 0;
+}
+.main .two .a {
+  display: flex;
+  flex-direction: column;
+  height: 74vh;
+}
+.main .two .a .two_1 {
+  background-color: #f1f1f1;
+  width: 92vw;
+  padding: 2vw;
 }
-.main .two {
-  width: 100%;
-  margin: 2px;
+.main .two .a .two_1 input {
+  font-size: 14px;
 }
-.main .thr {
+.main .two .a .two_2 {
   width: 96vw;
   flex-grow: 1;
   position: relative;
-  background-color: #ffffff;
 }
-.main .thr .scroll-view {
+.main .two .a .two_2 .scroll-view {
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
 }
-.main .thr .scroll-view .list-scroll-view {
+.main .two .a .two_2 .scroll-view .list-scroll-view {
   display: flex;
   flex-wrap: wrap;
   align-content: flex-start;
   justify-content: space-between;
 }
-.main .thr .scroll-view .list-scroll-view .list {
-  display: flex;
-  width: 96vw;
-  margin: 10px 0;
-  border-bottom: 0.1px solid #D1CFCF;
-}
-.main .thr .scroll-view .list-scroll-view .list .image {
+.main .two .a .two_2 .scroll-view .list-scroll-view .list {
+  background-color: #ffffff;
+  margin: 0 0 2vw 0;
   display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 30vw;
-}
-.main .thr .scroll-view .list-scroll-view .list .image image {
-  width: 20vw;
-  height: 20vw;
-  border-radius: 5px;
+  flex-direction: row;
+  justify-content: space-between;
+  width: 92vw;
+  padding: 2vw;
 }
-.main .thr .scroll-view .list-scroll-view .list .content {
-  padding: 5px;
+.main .two .a .two_2 .scroll-view .list-scroll-view .list .list_1 {
+  width: 70vw;
 }
-.main .thr .scroll-view .list-scroll-view .list .content .name {
-  font-size: 14px;
+.main .two .a .two_2 .scroll-view .list-scroll-view .list .list_1 .name {
+  font-size: 16px;
   font-weight: bold;
-  padding: 2px 0;
-  list-style: disc;
+  margin: 0 0 1vw 0;
 }
-.main .thr .scroll-view .list-scroll-view .list .content .title {
+.main .two .a .two_2 .scroll-view .list-scroll-view .list .list_1 .brief {
+  margin: 0 0 1vw 0;
   font-size: 12px;
-  color: #666;
-  padding: 2px 0;
-  display: -webkit-box;
+  color: #858585;
   overflow: hidden;
+  text-overflow: ellipsis;
   -webkit-line-clamp: 3;
+  word-break: break-all;
+  display: -webkit-box;
   -webkit-box-orient: vertical;
 }
-.main .thr .scroll-view .list-scroll-view .list .content .title text {
-  padding: 0 10px;
+.main .two .a .two_2 .scroll-view .list-scroll-view .list .list_1 .other {
+  font-size: 14px;
+  color: #858585;
+}
+.main .two .a .two_2 .scroll-view .list-scroll-view .list .list_2 {
+  text-align: right;
+}
+.main .two .a .two_2 .scroll-view .list-scroll-view .list .list_2 .image {
+  width: 100px;
+  height: 100px;
+  overflow: hidden;
+  border-radius: 10px;
 }

+ 39 - 2
pages/order/index.js

@@ -37,6 +37,18 @@ Page({
         const that = this;
         that.setData({ dialog: { title: '详细信息', show: false, type: '1' } })
     },
+    // 退款
+    toRefund: async function (e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        const arr = await app.$post('/newCourt/api/payOrder/toRefund', { id: item._id })
+        if (arr.errcode == '0') {
+            wx.showToast({ title: `退款成功`, icon: 'success', duration: 2000 });
+            that.watchLogin();
+        } else {
+            wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 });
+        }
+    },
     /**
      * 生命周期函数--监听页面加载
      */
@@ -52,12 +64,14 @@ Page({
             success: async res => {
                 const arr = await app.$get(`/newCourt/api/payOrder`);
                 if (arr.errcode == '0') {
-                    for (const val of arr.data) {
+                    let list = arr.data;
+                    for (const val of list) {
                         // 用户信息
                         const user = await app.$get(`/newCourt/api/user/${val.openid}`);
                         if (user.errcode = '0') { val.user_name = user.data.name };
                     }
-                    that.setData({ list: arr.data })
+                    list = list.map(i => ({ ...i, statusZh: this.getStatusZh(i.status) }))
+                    this.setData({ list })
                 }
             },
             fail: res => {
@@ -65,6 +79,29 @@ Page({
             }
         })
     },
+    getStatusZh(status) {
+        let word = "未知"
+        switch (status) {
+            case '0':
+                word = "未支付"
+                break;
+            case '1':
+                word = "支付成功"
+                break;
+            case '-1':
+                word = "支付失败"
+                break;
+            case '-2':
+                word = "申请退款"
+                break;
+            case '-3':
+                word = "已退款"
+                break;
+            default:
+                break;
+        }
+        return word;
+    },
     /**
      * 生命周期函数--监听页面初次渲染完成
      */

+ 6 - 0
pages/order/index.wxml

@@ -17,9 +17,15 @@
                                 <text>支付类型:</text>
                                 <text>{{item.type}}</text>
                             </view>
+                            <view class="other_1">
+                                <text>支付状态:</text>
+                                <text>{{item.statusZh}}</text>
+                            </view>
                         </view>
                         <view class="btn">
                             <button type="primary" size="mini" bindtap="toView" data-item="{{item}}">详细信息</button>
+                            <button type="warn" size="mini" bindtap="toRefund" data-item="{{item}}" wx:if="{{item.status=='1'}}">退款</button>
+
                         </view>
                     </view>
                 </view>

+ 1 - 1
pages/topic/index.wxml

@@ -1,4 +1,4 @@
-<mobile-main frameStyle="{{frameStyle}}" bind:back="back">
+<mobile-main frameStyle="{{frameStyle}}" bind:back="back" bind:tabPath="tabPath">
     <view slot="info" class="container main">
         <view class="zero one">
             <input type="text" value="{{searchInfo.name}}" bindconfirm="search" placeholder="请输入关键词" />