wangtao 3 éve
szülő
commit
8b68413128

+ 1 - 1
.env.production

@@ -5,4 +5,4 @@ VUE_APP_TITLE = 永天管理系统
 ENV = 'production'
 
 # 永天管理系统/生产环境
-VUE_APP_BASE_API = '/prod-api'
+VUE_APP_BASE_API = '/dxapi'

+ 2 - 0
src/api/recharge/admin.js

@@ -1,9 +1,11 @@
 import request from '@/utils/request'
 
+
 // 新增
 export function listAdmin(query) {
     return request({
         url: '/system/dept/list',
+        // url: '/dxtop/topRadio/list',
         method: 'get',
         params: query
     })

+ 10 - 1
src/api/recharge/detailed.js

@@ -8,6 +8,15 @@ export function listDetal(data) {
         data: data
     })
 }
+// 修改
+export function updataChannel(data) {
+  console.log(data)
+    return request({
+        url: '/dxtop/order',
+        method: 'put',
+        data: data
+    })
+}
 // 导出
 export function exportDetail(data) {
     return request({
@@ -16,4 +25,4 @@ export function exportDetail(data) {
         data: data,
         responseType: 'blob'
     })
-}
+}

+ 1 - 1
src/layout/components/Navbar.vue

@@ -91,7 +91,7 @@ export default {
         type: 'warning'
       }).then(() => {
         this.$store.dispatch('LogOut').then(() => {
-          location.href = '/index';
+          location.href = '/vuedx/';
         })
       }).catch(() => {});
     }

+ 1 - 1
src/permission.js

@@ -29,7 +29,7 @@ router.beforeEach((to, from, next) => {
         }).catch(err => {
             store.dispatch('LogOut').then(() => {
               Message.error(err)
-              next({ path: '/' })
+              next({ path: '/vuedx/' })
             })
           })
       } else {

+ 17 - 15
src/router/index.js

@@ -26,7 +26,8 @@ import Layout from '@/layout'
  */
 
 // 公共路由
-export const constantRoutes = [{
+export const constantRoutes = [
+    {
         path: '/redirect',
         component: Layout,
         hidden: true,
@@ -116,17 +117,17 @@ export const constantRoutes = [{
 
 
 
-    {
-        path: '',
-        component: Layout,
-        redirect: 'admin',
-        children: [{
-            path: '/recharge/admin',
-            component: (resolve) => require(['@/views/recharge/admin'], resolve),
-            name: '充值管理',
-            meta: { title: '充值管理', icon: 'guanli', noCache: false, affix: false },
-        }, ]
-    },
+    // {
+    //     path: '',
+    //     component: Layout,
+    //     redirect: 'admin',
+    //     children: [{
+    //         path: '/recharge/admin',
+    //         component: (resolve) => require(['@/views/recharge/admin'], resolve),
+    //         name: '充值管理',
+    //         meta: { title: '充值管理', icon: 'guanli', noCache: false, affix: false },
+    //     }, ]
+    // },
     {
         path: '',
         component: Layout,
@@ -163,9 +164,9 @@ export const constantRoutes = [{
     {
         path: '',
         component: Layout,
-        redirect: 'rechargeS',
+        redirect: 'recharge',
         children: [{
-            path: '/recharge/rechargeS',
+            path: '/recharge/recharge',
             component: (resolve) => require(['@/views/recharge/recharge'], resolve),
             name: '用户充值',
             meta: { title: '用户充值', icon: 'chongzhi', noCache: false, affix: false },
@@ -197,6 +198,7 @@ export const constantRoutes = [{
 
 export default new Router({
     mode: 'history', // 去掉url中的#
+    base: '/vuedx',
     scrollBehavior: () => ({ y: 0 }),
     routes: constantRoutes
-})
+})

+ 1 - 1
src/store/modules/user.js

@@ -93,4 +93,4 @@ const user = {
     }
 }
 
-export default user
+export default user

+ 13 - 10
src/views/login.vue

@@ -18,7 +18,7 @@
           <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
         </el-input>
       </el-form-item>
-      <el-form-item prop="code" v-if="captchaOnOff">
+      <!-- <el-form-item prop="code" v-if="captchaOnOff">
         <el-input
           v-model="loginForm.code"
           auto-complete="off"
@@ -31,7 +31,7 @@
         <div class="login-code">
           <img :src="codeUrl" @click="getCode" class="login-code-img"/>
         </div>
-      </el-form-item>
+      </el-form-item> -->
       <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
       <el-form-item style="width:100%;">
         <el-button
@@ -44,9 +44,9 @@
           <span v-if="!loading">登 录</span>
           <span v-else>登 录 中...</span>
         </el-button>
-        <div style="float: right;" v-if="register">
+        <!-- <div style="float: right;" v-if="register">
           <router-link class="link-type" :to="'/register'">立即注册</router-link>
-        </div>
+        </div> -->
       </el-form-item>
     </el-form>
     <!--  底部  -->
@@ -68,8 +68,10 @@ export default {
       codeUrl: "",
       cookiePassword: "",
       loginForm: {
-        username: "admin",
-        password: "admin123",
+        username: "",
+        password: "",
+        // username: "admin",
+        // password: "admin123",
         rememberMe: false,
         code: "",
         uuid: ""
@@ -85,9 +87,9 @@ export default {
       },
       loading: false,
       // 验证码开关
-      captchaOnOff: true,
+      captchaOnOff: false,
       // 注册开关
-      register: true,
+      register: false,
       redirect: undefined
     };
   },
@@ -136,8 +138,9 @@ export default {
             Cookies.remove("password");
             Cookies.remove('rememberMe');
           }
-          this.$store.dispatch("Login", this.loginForm).then(() => {
-            this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
+          this.$store.dispatch("Login", this.loginForm).then((res) => {
+            console.log(this.loginForm)
+            this.$router.push({ path: "/" || "/" }).catch(()=>{});
           }).catch(() => {
             this.loading = false;
             if (this.captchaOnOff) {

+ 2 - 1
src/views/recharge/admin/index.vue

@@ -156,7 +156,7 @@
 </template>
 
 <script>
-import { listAdmin, } from "@/api/recharge/admin";
+import { listAdmin, updataChannel, delChannel, listChannel  } from "@/api/recharge/admin";
 
 export default {
   name: "admin",
@@ -218,6 +218,7 @@ export default {
     getList() {
       this.loading = true;
       listAdmin(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+        console.log(response)
           this.adminList = response.rows;
           // this.total = response.total;
           this.loading = false;

+ 3 - 3
src/views/recharge/channel/index.vue

@@ -38,7 +38,7 @@
           v-hasPermi="['system:admin:add']"
         >新增</el-button>
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="success"
           plain
@@ -58,7 +58,7 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:admin:remove']"
-        >删除</el-button>
+        >删除</el-button> wt注释-->
       </el-col>
       <!-- <el-col :span="1.5">
         <el-button
@@ -302,4 +302,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 77 - 5
src/views/recharge/detailed/index.vue

@@ -28,15 +28,26 @@
           <el-option label="支付宝" :value="3"/>
         </el-select>
       </el-form-item>
+      <el-form-item label="支付状态:" prop="orderFlag">
+        <el-select v-model="queryParams.orderFlag" style="width: 240px" placeholder="请选择支付方式" clearable size="small">
+          <el-option label="未支付" :value="0"/>
+          <el-option label="支付等待中" :value="1"/>
+          <el-option label="支付失败" :value="2"/>
+          <el-option label="卡充值失败" :value="3"/>
+          <el-option label="支付成功" :value="4"/>
+          <el-option label="取消支付" :value="5"/>
+          <el-option label="已成功" :value="6"/>
+        </el-select>
+      </el-form-item>
       <el-form-item label="支付金额:" prop="Money">
-        <el-input-number 
+        <el-input-number
           v-model="queryParams.startMoney"
           clearable
           size="small"
           type="number"
           style="width: 240px"
-          @keyup.enter.native="handleQuery"></el-input-number> ~  
-        <el-input-number 
+          @keyup.enter.native="handleQuery"></el-input-number> ~
+        <el-input-number
           v-model="queryParams.endMoney"
           placeholder=""
           clearable
@@ -75,6 +86,17 @@
       <el-table-column label="姓名" align="center" prop="userName" />
       <el-table-column label="手机号" align="center" prop="userPhone"/>
       <el-table-column label="金额" align="center" prop="money"/>
+      <el-table-column label="支付状态" align="center" prop="orderFlag">
+        <template slot-scope="scope">
+          <span v-if="scope.row.orderFlag == 0" style="color:#909399">未支付</span>
+          <span v-if="scope.row.orderFlag == 1" style="color:#000000">支付等待中</span>
+          <span v-if="scope.row.orderFlag == 2" style="color:#E6A23C">支付失败</span>
+          <span v-if="scope.row.orderFlag == 3" style="color:#F56C6C">卡充值失败</span>
+          <span v-if="scope.row.orderFlag == 4" style="color:#409EFF">支付成功</span>
+          <span v-if="scope.row.orderFlag == 5" style="color:#303133">取消支付</span>
+          <span v-if="scope.row.orderFlag == 6" style="color:#67C23A">已成功</span>
+        </template>
+      </el-table-column>
       <el-table-column label="支付方式" align="center" prop="payType">
         <template slot-scope="scope">
           <span>{{ scope.row.payType == 1 ? '现金支付':scope.row.payType ==2 ? '微信':scope.row.payType ==3 ? '支付宝': '' }}</span>
@@ -86,8 +108,30 @@
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>
       </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
+        <template slot-scope="scope" >
+          <el-button v-if="scope.row.orderFlag ==3" 
+            size="small"
+            type="primary"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['system:admin:edit']"
+          >变更状态</el-button>
+        </template>
+      </el-table-column>
     </el-table>
 
+    <!-- 修改订单状态对话框 -->
+    <!-- <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :before-close="cancel" :close-on-click-modal="false">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px" >
+        <el-form-item label="支付状态标识" prop="orderFlag">
+          <el-input v-model="form.orderFlag" placeholder="支付状态标识" @input="onInput()"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog> -->
     <pagination
       v-show="total>0"
       :total="total"
@@ -99,7 +143,7 @@
 </template>
 
 <script>
-import { listDetal, exportDetail } from "@/api/recharge/detailed";
+import { listDetal, exportDetail, updataChannel } from "@/api/recharge/detailed";
 
 export default {
   name: "admin",
@@ -113,6 +157,10 @@ export default {
       total: 0,
       // 参数表格数据
       adminList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
       // 日期范围
       dateRange: [],
       // 查询参数
@@ -127,16 +175,31 @@ export default {
       },
       // 表单参数
       form: {},
+      // 表单校验
+      rules: {
+        name: [
+          { required: true, message: "渠道名称不能为空", trigger: "blur" }
+        ],
+        aliasName: [
+          { required: true, message: "渠道标识不能为空", trigger: "blur" }
+        ],
+      }
     };
   },
   created() {
     this.getList();
   },
   methods: {
+    //强制el-input刷新
+    onInput(){
+        this.$forceUpdate();
+    },
     /** 查询参数列表 */
     getList() {
       this.loading = true;
+      console.log(this.dateRange)
       listDetal(this.addDateRange(this.queryParams,this.dateRange,'section')).then(response => {
+        console.log(response)
           this.adminList = response.data.records;
           this.total = response.data.total;
           this.loading = false;
@@ -162,6 +225,15 @@ export default {
       this.queryParams.current = 1;
       this.getList();
     },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      Object.assign(this.form, row.id ? this.adminList.find(val=>val.id === row.id) : this.adminList.find(val=>val.id === this.ids[0]))
+      updataChannel(this.form).then(response => {
+        console.log(response)
+        this.msgSuccess("修改成功");
+        this.getList();
+      });
+    },
     /** 重置按钮操作 */
     resetQuery() {
       this.dateRange = [];
@@ -191,4 +263,4 @@ export default {
     },
   }
 };
-</script>
+</script>

+ 9 - 8
src/views/recharge/qrCode/index.vue

@@ -38,7 +38,7 @@
           v-hasPermi="['system:admin:add']"
         >新增</el-button>
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="success"
           plain
@@ -59,7 +59,7 @@
           @click="handleDelete"
           v-hasPermi="['system:admin:remove']"
         >删除</el-button>
-      </el-col>
+      </el-col> wt注释-->
     </el-row>
 
     <el-table v-loading="loading" :data="adminList" @selection-change="handleSelectionChange">
@@ -69,7 +69,7 @@
       <el-table-column label="渠道名称" align="center" prop="topChannelName"/>
       <el-table-column label="二维码" align="center" prop="createBy">
         <template slot-scope="scope">
-          <el-image 
+          <el-image
             v-if="scope.row.qrPath"
             style="width: 24px; height: 24px"
             :preview-src-list="['data:image/gif;base64,' + scope.row.qrPath]"
@@ -116,8 +116,8 @@
         <el-form-item label="二维码名称" prop="name">
           <el-input v-model="form.name" placeholder="请输入二维码名称" />
         </el-form-item>
-        <el-form-item label="渠道名称" prop="topChannelName">
-          <el-select v-model="form.topChannelName" placeholder="请选择渠道名称" clearable style="width:100%">
+        <el-form-item label="渠道名称" prop="topChannelId">
+          <el-select v-model="form.topChannelId"  placeholder="请选择渠道名称" clearable style="width:100%">
             <el-option
               v-for="dict in channelList"
               :key="dict.id"
@@ -210,6 +210,7 @@ export default {
         ids: undefined,
         name: undefined,
         topChannelName: undefined,
+        topChannelId:undefined
       };
       this.resetForm("form");
     },
@@ -245,11 +246,11 @@ export default {
     },
     /** 提交按钮 */
     submitForm(row) {
-      console.log(this.form)
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != undefined) {
             updataCode(this.form).then(response => {
+              console.log(response)
               this.msgSuccess("修改成功");
               this.open = false;
               this.getList();
@@ -271,7 +272,7 @@ export default {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
-        }).then(function() {
+        }).then(function(res) {
           return delCode(ids);
         }).then(() => {
           this.getList();
@@ -280,4 +281,4 @@ export default {
     },
   }
 };
-</script>
+</script>

+ 3 - 3
src/views/recharge/radio/index.vue

@@ -38,7 +38,7 @@
           v-hasPermi="['system:admin:add']"
         >新增</el-button>
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="success"
           plain
@@ -59,7 +59,7 @@
           @click="handleDelete"
           v-hasPermi="['system:admin:remove']"
         >删除</el-button>
-      </el-col>
+      </el-col> wt注释-->
       <!-- <el-col :span="1.5">
         <el-button
           type="warning"
@@ -119,7 +119,7 @@
           <el-input v-model="form.identity" placeholder="请输入身份信息" />
         </el-form-item>
         <el-form-item label="充值到账比例" prop="proportion">
-          <el-input v-model="form.proportion" placeholder="请输入充值到账比例" />
+          <el-input v-model="form.proportion" placeholder="请输入充值到账比例(例:0.95)" />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">

+ 6 - 1
src/views/recharge/reportForm/index.vue

@@ -87,12 +87,17 @@ export default {
   },
   created() {
     this.getList();
+    let a = 0.1+0.2
+    console.log(a.toFixed(2))
+    
   },
   methods: {
     /** 查询参数列表 */
     getList() {
       this.loading = true;
+      console.log(this.queryParams.type)
       listReport(this.addDateRange(this.queryParams,this.dateRange,'section')).then(response => {
+        console.log(response)
           this.adminList = response.data.records.map(val=>{
             return {
               ...val,
@@ -138,4 +143,4 @@ export default {
     },
   }
 };
-</script>
+</script>

+ 1 - 1
src/views/redirect.vue

@@ -5,7 +5,7 @@ export default {
     const { path } = params
     this.$router.replace({ path: '/' + path, query })
   },
-  render: function(h) { 
+  render: function(h) {
     return h() // avoid warning message
   }
 }

+ 9 - 9
src/views/system/dept/index.vue

@@ -57,17 +57,17 @@
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button 
-            size="mini" 
-            type="text" 
-            icon="el-icon-edit" 
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['system:dept:edit']"
           >修改</el-button>
-          <el-button 
-            size="mini" 
-            type="text" 
-            icon="el-icon-plus" 
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-plus"
             @click="handleAdd(scope.row)"
             v-hasPermi="['system:dept:add']"
           >新增</el-button>
@@ -314,4 +314,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 4 - 3
src/views/system/notice/index.vue

@@ -222,11 +222,12 @@ export default {
         noticeType: [
           { required: true, message: "公告类型不能为空", trigger: "change" }
         ]
-      }
+      },
     };
   },
   created() {
-    this.getList();
+    // this.getList();
+    this.loading = false;
     this.getDicts("sys_notice_status").then(response => {
       this.statusOptions = response.data;
     });
@@ -336,4 +337,4 @@ export default {
     }
   }
 };
-</script>
+</script>

+ 15 - 3
vue.config.js

@@ -16,7 +16,7 @@ module.exports = {
     // 部署生产环境和开发环境下的URL。
     // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
     // 例如 https://www.yongtian.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.yongtian.vip/admin/,则设置 baseUrl 为 /admin/。
-    publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
+    publicPath: process.env.NODE_ENV === "production" ? "/vuedx" : "/vuedx",
     // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
     outputDir: 'dist',
     // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
@@ -29,11 +29,12 @@ module.exports = {
     devServer: {
         host: '0.0.0.0',
         port: port,
-        open: true,
+        open: false,
         proxy: {
             // detail: https://cli.vuejs.org/config/#devserver-proxy
             [process.env.VUE_APP_BASE_API]: {
-                target: `http://172.16.120.104:8085`,
+                target: 'https://wx.ewoogi.com/dxapi/',
+                // target: `http://172.16.120.104:8085`,
                 changeOrigin: true,
                 pathRewrite: {
                     ['^' + process.env.VUE_APP_BASE_API]: ''
@@ -48,6 +49,17 @@ module.exports = {
             alias: {
                 '@': resolve('src')
             }
+        },
+        performance: {
+            hints: 'warning',
+            // 入口起点的最大体积
+            maxEntrypointSize: 50000000,
+            // 生成文件的最大体积
+            maxAssetSize: 30000000,
+            // 只给出 js 文件的性能提示
+            assetFilter: function(assetFilename) {
+                return assetFilename.endsWith('.js')
+            }
         }
     },
     chainWebpack(config) {