Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
完善我的反馈页面
Browse files Browse the repository at this point in the history
  • Loading branch information
mohuishou committed Mar 7, 2018
1 parent c907e83 commit cca4e6f
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 11 deletions.
6 changes: 6 additions & 0 deletions src/app.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
text: '资讯',
iconPath: 'icon/news.png',
selectedIconPath: 'icon/news@select.png'
},
{
pagePath: 'pages/my/my',
text: '个人中心',
iconPath: 'icon/user.png',
selectedIconPath: 'icon/user@select.png'
}
]
}
Expand Down
Binary file added src/icon/user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/icon/user@select.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions src/pages/exam.wpy
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@

<script>
import wepy from "wepy";
import Empty from "../components/empty";
import Toast from "../components/toast";
import ExamMixin from "../mixins/exam";
import HttpMixin from "../mixins/http";
import ToastMixin from "../mixins/toast";
import DataMixin from "../mixins/data";
import db from "../util/db"
import Empty from "components/empty";
import Toast from "components/toast";
import ExamMixin from "mixins/exam";
import HttpMixin from "mixins/http";
import ToastMixin from "mixins/toast";
import DataMixin from "mixins/data";
import db from "util/db"
export default class Exam extends wepy.page {
config = {
navigationBarTitleText: '考试安排',
Expand Down
18 changes: 18 additions & 0 deletions src/pages/my/feedbackDetail.wpy
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<style lang="less">

</style>

<template>

</template>

<script>
import wepy from "wepy";
import Toast from "components/toast";
import ExamMixin from "mixins/exam";
import HttpMixin from "mixins/http";
import ToastMixin from "mixins/toast";
export default class FeedBackList extends wepy.page {

}
</script>
73 changes: 69 additions & 4 deletions src/pages/my/feedbackList.wpy
Original file line number Diff line number Diff line change
@@ -1,12 +1,77 @@
<style lang="less">

@import "./src/less/config";
page {
background: @bg-color;
}
.lists {
.list {
border: 2rpx solid #eee;
box-shadow: 4rpx 4rpx 10rpx #eee;
margin: 20rpx;
padding: 20rpx;
background: @white;
}
}
</style>

<template>
<view>

<toast :msg.sync="toastMsg" :show.sync="toastShow" :toastType.sync="toastType"></toast>
<view wx:if="{{feedbacks.length > 0}}" class="lists">
<block wx:for="{{feedbacks}}" wx:key="{{index}}">
<view class="list" @tap="to({{item.number}})">{{item.title}}</view>
</block>
</view>
<empty wx:else msg="您暂时没有反馈数据"></empty>
</view>
</template>

<script>
import wepy from "wepy";
export default class FeedBackList extends wepy.page {}
import wepy from "wepy";
import Empty from "components/empty";
import Toast from "components/toast";
import ExamMixin from "mixins/exam";
import HttpMixin from "mixins/http";
import ToastMixin from "mixins/toast";
import DataMixin from "mixins/data";
export default class FeedBackList extends wepy.page {
config = {
navigationBarTitleText: '我的反馈',
enablePullDownRefresh: true,
}
components = {
empty: Empty,
toast: Toast
};
data = {
feedbacks: []
}
mixins = [HttpMixin, ToastMixin, DataMixin];
async get() {
try {
const resp = await this.GET("/user/feedbacks")
this.feedbacks = resp.data
this.$apply()
this.InitSet("feedbacks", resp.data)
} catch (error) {
console.log(error);
}
}
async onPullDownRefresh() {
try {
await this.get()
} catch (error) {
console.log(error);
}
wepy.stopPullDownRefresh()
}
methods = {
to(id) {
console.log(id);
}
}
async onLoad() {
this.Init("feedbacks")
}
}
</script>

0 comments on commit cca4e6f

Please sign in to comment.