Kaynağa Gözat

装修优化+排行榜

Blacked 2 yıl önce
ebeveyn
işleme
f750e274e6

+ 3 - 3
src/components/verifition/Verify.vue

@@ -1,5 +1,5 @@
 <template>
-  <div v-show="showBox" :class="mode=='pop'?'verify-mask':''">
+  <div v-show="showBox" :class="mode=='pop'?'verify-mask':''" style="touch-action:pan-y;">
     <div :class="mode=='pop'?'verifybox':''" :style="{'max-width':parseInt(imgSize.width)+30+'px'}">
       <div v-if="mode=='pop'" class="verifybox-top">
         {{ $t("pleaseCompleteTheSecurityVerification") }}
@@ -7,7 +7,7 @@
           <i class="iconfont icon-close" />
         </span>
       </div>
-      <div class="verifybox-bottom" :style="{padding:mode=='pop'?'15px':'0'}">
+      <div class="verifybox-bottom" :style="{padding:mode=='pop'?'5px':'0'}">
         <!-- 验证码容器 -->
         <components
           :is="componentType"
@@ -235,7 +235,7 @@ export default {
         top: 0;
         left:0;
         z-index: 1001;
-        width: 100%;
+        width: 100vw;
         height: 100vh;
         background: rgba(0,0,0,.3);
         /* display: none; */

+ 1 - 1
src/views/common/login.vue

@@ -41,7 +41,7 @@
     <Verify
       ref="verify"
       :captcha-type="'blockPuzzle'"
-      :img-size="{width:'400px',height:'200px'}"
+      :img-size="{width:'350px',height:'175px'}"
       @success="login"
     />
   </div>

+ 16 - 2
src/views/modules/distribution/activity/distribution-activity.vue

@@ -96,6 +96,11 @@
           >
             <template slot-scope="scope">
               <div class="text-btn-con">
+                <div
+                  class="default-btn text-btn"
+                  @click="toRank(scope.row.activityId)"
+                >排行榜
+                </div>
                 <div
                   class="default-btn text-btn"
                   @click="addOrUpdateHandle(scope.row.activityId)"
@@ -129,16 +134,18 @@
 
     <!-- 弹窗, 新增 / 修改 -->
     <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+    <rankList v-if="rankVisible" ref="rankdia"></rankList>
   </div>
 </template>
 
 <script>
+import rankList from './distribution-rank.vue'
 import AddOrUpdate from './distribution-activity-add-or-update'
 export default {
   data () {
     return {
       theData: null, // 保存上次点击查询的请求条件
-
+      rankVisible: false,
       dataForm: {
       },
       page: {
@@ -156,12 +163,19 @@ export default {
     }
   },
   components: {
-    AddOrUpdate
+    AddOrUpdate,
+    rankList
   },
   created () {
     this.getDataList()
   },
   methods: {
+    toRank (activityId) {
+      this.rankVisible = true
+      this.$nextTick(() => {
+        this.$refs.rankdia.init(activityId)
+      })
+    },
     // 多选回调
     selectionChange (list) {
       this.dataListSelections = list

+ 117 - 0
src/views/modules/distribution/activity/distribution-rank.vue

@@ -0,0 +1,117 @@
+<template>
+  <el-dialog
+    title="分销排行榜"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <div class="table-con distribution-msg-table">
+      <el-table
+        ref="distributionMsgTable"
+        height="600"
+        border
+        :data="dataList"
+        header-cell-class-name="table-header"
+        row-class-name="table-row-low"
+        style="width: 100%"
+      >
+        <el-table-column
+          prop="nickName"
+          label="用户昵称"
+          align="center">
+          <template slot-scope="scope">
+            {{scope.row.nickName}}
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="pic"
+          label="用户头像"
+          align="center">
+          <template slot-scope="scope">
+            <img :src="scope.row.pic " height="50px"/>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="rank"
+          label="排名"
+          align="center">
+          <template slot-scope="scope">
+            {{scope.row.rank}}
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="score"
+          label="积分"
+          align="center">
+          <template slot-scope="scope">
+            {{scope.row.score}}
+          </template>
+        </el-table-column>
+
+      </el-table>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+// import PicUpload from '@/components/pic-upload'
+import ImgUpload from './distribution-activity-img-upload.vue'
+import TinyMce from '@/components/tiny-mce'
+import { isHtmlNull } from '@/utils/index.js'
+
+export default {
+  components: {
+    ImgUpload,
+    TinyMce
+  },
+  created () {
+    // this.getData()
+  },
+  data () {
+    return {
+      visible: false,
+      tinymceFlag: new Date() + 1,
+      dataList: []
+    }
+  },
+  methods: {
+    init (activityId) {
+      console.log('activityId',activityId)
+      this.visible = true
+      this.$nextTick(() => {
+        this.$http({
+          url: this.$http.adornUrl('/distribution/distributionActivity/getActivityRank?activityId=' + activityId),
+          method: 'get',
+          params: this.$http.adornParams()
+        }).then(({data}) => {
+          console.log('data',data)
+          this.dataList = data.rankList
+        })
+      })
+    },
+    // 提交表单
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl(`/distribution/distributionActivity`),
+            method: this.dataForm.activityId ? 'put' : 'post',
+            data: this.$http.adornData(this.dataForm)
+          }).then(({ data }) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+            })
+            this.visible = false
+            this.$emit("refreshDataList")
+          }).catch(() => {
+
+          })
+        }
+      })
+    }
+  },
+  activated () {
+    this.tinymceFlag = new Date() + 1
+  }
+}
+</script>
+

+ 5 - 2
src/views/modules/platform/feature/create/edit/components/goods/index.vue

@@ -101,7 +101,7 @@
               </div>
             </el-form-item>
             <el-form-item label="关联类型">
-              <el-select v-model="formData.categoryName" @change="changetab" :disabled="$route.query.code == 2" placeholder="请选择" value-key="categoryId">
+              <el-select v-model="formData.categoryName" @change="changetab" clearable :disabled="$route.query.code == 2" placeholder="请选择" value-key="categoryId">
                 <el-option v-for="item in categoryList" :key="item.categoryId" :label="item.categoryName" :value="item.categoryName"></el-option>
               </el-select>
             </el-form-item>
@@ -257,11 +257,14 @@ export default {
       })
     },
     changetab(val){
+      console.log(val)
+      let num = ''
       this.categoryList.forEach((item,index)=>{
         if(item.categoryName===val){
-          this.formData.categoryId = item.categoryId;
+          num = item.categoryId;
         }
       })
+      this.formData.categoryId = num
     },
     dragstart(index) {
       this.dragIndex = index;

+ 1 - 0
src/views/modules/platform/feature/create/edit/components/goodsTab/index.scss

@@ -84,6 +84,7 @@
           display: flex;
         }
         .goods-item {
+          background: #fff;
           position: relative;
           .goods-img-one {
             width: 100%;

+ 5 - 2
src/views/modules/platform/feature/create/edit/components/hot-area/index.vue

@@ -86,7 +86,7 @@
               <span>关联类型</span>
               <span/>
             </div>
-            <el-select v-model="formData.categoryName" @change="changetab" :disabled="$route.query.code == 2" placeholder="请选择" value-key="categoryId">
+            <el-select v-model="formData.categoryName" @change="changetab" :disabled="$route.query.code == 2" clearable placeholder="请选择" value-key="categoryId">
               <el-option v-for="item in categoryList" :key="item.categoryId" :label="item.categoryName" :value="item.categoryName"></el-option>
             </el-select>
           </el-card>
@@ -322,11 +322,14 @@ export default {
   },
   methods: {
     changetab(val){
+      console.log(val)
+      let num = ''
       this.categoryList.forEach((item,index)=>{
         if(item.categoryName===val){
-          this.formData.categoryId = item.categoryId;
+          num = item.categoryId;
         }
       })
+      this.formData.categoryId = num
     },
     getlistCategory(){
       this.$http({

+ 5 - 2
src/views/modules/platform/feature/create/edit/components/image_ad/index.vue

@@ -145,7 +145,7 @@
                   <span>关联类型</span>
                   <span/>
                 </div>
-                <el-select v-model="formData.categoryName" @change="changetab" :disabled="$route.query.code == 2" placeholder="请选择" value-key="categoryId">
+                <el-select v-model="formData.categoryName" @change="changetab" :disabled="$route.query.code == 2" clearable placeholder="请选择" value-key="categoryId">
                   <el-option v-for="item in categoryList" :key="item.categoryId" :label="item.categoryName" :value="item.categoryName"></el-option>
                 </el-select>
               </el-card>
@@ -362,11 +362,14 @@ export default {
   },
   methods: {
     changetab(val){
+      console.log(val)
+      let num = ''
       this.categoryList.forEach((item,index)=>{
         if(item.categoryName===val){
-          this.formData.categoryId = item.categoryId;
+          num = item.categoryId;
         }
       })
+      this.formData.categoryId = num
     },
     getlistCategory(){
       this.$http({

+ 13 - 1
src/views/modules/platform/feature/create/edit/components/notice/index.scss

@@ -7,6 +7,18 @@
     overflow: hidden;
     font-size: 12px;
     padding: 0 15px;
+    background: rgba(255,255,255,0.5);
+    width: 95%;
+    border-radius: 20px;
+    margin-left: 2.5%;
+    margin-bottom: 10px;
+    .searchimg{
+      width: 20px;
+      height: 20px;
+      position: absolute;
+      left: 20px;
+      top: 10px;
+    }
     > i {
       display: inline-block;
       width: 20px;
@@ -20,7 +32,7 @@
     }
     >span{
       display: inline-block;
-      margin-right: 4px;
+      margin-right: 20px;
       vertical-align: top;
       font-size: 18px;
     }

+ 3 - 1
src/views/modules/platform/feature/create/edit/components/notice/index.vue

@@ -2,6 +2,7 @@
   <div class="micro-notice-box">
     <div class="design-preview-controller">
       <div class="notice-content">
+        <el-image :src="searchimg" class="searchimg"></el-image>
         <span class="iconfont_ckq ckq_notice" />
         {{ formData.title }}
       </div>
@@ -20,13 +21,14 @@
 </template>
 <script>
 import {microCreateMinis} from '../../minis'
-
+import searchimg from './search.png'
 export default {
   name: 'micro-notice-box',
   mixins: [microCreateMinis],
   props: {},
   data () {
     return {
+      searchimg: searchimg,
       formData: {
         title: this.$i18n.t('shopFeature.notice.announcement')
       },

BIN
src/views/modules/platform/feature/create/edit/components/notice/search.png


+ 8 - 1
src/views/modules/platform/feature/create/edit/components/top_logo_tab/index.scss

@@ -9,7 +9,7 @@
       flex-direction: column;
       background-repeat: no-repeat;
       background-size: 100%;
-      border-bottom: 1px solid grey;
+      //border-bottom: 1px solid grey;
       display: flex;
       justify-content: center;
       align-items: center;
@@ -32,6 +32,13 @@
 
         }
 
+        .titleimg{
+          margin-left: 10px;
+          margin-top: 5px;
+          height: 30px;
+          width: 75px;
+        }
+
         .title{
           font-weight: bold;
           margin-left: 10px;

+ 19 - 3
src/views/modules/platform/feature/create/edit/components/top_logo_tab/index.vue

@@ -9,7 +9,8 @@ import { url } from 'video.js';
         <div class="top"></div>
         <div class="logo-f">
           <div class="logoimg" :style="'backgroundImage: url('+resourcesUrl+formData.logo_src+');background-size: 100%; background-repeat: no-repeat;'"></div>
-          <div class="title" :style="'color: '+ formData.title_color +';'">{{ formData.title_text }}</div>
+          <div class="title" v-if="formData.titleType===1" :style="'color: '+ formData.title_color +';'">{{ formData.title_text }}</div>
+          <div class="titleimg" v-else :style="'backgroundImage: url('+resourcesUrl+formData.title_src+');background-size: 100%; background-repeat: no-repeat;'"></div>
         </div>
       </div>
       <div class="search-con" v-else
@@ -17,7 +18,8 @@ import { url } from 'video.js';
         <div class="top"></div>
         <div class="logo-f">
           <div class="logoimg" :style="'backgroundImage: url('+resourcesUrl+formData.logo_src+');background-size: 100%; background-repeat: no-repeat;'"></div>
-          <div class="title" :style="'color: '+ formData.title_color +';'">{{ formData.title_text }}</div>
+          <div class="title" v-if="formData.titleType===1" :style="'color: '+ formData.title_color +';'">{{ formData.title_text }}</div>
+          <div class="titleimg" v-else :style="'backgroundImage: url('+resourcesUrl+formData.title_src+');background-size: 100%; background-repeat: no-repeat;'"></div>
         </div>
       </div>
     </div>
@@ -51,9 +53,21 @@ import { url } from 'video.js';
               {{$t('shopFeature.header.reset')}}
             </div>
           </el-form-item>
-          <el-form-item label="标题">
+          <el-form-item label="标题形式">
+            <el-radio-group v-model="formData.titleType">
+              <el-radio :label="1">文字标题</el-radio>
+              <el-radio :label="2">图片标题</el-radio>
+            </el-radio-group>
+          </el-form-item>
+          <el-form-item label="标题内容" v-if="formData.titleType===1">
             <el-input v-model="formData.title_text"></el-input>
           </el-form-item>
+          <el-form-item label="标题图片" v-if="formData.titleType===2">
+            <img-upload v-model="formData.title_src"></img-upload>
+            <div class="default-btn" @click="formData.title_src=''">
+              {{$t('shopFeature.header.reset')}}
+            </div>
+          </el-form-item>
           <el-form-item label="标题颜色">
             <el-color-picker v-model="formData.title_color"></el-color-picker>
           </el-form-item>
@@ -90,8 +104,10 @@ export default {
         title: '顶部logo栏',
         bg_src: '',
         logo_src: '',
+        title_src: '',
         title_text: '',
         backType: 1,
+        titleType: 1,
         left_color: '#FEEAFF',
         right_color: '#D8D6FA',
         title_color: '#000000'