许成详 6 anni fa
parent
commit
a7dee40c69

+ 2
- 2
config/index.js Vedi File

@@ -12,10 +12,10 @@ module.exports = {
12 12
     proxyTable: {
13 13
       '/api': {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15
-        // target: 'http://192.168.0.62:8080', //wf
15
+        target: 'http://192.168.0.62:8080', //wf
16 16
         // target: 'http://127.0.0.1:8080', 
17 17
         // target: 'http://192.168.0.11:8080', //ys
18
-        target: 'http://192.168.0.102:8080', //hyq
18
+        // target: 'http://192.168.0.102:8080', //hyq
19 19
         // target: 'http://dev.ycjcjy.com', //frp
20 20
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
21 21
         // pathRewrite: {

+ 1
- 1
dist/index.html Vedi File

@@ -1 +1 @@
1
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.dfa2b32e7157d9e9486ed21f5c5323e4.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.3c9a16350e1e47228e4f.js></script><script type=text/javascript src=./static/js/app.0ca2d6b1edbec6107881.js></script></body></html>
1
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet href=//at.alicdn.com/t/font_775069_dwqa9wy3lkh.css><link rel="shortcut icon" href=favorite.ico><title>城的空间后台管理系统</title><link href=./static/css/app.3e7d81cd138d6f50697b1f82be971a43.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.3c9a16350e1e47228e4f.js></script><script type=text/javascript src=./static/js/app.10ba80da90cc01dba75e.js></script></body></html>

+ 57
- 42
src/pages/system/marketingActivities/listOfLotteryActivities/edit.vue Vedi File

@@ -1,9 +1,6 @@
1 1
 <template>
2 2
   <div class="subPage flex-h">
3
-    <div class="img">
4
-      <img v-if="templateList.length" :src="templateList[templateActiveIndex].TplImg" width="100%" alt="">
5
-    </div>
6
-    <div class="flex-item">
3
+    <div class="flex-item" style="margin:20px;">
7 4
       <nav class="flex-h">
8 5
         <a class="flex-item" :class="{'active': activeIndex === 0}" @click="activeIndex = 0">基础信息</a>
9 6
         <a class="flex-item" :class="{'active': activeIndex === 1}" @click="activeIndex = 1">奖品信息</a>
@@ -72,13 +69,13 @@
72 69
                         <input type="file" :ref="'templateImg' + index" hidden @change="templateImgChange(item, $event)">
73 70
                         <img :src="item.MiniPic" style="width:100%;height:100%;object-fit: contain;">
74 71
                       </a>
72
+                      <span style="width:100%;display:block;text-align:center;font-size:11px;color:#ccc;">(双击更换背景图)</span>
75 73
                       <el-button
76 74
                         v-if="item.currentImg !== ''"
77 75
                         size="mini"
78 76
                         @click="resetCurrentImg(item, index)"
79 77
                         type="success">重置</el-button>
80 78
                     </div>
81
-                    <div class="drawTemplateItem"><span style="width:100%;display:block;text-align:left;font-size:11px;color:#ccc;">(双击更换背景图)</span></div>
82 79
                   </div>
83 80
                 </div>
84 81
               </li>
@@ -312,8 +309,11 @@
312 309
           @click="rebackList">取消</el-button>
313 310
       </div>
314 311
     </div>
312
+    <div class="img" style="margin-left:0px;margin-right:20px;">
313
+      <img v-if="templateList.length" :src="templateList[templateActiveIndex].TplImg" width="100%" alt="">
314
+    </div>
315 315
     <el-dialog
316
-      title="新增奖品"
316
+      :title="editPrizeOff ? '编辑奖品' : '新增奖品'"
317 317
       :visible.sync="centerDialogVisible"
318 318
       width="800px"
319 319
       @closed="prizeTypeChange();editPrizeOff = false"
@@ -337,13 +337,14 @@
337 337
             <span>是否实物:<em>*</em></span>
338 338
             <div class="flex-item">
339 339
               <el-switch
340
-                :disabled="isread"
340
+                :disabled="!editAll || isread"
341 341
                 v-model="addPrizeInfo.IsReality"
342 342
                 :active-value="1"
343 343
                 :inactive-value="0"
344 344
                 @change="checkIsReality"
345 345
                 :active-text="addPrizeInfo.IsReality ? '是' : '否'">
346 346
               </el-switch>
347
+              <span style="line-height:40px;font-size:11px;color:#ccc;">(选择“否”即为“谢谢参与”奖项)</span>
347 348
             </div>
348 349
           </li>
349 350
           <li class="flex-h" style="width:50%;float:left;" v-if="addPrizeInfo.PrizeType === 'third' && addPrizeInfo.IsReality === 1">
@@ -559,6 +560,8 @@ const { mapActions: mapCouponActions } = createNamespacedHelpers('coupon')
559 560
 export default {
560 561
   data () {
561 562
     return {
563
+      submitOff: true,
564
+      editPrizeOff: false,
562 565
       isread: false, // 是否预览模式
563 566
       editAll: true, // 是否全部能编辑
564 567
       editPrizePhoneIndex: '', // 编辑奖品内定手机号索引值
@@ -773,6 +776,13 @@ export default {
773 776
         })
774 777
         return false
775 778
       }
779
+      if (new Date(this.postData.BeginDate).getTime() > new Date(this.postData.EndDate).getTime()) {
780
+        this.$message({
781
+          type: 'error',
782
+          message: '活动截止时间不能小于开始时间'
783
+        })
784
+        return false
785
+      }
776 786
       if (this.postData.LuckdrawRule === '') {
777 787
         this.$message({
778 788
           type: 'error',
@@ -835,49 +845,54 @@ export default {
835 845
       this.$router.push({ name: 'listOfLotteryActivities' })
836 846
     },
837 847
     submitLuckdrawData () { // 提交活动信息
838
-      if (!this.checkData()) {
839
-        return false
840
-      }
841
-      this.postData.ShareAddNum = this.postData.ShareAddNum - 0
842
-      this.postData.LuckdrawNum = this.postData.LuckdrawNum - 0
843
-      if (!this.postData.IsInternalDefault) {
844
-        for (var n = 0; n < this.postData.Prizes.length; n++) {
845
-          this.postData.Prizes[n].Defaults = []
848
+      if (this.submitOff) {
849
+        this.submitOff = false
850
+        if (!this.checkData()) {
851
+          return false
846 852
         }
847
-      }
848
-      for (var a = 0; a < this.postData.Prizes.length; a++) {
849
-        if (this.postData.Prizes[a].IsReality) {
850
-          if (this.postData.Prizes[a].VerificationStart === '') {
853
+        this.postData.ShareAddNum = this.postData.ShareAddNum - 0
854
+        this.postData.LuckdrawNum = this.postData.LuckdrawNum - 0
855
+        if (!this.postData.IsInternalDefault) {
856
+          for (var n = 0; n < this.postData.Prizes.length; n++) {
857
+            this.postData.Prizes[n].Defaults = []
858
+          }
859
+        }
860
+        for (var a = 0; a < this.postData.Prizes.length; a++) {
861
+          if (this.postData.Prizes[a].IsReality) {
862
+            if (this.postData.Prizes[a].VerificationStart === '') {
863
+              delete this.postData.Prizes[a].VerificationStart
864
+              delete this.postData.Prizes[a].VerificationEnd
865
+            } else {
866
+              delete this.postData.Prizes[a].ValidDays
867
+            }
868
+          } else {
851 869
             delete this.postData.Prizes[a].VerificationStart
852 870
             delete this.postData.Prizes[a].VerificationEnd
853
-          } else {
854 871
             delete this.postData.Prizes[a].ValidDays
855 872
           }
856
-        } else {
857
-          delete this.postData.Prizes[a].VerificationStart
858
-          delete this.postData.Prizes[a].VerificationEnd
859
-          delete this.postData.Prizes[a].ValidDays
860 873
         }
861
-      }
862
-      // console.log(JSON.stringify(this.postData))
863
-      if (this.$route.query.id) { // 编辑模式
864
-        this.editLuckdraw(this.postData).then((res) => {
865
-          // console.log(JSON.stringify(this.postData))
866
-          this.$message({
867
-            message: '操作成功',
868
-            type: 'success'
874
+        // console.log(JSON.stringify(this.postData))
875
+        if (this.$route.query.id) { // 编辑模式
876
+          this.editLuckdraw(this.postData).then((res) => {
877
+            // console.log(JSON.stringify(this.postData))
878
+            this.submitOff = true
879
+            this.$message({
880
+              message: '操作成功',
881
+              type: 'success'
882
+            })
883
+            this.$router.push({ name: 'listOfLotteryActivities' })
869 884
           })
870
-          this.$router.push({ name: 'listOfLotteryActivities' })
871
-        })
872
-      } else { // 新增模式
873
-        this.addLuckdraw(this.postData).then((res) => {
874
-          // console.log(JSON.stringify(this.postData))
875
-          this.$message({
876
-            message: '操作成功',
877
-            type: 'success'
885
+        } else { // 新增模式
886
+          this.addLuckdraw(this.postData).then((res) => {
887
+            // console.log(JSON.stringify(this.postData))
888
+            this.submitOff = true
889
+            this.$message({
890
+              message: '操作成功',
891
+              type: 'success'
892
+            })
893
+            this.$router.push({ name: 'listOfLotteryActivities' })
878 894
           })
879
-          this.$router.push({ name: 'listOfLotteryActivities' })
880
-        })
895
+        }
881 896
       }
882 897
     },
883 898
     addPrizeItemPhone (index) { // 编辑奖品内定号码

+ 4
- 4
src/pages/system/marketingActivities/listOfLotteryActivities/index.vue Vedi File

@@ -62,7 +62,7 @@
62 62
             prop="Name"
63 63
             label="活动名称">
64 64
             <template slot-scope="scope">
65
-              <router-link style="color:#333;" :to="{name: 'editLotteryActivities', query: {id: scope.row.Id, isread: 1}}">{{scope.row.Name}}</router-link>
65
+              <router-link style="color: #409EFF;" :to="{name: 'editLotteryActivities', query: {id: scope.row.Id, isread: 1}}">{{scope.row.Name}}</router-link>
66 66
             </template>
67 67
           </el-table-column>
68 68
           <el-table-column
@@ -124,7 +124,7 @@
124 124
                 type="success"
125 125
                 @click="getRecordListInfo(scope.row.Id)">抽奖记录</el-button>
126 126
               <el-button
127
-                v-if="scope.row.Status === 1 && new Date(scope.row.EndDate).getTime() > new Date().getTime()"
127
+                v-if="new Date(scope.row.EndDate).getTime() > new Date().getTime()"
128 128
                 size="mini"
129 129
                 type="primary"
130 130
                 v-clipboard:copy="clientUrl + '/game/luckdraw/#/?lotteryId=' + scope.row.Id"
@@ -153,7 +153,7 @@
153 153
       <div class="popupSearch">
154 154
         <div style="width:200px;">
155 155
           <el-input
156
-            placeholder="请输入手机号"
156
+            placeholder="请输入用户手机号"
157 157
             v-model="sharePostData.tel"
158 158
             clearable>
159 159
           </el-input>
@@ -227,7 +227,7 @@
227 227
       <div class="popupSearch">
228 228
         <div style="width:200px;">
229 229
           <el-input
230
-            placeholder="请输入手机号"
230
+            placeholder="请输入用户手机号"
231 231
             v-model="recordsPostData.tel"
232 232
             clearable>
233 233
           </el-input>

+ 1
- 1
src/pages/system/marketingActivities/snapUpList/edit.vue Vedi File

@@ -184,7 +184,7 @@ export default {
184 184
         ValidateStart: '', // 有效期开始时间
185 185
         ValidateEnd: '', // 有效期截止时间
186 186
         ValidateType: 'days', // 核销类型
187
-        FlashBuyStatus: 'active', // 活动状态
187
+        FlashBuyStatus: 'inactive', // 活动状态
188 188
       },
189 189
       editorOption: {
190 190
       },

+ 1
- 2
src/pages/system/marketingActivities/snapUpList/index.vue Vedi File

@@ -59,7 +59,7 @@
59 59
             prop="FlashBuyName"
60 60
             label="活动名称">
61 61
             <template slot-scope="scope">
62
-              <router-link style="color:#333;" :to="{name: 'editSnapUpList', query: {id: scope.row.FlashBuyId, isread: 1}}">{{scope.row.FlashBuyName}}</router-link>
62
+              <router-link style="color: #409EFF;" :to="{name: 'editSnapUpList', query: {id: scope.row.FlashBuyId, isread: 1}}">{{scope.row.FlashBuyName}}</router-link>
63 63
             </template>
64 64
           </el-table-column>
65 65
           <el-table-column
@@ -98,7 +98,6 @@
98 98
                 type="success"
99 99
                 @click="getRecords(scope.row.FlashBuyId)">抢购记录</el-button>
100 100
               <el-button
101
-                v-if="scope.row.FlashBuyStatus === 'active'"
102 101
                 size="mini"
103 102
                 type="primary"
104 103
                 v-clipboard:copy="clientUrl + '/wechat/user.html#/rush?flashBuyId=' + scope.row.FlashBuyId"