浏览代码

基本功能完成,订单按月按日显示

zhang 4 年之前
父节点
当前提交
fe12de0831

+ 49 - 41
src/components/fankuijilu/fankuijilu.vue

@@ -29,7 +29,8 @@
           <el-table-column prop="stuName" label="姓名" width="200" align="center"></el-table-column>
           <el-table-column prop="tel" label="联系方式" width="270"></el-table-column>
           <el-table-column prop="time" label="时间" width="220"></el-table-column>
-          <el-table-column prop="content" label="内容" width="400" id="content" align="center" widshow-overflow-tooltip></el-table-column>
+          <el-table-column prop="content" label="内容" width="400" id="content" align="center" widshow-overflow-tooltip>
+          </el-table-column>
           <el-table-column label="操作" width="120" id="state">
             <el-button id="show-btn" slot-scope="scope" @click="handleEdit(scope.$index, scope.row)">
               {{scope.row.state}}
@@ -38,7 +39,8 @@
         </el-table>
         <div style="margin-top: 20px" class="table-footer">
           <div class="pages">
-            <el-pagination layout="prev, pager, next" :total="1"></el-pagination>
+            <el-pagination layout="prev, pager, next" :page-size="pageSize" :total="totalCount"
+              @current-change="handleCurrentChange"></el-pagination>
           </div>
         </div>
       </el-col>
@@ -78,22 +80,58 @@
         formLabelWidth: '120px',
         formInline: {
           user: '',
-          options: [{
-            value: '选项1',
-            label: '全部'
-          }, {
-            value: '选项2',
-            label: '黄金糕'
-          }],
           value: '选项1'
         },
         tableData: [],
         multipleSelection: [],
-        // url: 'http://192.168.161.230:9999/tuitionpayment/feedbackmsg/list',  //测试
-        url: 'https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/tuitionpayment/feedbackmsg/list'
+        pageSize: 10,
+        totalCount: 0
       }
     },
+    created: function() {
+      this.user_info = JSON.parse(sessionStorage.getItem('usr_info'))
+      this.user_token = this.user_info.token
+      this.getTableData(this.$Api.fankui,1)
+    },
     methods: {
+      //分页
+      handleCurrentChange(val) {
+        this.currentPage = val;
+        this.tableData = []
+        this.getTableData(this.$Api.fankui, val)
+      },
+      getTableData(url, index) {
+        this.$axios.get(url + '?' + this.$qs.stringify({
+          'curPage': index,
+          'pageSize': this.pageSize
+        }), {
+          headers: {
+            'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
+            'Author': 'codingliang',
+            'admin_token': this.user_token
+          }
+        }).then(res => {
+          console.log(res)
+          this.totalCount = res.data.data.totalCount
+          for (var i = 0; i < res.data.data.list.length; i++) {
+            var list = {}
+            list.id = res.data.data.list[i].feedbackPersonIdentify
+            list.stuName = res.data.data.list[i].feedbackPersonName
+            list.tel = res.data.data.list[i].feedbackPersonPhone
+            list.time = res.data.data.list[i].publishTime
+            list.content = res.data.data.list[i].feedbackInfo
+            if (res.data.data.list[i].status == 2) {
+              list.state = '已处理'
+            } else {
+              list.state = '未处理'
+            }
+            this.tableData.push(list)
+          }
+          console.log(this.tableData)
+        }).catch(err => {
+          console.log(err)
+        })
+      },
       onSubmit() {
         console.log('submit!')
       },
@@ -124,36 +162,6 @@
         console.log(index, row)
       }
     },
-    created: function() {
-      this.user_info = JSON.parse(sessionStorage.getItem('usr_info'))
-      this.user_token = this.user_info.token
-      this.$axios.get(this.url, {
-        headers: {
-          'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
-          'Author': 'codingliang',
-          'admin_token': this.user_token
-        }
-      }).then(res => {
-        console.log(res)
-        for (var i = 0; i < res.data.data.list.length; i++) {
-          var list = {}
-          list.id = res.data.data.list[i].feedbackPersonIdentify
-          list.stuName = res.data.data.list[i].feedbackPersonName
-          list.tel = res.data.data.list[i].feedbackPersonPhone
-          list.time = res.data.data.list[i].publishTime
-          list.content = res.data.data.list[i].feedbackInfo
-          if (res.data.data.list[i].status == 2) {
-            list.state = '已处理'
-          } else {
-            list.state = '未处理'
-          }
-          this.tableData.push(list)
-        }
-        // console.log(this.tableData)
-      }).catch(err => {
-        console.log(err)
-      })
-    }
   }
 </script>
 

+ 30 - 17
src/components/index/Index.vue

@@ -52,7 +52,7 @@
             <div class="tx"></div>
             <div class="user-name">管理员</div>
             <div class="shuxian"></div>
-            <div id="logout"  @click="logout">
+            <div id="logout" @click="logout">
               <div class="logout-btn"></div>
               <div class="user-name">退出</div>
             </div>
@@ -81,7 +81,35 @@
         now_date: '',
       }
     },
+    created: function() {
+      this.user_info = JSON.parse(sessionStorage.getItem('usr_info'))
+      this.determineIdentify()
+      this.getNowDate()
+    },
     methods: {
+      getNowDate(){
+        var _this = this;
+        this.timer = setInterval(function() {
+          var aData = new Date();
+          // console.log(aData) //Wed Aug 21 2019 10:00:58 GMT+0800 (中国标准时间)
+          // this.value = aData.getFullYear() + "-" + (aData.getMonth() + 1) + "-" + aData.getDate();
+          var month = aData.getMonth() < 9 ? "0" + (aData.getMonth() + 1) : aData.getMonth() + 1;
+          var date = aData.getDate() <= 9 ? "0" + aData.getDate() : aData.getDate();
+          var week = "星期" + "日一二三四五六".charAt(aData.getDay());
+          // console.log(aData.getTime())
+          _this.now_date = aData.getFullYear() + "-" + month + "-" + date + ' ' + week + " " + aData.getHours() +
+            ":" + aData.getMinutes() + ":" + aData.getSeconds();
+        }, 1000);
+        // console.log(this.now_date) //2019-8-20
+      },
+      determineIdentify(){
+        // console.log(this.user_info)
+        if( this.user_info == null || this.user_info.userName != 'admin' || this.user_info.password != '123456'){
+          this.$router.push({
+            path: '/jiaofei/'
+          })
+        }
+      },
       onSubmit() {
         console.log('submit!');
       },
@@ -102,22 +130,7 @@
           .catch(_ => {});
       }
     },
-    created: function() {
-      var _this = this;
-      this.timer = setInterval(function() {
-          var aData = new Date();
-          // console.log(aData) //Wed Aug 21 2019 10:00:58 GMT+0800 (中国标准时间)
-          // this.value = aData.getFullYear() + "-" + (aData.getMonth() + 1) + "-" + aData.getDate();
-          var month = aData.getMonth() < 9 ? "0" + (aData.getMonth() + 1) : aData.getMonth() + 1;
-          var date = aData.getDate() <= 9 ? "0" + aData.getDate() : aData.getDate();
-          var week = "星期" + "日一二三四五六".charAt(aData.getDay());
-          // console.log(aData.getTime())
-          _this.now_date = aData.getFullYear() + "-" + month + "-" + date + ' ' + week + " " + aData.getHours() +
-            ":" + aData.getMinutes() + ":" + aData.getSeconds();
-        }, 1000);
-        // console.log(this.now_date) //2019-8-20
-      },
-    }
+  }
 </script>
 
 <style scoped>

+ 4 - 3
src/components/login/Login.vue

@@ -66,15 +66,16 @@
             trigger: 'blur'
           }]
         },
-        // url: 'http://192.168.161.230:9999/tuitionpayment/admininfo/login',  //测试
-        url: 'https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/tuitionpayment/admininfo/login',
         user_info: {}
       };
     },
     methods: {
       onSubmit() {
         // console.log(this.ruleForm.uname)
-        this.$axios.post(this.url + '?' + this.$qs.stringify({
+        this.getLogin(this.$Api.login)
+      },
+      getLogin(url){
+        this.$axios.post(url + '?' + this.$qs.stringify({
             userName: this.ruleForm.uname,
             password: this.ruleForm.upass
             // userName: 'admin',

+ 28 - 8
src/components/orderList/orderList.css

@@ -13,7 +13,8 @@
   display: flex;
   flex-direction: row;
   justify-content: space-between;
-  width: 130px;
+  align-items: center;
+  width: 400px;
 }
 
 #logo {
@@ -94,7 +95,7 @@
 	line-height: 40px;
 }
 
-.shuibiaoId>>>.el-input__inner {
+.selectDate>>>.el-input__inner {
 	width: 240px;
 	height: 40px;
 	border: 1px solid #4D4D4D;
@@ -102,16 +103,12 @@
 	font-size: 20px;
 }
 
-.loudonghao>>>.el-input__inner {
-	width: 181px;
+.order>>>.el-input__inner {
+	width: 240px;
 	height: 40px;
 	border: 1px solid #4D4D4D;
 	border-radius: 4px;
 	font-size: 20px;
-	font-family: Microsoft YaHei-3970(82674968);
-	font-weight: 400;
-	color: #333333;
-	line-height: 54px;
 }
 
 .el-button {
@@ -304,4 +301,27 @@
 .font-color{
   color:#FF520F;
 }
+
+#month{
+  display: flex;
+  flex-direction: column;
+  justify-content: space-around;
+  align-items: center;
+  height: 120px;
+}
+
+.last-row{
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  width: 300px;
+}
+
+.submitBtn{
+  background-color: #298DEF;
+  color: #ffffff;
+  margin: 0px;
+  width: 100px;
+}
+
 /* dev-mgr */

+ 135 - 74
src/components/orderList/orderList.vue

@@ -5,6 +5,12 @@
         <div id="first-left">
           <div id="logo"></div>
           <div class="tag">订单管理</div>
+          <div>
+            <el-select v-model="formInline.value" class="selectDate" placeholder="请选择" @change="selectTime">
+              <el-option v-for="item in formInline.options" :key="item.value" :label="item.label" :value="item.value">
+              </el-option>
+            </el-select>
+          </div>
         </div>
         <div id="first-right">
           <el-button type="primary" class="first-right-btn" @click="downLoadFile">导出已缴表单</el-button>
@@ -15,9 +21,9 @@
     <el-row>
       <el-col :span="24" class="second-row">
         <div class="total_balance">总金额:<span class="all-money">{{all_money}}</span> 元</div>
-        <el-form :inline="true" :model="formInline" class="demo-form-inline">
-          <el-form-item label="关键字:" class="shuibiaoId">
-            <el-input v-model="formInline.user" placeholder="请输入订单号或者班级"></el-input>
+        <el-form :inline="true" class="demo-form-inline">
+          <el-form-item label="关键字:" class="order">
+            <el-input v-model="selectOrder" placeholder="请输入订单号或者班级"></el-input>
           </el-form-item>
           <el-form-item>
             <el-button type="primary" @click="onSubmit">查找</el-button>
@@ -27,8 +33,7 @@
     </el-row>
     <el-row>
       <el-col :span="24" class="third-row">
-        <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
-          @selection-change="handleSelectionChange" highlight-current-row>
+        <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" highlight-current-row>
           <el-table-column label="订单号" width="220" align="center">
             <template slot-scope="scope">{{ scope.row.order }}</template>
           </el-table-column>
@@ -46,11 +51,39 @@
         </el-table>
         <div style="margin-top: 20px" class="table-footer">
           <div class="pages">
-            <el-pagination layout="prev, pager, next" :total="1"></el-pagination>
+            <el-pagination layout="prev, pager, next" :page-size="pageSize" :total="totalCount"
+              @current-change="handleCurrentChange"></el-pagination>
           </div>
         </div>
       </el-col>
     </el-row>
+    <el-row>
+      <el-col :span="24" class="forth-row">
+        <!-- 编辑对话框 -->
+        <el-dialog v-if="selectM" title="请选择月份" :visible.sync="editdialogFormVisible" width="400px" top="0vh"
+          class="my-dialog">
+          <div id="month">
+            <el-date-picker v-model="monthValue" type="month" placeholder="选择月" value-format="yyyy-MM">
+            </el-date-picker>
+            <div class="last-row">
+              <el-button @click="selectMonth" class="submitBtn">确定</el-button>
+              <el-button @click="selectLogout" class="submitBtn">取消</el-button>
+            </div>
+          </div>
+        </el-dialog>
+        <el-dialog v-if="!selectM" title="请选择日期" :visible.sync="editdialogFormVisible" width="400px" top="0vh"
+          class="my-dialog">
+          <div id="month">
+            <el-date-picker v-model="dayValue" type="date" placeholder="选择日期" value-format="yyyy-MM-dd">
+            </el-date-picker>
+            <div class="last-row">
+              <el-button @click="selectDay" class="submitBtn">确定</el-button>
+              <el-button @click="selectLogout" class="submitBtn">取消</el-button>
+            </div>
+          </div>
+        </el-dialog>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
@@ -58,37 +91,108 @@
   export default {
     data() {
       return {
-        editdialogFormVisible: false,
-        delDialogVisible: false,
-        form: {
-          id: 'KB580002652',
-          drom: '18',
-          room: '118'
-        },
-        formLabelWidth: '120px',
+        editdialogFormVisible: false, //月份
+        selectM: true,//显示月份
         formInline: {
           user: '',
           options: [{
-            value: '选项1',
+            value: 'all',
             label: '全部'
           }, {
-            value: '选项2',
-            label: '黄金糕'
+            value: 'month',
+            label: '月'
+          }, {
+            value: 'day',
+            label: '日'
           }],
-          value: '选项1'
+          value: ''
         },
-        tableData: [],
-        multipleSelection: [],
-        user_token: '',
-        all_money: 0,
-        // down_url: 'http://192.168.161.230:9999/tuitionpayment/payorder/downloadResult',  //测试
-        // url: 'http://192.168.161.230:9999/tuitionpayment/payorder/list',  //测试
-        down_url: 'https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/tuitionpayment/payorder/downloadResult',
-        url: 'https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/tuitionpayment/payorder/list',
-        // font_color: [true,false,false,false,false,false,false,false]
+        tableData: [], //订单数据
+        user_token: '', //token
+        all_money: 0, //总钱数
+        pageSize: 10, //每页订单数目
+        totalCount: 0, //总订单数
+        selectOrder: '', //查找订单号或姓名
+        monthValue: '', //选择的月份
+        dayValue: '', //选择的日期
       }
     },
+    created: function() {
+      this.user_info = JSON.parse(sessionStorage.getItem('usr_info'))
+      this.user_token = this.user_info.token
+      this.getTableData(this.$Api.orderList)
+    },
     methods: {
+      //分页
+      handleCurrentChange(val) {
+        this.currentPage = val;
+        this.tableData = []
+        this.getTableData(this.$Api.orderList, val)
+      },
+      //获取订单数据
+      getTableData(url, index) {
+        this.$axios.get(url + '?' + this.$qs.stringify({
+          'curPage': index,
+          'pageSize': this.pageSize
+        }), {
+          headers: {
+            'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
+            'Author': 'codingliang',
+            'admin_token': this.user_token
+          }
+        }).then(res => {
+          // console.log(res)
+          this.totalCount = res.data.data.page.totalCount
+          for (var i = 0; i < res.data.data.page.list.length; i++) {
+            var list = {}
+            list.order = res.data.data.page.list[i].orderNo
+            list.id = res.data.data.page.list[i].payerIdentify
+            list.stuName = res.data.data.page.list[i].studentName
+            list.class = res.data.data.page.list[i].className
+            list.money = res.data.data.page.list[i].orderAmount
+
+            this.all_money += list.money
+
+            list.time = res.data.data.page.list[i].finishTime
+            if (res.data.data.page.list[i].status == 2) {
+              list.state = '支付成功'
+            } else {
+              list.state = '支付失败'
+            }
+            this.tableData.push(list)
+          }
+          // console.log(this.tableData)
+        }).catch(err => {
+          console.log(err)
+        })
+      },
+      //选择时间
+      selectTime(val) {
+        if (val == 'month') {
+          this.editdialogFormVisible = true
+          this.selectM = true
+        } else if (val == 'day') {
+          this.editdialogFormVisible = true
+          this.selectM = false
+        }
+      },
+      //选择月份
+      selectMonth(val) {
+        console.log(this.monthValue)
+        this.formInline.value = this.monthValue
+        this.editdialogFormVisible = false
+      },
+      //选择日期
+      selectDay() {
+        console.log(this.dayValue)
+        this.formInline.value = this.dayValue
+        this.editdialogFormVisible = false
+      },
+      //退出选择
+      selectLogout() {
+        this.editdialogFormVisible = false
+        this.formInline.value = '请重新选择'
+      },
       onSubmit() {
         console.log('submit!')
       },
@@ -107,19 +211,9 @@
           this.$refs.multipleTable.clearSelection()
         }
       },
-      handleSelectionChange(val) {
-        this.multipleSelection = val
-      },
-      handleEdit(index, row) {
-        this.editdialogFormVisible = true
-        console.log(index, row)
-      },
-      handleDelete(index, row) {
-        this.delDialogVisible = true
-        console.log(index, row)
-      },
+      //下载文件
       downLoadFile() {
-        this.$axios.get(this.down_url, {
+        this.$axios.get(this.$Api.orderDownload, {
           headers: {
             'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
             'Author': 'codingliang',
@@ -133,7 +227,7 @@
           console.log(err)
         })
       },
-      //下载文件
+      //下载
       download(data) {
         if (!data) {
           return
@@ -142,45 +236,12 @@
         let link = document.createElement('a')
         link.style.display = 'none'
         link.href = url
-        link.setAttribute('download', 'excel.xlsx')
+        link.setAttribute('download', '订单列表.xlsx')
         document.body.appendChild(link)
         link.click()
       }
     },
-    created: function() {
-      this.user_info = JSON.parse(sessionStorage.getItem('usr_info'))
-      this.user_token = this.user_info.token
-      this.$axios.get(this.url, {
-        headers: {
-          'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
-          'Author': 'codingliang',
-          'admin_token': this.user_token
-        }
-      }).then(res => {
-        console.log(res)
-        for (var i = 0; i < res.data.data.page.list.length; i++) {
-          var list = {}
-          list.order = res.data.data.page.list[i].orderNo
-          list.id = res.data.data.page.list[i].payerIdentify
-          list.stuName = res.data.data.page.list[i].studentName
-          list.class = res.data.data.page.list[i].className
-          list.money = res.data.data.page.list[i].orderAmount
-
-          this.all_money += list.money
 
-          list.time = res.data.data.page.list[i].finishTime
-          if (res.data.data.page.list[i].status == 2) {
-            list.state = '支付成功'
-          } else {
-            list.state = '支付失败'
-          }
-          this.tableData.push(list)
-        }
-        // console.log(this.tableData)
-      }).catch(err => {
-        console.log(err)
-      })
-    }
   }
 </script>
 

+ 55 - 44
src/components/payNameList/payNameList.vue

@@ -47,7 +47,8 @@
         </el-table>
         <div style="margin-top: 20px" class="table-footer">
           <div class="pages">
-            <el-pagination layout="prev, pager, next" :total="1"></el-pagination>
+            <el-pagination layout="prev, pager, next" :page-size="pageSize" :total="totalCount"
+              @current-change="handleCurrentChange"></el-pagination>
           </div>
         </div>
       </el-col>
@@ -81,13 +82,6 @@
         formLabelWidth: '120px',
         formInline: {
           user: '',
-          options: [{
-            value: '选项1',
-            label: '全部'
-          }, {
-            value: '选项2',
-            label: '黄金糕'
-          }],
           value: '选项1'
         },
         tableData: [], //主页数据
@@ -96,10 +90,17 @@
         e_money: '5980',
         user_info: {},
         user_token: '',
-        // url: 'http://192.168.161.230:9999/tuitionpayment/payableinfo/list',  //测试
-        url:'https://jtishfw.ncjti.edu.cn/jiaofei/backendApi/tuitionpayment/payableinfo/list'
+        pageSize: 10,
+        currentPage: 1,
+        totalCount: 0
       }
     },
+    created: function() {
+      this.user_info = JSON.parse(sessionStorage.getItem('usr_info'))
+      this.user_token = this.user_info.token
+      // this.determineIdentify()
+      this.getTableData(this.$Api.paylist)
+    },
     methods: {
       onSubmit() {
         console.log('submit!')
@@ -122,6 +123,13 @@
       handleSelectionChange(val) {
         this.multipleSelection = val
       },
+      //分页
+      handleCurrentChange(val) {
+        this.currentPage = val;
+        this.tableData = []
+        this.getTableData(this.$Api.paylist, val)
+      },
+      //详情页面显示
       handleEdit(index, row) {
         this.editdialogFormVisible = true
         // console.log(index,row)
@@ -136,42 +144,45 @@
       handleDelete(index, row) {
         this.delDialogVisible = true
         console.log(index, row)
-      }
-    },
-    created: function() {
-      this.user_info = JSON.parse(sessionStorage.getItem('usr_info'))
-      // console.log(this.user_info)
-      if( this.user_info == null || this.user_info.userName != 'admin' || this.user_info.password != '123456'){
-        this.$router.push({
-          path: '/jiaofei/'
+      },
+      //判断登录状态
+      determineIdentify() {
+        if (this.user_info == null || this.user_info.userName != 'admin' || this.user_info.password != '123456') {
+          this.$router.push({
+            path: '/jiaofei/'
+          })
+        }
+      },
+      //获取订单列表数据
+      getTableData(url, index) {
+        // console.log(index)
+        this.$axios.get(url + '?' + this.$qs.stringify({
+          'curPage': index
+        }), {
+          headers: {
+            'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
+            'Author': 'codingliang',
+            'admin_token': this.user_token
+          }
+        }).then(res => {
+          console.log(res)
+          this.totalCount = res.data.data.totalCount
+          for (var i = 0; i < res.data.data.list.length; i++) {
+            var list = {} //外层数据
+            list.id = res.data.data.list[i].studentNo
+            list.stuName = res.data.data.list[i].studentName
+            list.institute = res.data.data.list[i].collegeName
+            list.major = res.data.data.list[i].majorName
+            list.class = res.data.data.list[i].className
+            list.money = res.data.data.list[i].realPayAmount
+            list.payItemDetail = res.data.data.list[i].payItemDetail
+            this.tableData.push(list)
+          }
+          console.log(this.tableData)
+        }).catch(err => {
+          console.log(err)
         })
       }
-      this.user_token = this.user_info.token
-      this.$axios.get( this.url, {
-        headers: {
-          'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
-          'Author': 'codingliang',
-          'admin_token': this.user_token
-        }
-      }).then(res => {
-        // console.log(res)
-        // console.log(res.data.data.list.length)
-        for (var i = 0; i < res.data.data.list.length; i++) {
-          var list = {} //外层数据
-          // var list2 = {} //详细数据
-          list.id = res.data.data.list[i].studentNo
-          list.stuName = res.data.data.list[i].studentName
-          list.institute = res.data.data.list[i].collegeName
-          list.major = res.data.data.list[i].majorName
-          list.class = res.data.data.list[i].className
-          list.money = res.data.data.list[i].realPayAmount
-          list.payItemDetail = res.data.data.list[i].payItemDetail
-          this.tableData.push(list)
-        }
-        // console.log(this.tableData)
-      }).catch(err => {
-        console.log(err)
-      })
     }
   }
 </script>

+ 3 - 0
src/main.js

@@ -8,6 +8,7 @@ import 'element-ui/lib/theme-chalk/index.css';
 import echarts from 'echarts'
 import axios from "axios"
 import qs from "qs"
+import Api from "@/interface/index"
 
 // axios.defaults.timeout = 3000 //响应时间
 // axios.defaults.headers.post['Content-Type'] = 'multipart/form-data'; //配置请求头
@@ -16,6 +17,8 @@ import qs from "qs"
 console.log(process.env.NODE_ENV)
 // alert('环境:' + process.env.NODE_ENV)
 
+Vue.prototype.$Api = Api
+
 Vue.use(ElementUI);
 
 Vue.prototype.$qs = qs;