Browse Source

提交修改

1
mo 2 years ago
parent
commit
25cdc48be4

+ 5 - 1
build/webpack.dev.conf.js

@@ -82,7 +82,11 @@ module.exports = new Promise((resolve, reject) => {
       // Add FriendlyErrorsPlugin
       devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
         compilationSuccessInfo: {
-          messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
+          messages: [
+            `App runing at: `,
+            `Local: http://localhost:${port}`,
+            `Network: http://${require('ip').address()}:${port}`,
+          ],
         },
         onErrors: config.dev.notifyOnErrors
         ? utils.createNotifierCallback()

+ 6 - 4
config/index.js

@@ -3,10 +3,12 @@
 // see http://vuejs-templates.github.io/webpack for documentation.
 
 const path = require('path')
-const proxyUrl = 'https://dev.colexiu.com'
+// const proxyUrl = 'https://dev.colexiu.com'
+const proxyUrl = 'https://test.dayaedu.com'
+
 module.exports = {
   dev: {
-
+    host:'0.0.0.0',
     // Paths
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
@@ -15,7 +17,7 @@ module.exports = {
         target: proxyUrl,
         changeOrigin: true
       },
-      '/api-admin': {
+      '/api-web': {
         target: proxyUrl,
         changeOrigin: true
       },
@@ -27,7 +29,7 @@ module.exports = {
     },
 
     // Various Dev Server settings
-    host: 'localhost', // can be overwritten by process.env.HOST
+    host: '0.0.0.0', // can be overwritten by process.env.HOST
     useLocalIp: true,
     port: 8090, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,

+ 3 - 1
config/prod.env.js

@@ -3,4 +3,6 @@ module.exports = {
   NODE_ENV: '"production"',
 
 }
-BASE_API: '"http://dev.colexiu.com"'
+BASE_API: '"https://test.dayaedu.com"'
+// BASE_API: '"http://dev.colexiu.com"'
+// let target = "https://test.dayaedu.com";

+ 2 - 2
package.json

@@ -1,11 +1,11 @@
 {
   "name": "mall-admin-web",
   "version": "1.0.0",
-  "description": "mall后台管理前端",
+  "description": "商城后台管理",
   "author": "macro",
   "private": true,
   "scripts": {
-    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js",
+    "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js --host 0.0.0.0",
     "start": "npm run dev",
     "build": "node build/build.js"
   },

+ 1 - 1
src/api/oss.js

@@ -2,7 +2,7 @@ import request from '@/utils/request'
 import qs from 'qs'
 export function policy(data) {
   return request({
-    url:'/api-admin/getUploadSign',
+    url:'/api-web/getUploadSign',
     method:'POST',
     headers: { 'Content-Type': 'application/json' },
     data

+ 1 - 1
src/utils/request.js

@@ -18,7 +18,7 @@ service.interceptors.request.use(config => {
     config.headers['Authorization'] = tocken // 让每个请求携带自定义token 请根据实际情况自行修改
   }
   if(config.url.indexOf('/api-mall-admin')== -1){
-    if(config.url.indexOf('/api-admin')== -1 && config.url.indexOf('/api-auth')== -1){
+    if(config.url.indexOf('/api-web')== -1 && config.url.indexOf('/api-auth')== -1){
       config.url = '/api-mall-admin'+config.url
     }
   }

+ 1 - 1
src/views/sms/advertise/components/HomeAdvertiseDetail.vue

@@ -117,7 +117,7 @@ export default {
   },
   data() {
     return {
-      homeAdvertise: null,
+      homeAdvertise: {name:''},
       rules: {
         name: [
           { required: true, message: "请输入广告名称", trigger: "blur" },