hwq 3 years ago
parent
commit
90f1e7b845
8 changed files with 47 additions and 37 deletions
  1. 7 0
      api/finance.js
  2. 6 0
      pages.json
  3. 18 18
      pages/assets/assets.vue
  4. 6 9
      pages/assets/details.vue
  5. 9 9
      pages/assets/transfer.vue
  6. 1 1
      pages/index/index.vue
  7. BIN
      static/img/qian.png
  8. BIN
      static/img/xiaj.png

+ 7 - 0
api/finance.js

@@ -47,6 +47,13 @@ export function cash(data) {
 		data
 	});
 }
+export function goPay(data) {
+	return request({
+		url: '/api/trade/go_pay',
+		method: 'POST',
+		data
+	});
+}
 export function spread(data) {
 	return request({
 		url: '/api/spread/people',

+ 6 - 0
pages.json

@@ -24,6 +24,12 @@
 				}
 			}
 		},
+		{
+			"path": "pages/assets/details",
+			"style": {
+				"navigationBarTitleText": "资金流水"
+			}
+		},
 		{
 			"path": "pages/index/convert",
 			"style": {

+ 18 - 18
pages/assets/assets.vue

@@ -152,21 +152,21 @@ export default {
 		},
 		toDateils(ls, index) {
 			console.log(ls, 88);
-			let way = ls.way.split(',');
-			console.log(way[0], 'money-----------', ls.money);
-			let path = 'address_' + way[0];
-			console.log(path);
-			console.log(path === 'address_TRC20');
-			let address = ls.money[path];
+			// let way = ls.way.split(',');
+			// console.log(way[0], 'money-----------', ls.money);
+			// let path = 'address_' + way[0];
+			// console.log(path);
+			// console.log(path === 'address_TRC20');
+			// let address = ls.money[path];
 			let wayaddress = {};
-			way.forEach(item => {
-				let path = 'address_' + item;
-				wayaddress[item] = ls.money[path];
-			});
-			let waypath = JSON.stringify(wayaddress);
+			// way.forEach(item => {
+			// 	let path = 'address_' + item;
+			// 	wayaddress[item] = ls.money[path];
+			// });
+			// let waypath = JSON.stringify(wayaddress);
 			uni.navigateTo({
 				url:
-					'/pages/finance/details?code=' +
+					'/pages/assets/details?code=' +
 					ls.code +
 					'&name=' +
 					ls.name +
@@ -186,12 +186,12 @@ export default {
 					ls.money.address +
 					'&charge=' +
 					ls.charge +
-					'&address=' +
-					address +
-					'&way=' +
-					ls.way +
-					'&waypath=' +
-					waypath +
+					// '&address=' +
+					// address +
+					// '&way=' +
+					// ls.way +
+					// '&waypath=' +
+					// waypath +
 					'&less=' +
 					ls.less
 			});

+ 6 - 9
pages/assets/details.vue

@@ -13,13 +13,13 @@
 				@confirm="handleConfirm"
 				@cancel="handleCancel"
 			></lb-picker>
-			<image src="../../static/img/img37.png"></image>
+			<image src="../../static/img/xiaj.png"></image>
 		</view>
 		<view class="list" v-show="list.length > 0">
 			<view class="list-box" v-for="(ls, index) in list" :key="index" @click="nav(index)">
 				<view class="flex">
 					<view class="list-tpl flex_item">
-						<image src="../../static/img/img36.png"></image>
+						<image src="../../static/img/qian.png"></image>
 						<view class="tpl-name">{{ ls.title }}</view>
 					</view>
 					<view class="num clamp" v-if="ls.pm === 0">- {{ ls.number }}</view>
@@ -28,7 +28,7 @@
 				<view class="tpl-time">{{ ls.add_time }}</view>
 			</view>
 		</view>
-		<view class="empty-box" v-show="list.length == 0"><empty></empty></view>
+		<view class="empty-box" v-show="list.length == 0"><u-empty></u-empty></view>
 		<view class="flex submit-box">
 			<view class="submit" @click="recharge">充币</view>
 			<view class="tip"></view>
@@ -79,13 +79,10 @@
 </template>
 <script>
 import { moneyLog, recharge } from '@/api/finance.js';
-import { moneyType } from '@/api/index.js';
 import LbPicker from '@/components/lb-picker';
-import empty from '@/components/empty';
 export default {
 	components: {
 		LbPicker,
-		empty
 	},
 	data() {
 		return {
@@ -164,9 +161,9 @@ export default {
 		// 所有币种
 		async moneyType() {
 			let obj = this;
-			moneyType({}).then(({ data }) => {
-				obj.moneyTypeList = data;
-			});
+			// moneyType({}).then(({ data }) => {
+			// 	obj.moneyTypeList = data;
+			// });
 		},
 		pay() {
 			let obj = this;

+ 9 - 9
pages/assets/transfer.vue

@@ -78,20 +78,20 @@ export default {
 		async moneyType() {
 			let obj = this;
 			wallet({}).then(({ data }) => {
-				console.log(data)
-				obj.moneyTypeList = data;
-				// if (obj.logo == '') {
-				// 	obj.logo = obj.moneyTypeList[0].LOGO;
-				// 	obj.name = obj.moneyTypeList[0].name;
-				// 	obj.code = obj.moneyTypeList[0].code;
-				// 	obj.money = obj.moneyTypeList[0].wallet.money;
-				// }
 				const arr = Object.keys(data.back);
 				console.log(arr);
 				let ar = [];
 				arr.forEach(e => {
 					ar.push(data.back[e]);
 				});
+				obj.moneyTypeList = ar;
+				console.log(obj.moneyTypeList)
+				if (obj.logo == '') {
+					obj.logo = obj.moneyTypeList[0].LOGO;
+					obj.name = obj.moneyTypeList[0].name;
+					obj.code = obj.moneyTypeList[0].code;
+					obj.money = obj.moneyTypeList[0].money.money;
+				}
 			});
 		},
 		transfer() {
@@ -134,7 +134,7 @@ export default {
 			this.logo = options.LOGO;
 			this.name = options.name;
 			this.code = options.code;
-			this.money = options.wallet.money;
+			this.money = options.money.money;
 		},
 		useOutClickSide() {
 			this.$refs.easySelect.hideOptions && this.$refs.easySelect.hideOptions();

+ 1 - 1
pages/index/index.vue

@@ -193,7 +193,7 @@ export default {
 			},this.id).then(e => {
 				this.password = ''
 				this.show1 = false;
-				console.log(e)
+				obj.$api.msg(data.msg);
 			}).catch(e => {
 				this.password = ''
 				this.show1 = false;

BIN
static/img/qian.png


BIN
static/img/xiaj.png