cmy vor 3 Jahren
Ursprung
Commit
1c8dfb037a
3 geänderte Dateien mit 45 neuen und 7 gelöschten Zeilen
  1. 45 7
      pages/assets/recharge.vue
  2. BIN
      static/re/re1.png
  3. BIN
      static/re/re2.png

+ 45 - 7
pages/assets/recharge.vue

@@ -4,7 +4,7 @@
 			<view class="title flex">
 				<view class="xian"></view>
 				<view class="title-font">
-					充币二维码
+					充币二维码TRC20
 				</view>
 			</view>
 			<view class="erweima-box">
@@ -12,10 +12,10 @@
 					请转入USDT
 				</view>
 				<view class="erweima">
-					<image src="" mode=""></image>
+					<image :src="image" mode="scaleToFill"></image>
 				</view>
 			</view>
-			<view class="btn">
+			<view class="btn" @click="domFile">
 				保存二维码
 			</view>
 		</view>
@@ -27,9 +27,9 @@
 				</view>
 			</view>
 			<view class="address">
-				0XJDKHGHDHFH3773HWEHG
+				{{num}}
 			</view>
-			<view class="btn" style="margin-top: 50rpx;">
+			<view class="btn" style="margin-top: 50rpx;" @click="setData">
 				复制充币地址
 			</view>
 		</view>
@@ -47,10 +47,49 @@
 export default {
 	data() {
 		return {
+				num:"TEn1gLWumRj1FfjQ927vSoQrUCqKhuiWV2",
+				image:'../../static/re/re1.png'
 		}
 	},
 	methods:{
-		
+		domFile(){
+			uni.downloadFile({
+				url:this.image,
+				success:(e) => {
+					console.log(e);
+					uni.showToast({
+						title:'下载成功!'
+					})
+				},
+				fail(e) {
+					uni.showToast({
+						title:'复制失败',
+						icon:false
+					})
+					console.log(e);
+				}
+			})
+		},
+		setData(){
+			// #ifdef APP-PLUS
+			uni.setClipboardData({
+				data:this.num,
+				success: (e) => {
+					uni.showToast({
+						title:'复制成功!',
+					})
+				},
+				fail(e) {
+					uni.showToast({
+						title:'复制失败',
+						icon:false
+					})
+					console.log(e);
+				}
+			})
+			// #endif
+			
+		}
 	}
 }
 </script>
@@ -82,7 +121,6 @@ export default {
 			margin: 16rpx auto 0;
 			width: 188rpx;
 			height: 188rpx;
-			background: #00BCD4;
 			image {
 				width: 100%;
 				height: 100%;

BIN
static/re/re1.png


BIN
static/re/re2.png