hwq преди 3 години
родител
ревизия
bd653d3710

+ 35 - 2
App.vue

@@ -7,19 +7,52 @@ import interceptor from './interceptor';
 // #ifdef H5
 import { weixindata } from './utils/wxAuthorized';
 // #endif
+import { version } from './api/user.js'
 export default {
 	data() {
 		return {
 			/* 保存微信信息 */
 			appData: {},
-			weixinObj: '' //保存微信对象
+			weixinObj: '' ,//保存微信对象
+			url: '',
+			versionFu: ''
 		};
 	},
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'login','hasLogin']),
+		banben(){
+			version({}).then(e =>{
+				console.log(e);
+				this.url = e.apk;
+				this.versionFu = e.version_code
+				let ver = plus.runtime.versionCode;
+				if(+ver > +versionFu){
+					uni.showModal({
+						title: '友情提示',
+						content:'当前版本较低请升级小程序',
+						success: (res) => {
+							if(res.confirm){
+								console.log('用户点击确定');
+								void plus.runtime.openURL(this.url);
+							}else if (res.cancel) {            
+								console.log('用户点击取消');
+							}
+						},
+					});
+				}else{
+					uni.showModal({
+						title: '友情提示',
+						content:'当前版本new',
+					});
+				}
+			})
+
+		}
 	},
 	onLaunch: function(urlObj) {
 		let obj = this;
+		//判断当前版本号
+		obj.banben();
 		// 加载缓存中的用户信息
 		let userInfo = uni.getStorageSync('userInfo') || '';
 		// 判断是否拥有用户信息
@@ -35,7 +68,7 @@ export default {
 		}
 	},
 	onShow: function() {},
-	onHide: function() {}
+	onHide: function() {},
 };
 </script>
 

+ 8 - 0
api/user.js

@@ -32,4 +32,12 @@ export function spread(data) {
 		method: 'GET',
 		data
 	});
+}
+//获取版本
+export function version(data) {
+	return request({
+		url: '/api/version',
+		method: 'GET',
+		data
+	})
 }

+ 7 - 5
manifest.json

@@ -1,6 +1,8 @@
 {
     "name" : "鲲鹏云矿",
     "appid" : "__UNI__36C0ACD",
+    // __UNI__6FC8B70
+    // "appid" : "__UNI__6FC8B70",
     "description" : "",
     "versionName" : "1.0.1",
     "versionCode" : 101,
@@ -78,15 +80,15 @@
             "splashscreen" : {
                 "androidStyle" : "default",
                 "android" : {
-                    "hdpi" : "H:/item/zhiya/启动图/qd480x762.png",
-                    "xhdpi" : "H:/item/zhiya/启动图/qd720x1242.png",
-                    "xxhdpi" : "H:/item/zhiya/启动图/qd1080x1882.png"
+                    "hdpi" : "static/启动图/qd480x762.png",
+                    "xhdpi" : "static/启动图/qd720x1242.png",
+                    "xxhdpi" : "static/启动图/qd1080x1882.png"
                 },
                 "iosStyle" : "default",
                 "ios" : {
                     "iphone" : {
-                        "portrait-896h@3x" : "H:/item/zhiya/启动图/qd1242x2688.png",
-                        "portrait-896h@2x" : "H:/item/zhiya/启动图/qd828x1792.png"
+                        "portrait-896h@3x" : "static/启动图/qd1242x2688.png",
+                        "portrait-896h@2x" : "static/启动图/qd828x1792.png"
                     }
                 }
             }

+ 61 - 11
pages/finance/recharge.vue

@@ -17,16 +17,32 @@
 			
 		</view>
 		
-		<view class="image-box">
+		<view class="image-box" v-if="charge != 0">
 			<view class="tuijianbox" v-if="isShow">
 				<view class="item" @click="gogo()" >
 					<image v-if="idx == 2" src="../../static/img/befor.png"></image>
 					<image v-else src="../../static/img/after.png"></image>
+				</view>
 			</view>
+			<tki-qrcode
+				:cid="cid"
+				ref="qrcode"
+				:val="val"
+				:size="size"
+				:unit="unit"
+				:background="background"
+				:foreground="foreground"
+				:pdground="pdground"
+				:iconSize="iconSize"
+				:lv="lv"
+				:onval="onval"
+				:loadMake="loadMake"
+				:usingComponents="usingComponents"
+				@result="qrR"
+			/>
+			<!-- <image :src="qr" mode="aspectFit"></image> -->
 		</view>
-			<image :src="qr" mode="aspectFit"></image>
-		</view>
-		<view class="from-box">
+		<view class="from-box" v-if="charge != 0">
 			<view class="from-title">充币地址</view>
 			<view class="flex input-tpl">
 				<input class="input-box" disabled="disabled" type="text" v-model="address" />
@@ -34,7 +50,7 @@
 			</view>
 			<!-- <view class="from-title">充币数量</view>
 			<input class="input-box" type="text" v-model="num" placeholder="请输入充币数量" /> -->
-			<view class="submit" v-if="showBtn" @click="bangidng">绑定钱包</view>
+			<!-- <view class="submit" v-if="showBtn" @click="bangidng">绑定钱包</view> -->
 			<!-- <view class="" v-if="orderShow == true">
 				<view class="from-title">订单号</view>
 				<view class="flex input-tpl">
@@ -48,6 +64,10 @@
 			</view> -->
 			<view class="text-box">{{mark}}</view>
 		</view>
+		<view class="qidai" v-else>
+			{{mark}}
+		</view>
+		
 		<uni-popup ref="popup" type="center">
 			<view class="popup">
 				<view class="cancel flex" @click="close">
@@ -76,13 +96,16 @@
 	import {
 		moneyType
 	} from '@/api/index.js';
+	import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
 	export default {
 		components: {
-			selectss
+			selectss,
+			tkiQrcode
 		},
 		data() {
 			return {
 				moneyTypeList: [],
+				charge: 0,
 				logo: '',
 				name: '',
 				code: '',
@@ -102,10 +125,24 @@
 				showBtn:false,
 				idx: 1,
 				isShow: false,
+				cid: 'cid',
+				size: 150,
+				unit: '150',
+				background: '#000000',
+				foreground: '#ffffff',
+				pdground: '#ffffff',
+				icon: '',
+				iconSize: 40,
+				lv: 3,
+				onval: true,
+				loadMake: true,
+				usingComponents: true,
+				
 			};
 		},
 		onLoad(option) {
 			if (option.name) {
+				this.charge = option.charge;
 				this.name = option.name;
 				this.logo = option.logo;
 				this.code = option.code;
@@ -113,7 +150,7 @@
 				this.ids = option.ids;
 				this.keysAddr = option.keysAddr;
 				this.qr = option._address_qr;
-				this.address = option.__money_address;
+				this.address = option.wallet.address_TRC20;
 				this.ids = option.ids;
 				this.addr = option.keysAddr;
 				if(this.addr == null || this.addr == ''){
@@ -134,11 +171,12 @@
 				}) => {
 					obj.moneyTypeList = data;
 					if (obj.logo == '') {
+						this.charge = obj.moneyTypeList[0].charge;
 						obj.logo = obj.moneyTypeList[0].LOGO;
 						obj.name = obj.moneyTypeList[0].name;
 						obj.code = obj.moneyTypeList[0].code;
 						obj.money = obj.moneyTypeList[0].price;
-						obj.address = obj.moneyTypeList[0].__money_address;
+						obj.address = obj.moneyTypeList[0].wallet.address_TRC20;
 						obj.qr = obj.moneyTypeList[0]._address_qr;
 						obj.mark = obj.moneyTypeList[0].mark;
 						obj.addr = obj.moneyTypeList[0].wallet.address;
@@ -233,10 +271,11 @@
 			},
 			selectOne(options) {
 				this.logo = options.LOGO;
+				this.charge = options.charge;
 				this.name = options.name;
 				this.code = options.code;
 				this.money = options.price;
-				this.address = options.__money_address;
+				this.address = options.wallet.address_TRC20;
 				this.qr = options._address_qr;
 				this.qr = options._address_qr;
 				this.mark = options.mark;
@@ -258,7 +297,13 @@
 			gogo() {
 				this.idx = 1;
 				
-			}
+			},
+			qrR(res) {
+				this.src = res;
+			},
+			creatQrcode() {
+				this.$refs.qrcode._makeCode();
+			},
 		}
 	};
 </script>
@@ -465,7 +510,7 @@
 		}
 	}
 
-.tuijianbox{
+	.tuijianbox{
 		width: 100%;
 		display: flex;
 		height: 40rpx;
@@ -482,4 +527,9 @@
 			}
 		}
 	}
+	.qidai {
+		width: 100%;
+		font-size: 100rpx;
+		text-align: center;
+	}
 </style>

BIN
static/启动图.zip


BIN
static/启动图/qd1080x1882.png


BIN
static/启动图/qd1125x2436.png


BIN
static/启动图/qd1242x2208.png


BIN
static/启动图/qd1242x2688.png


BIN
static/启动图/qd480x762.png


BIN
static/启动图/qd640x1136.png


BIN
static/启动图/qd640x960.png


BIN
static/启动图/qd720x1242.png


BIN
static/启动图/qd750x1334.png


BIN
static/启动图/qd828x1792.png