Browse Source

fix:分销总平台完整版

Tang 2 years ago
parent
commit
7cbe427e17

+ 5 - 2
.env.development

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE =中正云教育管理后
+VUE_APP_TITLE =中正
 
 # 开发环境配置
 ENV = 'development'
@@ -10,4 +10,7 @@ VUE_APP_BASE_API = 'http://120.79.166.78:19013/'
 VUE_APP_IMG_API = 'https://file-dev.xyyxt.net'
 
 # 路由懒加载
-VUE_CLI_BABEL_TRANSPILE_MODULES = true
+VUE_CLI_BABEL_TRANSPILE_MODULES = true
+
+#端口号
+port = 81

+ 2 - 2
.env.production

@@ -1,11 +1,11 @@
 # 页面标题
-VUE_APP_TITLE = 中正云教育管理后
+VUE_APP_TITLE = 中正
 
 # 生产环境配置
 ENV = 'production'
 
 # 中正云教育管理后台/生产环境
-VUE_APP_BASE_API = 'https://cloud.xyyxt.net/'
+VUE_APP_BASE_API = 'https://ptapi.gdzzkj.net/'
 VUE_APP_IMG_API = 'https://file.xyyxt.net'
 
 # 路由懒加载

+ 1 - 1
.env.staging

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 中正云教育管理后
+VUE_APP_TITLE = 中正
 
 NODE_ENV = production
 

BIN
src/assets/images/left@2x.png


BIN
src/assets/images/left_slices/left@2x.png


+ 40 - 0
src/components/modelView/index.vue

@@ -67,6 +67,20 @@
         alt=""
       /> -->
     </vue-draggable-resizable>
+    <vue-draggable-resizable
+      @dragstop="onDragstop7"
+      @resizestop="onResizeStop7"
+      :w="modelData.distributionText.width"
+      :h="modelData.distributionText.height"
+      :x="modelData.distributionText.left"
+      :y="modelData.distributionText.top"
+      :parent="true"
+      v-if="modelData.distributionText.checked"
+    >
+      <p style="white-space: pre-wrap" :style="modelData.distributionText.css">
+        {{ modelData.distributionText.name }}
+      </p>
+    </vue-draggable-resizable>
     <!-- 电子名片码 -->
     <vue-draggable-resizable
       @dragstop="onDragstop4"
@@ -87,6 +101,20 @@
         alt=""
       /> -->
     </vue-draggable-resizable>
+    <vue-draggable-resizable
+      @dragstop="onDragstop8"
+      @resizestop="onResizeStop8"
+      :w="modelData.cardCodeText.width"
+      :h="modelData.cardCodeText.height"
+      :x="modelData.cardCodeText.left"
+      :y="modelData.cardCodeText.top"
+      :parent="true"
+      v-if="modelData.cardCodeText.checked"
+    >
+      <p style="white-space: pre-wrap" :style="modelData.cardCodeText.css">
+        {{ modelData.cardCodeText.name }}
+      </p>
+    </vue-draggable-resizable>
     <!-- 广告语 -->
     <vue-draggable-resizable
       @dragstop="onDragstop5"
@@ -210,6 +238,18 @@ export default {
     onResizeStop6(left, top, width, height) {
       this.backData("mechanism", left, top, width, height);
     },
+    onDragstop7(left, top) {
+      this.backData("distributionText", left, top);
+    },
+    onResizeStop7(left, top, width, height) {
+      this.backData("distributionText", left, top, width, height);
+    },
+    onDragstop8(left, top) {
+      this.backData("cardCodeText", left, top);
+    },
+    onResizeStop8(left, top, width, height) {
+      this.backData("cardCodeText", left, top, width, height);
+    },
 
     backData(name, left, top, width, height) {
       this.$emit("changeModelData", { name, left, top, width, height });

+ 1 - 1
src/layout/components/Sidebar/Logo.vue

@@ -36,7 +36,7 @@ export default {
   },
   data() {
     return {
-      title: '中正云教育',
+      title: '中正平台',
       logo: logoImg,
       logoYT:logoYTImg,
     }

+ 3 - 2
src/utils/request.js

@@ -7,8 +7,9 @@ import methods from '@/utils/methodsTool';
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
 // 创建axios实例
-// export const baseURL = process.env.VUE_APP_BASE_API
-export const baseURL = 'http://192.168.1.222:7077/'
+export const baseURL = process.env.VUE_APP_BASE_API
+// export const baseURL = 'https://ptapi.gdzzkj.net/'
+// export const baseURL = 'http://192.168.1.7:7077/'
 export const BASE_IMG_URL = process.env.VUE_APP_IMG_API
 const service = axios.create({
   // axios中请求配置有baseURL选项,表示请求URL公共部分

+ 37 - 23
src/views/Marketing/activitySystem/activityList/activityInfo/index.vue

@@ -14,10 +14,18 @@
     ></el-form>
     <div style="text-align: center">
       <el-button @click="close">取消</el-button>
-      <el-button type="primary" @click="submitForm('ruleForm')" v-if="status !== 'info'"
+      <el-button
+        v-loading="loading"
+        type="primary"
+        @click="submitForm('ruleForm')"
+        v-if="status !== 'info'"
         >保存</el-button
       >
-      <el-button type="primary" @click="submitForm('ruleForm', true)" v-if="status !== 'info'"
+      <el-button
+        v-loading="loading"
+        type="primary"
+        @click="submitForm('ruleForm', true)"
+        v-if="status !== 'info'"
         >发布</el-button
       >
     </div>
@@ -32,6 +40,7 @@ export default {
   components: { First, Second, Three },
   data() {
     return {
+      loading: false,
       ruleForm: {
         publishStatus: 0,
         goodsList: [], //商品列表
@@ -50,23 +59,23 @@ export default {
         ],
       },
       id: "",
-      status:""
+      status: "",
     };
   },
   created() {
     this.id = this.$route.query.id;
-    this.status = this.$route.query.status
+    this.status = this.$route.query.status;
     if (this.id) {
       this.getInit();
     }
   },
   methods: {
     close() {
-        this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
-          this.$router.push({
-            path: "activityList",
-          });
+      this.$store.dispatch("tagsView/exitView", this.$route).then((res) => {
+        this.$router.push({
+          path: "activityList",
         });
+      });
     },
     getInit() {
       this.$api.distributiontempdata(this.id).then((res) => {
@@ -74,8 +83,8 @@ export default {
           parseInt(res.data.startTime * 1000),
           parseInt(res.data.endTime * 1000),
         ];
-        res.data.goodsList = res.data.goodsList || []
-        res.data.tenantList = res.data.tenantList || []
+        res.data.goodsList = res.data.goodsList || [];
+        res.data.tenantList = res.data.tenantList || [];
         this.$nextTick(() => {
           this.ruleForm = res.data;
         });
@@ -87,6 +96,7 @@ export default {
         if (valid) {
           this.checkGoodsFunc()
             .then(() => {
+              this.loading = true;
               var data = JSON.parse(JSON.stringify(this.ruleForm));
               data.startTime = data.timeList[0] / 1000;
               data.endTime = data.timeList[1] / 1000;
@@ -95,18 +105,22 @@ export default {
               }
               this.$api[
                 data.id ? "editdistributiontemp" : "distributiontempsave"
-              ](data).then((res) => {
-                this.$message.success("成功");
-                setTimeout(() => {
-                  this.$store
-                    .dispatch("tagsView/exitView", this.$route)
-                    .then((res) => {
-                      this.$router.push({
-                        path: "activityList",
+              ](data)
+                .then((res) => {
+                  this.$message.success("成功");
+                  setTimeout(() => {
+                    this.$store
+                      .dispatch("tagsView/exitView", this.$route)
+                      .then((res) => {
+                        this.$router.push({
+                          path: "activityList",
+                        });
                       });
-                    });
-                }, 300);
-              });
+                  }, 300);
+                })
+                .finally(() => {
+                  this.loading = false;
+                });
             })
             .catch((err) => {
               this.$message.error(err);
@@ -124,13 +138,13 @@ export default {
           if (this.ruleForm.goodsList[i].profitType === 1) {
             //百分比处理
             if (this.ruleForm.goodsList[i].profitMax > 100) {
-              return reject(`请检查第${i + 1}个商品的数设置`);
+              return reject(`请检查第${i + 1}个商品的数设置`);
             } else {
               let countNum =
                 parseFloat(this.ruleForm.goodsList[i].profitOne) +
                 parseFloat(this.ruleForm.goodsList[i].profitTwo) +
                 parseFloat(this.ruleForm.goodsList[i].profitThree);
-              if (countNum > this.ruleForm.goodsList[i].profitMax) {
+              if (countNum > 100) {
                 return reject(
                   `请检查第${
                     i + 1

+ 1 - 1
src/views/Marketing/activitySystem/activityList/index.vue

@@ -50,7 +50,7 @@
     >
       <template>
         <div class="posterUrl_style">
-          <img :src="$methodsTools.splitImgHost(posterUrl)" alt="" />
+          <img style="width: 100%;height:100%;" :src="$methodsTools.splitImgHost(posterUrl)" alt="" />
           <div
             class="code_style"
             v-if="modelData.distribution && modelData.distribution.checked"

+ 108 - 16
src/views/Marketing/activitySystem/posterList/model.vue

@@ -82,6 +82,45 @@
                   >电子名片码</el-checkbox
                 >
               </div>
+              <div class="lis">
+                <el-checkbox v-model="modelData.distributionText.checked"
+                  >分销码说明:</el-checkbox
+                ><el-input
+                  type="textarea"
+                  :rows="2"
+                  v-model="modelData.distributionText.name"
+                ></el-input
+                ><el-color-picker
+                  v-model="modelData.distributionText.css.color"
+                  show-alpha
+                ></el-color-picker>
+                <el-input
+                  placeholder="请输入字体大小"
+                  v-model="modelData.distributionText.css.fontSize"
+                >
+                  <template slot="prepend">字体大小</template></el-input
+                >
+              </div>
+
+              <div class="lis">
+                <el-checkbox v-model="modelData.cardCodeText.checked"
+                  >电子名片码说明:</el-checkbox
+                ><el-input
+                  type="textarea"
+                  :rows="2"
+                  v-model="modelData.cardCodeText.name"
+                ></el-input
+                ><el-color-picker
+                  v-model="modelData.cardCodeText.css.color"
+                  show-alpha
+                ></el-color-picker>
+                <el-input
+                  placeholder="请输入字体大小"
+                  v-model="modelData.cardCodeText.css.fontSize"
+                >
+                  <template slot="prepend">字体大小</template></el-input
+                >
+              </div>
               <div class="lis">
                 <el-checkbox v-model="modelData.advertise.checked"
                   >广告语:</el-checkbox
@@ -176,18 +215,16 @@ export default {
           name: "",
           type: 1,
           top: 38,
-          left: 0,
-          width: 375,
+          left: 1,
+          width: 373,
           height: 50,
           css: {
             textAlign: "center",
             fontSize: "30px",
             margin: "0px",
-            lineHeight: "36px",
           },
         },
         goods: {
-          // name: require("@/assets/model_images/model1.png"),
           name: "",
           type: 2,
           top: 126,
@@ -211,6 +248,19 @@ export default {
             height: "100%",
           },
         },
+        distributionText: {
+          name: "",
+          type: 1,
+          top: 597,
+          left: 114,
+          width: 121,
+          height: 44,
+          css: {
+            fontSize: "16px",
+            margin: "0px",
+            lineHeight: "normal",
+          },
+        },
         cardCode: {
           name: "",
           type: 3,
@@ -223,6 +273,19 @@ export default {
             height: "100%",
           },
         },
+        cardCodeText: {
+          name: "",
+          type: 1,
+          top: 597,
+          left: 244,
+          width: 121,
+          height: 44,
+          css: {
+            fontSize: "16px",
+            margin: "0px",
+            lineHeight: "normal",
+          },
+        },
         advertise: {
           name: "",
           type: 1,
@@ -231,9 +294,9 @@ export default {
           width: 102,
           height: 96,
           css: {
+            lineHeight: "normal",
             fontSize: "20px",
             margin: "0px",
-            lineHeight: "36px",
           },
         },
         mechanism: {
@@ -247,7 +310,6 @@ export default {
             fontSize: "16px",
             textAlign: "center",
             margin: "0px",
-            lineHeight: "36px",
           },
         },
       },
@@ -279,7 +341,7 @@ export default {
         this.$nextTick(() => {
           this.modelData = {
             background: {
-              checked:false,
+              checked: true,
               name: "",
               type: 0,
               css: {
@@ -291,22 +353,22 @@ export default {
               },
             },
             title: {
-              checked:false,
+              checked: true,
               name: "",
               type: 1,
               top: 38,
-              left: 0,
-              width: 375,
+              left: 1,
+              width: 373,
               height: 50,
               css: {
                 textAlign: "center",
                 fontSize: "30px",
                 margin: "0px",
+                lineHeight: "36px",
               },
             },
             goods: {
-              checked:false,
-              // name: require("@/assets/model_images/model1.png"),
+              checked: true,
               name: "",
               type: 2,
               top: 126,
@@ -319,7 +381,7 @@ export default {
               },
             },
             distribution: {
-              checked:false,
+              checked: true,
               name: "",
               type: 3,
               top: 476,
@@ -331,8 +393,22 @@ export default {
                 height: "100%",
               },
             },
+            distributionText: {
+              checked: true,
+              name: "",
+              type: 1,
+              top: 597,
+              left: 114,
+              width: 121,
+              height: 44,
+              css: {
+                fontSize: "16px",
+                margin: "0px",
+                lineHeight: "normal",
+              },
+            },
             cardCode: {
-              checked:false,
+              checked: true,
               name: "",
               type: 3,
               top: 476,
@@ -344,8 +420,22 @@ export default {
                 height: "100%",
               },
             },
+            cardCodeText: {
+              checked: true,
+              name: "",
+              type: 1,
+              top: 597,
+              left: 244,
+              width: 121,
+              height: 44,
+              css: {
+                fontSize: "16px",
+                margin: "0px",
+                lineHeight: "normal",
+              },
+            },
             advertise: {
-              checked:false,
+              checked: true,
               name: "",
               type: 1,
               top: 490,
@@ -355,10 +445,11 @@ export default {
               css: {
                 fontSize: "20px",
                 margin: "0px",
+                lineHeight: "normal",
               },
             },
             mechanism: {
-              checked:false,
+              checked: true,
               name: "",
               type: 1,
               top: 623,
@@ -369,6 +460,7 @@ export default {
                 fontSize: "16px",
                 textAlign: "center",
                 margin: "0px",
+                lineHeight: "normal",
               },
             },
           };

+ 0 - 5
src/views/Marketing/distribution/commissionList/index.vue

@@ -93,11 +93,6 @@ export default {
           prop: "telphone",
           hidden: true,
         },
-        {
-          label: "邀请人ID",
-          prop: "parentId",
-          hidden: true,
-        },
         {
           label: "邀请人姓名",
           prop: "parentName",

+ 0 - 5
src/views/Marketing/distribution/distributionOrder/index.vue

@@ -133,11 +133,6 @@ export default {
       },
       // 表单
       tableSet: [
-        {
-          label: "编号",
-          prop: "orderGoodsId",
-          hidden: true,
-        },
         {
           label: "订单号",
           prop: "orderSn",

+ 1 - 0
src/views/Marketing/distribution/rankingList/index.vue

@@ -78,6 +78,7 @@ export default {
           prop: "sortType",
           placeholder: "排行榜类型",
           scope: "select",
+          noClear:false,
           options: [
             { label: "佣金", value: 1 },
             { label: "订单数", value: 2 },

+ 3 - 8
src/views/Marketing/distribution/salesmanList/index.vue

@@ -105,7 +105,7 @@ export default {
         },
         {
           label: "手机号",
-          prop: "telphone",
+          prop: "phonenumber",
           hidden: true,
         },
         {
@@ -124,11 +124,6 @@ export default {
           hidden: true,
           scope:"isgzhOpenId"
         },
-        {
-          label: "邀请人ID",
-          prop: "parentAccount",
-          hidden: true,
-        },
         {
           label: "邀请人姓名",
           prop: "parentName",
@@ -147,11 +142,11 @@ export default {
           options: [
             {
               label: "有效",
-              value: 0,
+              value: 1,
             },
             {
               label: "禁止",
-              value: 1,
+              value: 0,
             },
           ],
         },

+ 19 - 0
src/views/login.vue

@@ -1,6 +1,10 @@
 <template>
   <div class="login">
     <div class="login_Left">
+      <h2 class="topName">
+        <img src="@/assets/images/logo@2xSYT.png" alt="" />
+        中正平台
+      </h2>
       <div class="anima1"></div>
       <div class="anima2"></div>
       <div class="anima3"></div>
@@ -200,6 +204,21 @@ export default {
     background: url("../assets/images/left@2x.png") no-repeat center;
     background-size: contain;
     overflow: hidden;
+    .topName {
+      user-select: none;
+      cursor: unset;
+      img {
+        width: 54.4px;
+        height: 38.4px;
+        vertical-align: bottom;
+      }
+      text-shadow: 0px 0px 3px rgba(41, 115, 255, 0.7);
+      position: absolute;
+      color: rgb(41, 115, 255);
+      top: 50px;
+      left: 150px;
+      font-size: 32px;
+    }
     .anima1 {
       position: fixed;
       top: 343px;

+ 2 - 2
vue.config.js

@@ -5,9 +5,9 @@ function resolve(dir) {
   return path.join(__dirname, dir)
 }
 
-const name = process.env.VUE_APP_TITLE || '中正云教育管理后台' // 网页标题
+const name = process.env.VUE_APP_TITLE || '中正台' // 网页标题
 
-const port = process.env.port || process.env.npm_config_port || 80 // 端口
+const port = process.env.port || process.env.npm_config_port || 81 // 端口
 
 // vue.config.js 配置说明
 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions