Browse Source

修改海报

cr 4 years ago
parent
commit
180fb32f2d
1 changed files with 35 additions and 5 deletions
  1. 35 5
      src/pages/manage/good-list.vue

+ 35 - 5
src/pages/manage/good-list.vue

@@ -845,7 +845,7 @@ export default {
845 845
                     Promise.all([
846 846
                         uni.getImageInfo({
847 847
                             src:
848
-                                this.user.avatar ||
848
+                                this.user.appLogo ||
849 849
                                 self.config.imageResourceUrl +
850 850
                                     "images/common/avatar.png",
851 851
                         }),
@@ -902,7 +902,7 @@ export default {
902 902
                         ctx.setFontSize(self.getPx(28));
903 903
                         ctx.setFillStyle("#333");
904 904
                         ctx.fillText(
905
-                            self.user.nickName + "的分享",
905
+                            self.user.appName,
906 906
                             self.getPx(115),
907 907
                             self.getPx(90)
908 908
                         );
@@ -935,7 +935,7 @@ export default {
935 935
                         // 商品标题,第二行
936 936
                         let goodsName2 = self.shareGood.baseInfo.name;
937 937
                         if (goodsName2.length > 12) {
938
-                            goodsName2 = goodsName2.substr(12, 9) + "...";
938
+                            goodsName2 = goodsName2.substr(12, 10) + "...";
939 939
 
940 940
                             ctx.setFontSize(self.getPx(28));
941 941
                             ctx.setFillStyle("#333");
@@ -947,10 +947,40 @@ export default {
947 947
                             ctx.stroke();
948 948
                         }
949 949
 
950
+                                                // 商品描述,第一行
951
+                        let descName = self.shareGood.baseInfo.description;
952
+
953
+                        if (descName.length > 14) {
954
+                            descName = descName.substr(0, 14);
955
+                        }
956
+                        ctx.setFontSize(self.getPx(24));
957
+                        ctx.setFillStyle("#666");
958
+                        ctx.fillText(
959
+                            descName,
960
+                            self.getPx(50),
961
+                            self.getPx(965)
962
+                        );
963
+                        ctx.stroke();
964
+
965
+                        // 商品描述,第二行
966
+                        let descName2 = self.shareGood.baseInfo.description;
967
+                        if (descName2.length > 14) {
968
+                            descName2 = descName2.substr(14, 14) + "...";
969
+
970
+                            ctx.setFontSize(self.getPx(24));
971
+                            ctx.setFillStyle("#666");
972
+                            ctx.fillText(
973
+                                descName2,
974
+                                self.getPx(50),
975
+                                self.getPx(995)
976
+                            );
977
+                            ctx.stroke();
978
+                        }
979
+
950 980
                         // 商品价格符号
951 981
                         ctx.setFontSize(self.getPx(20));
952 982
                         ctx.setFillStyle("#f8662a");
953
-                        ctx.fillText("¥", self.getPx(50), self.getPx(1015));
983
+                        ctx.fillText("¥", self.getPx(50), self.getPx(1050));
954 984
                         ctx.stroke();
955 985
 
956 986
                         // 商品价格
@@ -959,7 +989,7 @@ export default {
959 989
                         ctx.fillText(
960 990
                             self.shareGood.baseInfo.price / 100,
961 991
                             self.getPx(65),
962
-                            self.getPx(1015)
992
+                            self.getPx(1050)
963 993
                         );
964 994
                         ctx.stroke();
965 995