瀏覽代碼

2023-08-08 字段修改,canvasbug修改

zhuohongkui 1 年之前
父節點
當前提交
3c017367f6
共有 3 個文件被更改,包括 39 次插入9 次删除
  1. 1 1
      pages/deal/deal.vue
  2. 4 4
      pages/deal/productInfo.vue
  3. 34 4
      pages/index/index.vue

+ 1 - 1
pages/deal/deal.vue

@@ -84,7 +84,7 @@
 						<u-tag v-if="item.stage==1" text="可分期" type="success" shape="circle" size="mini"></u-tag> -->
 					</view>
 					<view class="price">
-						<text>{{item.money}}</text>
+						<text>{{item.money}}</text>
 					</view>
 				</view>
 			</view>

+ 4 - 4
pages/deal/productInfo.vue

@@ -132,10 +132,10 @@
 				<span style="font-size: 16px;">返回</span>
 			</view>
 			<view class="price">
-				价格:<text>¥</text><text class="bold">{{info.money}}</text>
+				jià格:<text class="bold">{{info.money}}</text><text>米</text>
 			</view>
 			<view class="back purchase" @click="showPopup=true">
-				购买账号
+				流程规则
 			</view>
 		</view>
 		<view class="swiper-item swiper-itemcopy" id="copyswiperItem">
@@ -221,9 +221,9 @@
 					<image :src="BASE_URL+noticeimage" mode=""></image>
 				</view>
 				<view class="notice">
-					<view class="noticeTitle">
+					<!-- <view class="noticeTitle">
 						购买须知
-					</view>
+					</view> -->
 					<view class="noticeInfo">
 					<u-parse :content="buy_notes"></u-parse>
 					</view>

+ 34 - 4
pages/index/index.vue

@@ -33,11 +33,11 @@
 								</view>
 							</view>
 							<view class="watermark1"
-								:style="{left:item.watermark_info.waterPos==0?0:item.watermark_info.waterPos==1?0:item.watermark_info.waterPos==4?0:item.watermark_info.waterPos==7?0:item.watermark_info.waterPos==2?'40%':item.watermark_info.waterPos==5?'40%':item.watermark_info.waterPos==8?'40%':'',top:item.watermark_info.waterPos==0?0:item.watermark_info.waterPos==1?0:item.watermark_info.waterPos==2?0:item.watermark_info.waterPos==3?0:item.watermark_info.waterPos==4?'40%':item.watermark_info.waterPos==5?'40%':item.watermark_info.waterPos==6?'40%':'',right:item.watermark_info.waterPos==3?0:item.watermark_info.waterPos==6?0:item.watermark_info.waterPos==9?0:'',bottom:item.watermark_info.waterPos==7?0:item.watermark_info.waterPos==8?0:item.watermark_info.waterPos==9?0:'',fontWeight:item.watermark_info.bold==1?'bold':'',fontFamily:item.watermark_info.typeface==1?'typeface1':item.watermark_info.typeface==2?'typeface2':item.watermark_info.typeface==3?'typeface3':item.watermark_info.typeface==4?'typeface4':item.watermark_info.typeface==5?'typeface5':item.watermark_info.typeface==6?'typeface6':''}"
+							:style="{left:item.watermark_info.waterPos==0?0+item.watermark_info.xx+'px':item.watermark_info.waterPos==1?0+item.watermark_info.xx+'px':item.watermark_info.waterPos==4?0+item.watermark_info.voffset+'px':item.watermark_info.waterPos==7?0+item.watermark_info.xx+'px':item.watermark_info.waterPos==2?'calc( 40%'+' + '+item.watermark_info.xx+'px )':item.watermark_info.waterPos==5?'calc( 40%'+' + '+item.watermark_info.voffset+'px )':item.watermark_info.waterPos==8?'calc( 40%'+' + '+item.watermark_info.xx+'px )':'',top:item.watermark_info.waterPos==0?0+item.watermark_info.yy+'px':item.watermark_info.waterPos==1?0+item.watermark_info.yy+'px':item.watermark_info.waterPos==2?0+item.watermark_info.yy+'px':item.watermark_info.waterPos==3?0+item.watermark_info.yy+'px':item.watermark_info.waterPos==4?'40%':item.watermark_info.waterPos==5?'40%':item.watermark_info.waterPos==6?'40%':'',right:item.watermark_info.waterPos==3?0+item.watermark_info.xx+'px':item.watermark_info.waterPos==6?0+item.watermark_info.waterPos+'px':item.watermark_info.waterPos==9?0+item.watermark_info.xx+'px':'',bottom:item.watermark_info.waterPos==7?0+item.watermark_info.xx+'px':item.watermark_info.waterPos==8?0+item.watermark_info.ww+'px':item.watermark_info.waterPos==9?0+item.watermark_info.xx+'px':'',fontWeight:item.watermark_info.bold==1?'bold':'',fontFamily:item.watermark_info.typeface==1?'typeface1':item.watermark_info.typeface==2?'typeface2':item.watermark_info.typeface==3?'typeface3':item.watermark_info.typeface==4?'typeface4':item.watermark_info.typeface==5?'typeface5':item.watermark_info.typeface==6?'typeface6':''}"
 								v-if="item.watermark_info&&item.watermark_info.type==2||item.watermark_info&&item.watermark_info.type==4">
-							
+
 								<view class=""
-									:style="{transform: 'rotate('+item.watermark_info.angle+'deg)',opacity:(100-item.watermark_info.opacity*1)*0.01,color:item.watermark_info.color,fontSize:item.watermark_info.text_font+'px'}">
+								:style="{transform: 'rotate('+item.watermark_info.angle+'deg)',color:`rgba(${hexToRgb(item.watermark_info.color).rgb},${(100-item.watermark_info.opacity*1)*0.01})`,fontSize:item.watermark_info.text_font+'px'}">
 									<image :src="BASE_URL+item.watermark_info.image" mode=""
 										v-if="item.watermark_info.image&&item.watermark_info.type==2"></image>
 									<text
@@ -81,7 +81,7 @@
 								v-if="item.watermark_info&&item.watermark_info.type==2||item.watermark_info&&item.watermark_info.type==4">
 
 								<view class=""
-									:style="{transform: 'rotate('+item.watermark_info.angle+'deg)',opacity:(100-item.watermark_info.opacity*1)*0.01,color:item.watermark_info.color,fontSize:item.watermark_info.text_font+'px'}">
+									:style="{transform: 'rotate('+item.watermark_info.angle+'deg)',color:`rgba(${hexToRgb(item.watermark_info.color).rgb},${(100-item.watermark_info.opacity*1)*0.01})`,fontSize:item.watermark_info.text_font+'px'}">
 									<image :src="BASE_URL+item.watermark_info.image" mode=""
 										v-if="item.watermark_info.image&&item.watermark_info.type==2"></image>
 									<text
@@ -330,6 +330,36 @@
 
 	})
 
+	 function hexToRgb (val) {   //HEX十六进制颜色值转换为RGB(A)颜色值
+                // 16进制颜色值的正则
+                var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
+                // 把颜色值变成小写
+                var color = val.toLowerCase();
+                var result = '';
+                if (reg.test(color)) {
+                    // 如果只有三位的值,需变成六位,如:#fff => #ffffff
+                    if (color.length === 4) {
+                        var colorNew = "#";
+                        for (var i = 1; i < 4; i += 1) {
+                            colorNew += color.slice(i, i + 1).concat(color.slice(i, i + 1));
+                        }
+                        color = colorNew;
+                    }
+                    // 处理六位的颜色值,转为RGB
+                    var colorChange = [];
+                    for (var i = 1; i < 7; i += 2) {
+                        colorChange.push(parseInt("0x" + color.slice(i, i + 2)));
+                    }
+                    result =  colorChange.join(",") 
+                    return { rgb: result, r: colorChange[0], g: colorChange[1], b: colorChange[2] };
+                } else {
+                    result = '无效';
+                    return { rgb: result };
+                }
+ 
+            }
+
+
 	function getspan(str) {
 		// let st=str.replace(new RegExp('font', 'g'), 'span')
 		var list1 = str.split('</span>')