Przeglądaj źródła

删除 uni 相关

zweizhao 7 lat temu
rodzic
commit
135db6e4d7

+ 0 - 57
uni/App.vue

@@ -1,57 +0,0 @@
-<script>
-export default {
-  onLaunch: function() {
-    console.log('App Launch')
-  },
-  onShow: function() {
-    console.log('App Show')
-  },
-  onHide: function() {
-    console.log('App Hide')
-  }
-}
-</script>
-
-<style>
-/*每个页面公共css */
-uni-app {
-  font-size: 14px !important;
-}
-
-@media screen and (min-width: 960px) {
-
-  html * {
-    box-sizing: border-box !important;
-  }
-
-  uni-app {
-    height: calc(100% + 46px);
-    transform: translateY(-46px);
-  }
-
-  button {
-    cursor: pointer;
-  }
-}
-
-uni-input {
-  width: 240px;
-  height: 32px;
-  border: 1px solid #d8d8d8;
-  border-radius: 4px;
-  padding: 0 8px;
-}
-
-page {
-  height: 100%;
-}
-
-.el-table--border {
-  overflow-x: scroll;
-}
-
-.el-pagination {
-  width: 100%;
-  overflow-x: scroll;
-}
-</style>

+ 0 - 63
uni/components/table.vue

@@ -1,63 +0,0 @@
-<template>
-  <view class="table">
-    <view class="tr">
-      <view class="td" v-for="(label, index) of labels" :key="index">
-        <text>{{label}}</text>
-      </view>
-    </view>
-    <view class="tbody">
-      <view class="tr" v-for="(item, index) of data" :key="index">
-        <view class="td" v-for="(key, keyIndex) of keys" :key="keyIndex">
-          <text>{{item[key]}}</text>
-        </view>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script>
-export default {
-  props: {
-    data: {
-      type: Array,
-      required: true,
-    },
-    keys: {
-      type: Array,
-      required: true,
-    },
-    labels: {
-      type: Array,
-      required: true,
-    },
-  },
-}
-</script>
-
-<style lang="less" scoped>
-@borderLine: 1px solid #d8d8d8;
-.table {
-  line-height: 32px;
-  text-align: center;
-  border-left: @borderLine;
-  border-top: @borderLine;
-  .tbody {
-    height: calc(100% - 34px);;
-    overflow-y: scroll;
-    width: max-content;
-  }
-  .tr {
-    display: flex;
-    border-bottom: @borderLine;
-    .td {
-      width: 100px;
-      display: flex;
-      flex: none;
-      justify-content: center;
-      align-items: center;
-      border-right: @borderLine;
-      word-break: break-all;
-    }
-  }
-}
-</style>

+ 0 - 21
uni/main.js

@@ -1,21 +0,0 @@
-import Vue from 'vue'
-import App from './App'
-import {
-  get,
-  post,
-  request
-} from '@/utils/http'
-
-Vue.config.productionTip = false
-Vue.prototype.$get = get
-Vue.prototype.$post = post
-Vue.prototype.$request = request
-
-Vue.config.productionTip = false
-
-App.mpType = 'app'
-
-const app = new Vue({
-  ...App
-})
-app.$mount()

+ 0 - 62
uni/manifest.json

@@ -1,62 +0,0 @@
-{
-    "name" : "boss_uni",
-    "appid" : "__UNI__D97D68E",
-    "description" : "尝试一个横屏表格",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
-    "transformPx" : true,
-    "app-plus" : {
-        /* 5+App特有相关 */
-        "modules" : {},
-        /* 模块配置 */
-        "distribute" : {
-            /* 应用发布信息 */
-            "android" : {
-                /* android打包配置 */
-                "permissions" : [
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-                ]
-            },
-            "ios" : {},
-            /* ios打包配置 */
-            "sdkConfigs" : {},
-            "orientation": [
-                // "portrait-primary",
-                "landscape-primary"
-//                 "portrait-secondary",
-//                 "landscape-secondary"
-            ]
-        }
-    },
-    /* SDK配置 */
-    "quickapp" : {},
-    /* 快应用特有相关 */
-    "mp-weixin" : {
-        /* 小程序特有相关 */
-        "appid" : "",
-        "setting" : {
-            "urlCheck" : true
-        }
-    }
-}

+ 0 - 68
uni/module/login/index.vue

@@ -1,68 +0,0 @@
-<template>
-  <div id="login">
-    <text>程序员客栈 - BOSS</text>
-    <input type="text" name="webmaster" placeholder="账号" v-model="form.webmaster" focus>
-    <input type="password" name="password" placeholder="密码" v-model="form.password">
-    <input type="text" name="cypher" placeholder="口令" v-model="form.cypher" @keydown.enter="submit">
-    <button @click="submit">登录</button>
-  </div>
-</template>
-
-<script>
-export default {
-  data() {
-    return {
-      form: {
-        // 账号
-        webmaster: '',
-        // 密码
-        password: '',
-        // 口令,格式:inn月日,无 0
-        cypher: '',
-      },
-    }
-  },
-  methods: {
-    // 提交登录
-    async submit() {
-      const { webmaster, password, cypher } = this.form
-      let warningMsg = ''
-      if(!webmaster) warningMsg += '账号'
-      else if(!password) warningMsg += '密码'
-      else if(!cypher) warningMsg += '口令'
-      if(warningMsg) {
-        uni.showToast({
-          title: warningMsg,
-          icon: 'none'
-        })
-        return
-      }
-      const res = await this.$post('/api/admin/index/login', {
-        webmaster,
-        password,
-        cypher
-      })
-      // console.log(res)
-      if(res && res.status) uni.redirectTo({
-        url: '/module/main/index'
-      })
-    }
-  }
-}
-</script>
-
-<style lang="less" scoped>
-#login {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding-top: 200px;
-  input {
-    margin-top: 20px;
-  }
-  button {
-    width: 240px;
-    margin: 20px;
-  }
-}
-</style>

+ 0 - 235
uni/module/main/components/cloud_developer.vue

@@ -1,235 +0,0 @@
-<template>
-  <view id="cloud-devaloper">
-    <!-- <el-button @click="goAddVer">添加认证</el-button> -->
-    <z-table :data="tableData" :keys="tableProps" :labels="tableHeaders" />
-    <!-- <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"
-      :pager-count="7"
-    ></el-pagination> -->
-  </view>
-</template>
-
-<script>
-import tableMixin from '../mixins/table'
-
-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 {
-  mixins: [tableMixin],
-  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) {
-      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: 100%;
-    height: calc(100% - 80px);
-  }
-}
-</style>

+ 0 - 130
uni/module/main/components/cloud_job.vue

@@ -1,130 +0,0 @@
-<template>
-  <view 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> -->
-    <z-table :data="tableData" :keys="tableProps" :labels="tableHeaders" />
-    <!-- <el-pagination
-      @current-change="changePagination"
-      :current-page.sync="currentPage"
-      :page-size="20"
-      layout="total, prev, pager, next"
-      :total="totalCount"
-      :pager-count="7"
-    ></el-pagination> -->
-  </view>
-</template>
-
-<script>
-import tableMixin from '../mixins/table'
-
-const tableHeaders = [
-  '企业方',
-  '名称',
-  '地点',
-  '简介',
-  '核定价格/预算区间',
-  '已完成月数',
-  '用户来源',
-  '审核人员',
-  '创建时间',
-  '状态',
-  '操作'
-]
-const tableProps = [
-  'nickname',
-  'title',
-  'address',
-  'description',
-  'salary',
-  'work_hours',
-  'remark_user_from',
-  'remark_checked_user',
-  'create_time',
-  'status',
-  'ctrl'
-]
-
-export default {
-  mixins: [tableMixin],
-  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) {
-      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 - 164
uni/module/main/components/gongmall.vue

@@ -1,164 +0,0 @@
-<template>
-  <view id="cloud-job">
-    <view class="title">企业账户:可用余额{{titleInfo.availableAmount}}元 待确认金额{{titleInfo.totalWaitConfirm}}元 帐户总金额{{titleInfo.amount}}元 待付款金额{{titleInfo.totalWaitPay}}元 成功支付金额{{titleInfo.totalSuccessPay}}元</view>
-    <z-table :data="tableData" :keys="tableProps" :labels="tableHeaders" />
-  </view>
-</template>
-
-<script>
-import tableMixin from '../mixins/table'
-
-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 {
-  mixins: [tableMixin],
-  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 - 51
uni/module/main/components/menu.vue

@@ -1,51 +0,0 @@
-<template>
-  <view class="menu">
-    <view class="group" v-for="(menu, index) of menus" :key="index">
-      <view class="group-title">
-        <text>{{menu.title}}</text>
-      </view>
-      <view class="sub-group" v-for="(item, subIndex) of menu.subs" :key="subIndex">
-        <view class="sub-item" @click="$emit('clickSub', { path: item.path, params: { a: '1' } })">
-          <text>{{item.title}}</text>
-        </view>
-      </view>
-    </view>
-  </view>
-</template>
-
-<script>
-import menus from '../../../../src/module/main/components/menu/data'
-
-export default {
-  data() {
-    return {
-      menus,
-    }
-  },
-  mounted() {
-
-  }
-}
-</script>
-
-<style lang="less" scoped>
-.menu {
-  width: 120px;
-  background: white;
-  overflow-y: scroll;
-  .group {
-    .group-title {
-      padding: 0 8px;
-      line-height: 40px;
-    }
-    .sub-group {
-      cursor: pointer;
-      .sub-item {
-        text-align: center;
-        line-height: 32px;
-        font-size: 12px;
-      }
-    }
-  }
-}
-</style>

+ 0 - 99
uni/module/main/components/withdraw.vue

@@ -1,99 +0,0 @@
-<template>
-  <view id="withdraw">
-    <z-table class="table" :data="tableData" :keys="tableProps" :labels="tableHeaders" />
-  </view>
-</template>
-
-<script>
-import tableMixin from '../mixins/table'
-
-const tableHeaders = [
-  '用户ID',
-  '真实姓名',
-  '提现金额',
-  '到账金额',
-  '账户余额',
-  '到账账户',
-  '提现时间',
-  '到账时间',
-  '订单号',
-  '支付方式',
-  '状态'
-]
-const tableProps = [
-  'uid',
-  'real_name',
-  'amount',
-  'true_amount',
-  'after_amount',
-  'account',
-  'created_atShow',
-  'taken_atShow',
-  'order_no',
-  'channel',
-  'statusShow'
-]
-
-export default {
-  mixins: [tableMixin],
-  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) {
-      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>
-.table {
-  height: calc(100% - 40px);
-}
-</style>

+ 0 - 90
uni/module/main/index.vue

@@ -1,90 +0,0 @@
-<template>
-  <view id="main">
-    <main-menu class="main-menu" :class="{ 'menu-show': menuShow }" @clickSub="routePath"/>
-    <component class="main-content" :is="currentComponent"></component>
-  </view>
-</template>
-
-<script>
-import MainMenu from "./components/menu"
-import routerMixin from "./mixins/router.js"
-
-export default {
-  components: {
-    MainMenu
-  },
-  mixins: [routerMixin],
-  data() {
-    return {
-      // 菜单是否折叠
-      menuShow: false,
-    }
-  },
-  onLoad(options) {
-    this.checkPath(options)
-    //#ifdef H5
-    document.addEventListener('keydown', e => {
-    	const keyCode = e.keyCode || e.which || e.charCode
-    	if(keyCode === 27 || keyCode === 112) this.toggleMenuShow()
-    })
-    //#endif
-  },
-  methods: {
-    // 切换菜单显示
-    toggleMenuShow() {
-      this.menuShow = !this.menuShow
-    },
-    // 检查入场的参数 path,并且明确子组件,模拟路由
-    checkPath(options) {
-      if(!options.path) this.routePath({ path: `withdraw` })
-      else this.navigate(options)
-    },
-    routePath({ path, params }) {
-      let paramStr = ""
-      if(params) {
-        Object.keys(params).forEach(key => {
-          paramStr += `${key}=${params[key]}&`
-        })
-        // console.log(paramStr)
-      }
-      uni.redirectTo({
-        url: `/module/main/index?path=${path}&${paramStr}`
-      })
-    }
-  }
-}
-</script>
-
-<style lang='less' scoped>
-@transformWidth: 40px;
-#main {
-  position: relative;
-  display: flex;
-  height: 100%;
-
-  .main-menu {
-    position: absolute;
-    left: 0;
-    top: 0;
-    height: 100%;
-    z-index: 2;
-    transform: translate(calc(-100% + @transformWidth - 4px), 0);
-    transition: transform 0.1s linear;
-    box-shadow: 0 0 8px 0 green;
-    &:hover {
-      transform: translate(0);
-    }
-  }
-
-  .menu-show {
-    transform: translate(0);
-  }
-
-  .main-content {
-    width: calc(100% - @transformWidth);
-    height: 100%;
-    transform: translate(@transformWidth, 0);
-    overflow-x: scroll;
-  }
-}
-</style>

+ 0 - 34
uni/module/main/mixins/router.js

@@ -1,34 +0,0 @@
-import withdraw from '../components/withdraw'
-import cloud_job from '../components/cloud_job'
-// import cloud_balance from '../components/cloud_balance'
-import cloud_developer from '../components/cloud_developer'
-import gongmall from '../components/gongmall'
-
-const components = { withdraw, cloud_job, cloud_developer, gongmall }
-
-export default {
-  data() {
-    return {
-      // 当前显示组件
-      currentComponent: '',
-    }
-  },
-  methods: {
-    // 导航事件
-    navigate(payload) {
-    	this.currentComponent = this.getComponent(payload)
-    },
-    // 获取相应显示组件
-    getComponent({ path = 'withdraw', params }) {
-      // console.log({path})
-    	for (let key in components) {
-    		if(components.hasOwnProperty(key)) {
-    			if(key.toLowerCase().includes(path.toLowerCase())) {
-            // console.log(key)
-    				return components[key]
-    			}
-    		}
-    	}
-    }
-  }
-}

+ 0 - 7
uni/module/main/mixins/table.js

@@ -1,7 +0,0 @@
-import ZTable from '../../../components/table'
-
-export default {
-  components: {
-    ZTable,
-  },
-}

+ 0 - 29
uni/module/welcome/index.vue

@@ -1,29 +0,0 @@
-<template>
-  <button>检查登录状态中……</button>
-</template>
-
-<script>
-  export default {
-    onLoad() {
-      this.checkLogin()
-    },
-    methods: {
-      async checkLogin() {
-//         uni.showToast({
-//         	title: 'test',
-//         	mask: false,
-//         	duration: 1500
-//         });
-        const res = await this.$post('/api/admin/index/check_login')
-        if(!res) return
-        if (res.status) uni.redirectTo({
-          url: `/module/main/index`
-        })
-      }
-    }
-  }
-</script>
-
-<style>
-  
-</style>

+ 0 - 28
uni/pages.json

@@ -1,28 +0,0 @@
-{
-	"pages": [
-		{
-			"path": "module/welcome/index",
-			"style": {
-				"navigationBarTitleText": "欢迎"
-			}
-		},
-    {
-    	"path": "module/login/index",
-    	"style": {
-    		"navigationBarTitleText": "登录"
-    	}
-    },
-    {
-    	"path": "module/main/index",
-    	"style": {
-    		"navigationBarTitleText": "核心"
-    	}
-    }
-	],
-	"globalStyle": {
-		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "boss_uni",
-		"navigationBarBackgroundColor": "#F8F8F8",
-		"backgroundColor": "#F8F8F8"
-	}
-}

+ 0 - 54
uni/server.js

@@ -1,54 +0,0 @@
-const superagent = require('superagent')
-const express = require('express')
-const path = require('path')
-const app = express()
-const bodyParser = require('body-parser')
-
-app.use(bodyParser.urlencoded({ extended: true }));
-app.use(bodyParser.json())
-
-let mycookie = '' // 自行添加 Cookie
-
-app.all('*', function(req, res, next) {
-  res.header("Access-Control-Allow-Origin", "*")
-  res.header('Access-Control-Allow-Methods', 'PUT, GET, POST, DELETE, OPTIONS')
-  res.header("Access-Control-Allow-Headers", "X-Requested-With")
-  res.header('Access-Control-Allow-Headers', 'Content-Type')
-  next()
-})
-
-app.get('/*', (req, res) => {
-  let ServerCookie = req.headers.cookie + ";" + mycookie
-
-  superagent
-    .get(`https://dev.test.gitinn.com${req.url}`)
-    .send(req.query)
-    .set('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
-    .set('Cookie', ServerCookie)
-    .end((err, resRequest) => {
-      if (err) console.log(err)
-      else res.end(JSON.stringify(resRequest.body))
-    })
-})
-
-app.post('/*', (req, res) => {
-  let ServerCookie = req.headers.cookie + ";" + mycookie
-  // console.log(req.body)
-  superagent
-    .post(`https://dev.test.gitinn.com${req.url}`)
-    .send(req.body)
-    .set('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
-    .set('Cookie', ServerCookie)
-    .end((err, resRequest) => {
-      // console.log(mycookie)
-      // 设置 Cookie
-      if(!mycookie) mycookie = resRequest.headers['set-cookie']
-      
-      if (err) console.log(err)
-      else res.end(JSON.stringify(resRequest.body))
-    })
-})
-
-app.listen(8082, "localhost", () => {
-  console.log("run in http://localhost:8082")
-})

+ 0 - 104
uni/utils/http.js

@@ -1,104 +0,0 @@
-/**
- *
- * @param {string} path 请求地址的 path
- * @param {string} data 请求实体
- * @param {object} payload 其他选项
- * @param {object} promise 返回一个 promise
- */
-export const get = async (path, data, payload) => {
-  let result = null
-  await request('get', path, data, payload)
-    .then(res => result = res)
-  return result
-}
-
-/**
- *
- * @param {string} path 请求地址的 path
- * @param {string} data 请求实体
- * @param {object} payload 其他选项
- * @param {object} promise 返回一个 promise
- */
-export const post = async (path, data = {}, payload) => {
-  let result = null
-  let formData = ''
-  for (const key in data) {
-    if (data.hasOwnProperty(key)) {
-      const element = data[key]
-      formData += `${key}=${element}&`
-    }
-  }
-  formData = formData.slice(0, formData.length - 1)
-
-  await request('post', path, formData, {
-      config: {
-        header: {
-          'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
-        }
-      }
-    })
-    .then(res => result = res)
-  return result
-}
-
-/**
- *
- * @param {method} method 请求方法
- * @param {string} path 请求地址的 path
- * @param {string} data 请求实体
- * @param {object} payload 其他选项
- * @param {object} promise 返回一个 promise
- */
-export const request = async (method, path, data, payload = {}) => {
-  let host = 'http://localhost:8082'
-  let url = host + path
-  const body = {
-    url,
-    data,
-    method,
-    // params: data,
-  }
-  if (payload.config) Object.assign(body, payload.config)
-
-  // console.log(`url: ${url}`)
-  consoleFormat({
-    body
-  })
-
-  // const res = await axios.request(body)
-  const res = await new Promise((resolve) => {
-    // console.log(body)
-    uni.request({
-      ...body,
-      success: res => {
-        let rData = res.data
-        if (typeof rData !== 'object') rData = JSON.parse(rData)
-        consoleFormat({
-          rData
-        })
-
-        if(rData.status === 1) resolve(rData)
-        else if (rData.status === -99) {
-          uni.redirectTo({
-            url: `/module/login/index`
-          })
-          return
-        }
-      },
-      fail: err => {
-        console.log(err)
-      },
-      complete: () => {
-
-      }
-    })
-  }).then(res => res)
-  return res
-}
-
-const consoleFormat = obj => {
-  const key = Object.keys(obj)[0]
-  // console.log(key + ':')
-  // console.dir(obj[key])
-  // console.log()
-}