sunlupeng 1 jaar geleden
bovenliggende
commit
bdacc96e57
3 gewijzigde bestanden met toevoegingen van 52 en 28 verwijderingen
  1. 17 6
      src/views/HomeView/GoodsDetail.vue
  2. 20 8
      src/views/HomeView/PointsMall.vue
  3. 15 14
      src/views/HomeView/RedeemView.vue

+ 17 - 6
src/views/HomeView/GoodsDetail.vue

@@ -62,7 +62,7 @@
                                         class="prize-img"></el-image>
                   </div>
                   <div class="prize-detail-info">
-                    <h3 class="title">{{ data.name }}</h3>
+                    <h3 style="color: #1e80ff;" class="title" @click="handleClickGood(data.skuDesc)">{{ data.name }}</h3>
                     <!-- <p class="desc">
                       <span v-if="data.location">{{ data.location }}</span>
                     </p> -->
@@ -173,6 +173,9 @@
         </div>
       </div>
     </el-card>
+    <el-dialog title="物品详情" :visible.sync="dialogVisibleGoods" width="40%">
+            <div v-html="data.skuDesc"></div>
+        </el-dialog>
   </div>
 </template>
 <script>
@@ -181,6 +184,8 @@ import { orderInfo, orderConfirm } from "@/api/allApi";
 export default {
   data() {
     return {
+      skuDesc:'',
+      dialogVisibleGoods:false,
       orderId: this.$route.query.orderId,
       comment: '',
       logs: [],
@@ -194,6 +199,16 @@ export default {
     this.getInfo(orderId);
   },
   methods: {
+    handleClickGood(val) {
+            this.skuDesc = val;
+            this.dialogVisibleGoods = true;
+            // this.$router.push({
+            //     path: '/home/pointsMall/goodDetail',
+            //     query: {
+            //         id: id,
+            //     }
+            // });
+        },
     getInfo(orderId) {
       orderInfo({ orderId: orderId }).then((response) => {
         this.data = response.data.data;
@@ -426,6 +441,7 @@ img {
 }
 
 .table .prize-detail-info .title {
+  cursor: pointer;
   font-weight: 400;
   font-size: 14px;
   line-height: 24px;
@@ -524,9 +540,4 @@ img {
   border: 1px solid transparent;
 }
 </style>
-<style>
-.el-dialog__body {
-  padding-bottom: 0px;
-}
-</style>
 

+ 20 - 8
src/views/HomeView/PointsMall.vue

@@ -68,7 +68,7 @@
                                         class="prize-img"></el-image>
                                 </div>
                                 <div class="content">
-                                    <h3 :title="item.name" class="title" @click="handleClickGood(item.skuId)">{{ item.name }}</h3>
+                                    <h3 style="color: #1e80ff;" :title="item.name" class="title" @click="handleClickGood(item.skuId)">{{ item.name }}</h3>
                                     <p class="desc"><span v-if="item.deliveryTypeName">{{ item.deliveryTypeName }}</span></p>
                                     <p class="redeem-info">
                                         <span title="积分" class="price">
@@ -162,16 +162,21 @@
                 </el-tab-pane>
             </el-tabs>
         </div>
+        <el-dialog title="物品详情" :visible.sync="dialogVisible" width="40%">
+            <div v-html="data.skuDesc"></div>
+        </el-dialog>
 
     </div>
 </template>
 <script>
-import { integralList, festivalList, notice, welfareType, dictList } from "@/api/allApi";
+import { integralInfo,integralList, festivalList, notice, welfareType, dictList } from "@/api/allApi";
 import { getTab } from '@/utils/auth'
 import { debounce } from '@/utils/index'
 export default {
     data() {
         return {
+            dialogVisible: false,
+            data:{},
             bannerList: [],
             page: 1,
             pages: 1,
@@ -240,18 +245,25 @@ export default {
         this.getNotice(this.activeName);
     },
     methods: {
+        getDataInfo(id){
+            integralInfo({skuId:id}).then(response => {
+                    this.data = response.data.data;
+                }).catch(() => {})
+        },
         getBannerList(){
             dictList({dictType:'index_lbt'}).then(response=>{
                 this.bannerList = response.data.data; 
             })
         },
         handleClickGood(id) {
-            this.$router.push({
-                path: '/home/pointsMall/goodDetail',
-                query: {
-                    id: id,
-                }
-            });
+            this.getDataInfo(id);
+            this.dialogVisible = true;
+            // this.$router.push({
+            //     path: '/home/pointsMall/goodDetail',
+            //     query: {
+            //         id: id,
+            //     }
+            // });
         },
         handleFilter() {
             this.page = 1;

+ 15 - 14
src/views/HomeView/RedeemView.vue

@@ -109,7 +109,7 @@
                                             class="prize-img"></el-image>
                                     </div>
                                     <div class="prize-detail-info">
-                                        <h3 class="title" @click="handleClickGood(data.skuId)">{{ data.name }}</h3>
+                                        <h3 style="color: #1e80ff;" class="title" @click="handleClickGood(data.skuDesc)">{{ data.name }}</h3>
                                         <!-- <p class="desc">
                                             <span v-if="data.location">{{ data.location }}</span>
                                         </p> -->
@@ -349,6 +349,9 @@
                 <el-button type="primary" @click="handleClickExchange">确 定</el-button>
             </span>
         </el-dialog>
+        <el-dialog title="物品详情" :visible.sync="dialogVisibleGoods" width="40%">
+            <div v-html="data.skuDesc"></div>
+        </el-dialog>
     </div>
 </template>
 <script>
@@ -372,6 +375,8 @@ export default {
             }
         };
         return {
+            skuDesc:'',
+            dialogVisibleGoods:false,
             dialogVisible:false,
             options: regionData,
             reclaimAddr: "",
@@ -460,13 +465,15 @@ export default {
         this.getInfo(skuId, activeName);
     },
     methods: {
-        handleClickGood(id) {
-            this.$router.push({
-                path: '/home/pointsMall/goodDetail',
-                query: {
-                    id: id,
-                }
-            });
+        handleClickGood(val) {
+            this.skuDesc = val;
+            this.dialogVisibleGoods = true;
+            // this.$router.push({
+            //     path: '/home/pointsMall/goodDetail',
+            //     query: {
+            //         id: id,
+            //     }
+            // });
         },
         handleClick(){
             this.dialogVisible = true;
@@ -1017,10 +1024,4 @@ img {
     max-width: 300px;
 }
 </style>
-<style>
-.el-dialog__body {
-    padding-bottom: 0px;
-    padding-top: 10px;
-}
-</style>