Browse Source

错误脚本删除

zweizhao 7 years ago
parent
commit
8b6ec4e439

+ 2 - 1
package.json

@@ -5,7 +5,8 @@
   "scripts": {
     "serve": "vue-cli-service serve",
     "build": "vue-cli-service build",
-    "release": "npm run build && git add . && git cm 'build & release' && git push"
+    "release": "npm run build && git add . && git cm 'build & release' && git push",
+    "gac": "git add .;git cm '$1'; git push"
   },
   "dependencies": {
     "axios": "^0.18.0",

+ 0 - 75
src/module/login/index.vue

@@ -1,75 +0,0 @@
-<template>
-  <div id="login">
-    <h1>程序员客栈 - BOSS</h1>
-    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="ruleForm">
-      <el-form-item label="账号" prop="webmaster">
-        <el-input v-model="ruleForm.webmaster" placeholder="请输入账号"></el-input>
-      </el-form-item>
-      <el-form-item label="密码" prop="password">
-        <el-input v-model="ruleForm.password" type="password" placeholder="请输入密码"></el-input>
-      </el-form-item>
-      <el-form-item label="口令" prop="cypher">
-        <el-input
-          v-model="ruleForm.cypher"
-          type="password"
-          placeholder="请输入口令"
-          @keyup.native.enter="submit"
-        ></el-input>
-      </el-form-item>
-      <el-form-item>
-        <el-button style="width: 100%;" type="primary" @click="submit">登录</el-button>
-      </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      ruleForm: {
-        // 账号
-        webmaster: '',
-        // 密码
-        password: '',
-        // 口令,格式:inn月日,无 0
-        cypher: '',
-      },
-      rules: {
-        webmaster: [
-          { required: true, message: '请输入账号', trigger: 'blur' },
-        ],
-        password: [
-          { required: true, message: '请输入密码', trigger: 'change' },
-          { min: 6, message: '长度在 6 个字符以上', trigger: 'blur' },
-        ],
-        cypher: [
-          { required: true, message: '请输入账号', trigger: 'blur' },
-        ],
-      }
-    }
-  },
-  methods: {
-    async submit() {
-      // this.$router.replace('/main')
-      // return
-      const { webmaster, password, cypher } = this.ruleForm
-      const res = await this.$post('/api/admin/index/login', { webmaster, password, cypher })
-      console.log(res)
-      if(res && res.status) this.$router.replace('/main')
-    }
-  }
-}
-</script>
-
-<style>
-#login {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  margin-top: 200px;
-}
-.ruleForm {
-  width: 550px;
-}
-</style>

+ 0 - 13
src/module/main/components/404.vue

@@ -1,13 +0,0 @@
-<template>
-	<section id="error-page">
-    <span>页面飞了……</span>
-  </section>
-</template>
-
-<style>
-  #error-page {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-  }
-</style>

+ 0 - 210
src/module/main/components/cloud_balance.vue

@@ -1,210 +0,0 @@
-<template>
-  <div id="cloud-balance">
-    <div class="table">
-      <el-table
-        v-if="tableData.length"
-        height="100%"
-        border
-        style="width: 100%"
-        :data="tableData"
-        :row-class-name="tableRowClassName"
-      >
-        <el-table-column
-          v-for="(prop, index) of tableProps"
-          :key="index"
-          :width="tableWidths[index]"
-          :prop="prop"
-          :label="tableHeaders[index]"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              v-if="prop === 'id'"
-              @click="clickOrder(scope.row)"
-            >{{scope.row[prop]}}</el-button>
-            <el-button
-              type="text"
-              v-else-if="prop === 'job_id'"
-              @click="clickJobID(scope.row[prop])"
-            >{{scope.row[prop]}}</el-button>
-            <el-button
-              type="text"
-              v-else-if="prop === 'company'"
-              @click="clickCompany(scope.row['uid'])"
-            >{{scope.row[prop]}}</el-button>
-            <el-button
-              type="text"
-              v-else-if="prop === 'operate'"
-              @click="clickOperate(scope.row)"
-            >{{scope.row[prop]}}</el-button>
-            <el-button
-              type="text"
-              v-else-if="prop === 'dev_realname'"
-              @click="clickDev(scope.row['developer_uid'])"
-            >{{scope.row[prop]}}</el-button>
-            <span v-else-if="prop === 'payAround'" v-html="scope.row[prop]"/>
-            <span v-else>{{scope.row[prop]}}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <el-pagination
-      @current-change="getTableData"
-      :current-page.sync="currentPage"
-      :page-size="20"
-      layout="total, prev, pager, next"
-      :total="totalCount"
-    ></el-pagination>
-  </div>
-</template>
-
-<script>
-const tableHeaders = [
-  '账单ID',
-  '项目ID',
-  '企业方',
-  '开发者',
-  '核定价格',
-  '托管费用',
-  "押金",
-  "次月托管",
-  '试用天数',
-  '结算周期',
-  '结算金额',
-  '退回金额',
-  '预计发薪',
-  '发薪日期',
-  '状态',
-  '负责人',
-  '操作',
-  '备注',
-  '项目状态',
-]
-const tableProps = [
-  'id',
-  'job_id',
-  'company',
-  'dev_realname',
-  'salary',
-  'company_pay',
-  'company_pay',
-  'company_pay',
-  'probation_days',
-  'payAround',
-  'pay_to_dev',
-  'return_money',
-  'pre_send_salary_timeShow', //
-  'send_salary_time',
-  'p_status_name',
-  'chk_user',
-  'operate',
-  'settle_msg',
-  'j_status_name'
-]
-const tableWidths = [
-  '80',
-  '80',
-  '100',
-  '100',
-  '80',
-  '80',
-  '80',
-  '80',
-  '80',
-  '100',
-  '80',
-  '80',
-  '90',
-  '80',
-  '80',
-  '100',
-  '80',
-  '180',
-  '80',
-]
-
-export default {
-  data() {
-    return {
-      // 数据总条目
-      totalCount: 0,
-      currentPage: 1,
-      // 列表宽度
-      tableWidths,
-      // 列表头显示内容
-      tableHeaders,
-      // 列表头字段
-      tableProps,
-      // 列表数据
-      tableData: []
-    }
-  },
-  mounted() {
-    this.getTableData()
-  },
-  methods: {
-    // 点击操作
-    clickOperate({ job_id, id }) {
-      // todo period_id mean what?
-      window.open(`https://www.proginn.com/rooter/wagesettlement?job_id=${job_id}&period_id=${id}`);
-    },
-    // 点击账单
-    clickOrder(i) {
-      window.open(`https://www.proginn.com/rooter/wagedetails?job_id=${i.job_id}&period_id=${i.id}`)
-    },
-    // 点击开发者
-    clickDev(uid) {
-      window.open(`https://www.proginn.com/rooter/user/${uid}`)
-    },
-    // 点击企业
-    clickCompany(uid) {
-      window.open(`https://www.proginn.com/rooter/user/${uid}`)
-    },
-    // 点击用户的 uid
-    clickJobID(jobID) {
-      window.open(`https://www.proginn.com/rooter/cloudjobitem/${jobID}`)
-    },
-    // 点击重试
-    async clickRetry(id) {
-      const res = await this.$post('/api/admin/payment/redoDraw', { id })
-      // console.log(res)
-    },
-    // 根据状态显示图表样式
-    tableRowClassName({ row, rowIndex }) {
-      // console.log({row, rowIndex})
-      let className = ''
-      if(row.j_status_name === '结束合作') className = 'end-row'
-      // console.log(className)
-      return className
-    },
-    // 格式化列表数据
-    formatTableData(data) {
-      return data.map(i => ({
-        ...i,
-        payAround: `${i.start_time}<br>${i.end_time}`,
-        pre_send_salary_timeShow: new Date(i.pre_send_salary_time * 1000).toLocaleDateString(),
-      }))
-    },
-    // 获取列表数据
-    async getTableData(page = 1) {
-      this.tableData = []
-      const res = await this.$post('/api/admin/job/get_all_periods', { page }) // /api/admin/job/jobs {status: 0, p:1} /api/admin/job/job_status_map
-      // console.log(res)
-      const data = res.data
-      this.tableData = this.formatTableData(data.list)
-      // // console.log(this.tableData)
-      this.totalCount = Number(data.total)
-      this.totalPage = data.totalPage
-    }
-  }
-}
-</script>
-
-<style>
-#cloud-balance .table {
-  height: calc(100% - 40px);
-}
-#cloud-balance .end-row {
-  background: rgba(0, 0, 0, .1);
-}
-</style>

+ 0 - 236
src/module/main/components/cloud_developer.vue

@@ -1,236 +0,0 @@
-<template>
-  <section id="cloud-devaloper">
-    <el-button @click="goAddVer">添加认证</el-button>
-    <div class="table">
-      <el-table v-if="tableData.length" height="100%" border style="width: 100%" :data="tableData" :row-class-name="tableRowClassName">
-        <el-table-column v-for="(prop, index) of tableProps" :key="index" :prop="prop" :label="tableHeaders[index]">
-          <template slot-scope="scope">
-            <el-button type="text" v-if="prop === 'ctrl'" @click="clickDelete(scope.row['uid'])">{{scope.row[prop]}}</el-button>
-            <el-button type="text" v-else-if="prop === 'nickname'" @click="clickDetail(scope.row['uid'])">{{scope.row[prop]}}</el-button>
-            <span v-else>{{scope.row[prop]}}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <el-dialog title="收货地址" :visible.sync="dialogFormVisible">
-      <el-form :model="form" :rules="rules" ref='roleForm'>
-        <el-form-item label="用户 UID" label-width="120px" prop="uid">
-          <el-input v-model="form.uid"></el-input>
-        </el-form-item>
-        <el-form-item label="培训状态" label-width="120px" prop="train_state">
-          <el-select v-model="form.train_state" placeholder="请选择培训状态">
-            <el-option v-for="(state, index) of states" :key="index" :label="state" :value="index" />
-          </el-select>
-        </el-form-item>
-        <el-form-item label="自由职业" label-width="120px" prop="freelancer">
-          <el-select v-model="form.freelancer" placeholder="请选择自由职业状态">
-            <el-option label="是" :value="1"></el-option>
-            <el-option label="否" :value="0"></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="备注" label-width="120px">
-          <el-input v-model="form.note" type="textarea"></el-input>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="dialogFormVisible = false">取 消</el-button>
-        <el-button type="primary" @click="addVer('roleForm')">确 定</el-button>
-      </div>
-    </el-dialog>
-    <el-pagination @current-change="changePagination" :current-page.sync="currentPage" :page-size="20" layout="total, prev, pager, next"
-      :total="totalCount"></el-pagination>
-  </section>
-</template>
-
-<script>
-const tableHeaders = [
-  "ID",
-  "昵称",
-  "自由职业",
-  "最低时长",
-  "当前状态",
-  "职业方向",
-  "技能",
-  "城市",
-  "工龄",
-  "接单情况",
-  "认证时间",
-  "备注",
-  "操作"
-]
-
-const tableProps = [
-  "uid",
-  "nickname",
-  "freelancer",
-  "cloud_job_min_work_time",
-  "on_projectShow",
-  "direction_name",
-  "skillStr",
-  "city_name",
-  "work_year_op",
-  "countDevelopProjectStr",
-  "cloud_job_verify_timeStr",
-  "cloud_job_verify_note",
-  "ctrl"
-]
-
-const apis = {
-  getTrainStates: `/api/admin/common/get_cloud_job_verify_train_state`,
-  delete: `/api/admin/user/cancel_cloud_verify`,
-  addVer: `/api/admin/user/add_cloud_verify`,
-  dataList: `/api/admin/user/get_cloud_verify_list`,
-}
-
-// 获取当前状态
-const getOnProjectShow = i => {
-  let str = ''
-  if(i.on_project === 0 && i.on_hire === 0 & i.on_job === 0 && i.work_status === 1) str = '空闲'
-  else {
-    if(i.on_project) str = '项目'
-    else if(i.on_hire) str = '雇佣'
-    else if(i.on_job) str = '云端'
-    else if(!i.work_status) str = '不接单'
-  }
-  return str
-}
-
-export default {
-  data() {
-    return {
-      // 培训状态
-      states: [],
-      // 表单验证
-      rules: {
-        uid: [
-          { required: true, message: '请输入 UID', trigger: 'blur' },
-        ],
-        train_state: [
-          { required: true, message: '请选择活动区域', trigger: 'change' }
-        ],
-        freelancer: [
-          { required: true, message: '请选择活动区域', trigger: 'change' }
-        ],
-        // note: [
-        //   { required: true, message: '请输入备注', trigger: 'blur' },
-        // ],
-      },
-      // 表单
-      form: {},
-      // 显示 dislog
-      dialogFormVisible: false,
-      // 筛选状态
-      statuses: [],
-      // 数据总条目
-      totalCount: 0,
-      currentPage: 1,
-      // 列表头显示内容
-      tableHeaders,
-      // 列表头字段
-      tableProps,
-      // 列表数据
-      tableData: []
-    }
-  },
-  mounted() {
-    this.getTableData()
-    this.getTrainStates()
-  },
-  methods: {
-    // 点击认证提交
-    addVer(formName) {
-      this.$refs[formName].validate(async (valid) => {
-        if (valid) {
-          await this.$post(apis.addVer, this.form)
-          this.dialogFormVisible = false
-          this.getTableData()
-        } else {
-          return false
-        }
-      })
-    },
-    // 点击删除
-    clickDelete(uid) {
-      this.$confirm(`确认删除 uid 为${uid}?`)
-        .then(async _ => {
-          await this.$post(apis.delete, {
-            uid
-          })
-          this.getTableData()
-        })
-        .catch(_ => {})
-    },
-    // 添加认证
-    goAddVer() {
-      this.dialogFormVisible = true
-    },
-    // 点击详情
-    clickDetail(uid) {
-      window.open(`/rooter/user/${uid}`)
-    },
-    // 根据状态显示图表样式
-    tableRowClassName({
-      row,
-      rowIndex
-    }) {
-      // console.log({row, rowIndex})
-      let className = ""
-      if (row.status === "1") className = "success-row"
-      return className
-    },
-    // 格式化列表数据
-    formatTableData(data, resData) {
-      const userSkills = resData.userSkills
-      return data.map(i => {
-        const uid = i.uid
-        const countDevelopProject = (resData.countDevelopProject[uid] || 0) + (resData.countManageProject[uid] || 0)
-        const countHire = resData.countHire[uid] || 0
-        const countJob = resData.countJob[uid] || 0
-        const cloudJobVerifyTime = i.cloud_job_verify_time * 1000
-        return {
-          ...i,
-          on_projectShow: getOnProjectShow(i),
-          skillStr: userSkills[i.uid].join(','),
-          countDevelopProjectStr: `项目:${countDevelopProject},雇佣:${countHire},云端:${countJob}`,
-          cloud_job_verify_timeStr: cloudJobVerifyTime > 0 ? new Date(cloudJobVerifyTime).toLocaleDateString() : '--',
-          ctrl: "删除"
-        }
-      })
-    },
-    // 页码变动
-    changePagination(page) {
-      this.getTableData()
-    },
-    // 获取培训状态列表
-    async getTrainStates() {
-      const res = await this.$post(apis.getTrainStates)
-      if(res) {
-        // console.log(res.data)
-        this.states = res.data
-      }
-    },
-    // 获取列表数据
-    async getTableData(status = 0) {
-      this.tableData = []
-      const p = this.currentPage
-      const res = await this.$post(apis.dataList, {
-        p
-      })
-      // console.log(res.data.data)
-      const data = res.data.data
-      const list = data.list
-      this.tableData = this.formatTableData(list, data)
-      this.totalCount = Number(data.total)
-      this.totalPage = data.totalPage
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-#cloud-devaloper {
-  .table {
-    height: calc(100% - 80px);
-  }
-}
-</style>

+ 0 - 153
src/module/main/components/cloud_job.vue

@@ -1,153 +0,0 @@
-<template>
-  <div id="cloud-job">
-    <el-select v-model="selected" @change="changeSelect" placeholder="筛选">
-      <el-option v-for="(item, index) of statuses" :key="index" :label="item" :value="index">
-        <span>{{item}}</span>
-      </el-option>
-    </el-select>
-    <div class="table">
-      <el-table
-        v-if="tableData.length"
-        height="100%"
-        border
-        style="width: 100%"
-        :data="tableData"
-        :row-class-name="tableRowClassName"
-      >
-        <el-table-column
-          v-for="(prop, index) of tableProps"
-          :key="index"
-          :prop="prop"
-          :label="tableHeaders[index]"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              v-if="prop === 'ctrl'"
-              @click="clickDetail(scope.row['id'])"
-            >{{scope.row[prop]}}</el-button>
-            <span v-else-if="prop === 'status'">{{scope.row['statusName']}}</span>
-            <span v-else>{{scope.row[prop]}}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <el-pagination
-      @current-change="changePagination"
-      :current-page.sync="currentPage"
-      :page-size="20"
-      layout="total, prev, pager, next"
-      :total="totalCount"
-    ></el-pagination>
-  </div>
-</template>
-
-<script>
-const tableHeaders = [
-  "企业方",
-  "名称",
-  "地点",
-  "简介",
-  "核定价格/预算区间",
-  "已完成月数",
-  "用户来源",
-  "审核人员",
-  "创建时间",
-  "状态",
-  "操作"
-];
-const tableProps = [
-  "nickname",
-  "title",
-  "address",
-  "description",
-  "salary",
-  "work_hours",
-  "remark_user_from",
-  "remark_checked_user",
-  "createTime",
-  "status",
-  "ctrl"
-];
-
-export default {
-  data() {
-    return {
-      // 筛选状态
-      statuses: [],
-      selected: "",
-      // 数据总条目
-      totalCount: 0,
-      currentPage: 1,
-      // 列表头显示内容
-      tableHeaders,
-      // 列表头字段
-      tableProps,
-      // 列表数据
-      tableData: []
-    };
-  },
-  mounted() {
-    this.getFilters();
-  },
-  methods: {
-    // 筛选框变动
-    changeSelect(index) {
-      this.currentPage = 1;
-      this.getTableData(index);
-    },
-    // 获取筛选
-    async getFilters() {
-      const res = await this.$post("/api/admin/job/job_status_map");
-      const data = res.data;
-      this.statuses = data || [];
-      if (data.length) this.selected = data[0];
-      this.getTableData();
-    },
-    // 点击详情
-    clickDetail(id) {
-      window.open(`/rooter/cloudjobitem/${id}`);
-    },
-    // 根据状态显示图表样式
-    tableRowClassName({ row, rowIndex }) {
-      // console.log({row, rowIndex})
-      let className = "";
-      if (row.status === "1") className = "success-row";
-      return className;
-    },
-    // 格式化列表数据
-    formatTableData(data) {
-      return data.map(i => ({
-        ...i,
-        nickname: i.companyUser.nickname,
-        ctrl: "详情"
-      }));
-    },
-    // 页码变动
-    changePagination(page) {
-      this.getTableData();
-    },
-    // 获取列表数据
-    async getTableData(status = 0) {
-      this.tableData = []
-      const p = this.currentPage;
-      const res = await this.$post("/api/admin/job/jobs", { p, status });
-      // console.log(res)
-      const data = res.data;
-      const list = data.list;
-      this.tableData = this.formatTableData(list);
-      this.totalCount = Number(data.total);
-      this.totalPage = data.totalPage;
-    }
-  }
-};
-</script>
-
-<style lang='less' scoped>
-#cloud-job {
-  .table {
-    height: 100%;
-    height: calc(100% - 80px);
-  }
-}
-</style>

+ 0 - 247
src/module/main/components/dev_show.vue

@@ -1,247 +0,0 @@
-<template>
-  <div id="cloud-balance">
-    <el-button @click="clickAdd">添加</el-button>
-    <div class="table">
-      <el-table
-        v-if="tableData.length"
-        height="100%"
-        border
-        style="width: 100%"
-        :data="tableData"
-        :row-class-name="tableRowClassName"
-      >
-        <el-table-column
-          v-for="(prop, index) of tableProps"
-          :key="index"
-          :prop="prop"
-          align="center"
-          :label="tableHeaders[index]"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              v-if="prop === 'uid'"
-              @click="clickUID(scope.row)"
-            >{{scope.row[prop]}}</el-button>
-            <img
-              v-else-if="prop === 'url'"
-              :src="scope.row[prop]"
-              alt="url"
-              style="display: block; width: 100px; height: 80px;"
-            >
-            <section class="ctrls" v-else-if="prop === 'ctrls'">
-              <el-button type="text" @click="clickEdit(scope.$index, scope.row)">编辑</el-button>
-              <el-button type="text" @click="clickDel(scope.$index, scope.row)">删除</el-button>
-            </section>
-            <span v-else>{{scope.row[prop]}}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <el-dialog title="添加展示" :visible.sync="centerDialogVisible" width="50%" center>
-      <el-form
-        :model="ruleForm"
-        :rules="rules"
-        ref="ruleForm"
-        label-width="100px"
-        class="demo-ruleForm"
-      >
-        <el-form-item label="UID" prop="uid">
-          <el-input type="number" v-model="ruleForm.uid" :disabled="isEdit"></el-input>
-        </el-form-item>
-        <el-form-item label="排序" prop="order">
-          <el-input type="number" v-model="ruleForm.order"></el-input>
-        </el-form-item>
-        <el-form-item label="配图" prop="url">
-          <el-upload
-            class="avatar-uploader"
-            action="/api/admin/developer/uploadImg"
-            :show-file-list="false"
-            :on-success="handleAvatarSuccess"
-            :before-upload="beforeAvatarUpload"
-          >
-            <img v-if="ruleForm.url" :src="ruleForm.url" class="avatar">
-            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-          </el-upload>
-        </el-form-item>
-      </el-form>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="centerDialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="clickSubmit">确 定</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-
-const tableHeaders = [
-  'ID',
-  '昵称',
-  '排序',
-  '配图',
-  '添加时间',
-  '操作',
-]
-const tableProps = [
-  'uid',
-  'nickname',
-  'order',
-  'url',
-  'create_date',
-  'ctrls',
-]
-
-export default {
-  data() {
-    return {
-      // 是否是编辑入口
-      isEdit: false,
-      ruleForm: {},
-      rules: {
-        id: [
-          { required: true, message: '请填写开发者ID', trigger: 'blur' },
-        ],
-        url: [
-          { type: 'string', required: true, message: '请上传配图', trigger: 'change' }
-        ],
-      },
-      // 弹框
-      centerDialogVisible: false,
-      // 数据总条目
-      totalCount: 0,
-      currentPage: 1,
-      // 列表头显示内容
-      tableHeaders,
-      // 列表头字段
-      tableProps,
-      // 列表数据
-      tableData: []
-    }
-  },
-  mounted() {
-    this.getTableData()
-  },
-  methods: {
-    // 点击新增或编辑框的确认
-    async clickSubmit() {
-      let url = '/api/admin/developer/addRecommendDeveloper';
-      if(this.isEdit) url = '/api/admin/developer/editRecommendDeveloper';
-      const res = await this.$post(url, this.ruleForm);
-      const data = res.data;
-      this.getTableData();
-      this.centerDialogVisible = false;
-    },
-    // 点击添加
-    clickAdd() {
-      this.ruleForm = {};
-      this.isEdit = false;
-      this.centerDialogVisible = true;
-    },
-    handleAvatarSuccess(res, file) {
-      // this.ruleForm.url = res.data.file_url_abs;
-      this.$set(this.ruleForm, 'url', res.data.file_url_abs);
-    },
-    beforeAvatarUpload(file) {
-      const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
-      const isLt2M = file.size / 1024 / 1024 < 2;
-
-      if(!isJPG) {
-        this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
-      }
-      if(!isLt2M) {
-        this.$message.error('上传头像图片大小不能超过 2MB!');
-      }
-      return isJPG && isLt2M;
-    },
-    // 点击删除
-    clickDel(i, item) {
-      const id = item.id
-      this.$confirm('此操作将永久删除, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(async () => {
-        const res = await this.$post('/api/admin/developer/deleteRecommendDeveloper', { id });
-        if(!res) return;
-        this.$message({
-          type: 'success',
-          message: '删除成功!'
-        });
-        this.getTableData()
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
-    // 点击编辑
-    clickEdit(i, {uid, order, url, id}) {
-      // 获取编辑信息, 现在自带的全, 暂时不用了
-      // 接口:/api/admin/developer/getRecommendDeveloper
-      // 参数:id int 列表每条记录的id(不是uid)
-      this.ruleForm = { uid, order, url, id };
-      this.isEdit = true;
-      this.centerDialogVisible = true;
-    },
-    // 点击用户
-    clickUID(i) {
-      window.open(i.seo_uri)
-    },
-    // 根据状态显示图表样式
-    tableRowClassName({ row, rowIndex }) {
-      let className = ''
-      if(row.p_status_name === '已结算') className = 'success-row'
-      return className
-    },
-    // 格式化列表数据
-    formatTableData(data) {
-      return data.map(i => ({
-        ...i,
-      }))
-    },
-    // 获取列表数据
-    async getTableData(page = 1) {
-      this.tableData = []
-      const res = await this.$post('/api/admin/developer/getRecommendList', { page, page_size: 9 }) // page_size 解决一个迷 bug, 后端要求添加
-      // console.log(res)
-      const data = res.data.list
-      this.tableData = this.formatTableData(data)
-      this.totalCount = Number(data.total)
-      this.totalPage = data.totalPage
-    }
-  }
-}
-</script>
-
-<style lang='less' scoped>
-#cloud-balance {
-  .table {
-    height: calc(100% - 40px);
-  }
-  .avatar-uploader .el-upload {
-    border: 1px dashed #d9d9d9;
-    border-radius: 6px;
-    cursor: pointer;
-    position: relative;
-    overflow: hidden;
-  }
-  .avatar-uploader .el-upload:hover {
-    border-color: #409eff;
-  }
-  .avatar-uploader-icon {
-    font-size: 28px;
-    color: #8c939d;
-    width: 178px;
-    height: 178px;
-    line-height: 178px;
-    text-align: center;
-  }
-  .avatar {
-    width: 178px;
-    height: 178px;
-    display: block;
-  }
-}
-</style>

+ 0 - 200
src/module/main/components/gongmall.vue

@@ -1,200 +0,0 @@
-<template>
-  <div id="cloud-job">
-    <div class="title">企业账户:可用余额{{titleInfo.availableAmount}}元 待确认金额{{titleInfo.totalWaitConfirm}}元 帐户总金额{{titleInfo.amount}}元 待付款金额{{titleInfo.totalWaitPay}}元 成功支付金额{{titleInfo.totalSuccessPay}}元</div>
-    <div class="table">
-      <el-table
-        v-if="tableData.length"
-        height="100%"
-        border
-        style="width: 100%"
-        :data="tableData"
-      >
-        <el-table-column
-          v-for="(prop, index) of tableProps"
-          :key="index"
-          :prop="prop"
-          :label="tableHeaders[index]"
-        >
-          <template slot-scope="scope">
-            <a
-              v-if="prop === 'projectName'"
-              :href="scope.row | projectLink"
-              target="_blank"
-            >{{scope.row[prop]}}</a>
-            <a v-else-if="prop === 'nickname'" :href="`/rooter/user/${scope.row['uid']}`" target="_blank">{{scope.row[prop]}}</a>
-            <span v-else-if="prop === 'create_time'">{{scope.row[prop] | toDate}}</span>
-            <template v-else-if="prop === 'state'">
-              <el-button v-if="scope.row[prop] === '1'" type="primary" @click="confirmPay(scope.row)">确认付款</el-button>
-              <span v-else-if="scope.row[prop] === '4'">已提交</span>
-              <span v-else-if="scope.row[prop] === '8'">已成功</span>
-              <el-button v-else-if="scope.row[prop] === '16'" type="danger" @click="rePay(scope.row)">失败重试</el-button>
-              <span v-else>--</span>
-            </template>
-            <span v-else>{{scope.row[prop]}}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <el-pagination
-      @current-change="changePagination"
-      :current-page.sync="currentPage"
-      :page-size="20"
-      layout="total, prev, pager, next"
-      :total="totalCount"
-    ></el-pagination>
-  </div>
-</template>
-
-<script>
-const tableHeaders = [
-  "项目名称",
-  "付款类型",
-  "用户昵称",
-  "银行卡号",
-  "税前应付",
-  "平台服务费",
-  "所得税费",
-  "开发者净收入",
-  "本次应付",
-  "实际到账",
-  "结算时间",
-  "付款流水号",
-  "付款时间",
-  "操作",
-]
-const tableProps = [
-  "projectName",
-  "payTypeShow",
-  "nickname",
-  "bankCode",
-  "prePay",
-  "servicePay",
-  "getPay",
-  "realGet",
-  "current_gongmall",
-  "amount",
-  "create_time",
-  "gongmall_order_id",
-  "pay_timeShow",
-  "state",
-]
-
-export default {
-  data() {
-    return {
-      // 头部信息
-      titleInfo: {},
-      // 数据总条目
-      totalCount: 0,
-      // 当前页面
-      currentPage: 1,
-      // 列表头显示内容
-      tableHeaders,
-      // 列表头字段
-      tableProps,
-      // 列表数据
-      tableData: [],
-    }
-  },
-  mounted() {
-    this.getTableData()
-  },
-  filters: {
-    toDate(val) {
-      return new Date(val * 1000).toLocaleDateString()
-    },
-    projectLink(i) {
-      const type = i.entity_type
-      let link = 'javascript:void(0);'
-      if(type === '1') link = `/rooter/outsourceitem/${i.entity_id}>`
-      else if(type === '3') link = `/rooter/wagedetails?job_id=${i.entity_id}`
-      return link
-    }
-  },
-  methods: {
-    // 重新支付
-    async rePay(i) {
-      const res = await this.$post('/api/admin/gongmall/confirm_pay', {
-        id: i.id,
-        amount: i.current_gongmall,
-        nickname: i.nickname,
-      })
-      if(res) {
-        this.getTableData()
-      }
-    },
-    // 确认支付
-    confirmPay(i) {
-      this.rePay(i)
-    },
-    // 页码变动
-    changePagination() {
-      this.getTableData()
-    },
-    // 格式化列表数据
-    formatTableData(data, rData) {
-      this.titleInfo = {
-        availableAmount: rData.accountBalance.availableAmount,
-        totalWaitConfirm: rData.totalWaitConfirm ? rData.totalWaitConfirm / 100 : '--',
-        amount: rData.accountBalance.amount,
-        totalWaitPay: rData.totalWaitPay ? rData.totalWaitPay / 100 : '--',
-        totalSuccessPay: rData.totalSuccessPay ? rData.totalSuccessPay / 100 : '--',
-      }
-      return data.map(i => {
-        let projectName = '--'
-        let prePay = ''
-        let servicePay = ''
-        let getPay = ''
-        let realGet = ''
-        // 3 比较特殊,所以这样写
-        if(i.entity_type === '3') {
-          projectName = rData.periodList[i.entity_id].pro_name
-          prePay = ((rData.periodList[i.entity_id].origin_price || 0) / 100).toFixed(2)
-          servicePay = ((rData.periodList[i.entity_id].person_platform_fee || 0) / 100).toFixed(2)
-          getPay = rData.periodList[i.entity_id].total_person_tax_fee || 0
-          realGet = rData.periodList[i.entity_id].developer_fee || 0
-        } else {
-          if(i.entity_type === '1') projectName = rData.projectList[i.entity_id].pro_name
-
-          prePay = ((rData.projectList[i.entity_id].origin_price || 0) / 100).toFixed(2)
-          servicePay = ((rData.projectList[i.entity_id].person_platform_fee || 0) / 100).toFixed(2)
-          getPay = rData.projectList[i.entity_id].total_person_tax_fee || 0
-          realGet = rData.projectList[i.entity_id].developer_fee || 0
-        }
-        return {
-          ...i,
-          projectName,
-          payTypeShow: i.pay_type === '1' ? '首付款' : '解冻款',
-          bankCode: rData.bankAccounts[i.uid] || '--',
-          prePay,
-          servicePay,
-          getPay,
-          realGet,
-          pay_timeShow: i.pay_time > 0 ? new Date(i.pay_time).toLocaleDateString() : '--',
-        }
-      })
-    },
-    // 获取列表数据
-    async getTableData() {
-      this.tableData = []
-      const p = this.currentPage
-      const res = await this.$post("/api/admin/gongmall/orders", { p })
-      // console.log(res)
-      const data = res.data
-      const list = data.list
-      this.tableData = this.formatTableData(list, data)
-      this.totalCount = Number(data.total)
-      this.totalPage = data.totalPage
-    }
-  }
-}
-</script>
-
-<style lang='less' scoped>
-#cloud-job {
-  .table {
-    height: 100%;
-    height: calc(100% - 80px);
-  }
-}
-</style>

+ 0 - 58
src/module/main/components/menu/data.js

@@ -1,58 +0,0 @@
-export default [{
-  title: '财务',
-  subs: [
-    {
-      title: '云端结算',
-      path: 'cloud_balance',
-    },
-    {
-      title: '提现账单',
-      path: 'withdraw',
-    },
-    {
-      title: '工资结算',
-      path: 'wage_settlement',
-      hidden: true
-    }
-  ]
-},
-{
-  title: '运营',
-  subs: [
-    {
-      title: '云端开发者展示',
-      path: 'dev_show',
-    },
-  ]
-},
-{
-  title: '项目',
-  subs: [{
-    title: '云端工作',
-    path: 'cloud_job',
-  },
-  {
-    title: '工猫结算订单',
-    path: 'gongmall',
-  }]
-},
-{
-  title: '用户与认证',
-  subs: [{
-    title: '云端开发者认证表',
-    path: 'cloud_developer',
-  }]
-},
-{
-  title: '会员',
-  subs: [{
-    title: '会员管理',
-    path: 'vip_manager',
-  },{
-    title: '会员订单',
-    path: 'vip_order',
-  },{
-    title: '会员设置',
-    path: 'vip_setting',
-  }]
-}]

+ 0 - 49
src/module/main/components/menu/index.vue

@@ -1,49 +0,0 @@
-<template>
-  <el-menu default-active="1-1" class="main-menu" @open="handleOpen" @close="handleClose">
-    <el-submenu v-for="(menu, index) of menus" :key="index" :index="String(index)">
-      <template slot="title">
-        <span class="menu-title" slot="title">{{menu.title}}</span>
-      </template>
-      <el-menu-item v-for='(sub, subIndex) of menu.subs' :key="subIndex" :index="String(index) + subIndex"
-        @click.native="$router.push({ name: sub.path })">
-        {{sub.title}}
-      </el-menu-item>
-    </el-submenu>
-  </el-menu>
-</template>
-
-<script>
-  import data from './data'
-  console.log(data)
-  let menus = data.map(menu => ({
-    ...menu,
-    subs: menu.subs.filter(sub => !sub.hidden)
-  }))
-
-  export default {
-    props: [],
-    data() {
-      return {
-        menus,
-      }
-    },
-    mounted() {
-    },
-    methods: {
-      handleOpen() {
-        // console.log('open')
-      },
-      handleClose() {
-        // console.log('close')
-      },
-    },
-  }
-</script>
-
-<style lang='less' scoped>
-  .main-menu {
-    .menu-title {
-      padding: 0 16px;
-    }
-  }
-</style>

+ 0 - 152
src/module/main/components/vip_manager.vue

@@ -1,152 +0,0 @@
-<template>
-  <div id="vip-manager">
-    <div
-      class="title"
-    >会员数:正常{{whole.total_normal}}, 过期{{whole.total_overdue}}; 企业会员: 正常{{whole.company_normal}}, 过期{{whole.company_overdue}};开发者会员: 正常{{whole.person_normal}}, 过期{{whole.person_overdue}}</div>
-    <div class="table">
-      <el-table v-if="tableData.length" height="100%" border style="width: 100%" :data="tableData">
-        <el-table-column
-          v-for="(prop, index) of tableProps"
-          :key="index"
-          :prop="prop"
-          :label="tableHeaders[index]"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              class="ctrls"
-              v-if="prop === 'uid'"
-              @click="clickUID(scope.row)"
-            >{{scope.row[prop]}}</el-button>
-            <span v-else>{{scope.row[prop]}}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <el-pagination
-      @current-change="changePagination"
-      :current-page.sync="currentPage"
-      :page-size="20"
-      layout="total, prev, pager, next"
-      :total="totalCount"
-    ></el-pagination>
-  </div>
-</template>
-
-<script>
-const tableHeaders = [
-  "用户ID",
-  "昵称",
-  "会员类型",
-  "开始时间",
-  "到期时间",
-  "最新购买",
-  "累计月数",
-  "累计金额",
-  "当前状态",
-]
-const tableProps = [
-  "uid",
-  "nickname",
-  "type_name",
-  "start_date",
-  "end_date",
-  "last_pay_date",
-  "total_month",
-  "total_price",
-  "status_name",
-]
-
-// 现在环境是线上还是测试, 默认线上
-let env = ''
-
-export default {
-  data() {
-    return {
-      // 原始数据
-      listData: {},
-      // 头部信息
-      titleInfo: {},
-      // 数据总条目
-      totalCount: 0,
-      // 当前页面
-      currentPage: 1,
-      // 列表头显示内容
-      tableHeaders,
-      // 列表头字段
-      tableProps,
-      // 列表数据
-      tableData: [],
-    }
-  },
-  computed: {
-    whole() {
-      return this.listData.whole || {};
-    }
-  },
-  mounted() {
-    this.getTableData()
-  },
-  filters: {
-    toDate(val) {
-      return new Date(val * 1000).toLocaleDateString()
-    },
-    projectLink(i) {
-      const type = i.entity_type
-      let link = 'javascript:void(0);'
-      if(type === '1') link = `/rooter/outsourceitem/${i.entity_id}>`
-      else if(type === '3') link = `/rooter/wagedetails?job_id=${i.entity_id}`
-      return link
-    }
-  },
-  methods: {
-    /**
-     * 点击 uid
-     */
-    clickUID({uid}) {
-      if(env === 'test') window.open(`https://dev.test.proginn.com/rooter/user/${uid}`)
-      else window.open(`https://www.proginn.com/rooter/user/${uid}`)
-    },
-    // 页码变动
-    changePagination() {
-      this.getTableData()
-    },
-    // 格式化列表数据
-    formatTableData(data) {
-      return data.map(i => {
-        let projectName = '--'
-        let prePay = ''
-        let servicePay = ''
-        let getPay = ''
-        let realGet = ''
-        return {
-          ...i,
-        }
-      })
-    },
-    // 获取列表数据
-    async getTableData() {
-      this.tableData = []
-      const p = this.currentPage
-      const res = await this.$post("/api/admin/vip/getVips", { page: this.currentPage, page_size: 10 })
-      // console.log(res)
-      const data = res.data;
-      env = data.current_env
-      const list = data.list;
-      this.listData = data;
-      this.tableData = list; // this.formatTableData(list, data);
-      this.totalCount = Number(data.total);
-      this.totalPage = data.pages;
-    }
-  }
-}
-</script>
-
-<style lang='less' scoped>
-#vip-manager {
-  .table {
-    height: 100%;
-    height: calc(100% - 80px);
-  }
-}
-</style>

+ 0 - 156
src/module/main/components/vip_order.vue

@@ -1,156 +0,0 @@
-<template>
-  <div id="vip-order">
-    <div class="title">订单总量:企业{{whole.company_order_num}}, 开发者{{whole.person_order_num}} 累计收入: 企业 ¥{{whole.company_paid_money}}, 开发者 ¥{{whole.person_paid_money}}</div>
-    <div class="table">
-      <el-table
-        v-if="tableData.length"
-        height="100%"
-        border
-        style="width: 100%"
-        :data="tableData"
-      >
-        <el-table-column
-          v-for="(prop, index) of tableProps"
-          :key="index"
-          :prop="prop"
-          :label="tableHeaders[index]"
-        >
-          <template slot-scope="scope">
-            <el-button type="text" class="ctrls" v-if="prop === 'uid'" @click="clickUID(scope.row)">{{scope.row[prop]}}</el-button>
-            <span v-else>{{scope.row[prop]}}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <el-pagination
-      @current-change="changePagination"
-      :current-page.sync="currentPage"
-      :page-size="20"
-      layout="total, prev, pager, next"
-      :total="totalCount"
-    ></el-pagination>
-  </div>
-</template>
-
-<script>
-const tableHeaders = [
-  "用户ID",
-  "昵称",
-  "会员类型",
-  "购买类型",
-  "购买月数",
-  "应付金额",
-  "实付金额",
-  "订单号",
-  "开始时间",
-  "生效时间",
-  "购前到期",
-  "购后到期",
-]
-const tableProps = [
-  "uid",
-  "nickname",
-  "type_name",
-  "is_first_name",
-  "num",
-  "need_pay_money",
-  "paid_money",
-  "order_no",
-  "start_date",
-  "pay_date",
-  "origin_end_date",
-  "end_date",
-]
-// 现在环境是线上还是测试, 默认线上
-let env = ''
-
-export default {
-  data() {
-    return {
-      // 原始数据
-      listData: {},
-      // 头部信息
-      titleInfo: {},
-      // 数据总条目
-      totalCount: 0,
-      // 当前页面
-      currentPage: 1,
-      // 列表头显示内容
-      tableHeaders,
-      // 列表头字段
-      tableProps,
-      // 列表数据
-      tableData: [],
-    }
-  },
-  computed: {
-    whole() {
-      return this.listData.whole || {};
-    }
-  },
-  mounted() {
-    this.getTableData()
-  },
-  filters: {
-    toDate(val) {
-      return new Date(val * 1000).toLocaleDateString()
-    },
-    projectLink(i) {
-      const type = i.entity_type
-      let link = 'javascript:void(0);'
-      if(type === '1') link = `/rooter/outsourceitem/${i.entity_id}>`
-      else if(type === '3') link = `/rooter/wagedetails?job_id=${i.entity_id}`
-      return link
-    }
-  },
-  methods: {
-    /**
-     * 点击 uid
-     */
-    clickUID({uid}) {
-      if(env === 'test') window.open(`https://dev.test.proginn.com/rooter/user/${uid}`)
-      else window.open(`https://www.proginn.com/rooter/user/${uid}`)
-    },
-    // 页码变动
-    changePagination() {
-      this.getTableData()
-    },
-    // 格式化列表数据
-    formatTableData(data) {
-      return data.map(i => {
-        let projectName = '--'
-        let prePay = ''
-        let servicePay = ''
-        let getPay = ''
-        let realGet = ''
-        return {
-          ...i,
-        }
-      })
-    },
-    // 获取列表数据
-    async getTableData() {
-      this.tableData = []
-      const p = this.currentPage
-      const res = await this.$post("/api/admin/vip/getVipOrders", { page: this.currentPage, page_size: 10 })
-      // console.log(res)
-      const data = res.data;
-      env = data.current_env
-      const list = data.list;
-      this.listData = data;
-      this.tableData = list; // this.formatTableData(list, data);
-      this.totalCount = Number(data.total);
-      this.totalPage = data.pages;
-    }
-  }
-}
-</script>
-
-<style lang='less' scoped>
-#vip-order {
-  .table {
-    height: 100%;
-    height: calc(100% - 80px);
-  }
-}
-</style>

+ 0 - 193
src/module/main/components/vip_setting.vue

@@ -1,193 +0,0 @@
-<template>
-  <div id="vip-setting">
-    <el-button v-for="(title, i) of titles" :key="i"
-      :type="i === currentIndex ? 'primary' : 'button'" @click="clickTitle(i)">{{title}}</el-button>
-    <el-form :model="ruleForm" :rules="rules" ref="ruleForm">
-      <h3>会员定价</h3>
-      <h4>月付</h4>
-      <el-form-item label="原价" prop="monthly_origin_price">
-        <el-input v-model="ruleForm.monthly_origin_price"></el-input>
-      </el-form-item>
-      <el-form-item label="现价" prop="monthly_real_price">
-        <el-input v-model="ruleForm.monthly_real_price"></el-input>
-      </el-form-item>
-      <el-form-item prop="can_buy_monthly">
-        <el-checkbox label="支持购买" v-model="ruleForm.can_buy_monthly"></el-checkbox>
-      </el-form-item>
-
-      <h4>季付</h4>
-      <el-form-item label="原价" prop="quarterly_origin_price">
-        <el-input v-model="ruleForm.quarterly_origin_price"></el-input>
-      </el-form-item>
-      <el-form-item label="现价" prop="quarterly_real_price">
-        <el-input v-model="ruleForm.quarterly_real_price"></el-input>
-      </el-form-item>
-      <el-form-item prop="can_buy_quarterly">
-        <el-checkbox label="支持购买" v-model="ruleForm.can_buy_quarterly"></el-checkbox>
-      </el-form-item>
-
-      <h4>年付</h4>
-      <el-form-item label="原价" prop="yearly_origin_price">
-        <el-input v-model="ruleForm.yearly_origin_price"></el-input>
-      </el-form-item>
-      <el-form-item label="现价" prop="yearly_real_price">
-        <el-input v-model="ruleForm.yearly_real_price"></el-input>
-      </el-form-item>
-      <el-form-item prop="can_buy_yearly">
-        <el-checkbox label="支持购买" v-model="ruleForm.can_buy_yearly"></el-checkbox>
-      </el-form-item>
-
-      <h3>服务费减免</h3>
-      <el-form-item label="整包" prop="project_reduction_rate">
-        <el-input v-model="ruleForm.project_reduction_rate"></el-input>%
-      </el-form-item>
-      <el-form-item label="云端" prop="job_reduction_rate">
-        <el-input v-model="ruleForm.job_reduction_rate"></el-input>%
-      </el-form-item>
-      <br>
-      <el-form-item>
-        <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
-      </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      ruleForm: {},
-      rules: {
-        mOrigin: [
-          { required: true, message: '请输入数字', trigger: 'blur' },
-        ],
-        mCurrent: [
-          { required: true, message: '请输入数字', trigger: 'blur' },
-        ],
-        sOrigin: [
-          { required: true, message: '请输入数字', trigger: 'blur' },
-        ],
-        sCurrent: [
-          { required: true, message: '请输入数字', trigger: 'blur' },
-        ],
-        yOrigin: [
-          { required: true, message: '请输入数字', trigger: 'blur' },
-        ],
-        sCurrent: [
-          { required: true, message: '请输入数字', trigger: 'blur' },
-        ],
-        tPercent: [
-          { required: true, message: '请输入数字', trigger: 'blur' },
-        ],
-        cPercent: [
-          { required: true, message: '请输入数字', trigger: 'blur' },
-        ],
-      },
-      // 当前 title 索引
-      currentIndex: 0,
-      // vip 的类型名字
-      titles: [],
-      // vip 列表
-      list: [],
-    }
-  },
-  mounted() {
-    this.getList();
-  },
-  methods: {
-    /**
-     * 点击 title
-     */
-    clickTitle(i) {
-      this.currentIndex = i;
-      this.resetForm();
-      this.getDetail(this.list[i]);
-    },
-    /**
-     * 重置
-     */
-    resetForm(formName = 'ruleForm') {
-      this.$refs[formName].resetFields();
-    },
-    /**
-     * 保存或更新
-     */
-    async update() {
-      const ruleForm = this.ruleForm;
-      const can_buy_monthly = ruleForm.can_buy_monthly ? '1' : '0';
-      const can_buy_quarterly = ruleForm.can_buy_quarterly ? '1' : '0';
-      const can_buy_yearly = ruleForm.can_buy_yearly ? '1' : '0';
-      const res = await this.$post("/api/admin/vip/update", {
-        ...ruleForm,
-        can_buy_monthly,
-        can_buy_quarterly,
-        can_buy_yearly,
-      });
-      if(res) this.$message({
-        message: '更新成功',
-        type: 'success'
-      })
-    },
-    /**
-     * 提交
-     */
-    submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
-        if(valid) {
-          console.log(this.ruleForm);
-          this.update();
-        } else {
-          console.log('error submit!!');
-          return false;
-        }
-      });
-    },
-    /**
-     * 获取详情数据
-     */
-    async getDetail({id}) {
-      const res = await this.$post("/api/admin/vip/getDetail", {id});
-      const data = res.data;
-      const can_buy_monthly = data.can_buy_monthly === '1';
-      const can_buy_quarterly = data.can_buy_quarterly === '1';
-      const can_buy_yearly = data.can_buy_yearly === '1';
-      // ruleForm 相当于 detail, 这里同步下关键词
-      this.ruleForm = {
-        ...data,
-        can_buy_monthly,
-        can_buy_quarterly,
-        can_buy_yearly,
-      };
-    },
-    /**
-     * 获取列表数据
-     */
-    async getList() {
-      const res = await this.$post("/api/admin/vip/getList");
-      // console.log(res)
-      this.list = res.data;
-      this.titles = this.list.map(i => i.name);
-      // 模拟点击一次
-      this.clickTitle(0);
-    }
-  }
-}
-</script>
-
-<style lang='less'>
-#vip-setting {
-  padding: 20px;
-  .table {
-    height: 100%;
-    height: calc(100% - 80px);
-  }
-  .el-input {
-    width: auto;
-  }
-  .el-check-group,
-  .el-form-item,
-  .el-form-item__content {
-    display: inline-block;
-  }
-}
-</style>

+ 0 - 306
src/module/main/components/wage_settlement.vue

@@ -1,306 +0,0 @@
-<template>
-  <div v-if="detail" id="wage-settlement">
-    <h3>工资结算</h3>
-    <h4>
-      【
-      <a :href="orderHref">{{detail.job.title_count}}</a>
-      】{{detail.time.month}}工资账单
-    </h4>
-    <section class="container">
-      <span class="title">每月薪资:</span>
-      ¥{{salary.job_salary}}/月
-    </section>
-    <section class="container">
-      <span class="title">工作周期:</span>
-      {{detail.time.start_time | dateFormat}} 至 {{detail.time.end_time | dateFormat}} ({{detail.days}}天)
-    </section>
-    <section class="container">
-      <span class="title">托管金额:</span>
-      ¥{{detail.company.company_pay}}
-    </section>
-    <section v-if="detail.normal_days > 0" class="container">
-      <span class="title">正式工资:</span>
-      ¥{{salary.normal_salary}}({{detail.normal_days}}天)
-    </section>
-    <section v-if="detail.probation_days > 0" class="container">
-      <span class="title">试用工资:</span>
-      ¥{{salary.probation_salary}}({{detail.probation_days}}天,按月工资{{rate.probation_rate}}%结算)
-    </section>
-    <section class="container">
-      <span class="title">结算比例:</span>
-      <el-input type="number" v-model="detail.work_hour.work_rate"></el-input>
-      % (工作工时:{{detail.work_hour.worked_hours}}/{{detail.work_hour.should_work_hours}})
-    </section>
-    <section class="container">
-      <span class="title">扣减工资:</span>
-      <el-input type="number" v-model="salary.deduction_fee"></el-input>元
-    </section>
-    <section class="container salary-container">
-      <span class="title">本月工资:</span>
-      <section>
-        <div class="salary-result">¥{{baseSalary}}</div>
-        <div
-          class="salary-calc"
-        >=({{salary.normal_salary}}+{{salary.probation_salary}})*{{detail.work_hour.work_rate}}%-{{salary.deduction_fee}}</div>
-      </section>
-    </section>
-    <section class="container">
-      <span class="title">平台服务费:</span>
-      <el-input type="number" v-model="rate.origin_person_service_fee_rate"></el-input>
-      VIP会员减免{{rate.person_service_fee_rate_reduce}}% ¥{{vipMinus}} (开发者服务费率{{devServiceRate}}%)
-    </section>
-    <section class="container">
-      <span class="title">应缴税费:</span>
-      <el-checkbox type="checkbox" v-model="payable"></el-checkbox>
-      ¥{{shouldRate}} (开发者税率{{devRate}}%)
-    </section>
-    <section class="container salary-container">
-      <span class="title">实际工资:</span>
-      <section>
-        <div class="salary-result">¥{{personPrice}}</div>
-        <div class="salary-calc">
-          <span>=(({{salary.normal_salary}}+{{salary.probation_salary}})*{{detail.work_hour.work_rate}}%-{{salary.deduction_fee * 1}})*(1-{{rate.person_service_fee_rate}}%)</span>
-          <span v-if="payable">*(1-{{rate.person_tax_rate}}%-{{rate.person_tax_service_fee_rate}}%)</span>
-        </div>
-      </section>
-    </section>
-    <!-- 本月结束合作,下月未托管费用 -->
-    <section v-if="detail.can_use_deposit" class="container">
-      <el-checkbox v-model="is_use_deposit" style="margin: 0 4px 0 0;"></el-checkbox>
-      使用押金结算(¥{{detail.company.company_left_deposit}})(企业方费用:¥{{companyPrice}})
-    </section>
-    <section class="container">
-      <span class="title">退还金额:</span>
-      <el-input type="text" :value="returnMoney"></el-input>
-      =(({{salary.normal_salary}}+{{salary.probation_salary}})-{{baseSalary}})*(1+{{rate.company_service_fee_rate}}%)
-      <span
-        v-if="payable"
-      >*(1+{{detail.is_invoice ? rate.company_tax_rate : 0}}%)</span>元
-    </section>
-    <section class="container">
-      <span class="title">备注说明:</span>
-      <el-input v-model="detail.remark"></el-input>
-    </section>
-    <el-button v-show="detail.status == 2 || detail.status == 3" @click="jobPeriodSettle('save')">保存</el-button>
-    <section v-if="detail.can_send_salary" class="container" style="margin-top: 20px;">
-      <el-button
-        type="primary"
-        v-show="detail.status == 3"
-        @click="jobPeriodSettle('confirm')"
-      >确定支付工资</el-button>
-    </section>
-  </div>
-</template>
-
-<script>
-// 现在环境是线上还是测试, 默认线上
-let env = ''
-
-export default {
-  data() {
-    return {
-      job_id: '',
-      period_id: '',
-      payable: false,
-      is_use_deposit: false,
-      detail: null,
-    }
-  },
-  computed: {
-    /**
-     * 详情链接地址
-     */
-    orderHref() {
-      let detail = this.detail
-        , hrefFix = `/rooter/cloudjobitem/${detail.job_id}`
-      if(env === 'test') hrefFix = `https://dev.test.proginn.com${hrefFix}`
-      else hrefFix = `https://www.proginn.com${hrefFix}`
-      return hrefFix
-    },
-    /**
-     * 开发者服务费率
-     */
-    devServiceRate() {
-      let rate = this.rate
-      let result = Number(rate.origin_person_service_fee_rate) - Number(rate.person_service_fee_rate_reduce)
-      return result < 0 ? 0 : result
-    },
-    /**
-     * 开发者税率
-     */
-    devRate() {
-      let rate = this.rate
-      return Number(rate.person_tax_rate) + Number(rate.person_tax_service_fee_rate)
-    },
-    /**
-     * 薪资
-     */
-    salary() {
-      return this.detail.salary
-    },
-    /**
-     * 会员减免
-     */
-    vipMinus() {
-      let salary = this.salary
-      let rate = this.rate
-      return this.keepDecimal(((salary.normal_salary * 1 + salary.probation_salary * 1) * (this.detail.work_hour.work_rate / 100) - salary.deduction_fee * 1) * ((rate.origin_person_service_fee_rate - rate.person_service_fee_rate_reduce) / 100))
-    },
-    /**
-     * 税率
-     */
-    rate() {
-      return this.detail.rate
-    },
-    /**
-     * 应缴税费
-     */
-    shouldRate() {
-      let rate = this.rate
-      return this.keepDecimal(Number(this.baseSalary) * (1 - Number(rate.origin_person_service_fee_rate) / 100 + Number(rate.person_service_fee_rate_reduce) / 100) * this.devRate / 100)
-    },
-    /**
-     * 本月工资
-     */
-    baseSalary() {
-      let salary = this.salary
-      return this.keepDecimal((Number(salary.normal_salary) + Number(salary.probation_salary)) * Number(this.detail.work_hour.work_rate) / 100 - Number(salary.deduction_fee))
-    },
-    /**
-     * 退还金额
-     */
-    returnMoney() {
-      if(this.is_use_deposit) return 0
-
-      let salary = this.salary
-      let isPay = Number(this.detail.company.company_pay) > 0 ? 1 : 0
-      let hasTax = this.payable ? (1 + Number(this.detail.rate.company_tax_rate) / 100) : 1
-      return this.keepDecimal((Number(salary.normal_salary) + Number(salary.probation_salary) - Number(this.baseSalary)) * (1 + Number(this.detail.rate.company_service_fee_rate) / 100) * hasTax) * isPay
-    },
-    /**
-     * 实际工资
-     */
-    personPrice() {
-      let salary = this.salary
-      let rate = this.detail.rate
-      let work_hour = this.detail.work_hour
-      let isPayable = this.payable ? (1 - rate.person_tax_rate / 100 - rate.person_tax_service_fee_rate / 100) : 1
-      let personPrice = (((salary.normal_salary - 0) + (salary.probation_salary - 0)) * work_hour.work_rate / 100 - Number(salary.deduction_fee)) * (1 - rate.person_service_fee_rate / 100) * isPayable
-
-      return this.keepDecimal(personPrice)
-    },
-    /**
-     * 企业方费用
-     */
-    companyPrice() {
-      let salary = this.salary
-      let rate = this.detail.rate
-      let work_hour = this.detail.work_hour
-      let isPayable = this.payable ? (1 + rate.company_tax_rate / 100) : 1
-      let companyPrice = (((salary.normal_salary - 0) + (salary.probation_salary - 0)) * work_hour.work_rate / 100 - Number(salary.deduction_fee)) * (1 + rate.company_service_fee_rate / 100) * isPayable
-      return this.keepDecimal(companyPrice)
-    },
-  },
-  filters: {
-    /**
-     * 格式化日期
-     */
-    dateFormat(val) {
-      return new Date(Number(val) * 1000).toLocaleDateString()
-    }
-  },
-  mounted() {
-    this.job_id = this.$route.query.job_id
-    this.period_id = this.$route.query.period_id
-    this.getData()
-  },
-  methods: {
-    /**
-     * 有效数字控制
-     */
-    keepDecimal(num) {
-      return num.toFixed(2)
-    },
-    /**
-     * 点击保存或支付
-     */
-    jobPeriodSettle(action) {
-      let res = this.$post('/api/admin/job/job_period_settle', {
-        // 云端工作周期id(int)
-        period_id: this.period_id,
-        // 云端工作id(int)
-        job_id: this.job_id,
-        // 操作名称 save-保存结算信息 confirm-确认支付工资
-        action,
-        // 结算比例(百分比)
-        work_rate: this.detail.work_hour.work_rate,
-        // 扣减工资(数值,两位小数)
-        deduction_fee: this.salary.deduction_fee,
-        // 是否要发票(0-不需要  1-需要)
-        is_invoice: this.payable ? 1 : 0,
-        // 退还金额(数值,两位小数)
-        return_money: this.returnMoney,
-        // 结算工资时的备注(可选)
-        remark: this.detail.remark,
-        // 结算时是否使用押金
-        is_use_deposit: this.is_use_deposit ? 1 : 0,
-        person_service_fee_rate: this.detail.rate.origin_person_service_fee_rate,
-      })
-      // console.log(res)
-      if(!res) return
-      this.$message({
-        message: '成功',
-        type: 'success'
-      })
-      setTimeout(() => {
-        location.reload()
-      }, 1000)
-    },
-    /**
-     * 获取数据
-     */
-    async getData(i) {
-      let res = await this.$post('/api/admin/job/get_job_period_detail', {
-        job_id: this.job_id,
-        period_id: this.period_id,
-        is_cal_workrate: 1
-      })
-      if(!res.data) return
-      let data = res.data
-      env = data.current_env
-      this.detail = data
-      this.payable = data.is_invoice === '1'
-      this.is_use_deposit = data.can_use_deposit === '1'
-    },
-  }
-}
-</script>
-
-<style scoped>
-#wage-settlement {
-  padding: 20px;
-}
-.container {
-  display: flex;
-  align-items: center;
-  height: 44px;
-}
-.salary-container {
-  height: 80px;
-  background: #f0f0f0;
-}
-.salary-result {
-  font-size: 28px;
-  font-weight: 800;
-}
-.salary-calc {
-  color: #666;
-  margin-left: 40px;
-}
-.title {
-  width: 92px;
-}
-.el-input {
-  width: 180px;
-}
-</style>

+ 0 - 134
src/module/main/components/withdraw.vue

@@ -1,134 +0,0 @@
-<template>
-  <div id="withdraw">
-    <div class="table">
-      <el-table v-if="tableData.length"
-        height="100%"
-        border
-        style="width: 100%"
-        :data="tableData"
-        :row-class-name="tableRowClassName"
-      >
-        <el-table-column
-          v-for="(prop, index) of tableProps"
-          :key="index"
-          :prop="prop"
-          :label="tableHeaders[index]"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              v-if="prop === 'uid'"
-              @click="clickUID(scope.row[prop])"
-            >{{scope.row[prop]}}</el-button>
-            <span v-else-if="prop === 'statusShow' && scope.row['status'] !== '1'">
-              {{scope.row[prop]}}
-              <el-button type="text" @click="clickRetry(scope.row['id'])">重试</el-button>
-            </span>
-            <span v-else>{{scope.row[prop]}}</span>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-    <el-pagination
-      @current-change="getTableData"
-      :current-page.sync="currentPage"
-      :page-size="20"
-      layout="total, prev, pager, next"
-      :total="totalCount"
-    ></el-pagination>
-  </div>
-</template>
-
-<script>
-const tableHeaders = [
-  "用户ID",
-  "真实姓名",
-  "提现金额",
-  "到账金额",
-  "账户余额",
-  "到账账户",
-  "提现时间",
-  "到账时间",
-  "订单号",
-  "支付方式",
-  "状态"
-];
-const tableProps = [
-  "uid",
-  "real_name",
-  "amount",
-  "true_amount",
-  "after_amount",
-  "account",
-  "created_atShow",
-  "taken_atShow",
-  "order_no",
-  "channel",
-  "statusShow"
-];
-
-export default {
-  data() {
-    return {
-      // 数据总条目
-      totalCount: 0,
-      currentPage: 1,
-      // 列表头显示内容
-      tableHeaders,
-      // 列表头字段
-      tableProps,
-      // 列表数据
-      tableData: []
-    };
-  },
-  mounted() {
-    this.getTableData();
-  },
-  methods: {
-    // 点击重试
-    async clickRetry(id) {
-      const res = await this.$post("/api/admin/payment/redoDraw", { id });
-      console.log(res);
-    },
-    // 点击用户的 uid
-    clickUID(uid) {
-      console.log("click uid: " + uid);
-    },
-    // 根据状态显示图表样式
-    tableRowClassName({ row, rowIndex }) {
-      // console.log({row, rowIndex})
-      let className = "";
-      if (row.status === "1") className = "success-row";
-      return className;
-    },
-    // 格式化列表数据
-    formatTableData(data) {
-      return data.map(i => ({
-        ...i,
-        statusShow: i.status === "1" ? "到账" : "失败",
-        created_atShow: new Date(Number(i.created_at) * 1000).toLocaleString(),
-        taken_atShow: new Date(Number(i.taken_at) * 1000).toLocaleString()
-      }));
-    },
-    // 获取列表数据
-    async getTableData(page = 1) {
-      this.tableData = []
-      const res = await this.$post("/api/admin/payment/listDraw", { page });
-      // console.log(res)
-      const data = res.data;
-      this.tableData = this.formatTableData(res.data.list);
-      // console.log(this.tableData)
-      this.totalCount = Number(data.total);
-      this.totalPage = data.totalPage;
-    }
-  }
-};
-</script>
-
-<style lang='less' scoped>
-#withdraw {
-  .table {
-    height: calc(100% - 40px);
-  }
-}
-</style>

+ 0 - 32
src/module/main/index.vue

@@ -1,32 +0,0 @@
-<template>
-  <div id="main">
-    <main-menu :collapse="menuCollapse" />
-    <router-view class="main-content"></router-view>
-  </div>
-</template>
-
-<script>
-import MainMenu from './components/menu/'
-
-export default {
-  components: {
-    MainMenu,
-  },
-  data() {
-    return {
-      // 菜单是否折叠
-      menuCollapse: false,
-    }
-  }
-}
-</script>
-
-<style lang='less' scoped>
-#main {
-  display: flex;
-  height: 100%;
-  .main-content {
-    flex: 1;
-  }
-}
-</style>

+ 0 - 78
src/module/main/router.js

@@ -1,78 +0,0 @@
-import Main from './index'
-import cloud_balance from './components/cloud_balance'
-import withdraw from './components/withdraw'
-import wage_settlement from './components/wage_settlement'
-import dev_show from './components/dev_show'
-import cloud_job from './components/cloud_job'
-import gongmall from './components/gongmall'
-import cloud_developer from './components/cloud_developer'
-import vip_manager from './components/vip_manager'
-import vip_order from './components/vip_order'
-import vip_setting from './components/vip_setting'
-
-// import menus from './components/menu/data'
-
-import Error from './components/404'
-
-const children = [{
-  path: 'cloud_balance',
-  name: 'cloud_balance',
-  component: cloud_balance
-},{
-  path: 'withdraw',
-  name: 'withdraw',
-  component: withdraw
-},{
-  path: 'wage_settlement',
-  name: 'wage_settlement',
-  component: wage_settlement
-},{
-  path: 'dev_show',
-  name: 'dev_show',
-  component: dev_show
-},{
-  path: 'cloud_job',
-  name: 'cloud_job',
-  component: cloud_job
-},{
-  path: 'gongmall',
-  name: 'gongmall',
-  component: gongmall
-},{
-  path: 'cloud_developer',
-  name: 'cloud_developer',
-  component: cloud_developer
-},{
-  path: 'vip_manager',
-  name: 'vip_manager',
-  component: vip_manager
-},{
-  path: 'vip_order',
-  name: 'vip_order',
-  component: vip_order
-},{
-  path: 'vip_setting',
-  name: 'vip_setting',
-  component: vip_setting
-},]
-
-// menus.forEach(menu => menu.subs.forEach(({ path }) => children.push({
-//   path,
-//   name: path,
-//   component: () => import(`./components/${path}`)
-// })))
-
-children.push({
-  path: '*',
-  name: '404',
-  component: Error
-})
-
-children[0].alias = '/'
-
-export default {
-  path: '/main',
-  name: 'main',
-  component: Main,
-  children,
-}

+ 0 - 24
src/module/welcome/index.vue

@@ -1,24 +0,0 @@
-<template>
-  <div id="nav">
-    检查登录状态中……
-  </div>
-</template>
-
-<script>
-export default {
-  mounted() {
-    this.checkLogin()
-  },
-  methods: {
-    async checkLogin() {
-      const res = await this.$post('/api/admin/index/check_login')
-      // console.log(res)
-      if(res.status) this.$router.replace('/main')
-      else this.$router.replace('/login')
-    }
-  }
-}
-</script>
-
-<style>
-</style>