Browse Source

爆款产品

zhuliu 1 năm trước cách đây
mục cha
commit
ff82d95ff5

+ 3 - 2
src/config/index.js

@@ -3,7 +3,8 @@ export default {
   updateTime:'2023-08-04 08:00:00',
   specialDays:['05-12','09-18','12-13'],
   host: window.location.host,
+  url:process.env.NODE_ENV === 'production' ? 'https://weixin.xsip.cn' : 'http://192.168.2.24:8080',
   imgURL: process.env.NODE_ENV !== 'production' ? 'https://xsip.cn' : 'http://192.168.1.19:8802',
-  staticURL:process.env.NODE_ENV !== 'production' ? '139.224.24.90' : '192.168.1.24',
-  WebSocketPath: process.env.NODE_ENV === 'production' ? '139.224.24.90:8879' : '192.168.2.113:8902',
+  staticURL:process.env.NODE_ENV !== 'production' ? 'https://xsip.cn/onlinePreview' : 'http://192.168.2.24:8012',
+  WebSocketPath: process.env.NODE_ENV === 'production' ? 'wss://weixin.xsip.cn' : 'ws://192.168.2.113:8902',
 }

+ 1 - 1
src/permission.js

@@ -15,7 +15,7 @@ router.beforeEach((to, from, next) => {
     } else {
       if (store.getters.roles.length === 0) {
         store.dispatch('GetInfo').then(res => { // 拉取用户信息
-          console.log(res)
+          // console.log(res)
           // var menus=res.data.menus;
           var menus=[];
           menus = [

+ 1 - 1
src/utils/common.js

@@ -7,7 +7,7 @@ export default {
     if(!guid){
       return ''
     }
-    return `${Config.imgURL}/fileManager/downloadFile?fileId=${guid}`
+    return `/fileManager/downloadFile?fileId=${guid}`
   },
    //校验文件是否全部上传
    validFile(data,arr) {

+ 1 - 2
src/views/component/fileView/fileView.vue

@@ -41,8 +41,7 @@ export default {
       var that = this
       var src = this.$commonJS.getFile(this.guid)
       var previewUrl = src + '&fullfilename=test.'+this.type
-      console.log(previewUrl,window.location.origin)
-      this.FileUrl = `http://${this.$c.staticURL}:8012/onlinePreview?url=` + encodeURIComponent(Base64.encode(window.location.origin+previewUrl))
+      this.FileUrl = `${this.$c.staticURL}/onlinePreview?url=` + encodeURIComponent(Base64.encode(this.$c.url+previewUrl))
       console.log(this.FileUrl)
       this.loadLoading = true
       this.$nextTick(()=>{

+ 1 - 1
src/views/layout/mixin/index.js

@@ -4,7 +4,7 @@ import Store from '@/store'
 export const webSocket = {
   methods: {
     connectWebSocket(userId) {
-      let webSocket = new WebSocket(`ws://${Config.WebSocketPath}/xiaoshi-weixinback/ws/` + userId)
+      let webSocket = new WebSocket(`${Config.WebSocketPath}/xiaoshi-weixinback/ws/` + userId)
       Store.commit('SET_WEB_SOCKET', webSocket)
       webSocket.onopen = () => {
         console.log('WebSocket连接成功')

+ 8 - 1
src/views/pms/product/components/ProductDetail.vue

@@ -33,7 +33,7 @@
         <el-form-item label="产品图:" >
           <myUpload :file-list="files" @on-change="onChange" @on-remove="onRemove" :autoUpload="true"></myUpload>
         </el-form-item>
-        <el-form-item label="检索条件:">
+        <el-form-item label="检索条件:" prop="searchCondition">
           <el-input type="textarea" v-model="productParam.searchCondition" placeholder="请输入检索条件"></el-input>
         </el-form-item>
         <el-form-item label="来源:">
@@ -45,6 +45,9 @@
         <el-form-item label="售卖平台链接:">
           <el-input v-model="productParam.platformLink" placeholder="请输入售卖平台链接"></el-input>
         </el-form-item>
+        <el-form-item label="亚马逊链接:">
+          <el-input v-model="productParam.amazonLink" placeholder="请输入亚马逊链接"></el-input>
+        </el-form-item>
         <el-form-item label="销冠品牌:">
           <el-input v-model="productParam.bestSellingBrand" placeholder="请输入销冠品牌"></el-input>
         </el-form-item>
@@ -81,6 +84,7 @@
     sourceFrom:'',//来源
     sellPlatform:'',//售卖平台
     platformLink:'',//平台链接
+    amazonLink:'',//亚马逊链接
     price:'',//价格
     bestSellingBrand:'',//品牌
     fileGuids:[],//图片
@@ -108,6 +112,9 @@
             {required: true, message: '请输入产品名称', trigger: 'blur'},
             {min: 2, max: 140, message: '长度在 2 到 140 个字符', trigger: 'blur'}
           ],
+          searchCondition: [
+            {required: true, message: '请输入检索条件', trigger: 'blur'}
+          ],
           productCategoryId: [{required: true, message: '请选择产品分类', trigger: 'blur'}],
         },
         show:true