Browse Source

2021-7-27

cmy 3 years ago
parent
commit
6547fd5b91
3 changed files with 27 additions and 35 deletions
  1. 2 25
      pages.json
  2. 21 6
      pages/index/convert.vue
  3. 4 4
      utils/wxAuthorized.js

+ 2 - 25
pages.json

@@ -18,13 +18,13 @@
 		{
 			"path": "pages/index/node",
 			"style": {
-				"navigationBarTitleText": "兑换"
+				"navigationBarTitleText": "节点"
 			}
 		},
 		{
 			"path": "pages/index/convert",
 			"style": {
-				"navigationBarTitleText": "节点"
+				"navigationBarTitleText": "兑换"
 			}
 		},
 		{
@@ -175,29 +175,6 @@
 			"style": {
 				// #ifndef MP-WEIXIN
 				"navigationStyle": "custom",
-				// "app-plus": {
-				// 	"bounce": "none",
-				// 	"titleNView": {
-				// 		"type": "transparent",
-				// 		"buttons": [{
-				// 				"fontSrc": "/static/yticon.ttf",
-				// 				"text": "\ue60f",
-				// 				"fontSize": "24",
-				// 				"color": "#303133",
-				// 				"width": "46px",
-				// 				"background": "rgba(0,0,0,0)"
-				// 			},
-				// 			{
-				// 				"fontSrc": "/static/yticon.ttf",
-				// 				"text": "\ue744",
-				// 				"fontSize": "28",
-				// 				"color": "#303133",
-				// 				"background": "rgba(0,0,0,0)",
-				// 				"redDot": true
-				// 			}
-				// 		]
-				// 	}
-				// },
 				// #endif
 				"navigationBarTitleText": "个人中心"
 			}

+ 21 - 6
pages/index/convert.vue

@@ -1,17 +1,32 @@
 <template>
-	<view class="center">
-		
-		
-	</view>
+	<view class="center"></view>
 </template>
 <script>
+import { recharge, wallet, moneyType } from '@/api/finance.js';
 export default {
 	data() {
 		return {};
 	},
 	//页面加载即刻发生
-	onload() {},
-	methods: {}
+	onLoad() {
+		this.init()
+	},
+	methods: {
+		// 初始化页面
+		init() {
+			this.wallet()
+		},
+		wallet() {
+			console.log('请求兑换');
+			wallet()
+				.then(e => {
+					console.log(e);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		}
+	}
 };
 </script>
 <style lang="scss">

+ 4 - 4
utils/wxAuthorized.js

@@ -224,19 +224,19 @@ function shareFun(config) {
 export function setRouter(route) {
 	return new Promise((ok, err) => {
 		router = getApp().$router;
-		console.log(router,'开始数据');
+		// console.log(router,'开始数据');
 		if (!router) {
 			const set = setInterval(() => {
 				router = getApp().$router;
-				console.log(router,'返回数据');
+				// console.log(router,'返回数据');
 				if (router) {
-					console.log(router,'结束');
+					// console.log(router,'结束');
 					clearInterval(set)
 					ok(router)
 				}
 			}, 100);
 		}else{
-			console.log(router,'成功');
+			// console.log(router,'成功');
 			ok(router)
 		}
 	})