Pārlūkot izejas kodu

删除无用依赖

reghao 1 gadu atpakaļ
vecāks
revīzija
77a4c10d45

+ 0 - 5
package.json

@@ -15,17 +15,14 @@
     "babel-plugin-prismjs": "^2.0.1",
     "core-js": "^3.6.4",
     "crypto-js": "^4.1.1",
-    "dashjs": "^4.2.0",
     "dplayer": "^1.26.0",
     "element-ui": "^2.13.0",
     "flv.js": "^1.6.2",
     "hls.js": "^1.1.2",
     "js-cookie": "2.2.0",
     "jsencrypt": "^3.2.1",
-    "mavon-editor": "^2.10.4",
     "nprogress": "^0.2.0",
     "prismjs": "^1.25.0",
-    "shaka-player": "^3.2.1",
     "svg-sprite-loader": "^5.0.0",
     "tinymce": "^5.1.0",
     "tinymce-vue": "^1.0.0",
@@ -34,11 +31,9 @@
     "videojs-flash": "^2.2.1",
     "vue": "^2.6.11",
     "vue-amap": "^0.5.10",
-    "vue-baidu-map": "^0.21.22",
     "vue-calendar-heatmap": "^0.8.4",
     "vue-clipboard2": "^0.3.3",
     "vue-cookies": "^1.7.0",
-    "vue-quill-editor": "^3.0.6",
     "vue-router": "^3.4.5",
     "vue-simple-uploader": "^0.7.6",
     "vuex": "^3.4.0"

+ 9 - 114
src/components/RichText.vue

@@ -1,31 +1,14 @@
 <template>
-  <quill-editor
-    ref="myTextEditor"
-    v-model="text"
-    class="editor"
-    :options="editorOption"
-    @change="onEditorChange($event)"
+  <el-input
+    v-model="content"
+    style="margin-left: 5px"
+    type="textarea"
+    :rows="5"
+    @blur="onInputBlur"
   />
 </template>
 
 <script>
-const toolbar = [
-  ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线
-  ['blockquote', 'code-block'], // 引用  代码块
-  [{ header: 1 }, { header: 2 }], // 1、2 级标题
-  [{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表
-  //   [{ script: "sub" }, { script: "super" }], // 上标/下标
-  //   [{ indent: "-1" }, { indent: "+1" }], // 缩进
-  // [{'direction': 'rtl'}],                         // 文本方向
-  [{ size: ['small', false, 'large', 'huge'] }], // 字体大小
-  [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
-  [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
-  [{ font: [] }], // 字体种类
-  [{ align: [] }], // 对齐方式
-  ['clean'], // 清除文本格式
-  ['link', 'image', 'video'] // 链接、图片、视频
-] // 工具菜单栏配置
-
 export default {
   name: 'RichText',
   props: {
@@ -36,104 +19,16 @@ export default {
   },
   data() {
     return {
-      content: '', // 内容
-      editorOption: {
-        modules: {
-          toolbar
-        },
-        placeholder: '', // 提示
-        readyOnly: false, // 是否只读
-        theme: 'snow', // 主题 snow/bubble
-        syntax: true // 语法检测
-      }
+      content: ''
     }
   },
   methods: {
-    // 值发生变化
-    onEditorChange(editor) {
-      this.content = editor.html
-      this.$emit('content', editor.html)
+    onInputBlur() {
+      this.$emit('content', this.content)
     }
   }
 }
 </script>
 
 <style>
-.editor {
-  line-height: normal !important;
-  height: 480px;
-  margin-bottom: 30px;
-}
-.ql-snow .ql-tooltip[data-mode="link"]::before {
-  content: "请输入链接地址:";
-}
-.ql-snow .ql-tooltip.ql-editing a.ql-action::after {
-  border-right: 0px;
-  content: "保存";
-  padding-right: 0px;
-}
-
-.ql-snow .ql-tooltip[data-mode="video"]::before {
-  content: "请输入视频地址:";
-}
-
-.ql-snow .ql-picker.ql-size .ql-picker-label::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item::before {
-  content: "14px";
-}
-.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
-  content: "10px";
-}
-
-.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
-  content: "18px";
-}
-.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
-.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
-  content: "32px";
-}
-
-.ql-snow .ql-picker.ql-header .ql-picker-label::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item::before {
-  content: "文本";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {
-  content: "标题1";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {
-  content: "标题2";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {
-  content: "标题3";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {
-  content: "标题4";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {
-  content: "标题5";
-}
-.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,
-.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
-  content: "标题6";
-}
-
-.ql-snow .ql-picker.ql-font .ql-picker-label::before,
-.ql-snow .ql-picker.ql-font .ql-picker-item::before {
-  content: "标准字体";
-}
-.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
-.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
-  content: "衬线字体";
-}
-.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
-.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
-  content: "等宽字体";
-}
 </style>

+ 0 - 1
src/components/upload/PublishArticle.vue

@@ -11,7 +11,6 @@
         </el-form-item>
         <el-form-item label="内容">
           <rich-text style="width: 80%; padding-right: 2px" @content="processContent" />
-          <!-- <mavon-editor v-model="content" style="width: 90%; padding-right: 2px" />-->
         </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="onSubmit">发布</el-button>

+ 0 - 10
src/main.js

@@ -22,16 +22,6 @@ Vue.use(uploader)
 import AudioPlayer from '@liripeng/vue-audio-player'
 Vue.use(AudioPlayer)
 
-import VueQuillEditor from 'vue-quill-editor'
-import 'quill/dist/quill.core.css'
-import 'quill/dist/quill.snow.css'
-import 'quill/dist/quill.bubble.css'
-Vue.use(VueQuillEditor)
-
-import 'mavon-editor/dist/css/index.css'
-import mavonEditor from 'mavon-editor'
-Vue.use(mavonEditor)
-
 import VueClipboards from 'vue-clipboard2'
 Vue.use(VueClipboards)
 

+ 0 - 7
src/router/mall.js

@@ -10,7 +10,6 @@ const ConfirmOrder = () => import('views/mall/ConfirmOrder')
 const Visit = () => import('views/mall/Visit')
 const Pay = () => import('views/mall/Pay')
 const Product = () => import('views/mall/Product')
-const BdMap = () => import('views/home/BdMap')
 const AMap = () => import('views/home/AMap')
 
 export default {
@@ -43,12 +42,6 @@ export default {
       component: AMap,
       meta: { needAuth: false }
     },
-    {
-      path: '/mall/bdmap',
-      name: 'BdMap',
-      component: BdMap,
-      meta: { needAuth: false }
-    },
     {
       path: '/mall/amap',
       name: 'AMap',

+ 0 - 267
src/views/home/BdMap.vue

@@ -1,267 +0,0 @@
-<template>
-  <el-row class="movie-list">
-    <el-col :md="24">
-      <el-row style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
-        <el-card class="box-card">
-          <div class="text item amap-wrapper">
-            <el-select v-model="form" placeholder="选择标签" @change="onChange">
-              <el-option label="全部" value="0" />
-              <el-option label="分类1" value="1" />
-              <el-option label="分类2" value="2" />
-              <el-option label="分类3" value="3" />
-            </el-select>
-            <!-- zoom=7 的比例尺为 100km   -->
-            <baidu-map
-              :center="mapCenter"
-              :scroll-wheel-zoom="true"
-              :zoom="7"
-              class="bm-view"
-              @click="getClickInfo"
-              @ready="onBaiduMapReady"
-            >
-              <!--比例尺控件左上角-->
-              <bm-scale anchor="BMAP_ANCHOR_TOP_LEFT" />
-              <!--缩放控件右下角-->
-              <bm-navigation anchor="BMAP_ANCHOR_BOTTOM_RIGHT" />
-              <bm-marker
-                v-for="(item,index) in markers"
-                :key="index"
-                :position="item.position"
-                @click="getMarkerInfoWrapper(item)"
-              >
-                <bm-label
-                  :content="item.title"
-                  :label-style="{color: 'blue', fontSize : '12px'}"
-                  :offset="{width: 0, height: 0}"
-                />
-              </bm-marker>
-            </baidu-map>
-          </div>
-        </el-card>
-      </el-row>
-    </el-col>
-
-    <!-- marker 内容弹窗   -->
-    <el-dialog
-      append-to-body
-      :visible.sync="showMarkerDialog"
-      :before-close="handleDialogClose"
-      width="30%"
-      center
-    >
-      <el-card class="box-card">
-        <div slot="header" class="clearfix">
-          <el-button
-            v-clipboard:copy="earthPoint.lat + ' ' + earthPoint.lng"
-            v-clipboard:success="onCopy"
-            v-clipboard:error="onCopyError"
-            type="text"
-          >GoogleEarth 坐标</el-button>
-        </div>
-        <div class="text item">
-          <el-image v-if="markerInfo.photoUrl !== null" :src="markerInfo.photoUrl" min-width="40" height="30" />
-          <br>
-          <label>
-            商品 <span v-text="markerInfo.itemId" />
-          </label>
-          <br>
-          <label>
-            SKU <span v-text="markerInfo.sku" />
-          </label>
-          <br>
-          <label>
-            评论 <span style="color: blue" v-text="markerInfo.replyContent" />
-          </label>
-          <br>
-          <!--          <label v-if="markerInfo.appendContent !== undefined || markerInfo.appendContent !== null">
-                      追加 <span style="color: blue" v-text="markerInfo.appendContent"/>
-                    </label>-->
-        </div>
-      </el-card>
-    </el-dialog>
-  </el-row>
-</template>
-
-<script>
-import Vue from 'vue'
-import BaiduMap from 'vue-baidu-map/components/map/Map.vue'
-import BmScale from 'vue-baidu-map/components/controls/Scale'
-import BmNavigation from 'vue-baidu-map/components/controls/Navigation'
-import BmMarker from 'vue-baidu-map/components/overlays/Marker'
-
-Vue.use(BaiduMap, {
-  ak: ''
-})
-
-import { getMapMarkers, getMarkerInfo } from '@/api/map'
-
-export default {
-  components: {
-    BaiduMap,
-    BmScale, // 比例尺
-    BmNavigation, // 缩放
-    BmMarker // 标记
-  },
-  data() {
-    return {
-      BMap: null,
-      markers: [],
-      mapCenter: { title: '武汉', lng: 114.0000, lat: 30.0000 },
-      showMarkerDialog: false,
-      markerInfo: {
-        itemId: null,
-        sku: null,
-        replyId: null,
-        replyContent: null,
-        appendContent: null,
-        photoUrl: null
-      },
-      earthPoint: {
-        lat: null,
-        lng: null
-      },
-      form: 0
-    }
-  },
-  created() {
-    document.title = '地图'
-  },
-  methods: {
-    onBaiduMapReady(e) {
-      const that = this
-      this.BMap = e.BMap
-      if (this.BMap) {
-        // 获取定位地址信息并赋值给声明变量
-        // Geolocation 对象的 getCurrentPosition()、watchPosition()、clearWatch() 方法详解 :https://blog.csdn.net/zyz00000000/article/details/82774543
-        const geolocation = new this.BMap.Geolocation()
-        // 通过 getCurrentPosition() 方法:获取当前的位置信息
-        geolocation.getCurrentPosition(res => {
-          // console.log('返回详细地址和经纬度', res)
-          const { lng, lat } = res.point
-          const { province, city, district, street, street_number } = res.address
-          that.choosedLocation = { province, city, district, addr: street + street_number, lng, lat }
-        })
-
-        const type = 0
-        this.getMapMarkersWrapper(type)
-      }
-    },
-    getClickInfo(e) {
-      // 此时已经可以获取到BMap类
-      if (this.BMap) {
-        const that = this
-        // Geocoder() 类进行地址解析
-        // 创建地址解析器的实例
-        const geoCoder = new this.BMap.Geocoder()
-        // getLocation() 类--利用坐标获取地址的详细信息
-        // getPoint() 类--获取位置对应的坐标
-        geoCoder.getLocation(e.point, function(res) {
-          const lng = e.point.lng
-          const lat = e.point.lat
-          const addrComponent = res.addressComponents
-          const surroundingPois = res.surroundingPois
-          const province = addrComponent.province
-          const city = addrComponent.city
-          const district = addrComponent.district
-          let addr = addrComponent.street
-          if (surroundingPois.length > 0 && surroundingPois[0].title) {
-            if (addr) {
-              addr += `-${surroundingPois[0].title}`
-            } else {
-              addr += `${surroundingPois[0].title}`
-            }
-          } else {
-            addr += addrComponent.streetNumber
-          }
-
-          that.choosedLocation = { province, city, district, addr, lng, lat }
-        })
-      }
-    },
-    getMapMarkersWrapper(type) {
-      this.markers = []
-      getMapMarkers(type).then(res => {
-        if (res.code === 0) {
-          this.$notify({
-            message: '加载了 ' + res.data.length + ' 条数据',
-            type: 'warning',
-            duration: 5000
-          })
-          this.markers = res.data
-        } else {
-          this.$notify({
-            message: res.msg,
-            type: 'warning',
-            duration: 3000
-          })
-        }
-      }).catch(error => {
-        this.$notify({
-          message: error.message,
-          type: 'warning',
-          duration: 3000
-        })
-      })
-    },
-    getMarkerInfoWrapper(item) {
-      this.earthPoint = item.position
-      this.showMarkerDialog = true
-      this.markerInfo = {
-        itemId: null,
-        sku: null,
-        replyId: null,
-        replyContent: null,
-        appendContent: null,
-        photoUrl: null
-      }
-
-      getMarkerInfo(item.id).then(res => {
-        if (res.code === 0) {
-          this.markerInfo = res.data
-        } else {
-          this.showMarkerDialog = false
-        }
-      }).catch(error => {
-        this.showMarkerDialog = false
-        console.log(error)
-      })
-    },
-    handleDialogClose(done) {
-      this.showMarkerDialog = false
-      this.earthPoint = { lat: null, lng: null }
-      done()
-    },
-    onCopy(e) {
-      this.$notify({
-        message: 'GoogleEarth 坐标已复制, 快到 GoogleEarth 中去找这个地方吧~',
-        type: 'warning',
-        duration: 3000
-      })
-    },
-    onCopyError(e) {
-      this.$notify({
-        message: '复制 GoogleEarth 坐标失败!',
-        type: 'error',
-        duration: 3000
-      })
-    },
-    onChange() {
-      const type = this.form
-      this.getMapMarkersWrapper(type)
-    }
-  }
-}
-</script>
-
-<style>
-.bm-view {
-  width: 100%;
-  height: 600px;
-}
-
-.movie-list {
-  padding-top: 15px;
-  padding-left: 1%;
-  padding-right: 1%;
-}
-</style>