MrShi
4 天以前 05aec1e9986fbe3e907259bb1a1396f129bd0fa1
优化
已添加2个文件
已删除1个文件
已修改20个文件
已重命名2个文件
621 ■■■■ 文件已修改
admin/.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/.env.production 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/public/dianjiang_template/cases.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
admin/public/dianjiang_template/member.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaCasesImportWindow.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaCategoryWindow.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaMemberImportWindow.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaMemberWindow.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/category.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/categoryBusType.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/categoryField.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/categoryLevel.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/member.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/login.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mini-program/App.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mini-program/components/kxj-previewImage/kxj-previewImage.vue 372 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mini-program/main.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mini-program/manifest.json 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mini-program/package.json 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mini-program/pages.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
mini-program/pages/details/details.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mini-program/pages/index/index.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
mini-program/static/logo.png 补丁 | 查看 | 原始文档 | blame | 历史
mini-program/utils/http.interceptor.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/.env.development
@@ -1,6 +1,6 @@
# å¼€å‘环境配置
NODE_ENV = 'development'
VUE_APP_API_URL = 'https://test.doumee.cn/dianjiang_admin_api/'
# VUE_APP_API_URL = 'http://192.168.1.37:11010/'
# VUE_APP_API_URL = 'https://test.doumee.cn/dianjiang_admin_api/'
VUE_APP_API_URL = 'http://192.168.0.7/dianjiang_admin_api/'
VUE_APP_CONTEXT_PATH = '/'
admin/.env.production
@@ -4,4 +4,4 @@
# å…³é—­DEBUG
VUE_APP_DEBUG = 'off'
VUE_APP_CONTEXT_PATH = '/dianjiang_admin'
VUE_APP_API_URL = 'https://test.doumee.cn/'
VUE_APP_API_URL = 'https://zbyj.zbom.com/'
admin/public/dianjiang_template/cases.xlsx
Binary files differ
admin/public/dianjiang_template/member.xlsx
Binary files differ
admin/src/components/business/OperaCasesImportWindow.vue
@@ -53,7 +53,7 @@
    // å¯¼å‡ºæ¨¡æ¿
    exportTemplate () {
      // æŠ•保申请
      window.open('/template/cases.xlsx')
      window.open('/dianjiang_template/cases.xlsx')
    },
    clickRef () {
      this.$refs.fileExcel.click()
admin/src/components/business/OperaCategoryWindow.vue
@@ -6,7 +6,16 @@
    @confirm="confirm"
  >
    <el-form :model="form" ref="form" :rules="rules">
      <el-form-item label="名称" prop="name">
      <el-form-item label="商业化类型" prop="name" v-if="form.type == 1">
        <el-input   v-model="form.name" placeholder="请输入名称" v-trim/>
      </el-form-item>
      <el-form-item label="擅长领域" prop="name" v-else-if="form.type == 2">
        <el-input   v-model="form.name" placeholder="请输入擅长领域" v-trim/>
      </el-form-item>
      <el-form-item label="老师等级" prop="name" v-else-if="form.type == 3">
        <el-input   v-model="form.name" placeholder="请输入擅长领域" v-trim/>
      </el-form-item>
      <el-form-item label="名称" prop="name" v-else>
        <el-input   v-model="form.name" placeholder="请输入名称" v-trim/>
      </el-form-item>
      <el-form-item label="战区编码" prop="detail"  v-if="form.type ==0" >
admin/src/components/business/OperaMemberImportWindow.vue
@@ -53,7 +53,7 @@
    // å¯¼å‡ºæ¨¡æ¿
    exportTemplate () {
      // æŠ•保申请
      window.open('/template/member.xlsx')
      window.open('/dianjiang_template/member.xlsx')
    },
    clickRef () {
      this.$refs.fileExcel.click()
admin/src/components/business/OperaMemberWindow.vue
@@ -28,7 +28,7 @@
                         @uploadSuccess="uploadAvatarSuccess" @uploadEnd="isUploading = false" @uploadBegin="isUploading = true" />
          <div class="content">
            <div>1、建议尺寸:750px X 750px ã€‚</div>
            <div>2、支持png、jpg、jpeg格式,大小不超过2M,上传图片不允许涉及政治敏感与色情。</div>
            <div>2、支持png、jpg、jpeg格式,大小不超过5M,上传图片不允许涉及政治敏感与色情。</div>
          </div>
        </div>
      </el-form-item>
@@ -163,6 +163,7 @@
  methods: {
    loadCateList () {
      cateList({
        status: 0
      }).then(res => {
        this.cateList = res
      })
admin/src/views/business/category.vue
@@ -5,6 +5,9 @@
      <el-form-item label="名称" prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入名称" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="战区编码" prop="detail">
        <el-input v-model="searchForm.detail" placeholder="请输入战区编码" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <section>
        <el-button type="primary" @click="search">搜索</el-button>
        <el-button @click="reset">重置</el-button>
@@ -76,6 +79,7 @@
      // æœç´¢
      searchForm: {
        name: '',
        detail: '',
        type: 0
      }
    }
@@ -91,11 +95,12 @@
  },
  methods: {
    synchronization() {
      this.$dialog.deleteConfirm('确认同步战区信息吗?')
      this.$dialog.actionConfirmButton('确认同步战区信息吗?')
        .then(() => {
          syncZhanQu()
            .then(res=>{
              if (res.code === 200) {
                this.search()
                this.$message.success('同步成功!')
              }
            })
admin/src/views/business/categoryBusType.vue
@@ -5,6 +5,13 @@
      <el-form-item label="商业化类型" prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入商业化类型" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="状态" prop="status">
        <el-select v-model="searchForm.status" placeholder="请选择状态" @change="search">
          <el-option label="全部" value=""></el-option>
          <el-option label="启用" value="0"></el-option>
          <el-option label="禁用" value="1"></el-option>
        </el-select>
      </el-form-item>
      <section>
        <el-button type="primary" @click="search">搜索</el-button>
        <el-button @click="reset">重置</el-button>
@@ -24,7 +31,7 @@
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" :selectable="isChangeSelected" width="55"></el-table-column>
        <el-table-column prop="name" label="名称" min-width="100px"></el-table-column>
        <el-table-column prop="name" label="商业化类型" min-width="100px"></el-table-column>
        <el-table-column  prop="icon" label="排行榜图集" min-width="220px">
          <template slot-scope="{row}">
            <div style="display: flex; flex-wrap: wrap;width: 200px;"  v-if="row.fileList && row.fileList.length">
@@ -86,6 +93,7 @@
      // æœç´¢
      searchForm: {
        name: '',
        status: '',
        type: 1
      }
    }
admin/src/views/business/categoryField.vue
@@ -2,8 +2,15 @@
  <TableLayout :permissions="['business:category:query']">
    <!-- æœç´¢è¡¨å• -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
      <el-form-item label="名称" prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入名称" @keypress.enter.native="search"></el-input>
      <el-form-item label="擅长领域" prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入擅长领域" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="状态" prop="status">
        <el-select v-model="searchForm.status" placeholder="请选择状态" @change="search">
          <el-option label="全部" value=""></el-option>
          <el-option label="启用" value="0"></el-option>
          <el-option label="禁用" value="1"></el-option>
        </el-select>
      </el-form-item>
      <section>
        <el-button type="primary" @click="search">搜索</el-button>
@@ -24,7 +31,7 @@
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" :selectable="isChangeSelected" width="55"></el-table-column>
        <el-table-column prop="name" label="名称" min-width="100px"></el-table-column>
        <el-table-column prop="name" label="擅长领域" min-width="100px"></el-table-column>
        <el-table-column label="状态">
          <template slot-scope="{row}">
            <el-switch :disabled="row.isFixed ==1" @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66"
@@ -44,7 +51,7 @@
        >
          <template slot-scope="{row}">
            <el-button type="text"   @click="$refs.operaCategoryWindow.open('编辑擅长领域', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">编辑</el-button>
            <el-button type="text"   @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">删除</el-button>
            <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -74,6 +81,7 @@
      // æœç´¢
      searchForm: {
        name: '',
        status: '',
        type: 2
      }
    }
admin/src/views/business/categoryLevel.vue
@@ -2,8 +2,15 @@
  <TableLayout :permissions="['business:category:query']">
    <!-- æœç´¢è¡¨å• -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
      <el-form-item label="名称" prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入名称" @keypress.enter.native="search"></el-input>
      <el-form-item label="老师等级" prop="name">
        <el-input v-model="searchForm.name" placeholder="请输入老师等级" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="状态" prop="status">
        <el-select v-model="searchForm.status" placeholder="请选择状态" @change="search">
          <el-option label="全部" value=""></el-option>
          <el-option label="启用" value="0"></el-option>
          <el-option label="禁用" value="1"></el-option>
        </el-select>
      </el-form-item>
      <section>
        <el-button type="primary" @click="search">搜索</el-button>
@@ -24,7 +31,7 @@
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" :selectable="isChangeSelected" width="55"></el-table-column>
        <el-table-column prop="name" label="名称" min-width="100px"></el-table-column>
        <el-table-column prop="name" label="老师等级" min-width="100px"></el-table-column>
        <el-table-column  prop="icon" label="图标" min-width="100px">
          <template slot-scope="{row}">
            <el-image v-if="row.iconFull" style="width: 50px; height: 50px; margin-right: 10px" :src="row.iconFull"
@@ -41,7 +48,7 @@
          </template>
        </el-table-column>
        <el-table-column prop="remark" label="描述" min-width="100px"></el-table-column>
        <el-table-column prop="sortnum" label="排序码" min-width="100px"></el-table-column>
        <el-table-column prop="sortnum" label="等级顺序" min-width="100px"></el-table-column>
        <el-table-column prop="updateUserName" label="操作人" min-width="100px"></el-table-column>
        <el-table-column prop="updateTime" label="最近操作时间" min-width="150px"></el-table-column>
        <el-table-column
@@ -52,7 +59,7 @@
        >
          <template slot-scope="{row}">
            <el-button type="text"   @click="$refs.operaCategoryWindow.open('编辑老师等级', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:category:update']">编辑</el-button>
            <el-button type="text"   @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">删除</el-button>
            <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -82,6 +89,7 @@
      // æœç´¢
      searchForm: {
        name: '',
        status: '',
        type: 3
      }
    }
admin/src/views/business/member.vue
@@ -3,15 +3,15 @@
    <!-- æœç´¢è¡¨å• -->
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
      <el-form-item label="姓名" prop="name">
        <el-input v-model="searchForm.name"  style="width: 150px" placeholder="请输入姓名" @keypress.enter.native="search"></el-input>
        <el-input v-model="searchForm.name"  style="width: 180px" placeholder="请输入姓名" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="工号" prop="code">
        <el-input v-model="searchForm.code" style="width: 150px" placeholder="请输入工号" @keypress.enter.native="search"></el-input>
        <el-input v-model="searchForm.code" style="width: 180px" placeholder="请输入工号" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="战区" prop="zhanquIds">
        <el-select
            v-model="searchForm.zhanquIds"
            style="width: 150px"
            style="width: 180px"
            placeholder="战区"
            clearable
            @change="search"
@@ -27,10 +27,11 @@
      <el-form-item label="商业化类型" prop="bustypeIdList">
        <el-select
            v-model="searchForm.bustypeIdList"
            style="width: 150px"
            style="width: 180px"
            placeholder="商业化类型"
            clearable
            multiple
            collapse-tags
            @change="search"
        >
          <el-option
@@ -44,9 +45,10 @@
      <el-form-item label="擅长领域" prop="fieldIdList">
        <el-select
            v-model="searchForm.fieldIdList"
            style="width: 150px"
            style="width: 300px"
            placeholder="擅长领域"
            clearable
            collapse-tags
            multiple
            @change="search"
        >
@@ -61,7 +63,7 @@
      <el-form-item label="老师等级" prop="levelId">
        <el-select
            v-model="searchForm.levelId"
            style="width: 150px"
            style="width: 180px"
            placeholder="老师等级"
            clearable
            @change="search"
@@ -79,7 +81,7 @@
              v-model="searchForm.status"
              placeholder="状态"
              clearable
              style="width: 150px"
              style="width: 180px"
              @change="search"
          >
            <el-option :key="0" :value="0" label="启用"></el-option>
@@ -108,7 +110,7 @@
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column  prop="imgurl" label="图片" min-width="100px">
          <template slot-scope="{row}">
            <el-image v-if="row.fullImgurl" style="width: 50px; height: 50px; margin-right: 10px" :src="row.fullImgurl"
            <el-image v-if="row.fullImgurl" style="width: 50px; margin-right: 10px" :src="row.fullImgurl"
                      :preview-src-list="[row.fullImgurl]">
            </el-image>
          </template>
@@ -155,7 +157,9 @@
        <el-table-column prop="fieldNames" label="擅长领域" min-width="200px">
          <template slot-scope="{row}">
            <div v-if="row.fieldList && row.fieldList.length">
              <div style="display:inline-block;" v-for="(item,index) in row.fieldList">{{item.name||''}} <span v-if="index < row.fieldList.length-1" style="display:inline-block;padding: 0px 3px;">/</span></div>
              <div style="width: 190px; display: -webkit-box; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden;">
                <template v-for="(item,index) in row.fieldList">{{item.name||''}} <template v-if="index < row.fieldList.length-1">/</template></template>
              </div>
            </div>
          </template>
        </el-table-column>
@@ -177,7 +181,7 @@
        >
          <template slot-scope="{row}">
            <el-button type="text" @click="$refs.operaMemberWindow.open('编辑老师', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:member:update']">编辑</el-button>
            <el-button type="text"   @click="$refs.OperaCasesListWindow.open('查看老师案例【'+row.name+'】', row.id)" icon="el-icon-open">案例</el-button>
            <el-button type="text"   @click="$refs.OperaCasesListWindow.open('查看老师案例【'+row.name+'】', row.id)" icon="el-icon-picture-outline">案例</el-button>
            <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">删除</el-button>
          </template>
        </el-table-column>
admin/src/views/index.vue
@@ -1,7 +1,7 @@
<template>
  <div class="main_home">
    <div class="home_header">
      <div class="mb10 fs17">下午好,{{ userInfo.realname }}</div>
      <div class="mb10 fs17">{{getTimePeriod()}},{{ userInfo.realname }}</div>
      <div class="fs13">
        ä»Šå¤©æ˜¯ {{ nowDate }} {{ nowWeek }},欢迎访问志邦点将后台管理系统
      </div>
@@ -49,6 +49,16 @@
    // this.initData()
  },
  methods: {
    getTimePeriod() {
      const now = new Date()
      const hours = now.getHours()
      if (hours >= 0 && hours < 12) {
        return '上午好'
      } else {
        return '下午好'
      }
    },
    updateDate () {
      this.nowDate = dayjs().format('YYYYå¹´M月D日')
      this.nowWeek = weeks[new Date().getDay()]
admin/src/views/login.vue
@@ -121,17 +121,18 @@
    if (dd.env.platform !== 'notInDingTalk') {
      // å…ˆåˆ¤æ–­åœ°å€ä¸Šæœ‰æ²¡æœ‰corpId
      if (href.indexOf('?corpid=') !== -1) {
        alert('从地址拿corpid')
        // alert('从地址拿corpid')
        corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.lastIndexOf('#'))
        window.localStorage.setItem('corpId', corpId)
      // åˆ¤æ–­æµè§ˆå™¨ç¼“存是否有corpId
      } else if (window.localStorage.getItem('corpId')) {
        corpId = window.localStorage.getItem('corpId')
        alert('从缓存拿corpid')
        // alert('从缓存拿corpid')
      }
      // dingulzemj5bynjciapg
      dd.requestAuthCode({
        corpId: corpId,
        clientId: 'dingulzemj5bynjciapg',
        clientId: 'dingy7xdyzffnegiaszo',
        onSuccess: function(result) {
          loginByDingTalk({
            code: result.code,
mini-program/App.vue
@@ -4,12 +4,13 @@
            var that = this
            let href = window.location.href;
            if (this.$dd.env.platform !== 'notInDingTalk') {
                console.log(href)
                console.log('钉钉授权登录')
                let corpId = href.substring(href.lastIndexOf('?corpid=') + 8, href.lastIndexOf('#'))
                console.log(corpId)
                // dingy7xdyzffnegiaszo æ­£å¼
                // dingulzemj5bynjciapg æµ‹è¯•
                this.$dd.requestAuthCode({
                    corpId: corpId,
                    clientId: 'dingulzemj5bynjciapg',
                    clientId: 'dingy7xdyzffnegiaszo',
                    onSuccess: function(result) {
                        that.$u.api.ddLogin({
                            code: result.code,
@@ -23,6 +24,7 @@
                    }
                });
            } else if (href.indexOf('?token') !== -1) {
                console.log('token免登')
                let token = href.substring(href.lastIndexOf('?token=') + 7, href.lastIndexOf('#'))
                that.$store.commit('setToken', token)
                that.$isResolve()
mini-program/components/kxj-previewImage/kxj-previewImage.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,372 @@
<template>
    <view class="previewImage" :style="{ 'background-color': 'rgba(0,0,0,' + opacity + ')' }" v-if="show" @tap="close" @touchmove.stop.prevent>
        <swiper class="swiper" :current="index" @change="swiperChange" :disable-touch="swiper" :circular="circular">
            <swiper-item v-for="(img, i) in imgs" :key="'swiper-item-'+i" :id="'swiper-item-'+i">
                <movable-area class="marea" scale-area>
                    <movable-view
                        :id="'movable-view-'+i"
                        :key="'movable-view-'+i"
                        class="mview"
                        direction="all"
                        :out-of-bounds="false"
                        :inertia="true"
                        damping="90"
                        friction="2"
                        scale="true"
                        scale-min="1"
                        scale-max="4"
                        :scale-value="scale"
                        @scale="onScale"
                        @change="movableChange"
                    >
                        <image
                            :id="'image-'+i"
                            :key="'movable-view'+i"
                            class="image"
                            :src="img"
                            :style="{ transform: 'rotateZ(' + deg + 'deg)' }"
                            :data-index="i"
                            :data-src="img"
                            mode="widthFix"
                            @touchmove="handletouchmove"
                            @touchstart="handletouchstart"
                            @touchend="handletouchend"
                        />
                    </movable-view>
                </movable-area>
            </swiper-item>
        </swiper>
        <view class="page" v-if="imgs.length > 0">
            <text class="text">{{ index + 1 }} / {{ imgs.length }}</text>
        </view>
        <!-- <view class="save" v-if="saveBtn" @click.stop.prevent="save"><text class="text">保存</text></view> -->
        <!-- <view class="rotate" v-if="rotateBtn" @click.stop.prevent="rotate"><text class="text">旋转</text></view> -->
        <!-- <view class="desc" v-if="descs.length > 0 && descs.length == imgs.length && descs[index].length > 0">{{ descs[index] }}</view> -->
    </view>
</template>
<script>
export default {
    name: 'ksj-previewImage', //插件名称
    props: {
        imgs: {
            //图片列表
            type: Array,
            required: true,
            default: () => {
                return [];
            }
        },
        descs: {
            //描述列表
            type: Array,
            required: false,
            default: () => {
                return [];
            }
        },
        //透明度,0到1之间。
        opacity: {
            type: Number,
            default: 0.8
        },
        //保存按键
        saveBtn: {
            type: Boolean,
            default: true
        },
        //旋转按键
        rotateBtn: {
            type: Boolean,
            default: true
        },
        //循环预览
        circular:{
            type: Boolean,
            default: false
        }
    },
    data() {
        return {
            swiper:false,//是否禁用
            show: false, //显示状态
            index: 0, //当前页
            deg: 0, //旋转角度
            time: 0, //定时器
            interval: 1000, //长按事件
            scale: 1 //缩放比例
        };
    },
    methods: {
        //比例变化
        onScale(e) {
        },
        //长按事件相关内容---------开始-------------------
        //接触开始
        handletouchstart(e) {
            var tchs = e.touches.length;
            if (tchs != 1) {
                return false;
            }
            this.time = setTimeout(() => {
                this.onLongPress(e);
            }, this.interval);
            return false;
        },
        //清除定时器
        handletouchend() {
            clearTimeout(this.time);
            if (this.time != 0) {
                //处理点击时间
            }
            return false;
        },
        //清除定时器
        handletouchmove() {
            clearTimeout(this.time);
            this.time = 0;
        },
        // å¤„理长按事件
        onLongPress(e) {
            var src = e.currentTarget.dataset.src;
            var index = e.currentTarget.dataset.index;
            var data = { src: src, index: index };
            this.$emit('longPress', data);
        },
        //长按事件相关内容---------结束-------------------
        //图片改变
        swiperChange(e) {
            this.index = e.target.current; //更新当前图片index
            this.$nextTick(function() {
                this.scale = 1;
            })
            //this.deg = 0; //旋转角度
            //this.swiper=true;
        },
        //移动变化
        movableChange(e) {
            //console.log(e);
            /* if(this.old.scale <= 1){
                this.swiper=false;
            }else if(e.detail.x===0){
                this.swiper=false;
            } */
        },
        //保存
        save(e) {
            var _this = this;
            var src = this.imgs[this.index];
            //#ifdef MP-WEIXIN
            //提前向用户发起授权请求
            uni.authorize({
                scope: 'scope.writePhotosAlbum',
                success() {
                    console.log('kxj-previewImage:允许储存');
                    _this.downloadImg(src);
                }
            });
            //#endif
            //#ifdef APP-PLUS
            this.downloadImg(src);
            //#endif
            //#ifdef H5
            //非同源图片将直接打开
            var abtn = document.createElement('a');
            abtn.href = src;
            abtn.download = '';
            abtn.target = '_blank';
            abtn.click();
            //#endif
        },
        //下载并保存文件
        downloadImg(src) {
            //下载图片文件
            uni.showLoading({
                title: '大图提取中'
            });
            uni.downloadFile({
                url: src,
                success: function(res) {
                    console.log('kxj-previewImage:下载成功');
                    uni.hideLoading();
                    uni.saveImageToPhotosAlbum({
                        filePath: res.tempFilePath,
                        success: () => {
                            uni.showToast({
                                title: '已保存至相册',
                                duration: 1000
                            });
                        }
                    });
                },
                fail: function() {
                    uni.hideLoading();
                    uni.showToast({
                        title: '图片下载失败',
                        icon: 'none',
                        duration: 1000
                    });
                }
            });
        },
        //旋转
        rotate(e) {
            this.deg = this.deg == 270 ? 0 : this.deg + 90;
        },
        //打开
        open(e) {
            if (e === null || e === '') {
                console.log('kxj-previewImage:打开参数无效');
                return;
            }
            if (!isNaN(e)) {
                if(e>=this.imgs.length){
                    console.log('kxj-previewImage:打开参数无效');
                }else{
                    this.index = e;
                }
            } else {
                var index = this.imgs.indexOf(e);
                if(index===-1){
                    this.imgs = [e];
                    this.index = 0;
                    console.log('kxj-previewImage:未在图片地址数组中找到传入的图片,已为你自动打开单张预览模式')
                }else{
                    this.index = this.imgs.indexOf(e);
                }
            }
            console.log('kxj-previewImage:当前预览图片序号'+this.index);
            this.show = true;
        },
        //关闭
        close(e) {
            this.show = false;
            this.index = 0; //当前页
            this.deg = 0; //旋转角度
            this.time = 0; //定时器
            this.interval = 1000; //长按事件
            this.scale = 1; //缩放比例
        }
    }
};
</script>
<!--使用scss,只在本组件生效-->
<style lang="scss" scoped>
.previewImage {
    z-index: 999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    user-select: none;
    .swiper {
        width: 100%;
        height: 100%;
        .marea {
            height: 100%;
            width: 100%;
            position: fixed;
            overflow: hidden;
            .mview {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 100%;
                height: auto;
                min-height: 100%;
                .image {
                    width: 100%;
                }
            }
        }
    }
    .page {
        position: absolute;
        width: 100%;
        top: 20rpx;
        text-align: center;
        .text {
            color: #fff;
            font-size: 26rpx;
            background-color: rgba(0, 0, 0, 0.5);
            padding: 3rpx 16rpx;
            border-radius: 20rpx;
            user-select: none;
        }
    }
    .save {
        position: absolute;
        left: 10rpx;
        width: 120rpx;
        height: 56rpx;
        bottom: 10rpx;
        text-align: center;
        padding: 10rpx;
        .text {
            background-color: rgba(0, 0, 0, 0.5);
            color: #fff;
            font-size: 30rpx;
            border-radius: 20rpx;
            border: 1rpx solid #f1f1f1;
            padding: 6rpx 22rpx;
            user-select: none;
        }
        .text:active {
            background-color: rgba(100, 100, 100, 0.5);
        }
    }
    .rotate {
        position: absolute;
        right: 10rpx;
        width: 120rpx;
        height: 56rpx;
        bottom: 10rpx;
        text-align: center;
        padding: 10rpx;
        .text {
            background-color: rgba(0, 0, 0, 0.5);
            color: #fff;
            font-size: 30rpx;
            border-radius: 20rpx;
            border: 1rpx solid #f1f1f1;
            padding: 6rpx 22rpx;
            user-select: none;
        }
        .text:active {
            background-color: rgba(100, 100, 100, 0.5);
        }
    }
    .desc {
        position: absolute;
        top: 0;
        width: 100%;
        padding: 5rpx 10rpx;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
        font-size: 28rpx;
        letter-spacing: 3rpx;
        user-select: none;
    }
}
</style>
mini-program/main.js
@@ -5,7 +5,7 @@
import store from './store/index.js'
import * as dd from 'dingtalk-jsapi';
import { initDingH5RemoteDebug } from "dingtalk-h5-remote-debug";
import vconsole from "vconsole";
// import vconsole from "vconsole";
Vue.config.productionTip = false
App.mpType = 'app'
@@ -13,9 +13,10 @@
    Vue.prototype.$isResolve = resolve
})
Vue.prototype.$dd = dd
Vue.prototype.$baseUrl = 'https://test.doumee.cn/dianjiang_web_api/'
// Vue.prototype.$baseUrl = 'https://test.doumee.cn/dianjiang_web_api/'
// Vue.prototype.$baseUrl = 'http://192.168.0.7/dianjiang_web_api/'
Vue.prototype.vconsole = new vconsole();
Vue.prototype.$baseUrl = 'https://zbyj.zbom.com/dianjiang_web_api/'
// Vue.prototype.vconsole = new vconsole();
initDingH5RemoteDebug();
mini-program/manifest.json
@@ -1,5 +1,5 @@
{
    "name" : "mini-program",
    "name" : "点将",
    "appid" : "__UNI__438238C",
    "description" : "",
    "versionName" : "1.0.0",
@@ -72,7 +72,8 @@
    "h5" : {
        "router" : {
            "mode" : "hash",
            "base" : "/h5/"
        }
            "base" : "/dianjiang_h5/"
        },
        "title" : "点将"
    }
}
mini-program/package.json
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
{
    "id": "Easy-preview",
    "name": "Easy-preview",
    "displayName": "Easy-preview",
    "version": "1.0",
    "description": "图片预览(支持下载到相册,横屏自动播放,缩放 ï¼‰ ",
    "keywords": [
        "图片预览",
        "下载到相册",
        "缩放"
    ],
    "dcloudext": {
        "category": [
            "前端组件",
            "通用组件"
        ]
    }
}
mini-program/pages.json
@@ -13,7 +13,7 @@
        {
            "path": "pages/details/details",
            "style": {
                "navigationBarTitleText": "点赞老师详情",
                "navigationBarTitleText": "点将老师详情",
                "navigationStyle": "custom"
            }
        },
mini-program/pages/details/details.vue
@@ -47,10 +47,9 @@
                <view class="card-title-xian"></view>
                <text>擅长领域</text>
            </view>
            <view class="card-list" v-if="item.fieldList && item.fieldList.length > 0">
                <view class="card-list-item" v-for="(child, index) in item.fieldList" :key="index">
                    <view class="card-list-item-title">{{child.name}}:</view>
                    <view class="card-list-item-text">{{child.remark}}</view>
            <view class="card-list">
                <view class="card-list-item">
                    <text v-for="(child, index) in item.fieldList" :key="index">{{child.name}} <template v-if="item.fieldList.length- 1 !== index">、</template></text>
                </view>
            </view>
        </view>
@@ -69,22 +68,27 @@
                        </view>
                        <view class="left-info">{{child.detail}}</view>
                    </view>
                    <view class="right" v-if="child.fileList && child.fileList.length > 0" @click="yulan(index, child.fileList[0].url)">
                    <view class="right" v-if="child.fileList && child.fileList.length > 0" @click="yulan(child.fileList)">
                        <image :src="child.fileList[0].url" mode="widthFix"></image>
                        <view class="right-num">共{{child.fileList.length}}å¼ </view>
                    </view>
                </view>
            </view>
        </view>
        <previewImage ref="previewImage" :opacity="1" :circular="true" :imgs="imgs" />
    </view>
</template>
<script>
    import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
    export default {
        components: { previewImage}, //注册插件
        data() {
            return {
                id: null,
                item: null,
                imgs: []
            };
        },
        onLoad(option) {
@@ -92,11 +96,14 @@
            this.getDetails()
        },
        methods: {
            yulan(index, url) {
                uni.previewImage({
                    current: url,
                    urls: this.item.casesList[index].fileList.map(item => item.url)
                })
            yulan(arr) {
                this.imgs = arr.map(item => item.url)
                this.$refs.previewImage.open(this.imgs[0]);
                // uni.previewImage({
                //     current: url,
                //     urls: this.item.casesList[index].fileList.map(item => item.url),
                //     indicator: 'number'
                // })
            },
            zhankai() {
                this.item.zhankai = !this.item.zhankai
@@ -112,13 +119,16 @@
                            res.data.zhankai = false
                            res.data.contentCopy = res.data.content.substring(0, 30) + '...'
                        }
                        let arr = []
                        res.data.fieldList.forEach(item => {
                            if (item.remark) {
                                arr.push(item)
                        // let arr = []
                        // res.data.fieldList.forEach(item => {
                        //     if (item.remark) {
                        //         arr.push(item)
                        //     }
                        // })
                        // res.data.fieldList = arr;
                        if (res.data.casesList) {
                            this.imageUrls = res.data.casesList.map(item => item.url)
                            }
                        })
                        res.data.fieldList = arr;
                        this.item = res.data
                    }
                })
@@ -243,12 +253,12 @@
                        align-items: center;
                        .item-info-c-item-label {
                            font-weight: 400;
                            font-size: 24rpx;
                            font-size: 26rpx;
                            color: #777777;
                        }
                        .item-info-c-item-val {
                            font-weight: 400;
                            font-size: 24rpx;
                            font-size: 26rpx;
                            color: #333333;
                        }
                    }
@@ -257,7 +267,7 @@
                    width: 100%;
                    line-height: 40rpx;
                    font-weight: 400;
                    font-size: 24rpx;
                    font-size: 26rpx;
                    color: #333333;
                    margin-top: 20rpx;
                    text {
@@ -284,6 +294,7 @@
                    margin-right: 12rpx;
                }
                text {
                    line-height: 40rpx;
                    font-weight: 600;
                    font-size: 32rpx;
                    color: #222222;
@@ -362,21 +373,17 @@
                width: 100%;
                .card-list-item {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    flex-wrap: wrap;
                    margin-bottom: 30rpx;
                    line-height: 40rpx;
                    &:last-child {
                        margin: 0 !important;
                    }
                    .card-list-item-title {
                        font-weight: 500;
                    text {
                        font-weight: 400;
                        font-size: 28rpx;
                        color: #333333;
                        margin-bottom: 15rpx;
                    }
                    .card-list-item-text {
                        font-weight: 400;
                        font-size: 26rpx;
                        color: #666666;
                    }
                }
            }
mini-program/pages/index/index.vue
@@ -14,9 +14,9 @@
                </view>
                <view class="cate">
                    <view class="cate-item" @click="clickRow(1)">
                        <text :style="{ fontWeight: (view === 1 || form.bustypeIds) ? 'bold' : '', color: (view === 1 || form.bustypeIds) ? '#222222' : '' }">{{form.bustypeIds ? form.bustypeName : '商业化类型'}}</text>
                        <text :style="{ fontWeight: (view === 1 || form.bustypeIdList.length > 0) ? 'bold' : '', color: (view === 1 || form.bustypeIdList.length > 0) ? '#222222' : '' }">{{form.bustypeIdList.length > 0 ? form.bustypeName : '商业化类型'}}</text>
                        <image src="/static/ar_open_sel8@2x.png" mode="widthFix" v-if="view === 1"></image>
                        <image src="/static/ar_open_sel@2x.png" mode="widthFix" v-else-if="view !== 1 && form.bustypeIds"></image>
                        <image src="/static/ar_open_sel@2x.png" mode="widthFix" v-else-if="view !== 1 && form.bustypeIdList.length > 0"></image>
                        <image src="/static/ar_open7@2x.png" mode="widthFix" v-else></image>
                    </view>
                    <view class="cate-item" @click="clickRow(2)">
@@ -85,7 +85,8 @@
                        </view>
                    </view>
                    <view class="item-info-d" v-if="item.isShow">
                        {{item.zhankai ? item.content : item.contentCopy}}<text @click.stop="zhankai(item)">{{item.zhankai ? '收起' : '更多'}}</text>
                         <!-- @click.stop="zhankai(item)" -->
                        {{item.zhankai ? item.content : item.contentCopy}}<text>{{item.zhankai ? '收起' : '更多'}}</text>
                    </view>
                    <view class="item-info-d" v-else>
                        {{item.content}}
@@ -108,7 +109,7 @@
                    orderByType: '',
                    orderByName: '',
                    fieldIdList: [],
                    bustypeIds: '',
                    bustypeIdList: [],
                    bustypeName: '',
                    name: ''
                },
@@ -146,7 +147,7 @@
                        orderByType: this.form.orderByType ? this.form.orderByType : 3,
                        orderByName: this.form.orderByName,
                        fieldIdList: this.form.fieldIdList,
                        bustypeIds: this.form.bustypeIds,
                        bustypeIdList: this.form.bustypeIdList,
                        bustypeName: this.form.bustypeName,
                        name: this.form.name
                    }
@@ -176,7 +177,11 @@
            },
            clickSearch(i, type) {
                if (type === 1) {
                    this.form.bustypeIds = this.list1[i].id
                    if (this.list1[i].id) {
                        this.form.bustypeIdList = [this.list1[i].id]
                    } else {
                        this.form.bustypeIdList = []
                    }
                    this.form.bustypeName = this.list1[i].name
                    this.list1.forEach((item, index) => {
                        item.active = index === i
@@ -325,6 +330,7 @@
                        }
                    }
                    .item-info-b {
                        width: 80%;
                        display: flex;
                        flex-wrap: wrap;
                        align-items: center;
mini-program/static/logo.png
Binary files differ
mini-program/utils/http.interceptor.js
@@ -1,10 +1,10 @@
const install = (Vue, vm) => {
    // è¯·æ±‚拦截器
    uni.$u.http.interceptors.request.use((config) => {
        // const Headtoken = vm.$store.state.token
        // if (Headtoken) {
            config.header['token'] = 'eyJhbGciOiJIUzUxMiJ9.eyJpZCI6IjE4MDU1MTU5NDUzIiwiZXhwIjoxNzcwMTg3MDgxfQ.xoNzXq98cZQEAlCO3UeJU6zn5obIdoCWxWLRJumlj4AAzVeBNQosrVfxZMBfYOAZKB7qBcM_4JiWlDCEyL8hrg';
        // }
        const Headtoken = vm.$store.state.token
        if (Headtoken) {
            config.header['token'] = Headtoken;
        }
        return config
    }, config => {
        return Promise.reject(config)