cr лет назад: 4
Родитель
Сommit
4223eb2328
1 измененных файлов с 115 добавлено и 26 удалено
  1. 115 26
      src/pages/youxuan/good.vue

+ 115 - 26
src/pages/youxuan/good.vue

@@ -50,17 +50,56 @@
50 50
                                         </div>
51 51
                                     </div>
52 52
                                 </div>
53
-                                <div class="des">
54
-                                    <span>说明:</span>
55
-                                    {{ activity.description }}
53
+                                <div class="des" v-if="activity.description">
54
+                                    <span class="key">说明:</span>
55
+                                    <span
56
+                                        class="val"
57
+                                        @click="
58
+                                            showContent(
59
+                                                '说明',
60
+                                                activity.description
61
+                                            )
62
+                                        "
63
+                                        >{{ activity.description }}</span
64
+                                    >
65
+                                    <my-image
66
+                                        class="arrow"
67
+                                        src="/static/common/arrows_left.png"
68
+                                    ></my-image>
56 69
                                 </div>
57
-                                <div class="des">
58
-                                    <span>发货:</span
59
-                                    >{{ activity.deliveryDesc }}
70
+                                <div class="des" v-if="activity.deliveryDesc">
71
+                                    <span class="key">发货:</span
72
+                                    ><span
73
+                                        class="val"
74
+                                        @click="
75
+                                            showContent(
76
+                                                '发货',
77
+                                                activity.deliveryDesc
78
+                                            )
79
+                                        "
80
+                                        >{{ activity.deliveryDesc }}</span
81
+                                    ><my-image
82
+                                        class="arrow"
83
+                                        src="/static/common/arrows_left.png"
84
+                                    ></my-image>
60 85
                                 </div>
61
-                                <div class="des">
62
-                                    <span>服务:</span>
63
-                                    退换无忧,支持7天无理由退换
86
+                                <div class="des" v-if="activity.service">
87
+                                    <span class="key">服务:</span>
88
+                                    <span
89
+                                        class="val"
90
+                                        @click="
91
+                                            showContent(
92
+                                                '服务',
93
+                                                activity.service
94
+                                            )
95
+                                        "
96
+                                    >
97
+                                        {{ activity.service }}</span
98
+                                    >
99
+                                    <my-image
100
+                                        class="arrow"
101
+                                        src="/static/common/arrows_left.png"
102
+                                    ></my-image>
64 103
                                 </div>
65 104
                                 <div class="a-btns">
66 105
                                     <span @click="setActivityTop(activity)">
@@ -173,7 +212,10 @@
173 212
                                     </div>
174 213
 
175 214
                                     <div class="btns">
176
-                                        <div class="btn" @click="sharePoster(item)">
215
+                                        <div
216
+                                            class="btn"
217
+                                            @click="sharePoster(item)"
218
+                                        >
177 219
                                             {{
178 220
                                                 item.shareLoading
179 221
                                                     ? "生成中"
@@ -226,6 +268,7 @@
226 268
             </div>
227 269
         </div>
228 270
 
271
+        <!-- 海报 -->
229 272
         <div
230 273
             class="canvas"
231 274
             v-show="canvasShow"
@@ -248,6 +291,14 @@
248 291
                 ></canvas>
249 292
             </div>
250 293
         </div>
294
+        <!-- 描述 -->
295
+        <div class="des-modal" v-if="desModalVisible">
296
+            <div class="bg"></div>
297
+            <div class="head">
298
+                <span class="head-tit">{{desModalTitle}}</span>
299
+                <div class="head-r" >关闭</div>
300
+            </div>
301
+        </div>
251 302
     </div>
252 303
 </template>
253 304
 
@@ -274,6 +325,11 @@ export default {
274 325
             shareGood: {},
275 326
             shareRootLoading: false,
276 327
             shareLoadList: [],
328
+
329
+            // 文字弹框
330
+            desModalVisible:false,
331
+            desModalTitle:'',
332
+            desModalDes:''
277 333
         };
278 334
     },
279 335
     filters: {
@@ -378,8 +434,8 @@ export default {
378 434
             });
379 435
             this.api.get("/Yx/GetProductList", sendData).then((res) => {
380 436
                 uni.hideLoading();
381
-                // this.goodList = res.data;
382
-                this.goodList = res.data.item2;
437
+                this.goodList = res.data;
438
+                // this.goodList = res.data.item2;
383 439
                 if (!res.data.length) {
384 440
                     this.dataEnd = true;
385 441
                 }
@@ -720,7 +776,7 @@ export default {
720 776
                                 path: "pages/recommend/detail",
721 777
                                 paremeters: JSON.stringify({
722 778
                                     goodsId: self.shareGood.pid,
723
-                                    shopId:this.shopId
779
+                                    shopId: this.shopId,
724 780
                                 }),
725 781
                             })
726 782
                             .then((res) => {
@@ -810,8 +866,7 @@ export default {
810 866
                         }
811 867
 
812 868
                         // 商品描述,第一行
813
-                        let descName =
814
-                            self.shareGood.description || "";
869
+                        let descName = self.shareGood.description || "";
815 870
 
816 871
                         if (descName.length > 14) {
817 872
                             descName = descName.substr(0, 14);
@@ -822,8 +877,7 @@ export default {
822 877
                         ctx.stroke();
823 878
 
824 879
                         // 商品描述,第二行
825
-                        let descName2 =
826
-                            self.shareGood.description || "";
880
+                        let descName2 = self.shareGood.description || "";
827 881
                         if (descName2.length > 14) {
828 882
                             descName2 = descName2.substr(14, 14) + "...";
829 883
 
@@ -935,7 +989,7 @@ export default {
935 989
                                 path: "pages/goods/detail",
936 990
                                 paremeters: JSON.stringify({
937 991
                                     goodsId: self.shareGood.pid,
938
-                                    shopId:this.shopId
992
+                                    shopId: this.shopId,
939 993
                                 }),
940 994
                             })
941 995
                             .then((res) => {
@@ -1067,10 +1121,7 @@ export default {
1067 1121
                                         self.shareEnd();
1068 1122
                                         self.fn.openSetting();
1069 1123
                                     } else {
1070
-                                        self.shareLoading(
1071
-                                            good.pid,
1072
-                                            false
1073
-                                        );
1124
+                                        self.shareLoading(good.pid, false);
1074 1125
                                     }
1075 1126
                                 });
1076 1127
                         } else {
@@ -1080,10 +1131,7 @@ export default {
1080 1131
                                 uni.saveImageToPhotosAlbum({
1081 1132
                                     filePath: res,
1082 1133
                                     success: function () {
1083
-                                        self.shareLoading(
1084
-                                            good.pid,
1085
-                                            false
1086
-                                        );
1134
+                                        self.shareLoading(good.pid, false);
1087 1135
                                         self.shareEnd();
1088 1136
                                         self.fn.showToast("海报保存成功");
1089 1137
                                     },
@@ -1165,6 +1213,8 @@ export default {
1165 1213
                 this.sharePoster(val);
1166 1214
             }
1167 1215
         },
1216
+
1217
+        showContent(tit, con) {},
1168 1218
     },
1169 1219
 
1170 1220
     // 数据计算
@@ -1850,9 +1900,35 @@ page {
1850 1900
         margin-top: px(30);
1851 1901
         font-size: px(40);
1852 1902
         line-height: 1.5;
1903
+        color: #888;
1904
+        display: flex;
1905
+        align-items: flex-start;
1906
+        justify-content: space-between;
1907
+        line-height: px(60);
1908
+
1853 1909
         & ~ .des {
1854 1910
             margin-top: px(10);
1855 1911
         }
1912
+        .key {
1913
+            color: #333;
1914
+            width: px(130);
1915
+            flex-shrink: 0;
1916
+        }
1917
+        .val {
1918
+            width: 100%;
1919
+            @include omits(2);
1920
+        }
1921
+        .arrow {
1922
+            width: px(40);
1923
+            height: px(40);
1924
+            margin-left: px(10);
1925
+            flex-shrink: 0;
1926
+            transform: rotate(180deg) translate(0, -3px);
1927
+            /deep/ img {
1928
+                width: px(40);
1929
+                height: px(40);
1930
+            }
1931
+        }
1856 1932
     }
1857 1933
     .tags {
1858 1934
         display: flex;
@@ -1882,4 +1958,17 @@ page {
1882 1958
         font-size: px(40);
1883 1959
     }
1884 1960
 }
1961
+.des-modal {
1962
+    position: fixed;
1963
+    top: 0;
1964
+    left: 0;
1965
+    width: 100%;
1966
+    height: 100%;
1967
+    z-index: 100;
1968
+    .bg {
1969
+        width: 100%;
1970
+        height: 100%;
1971
+        background-color: rgba(0,0,0,0.3);
1972
+    }
1973
+}
1885 1974
 </style>