Przeglądaj źródła

Signed-off-by: 李妹妹 <1639016684@qq.com>

李妹妹 6 godzin temu
rodzic
commit
bc8d423074

+ 3 - 0
components/custom-toast.vue

@@ -41,5 +41,8 @@ export default {
   border-radius: 4px;
   font-size: 16px; /* 默认字体大小 */
   z-index: 9999;
+  line-height: 44rpx;
+  white-space: pre-line; /* 解析 \n 为换行 */
+  text-align: center; /* 可选,让文本居中 */
 }
 </style>

+ 4 - 4
pages/shopping/productDetails.vue

@@ -365,7 +365,7 @@ import {CustomToast} from '@/components/custom-toast.vue';
 					// 如果限购数量为0,提示库存不足
 					if (this.remainingPurchaseLimit === 0) {
             this.$refs.customToast.show({
-              title: "该商品限购:" + this.purchaseLimit +",已达到购买上限",
+              title: `该商品限购:${this.this.purchaseLimit}件\n已达购买上限`,
               duration: 2000
             });
 						// uni.showToast({
@@ -597,7 +597,7 @@ import {CustomToast} from '@/components/custom-toast.vue';
 				if (this.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number' && this.specNum > this.remainingPurchaseLimit) {
 					this.specNum = this.remainingPurchaseLimit;
           this.$refs.customToast.show({
-            title: "该商品限购:" + this.remainingPurchaseLimit + "次,已达购买上限",
+            title: `该商品限购:${this.this.remainingPurchaseLimit}件\n已达购买上限`,
             duration: 2000
           });
 					// uni.showToast({
@@ -619,7 +619,7 @@ import {CustomToast} from '@/components/custom-toast.vue';
 				if (this.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number' && this.specNum > this.remainingPurchaseLimit) {
 					this.specNum = this.remainingPurchaseLimit;
           this.$refs.customToast.show({
-            title: "该商品限购:" + this.remainingPurchaseLimit + "次,已达购买上限",
+            title: `该商品限购:${this.this.remainingPurchaseLimit}件\n已达购买上限`,
             duration: 2000
           });
 					// uni.showToast({
@@ -638,7 +638,7 @@ import {CustomToast} from '@/components/custom-toast.vue';
 				if (this.remainingPurchaseLimit !== null && typeof this.remainingPurchaseLimit === 'number' && this.specNum > this.remainingPurchaseLimit) {
 					this.specNum = this.remainingPurchaseLimit;
           this.$refs.customToast.show({
-            title: "该商品限购:" + this.remainingPurchaseLimit + "次,已达购买上限",
+            title: `该商品限购:${this.this.remainingPurchaseLimit}件\n已达购买上限`,
             duration: 2000
           });
 					// uni.showToast({

+ 2 - 2
pages/user/index.vue

@@ -187,12 +187,12 @@
 							</view> -->
 
 							<!-- 测试用下面的 -->
-							<view v-if="Version" class="item no-marin-bottom align-top" @click="navgetTo('/pages_course/livingList')">
+							<!-- <view v-if="Version" class="item no-marin-bottom align-top" @click="navgetTo('/pages_course/livingList')">
 								<image
 									src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/integral.png"
 									mode=""></image>
 								<text class="text">直播</text>
-							</view>
+							</view> -->
 
 							<view class="item no-marin-bottom" @click="toManager()">
 								<image

+ 3 - 3
pages_shopping/live/goods.vue

@@ -207,7 +207,7 @@
 					// 如果限购数量为0,提示库存不足
 					if (this.remainingPurchaseLimit === 0) {
             this.$refs.customToast.show({
-              title: "该商品限购:" + this.purchaseLimit +",已达到购买上限",
+              title:`该商品限购:${this.purchaseLimit}件\n已达购买上限`,
               duration: 2000
             });
 						// uni.showToast({
@@ -394,7 +394,7 @@
 				if(this.totalNum > this.remainingPurchaseLimit && this.remainingPurchaseLimit!==null){
 					this.totalNum = this.remainingPurchaseLimit;
           this.$refs.customToast.show({
-            title: "该商品限购:"+this.remainingPurchaseLimit+"次"+",已达购买上限",
+            title: `该商品限购:${this.remainingPurchaseLimit}件\n已达购买上限`,
             duration: 2000
           });
 					// uni.showToast({
@@ -422,7 +422,7 @@
 				if(this.totalNum > this.remainingPurchaseLimit && this.remainingPurchaseLimit!==null){
 					this.totalNum = this.remainingPurchaseLimit;
           this.$refs.customToast.show({
-            title: "该商品限购:"+this.remainingPurchaseLimit+"次"+",已达购买上限",
+            title: `该商品限购:${this.remainingPurchaseLimit}件\n已达购买上限`,
             duration: 2000
           });
 					// uni.showToast({