Fly 2 years ago
parent
commit
c5c142d43a
38 changed files with 1714 additions and 930 deletions
  1. 33 0
      api/index.js
  2. 6 0
      package-lock.json
  3. 1 0
      package.json
  4. 4 6
      pages.json
  5. 12 0
      pages/content/select-currency.vue
  6. 17 2
      pages/exchange/index.vue
  7. 1 1
      pages/login/modules/phone.vue
  8. 0 19
      pages/property/asset.vue
  9. 22 1
      pages/property/bill.vue
  10. 38 19
      pages/property/index.vue
  11. 94 40
      pages/property/modules/Bibi/capital-switch.vue
  12. 124 32
      pages/property/modules/Bibi/index.vue
  13. 126 0
      pages/property/modules/Bibi/setting-bi.vue
  14. 103 27
      pages/property/modules/GiftMoney/capital-switch.vue
  15. 119 49
      pages/property/modules/GiftMoney/index.vue
  16. 0 204
      pages/property/modules/capital-switch.vue
  17. 32 0
      pages/property/modules/card.js
  18. 127 0
      pages/property/modules/card.scss
  19. 45 181
      pages/property/modules/card.vue
  20. 86 160
      pages/property/modules/contract/capital-switch.vue
  21. 91 21
      pages/property/modules/contract/index.vue
  22. 129 0
      pages/property/modules/legalTender/capital-switch.vue
  23. 94 21
      pages/property/modules/legalTender/index.vue
  24. 115 136
      pages/property/modules/switch.scss
  25. 145 0
      pages/property/modules/switch.vue
  26. 1 5
      pages/property/modules/table.scss
  27. BIN
      static/fontsize/Alimama_ShuHeiTi_Bold.ttf
  28. BIN
      static/fontsize/Alimama_ShuHeiTi_Bold.woff
  29. BIN
      static/fontsize/Alimama_ShuHeiTi_Bold.woff2
  30. 13 4
      static/fontsize/iconfont.css
  31. 19 0
      static/fontsize/instruction.txt
  32. BIN
      static/fontsize/阿里妈妈数黑体.zip
  33. 7 1
      store/getters.js
  34. 2 0
      store/index.js
  35. 71 0
      store/modules/possession.js
  36. 32 0
      utils/common.js
  37. 3 1
      utils/initialize.js
  38. 2 0
      utils/request.js

+ 33 - 0
api/index.js

@@ -36,6 +36,39 @@ export function Api_getQuotationNew() {
 }
 
 
+
+
+// 账户详情
+export function Api_getAccountInfo() {
+	return axios.post(`/api/wallet/list`)
+}
+
+// 用户帐单
+export function Api_getUserBill() {
+	return axios.post(`/api/wallet/legal_log`)
+}
+
+// 账户 - 划转
+export function Api_setChangeAccount(data) {
+	return axios.post(`/api/wallet/change` , data)
+}
+
+
+// 币种列表
+export function Api_getBiTypeList() {
+	return axios.get(`/api/wallet/flashAgainstList`)
+}
+
+// 闪况记录
+export function Api_getFlashRecord() {
+	return axios.get(`/api/wallet/myFlashAgainstList`)
+}
+
+// 提交兑换
+export function Api_getSubmit() {
+	return axios.post(`/api/wallet/flashAgainst`)
+}
+
 // // 根据手机号登录
 // export function goAuthLogin_Api(data) {
 // 	return axios.post(`/auth/c/doMiniLoginByPhone` , data )

+ 6 - 0
package-lock.json

@@ -5,6 +5,7 @@
   "packages": {
     "": {
       "dependencies": {
+        "decimal.js": "^10.4.3",
         "html2canvas": "^1.4.1",
         "uview-ui": "^2.0.36"
       }
@@ -25,6 +26,11 @@
         "utrie": "^1.0.2"
       }
     },
+    "node_modules/decimal.js": {
+      "version": "10.4.3",
+      "resolved": "https://registry.npmmirror.com/decimal.js/-/decimal.js-10.4.3.tgz",
+      "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA=="
+    },
     "node_modules/html2canvas": {
       "version": "1.4.1",
       "resolved": "https://registry.npmmirror.com/html2canvas/-/html2canvas-1.4.1.tgz",

+ 1 - 0
package.json

@@ -1,5 +1,6 @@
 {
   "dependencies": {
+    "decimal.js": "^10.4.3",
     "html2canvas": "^1.4.1",
     "uview-ui": "^2.0.36"
   }

+ 4 - 6
pages.json

@@ -28,12 +28,6 @@
                 "navigationBarTitleText" : "用户账单"
             }
         },
-        {
-            "path" : "pages/property/asset",
-            "style" : {
-                "navigationBarTitleText" : "资产记录"
-            }
-        },
         {
             "path" : "pages/task/index",
             "style" : {
@@ -53,6 +47,10 @@
         {
             "path" : "pages/contract/sustainability/lever",
             "style" : {}
+        },
+        {
+            "path" : "pages/property/modules/contract/capital-switch",
+            "style" : {}
         }
     ],
     "subPackages" : [

+ 12 - 0
pages/content/select-currency.vue

@@ -28,6 +28,7 @@
 
 <script>
 	import reverseBack from "@/components/headModules/reverse-back.vue"
+	import { Api_getBiTypeList , Api_getFlashRecord , Api_getSubmit} from "@/api/index.js"
 	export default {
 		name: 'selectCurrency',
 		components: {
@@ -54,7 +55,18 @@
 				]
 			};
 		},
+		onLoad() {
+			this.getBiTypeList();
+		},
+	 
 		methods:{
+			getBiTypeList(){
+				Api_getBiTypeList().then(res => {
+					console.log('Api_getBiTypeList = ' , res)
+				}).catch(err => {
+					console.log('Api_getBiTypeList = ' , err)
+				})
+			},
 			// pages/content/top-up
 			topUp(name){
 				uni.navigateTo({

+ 17 - 2
pages/exchange/index.vue

@@ -8,7 +8,7 @@
 				</view>
 			</template>
 			<template #right>
-				<share></share>
+				<view @click.stop="lookRecord()" class="head-record iconfont">&#xe642;</view>
 			</template>
 		</headContent>
 
@@ -59,6 +59,7 @@
 <script>
 	import share from "@/components/headModules/share.vue"
 	import selectCoin from "./modules/select-coin.vue" 
+	import { Api_getBiTypeList , Api_getFlashRecord , Api_getSubmit} from "@/api/index.js"
 	export default {
 		name: 'exchange',
 		components: {
@@ -69,6 +70,18 @@
 			return {
 
 			};
+		},
+		onLoad() {
+			this.getBiTypeList();
+		},
+		methods:{
+			getBiTypeList(){
+				Api_getFlashRecord().then(res => {
+					console.log('Api_getBiTypeList = ' , res)
+				}).catch(err => {
+					console.log('Api_getBiTypeList = ' , err)
+				})
+			}
 		}
 	}
 </script>
@@ -78,7 +91,9 @@
 	}
 </style>
 <style lang="scss" scoped>
-	 
+	 .head-record{
+	 	font-size: 60rpx;
+	 }
 
 	.box {
 		padding: 36rpx 30rpx 0;

+ 1 - 1
pages/login/modules/phone.vue

@@ -39,7 +39,7 @@
 		data() {
 			return {
 				formData: {
-					user_string: '14100000001',
+					user_string: '123456',
 					password: '123456'
 				}
 			};

+ 0 - 19
pages/property/asset.vue

@@ -1,19 +0,0 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			};
-		}
-	}
-</script>
-
-<style lang="scss">
-
-</style>

+ 22 - 1
pages/property/bill.vue

@@ -48,6 +48,7 @@
 <script>
 	import reverseBack from "@/components/headModules/reverse-back.vue"
 	import noData from "./modules/no-data.vue"
+	import { Api_getUserBill } from "@/api/index.js"
 	export default {
 		components: {
 			reverseBack,
@@ -117,7 +118,7 @@
 				],
 
 
-				tableData: [1, 2, 3, 4, 5]
+				tableData: []
 			};
 		},
 		onLoad(opt) {
@@ -129,6 +130,7 @@
 			// 	'法币账户',
 			// 	'赠金账户'
 			// ]
+			this.getUserBill()
 		},
 
 		onReachBottom() {
@@ -154,6 +156,25 @@
 					title = '';
 				}
 				return title
+			},
+			// 获取用户账单
+			getUserBill(){
+				// moreStatus: 'more-loading', // 上拉的状态:more-loading前;loading-loading中;noMore-没有更多了
+				this.moreStatus = 'loading';
+				Api_getUserBill({
+					currency:3,
+					type:this.pageType - 0 + 1,
+				}).then(res => {
+					this.tableData = res.list;
+					if(this.tableData.length >= res.count ){
+						this.moreStatus = 'more-loading';
+					}else{
+						this.moreStatus = 'loading';
+					};
+					console.log('Api_getUserBill = ' , this.res)
+				}).catch(err => {
+					
+				})
 			}
 		}
 	}

+ 38 - 19
pages/property/index.vue

@@ -13,7 +13,6 @@
 			</template>
 		</headContent>
 		<view class="content">
-			<card :cardIndex="navigationIndex" :userInfo="UserInfo"></card>
 			<!-- 合约账户 -->
 			<template v-if="navigationIndex === 0">
 				<contractModules />
@@ -44,7 +43,9 @@
 	import GiftMoneyModules from "./modules/GiftMoney/index.vue"
 	import legalTenderModules from "./modules/legalTender/index.vue"
 	import BibiModules from "./modules/Bibi/index.vue"
-	import { Way_getUserInfo } from "@/utils/common-request.js"
+	import {
+		Way_getUserInfo
+	} from "@/utils/common-request.js"
 	export default {
 		name: 'property',
 		components: {
@@ -56,14 +57,16 @@
 		},
 		data() {
 			return {
-				navigationIndex: 1,
+				navigationIndex: 3,
 				navigationArr: [
 					'合约账户',
 					'币币账户',
 					'法币账户',
 					'赠金账户'
 				],
-				UserInfo: null
+				UserInfo: null,
+
+				 
 			};
 		},
 		computed: {
@@ -72,27 +75,43 @@
 			]),
 		},
 		onShow() {
-			if(this.token){
-				this.getUserInfo()
-			}else{
-				uni.navigateTo({
-					url: '/pages/login/index'
-				})
-			}
+			this.getTokenStatus()
 		},
 		onReachBottom() {
 			console.log('页面触底')
 		},
-		methods:{
-			getUserInfo(){
-				Way_getUserInfo().then(res => {
-					this.UserInfo = res
-					console.log('this.UserInfo = ' , this.UserInfo.legal_wallet)
+		watch: {
+			token: {
+				handler(newToken) {
+					if (!newToken) {
+						this.goLogin()
+					};
+				}
+			}
+		},
+		methods: {
+			goLogin(){
+				// #ifndef APP-PLUS
+				uni.redirectTo({
+					url: '/pages/login/index'
+				})
+				// #endif
+			},
+			getTokenStatus() {
+				if (this.token) {
+					this.getAccountInfo()
+				} else {
+					this.goLogin()
+				}
+			},
+			getAccountInfo() {
+				this.$store.dispatch('possession/getPossession').then(res => {
+					console.log('获取成功')
 				}).catch(err => {
-					this.UserInfo = null
+					console.log('获取shibai ')
 				})
-				
-				
+
+
 			}
 		}
 	}

+ 94 - 40
pages/property/modules/Bibi/capital-switch.vue

@@ -1,62 +1,116 @@
 <template>
-	<uni-popup ref="popupRef">
-
-		<view class="unopen-box">
-			<view class="unopen-title">
-				<text class="z-close"></text>
-				<text>资金划转</text>
-				<text class="z-close" @click.stop="close">x</text>
-			</view>
-			<view class="unopen-content">
-			 
-				<view class="account-box">
-					<view class="account-item">
-						币币账户
-					</view>
-					<view class="account-link"> 
-					<image src="@/static/logo.png" mode="aspectFit"></image>
-						<text>划转</text>
-					</view>
-					<view class="account-item">
-						合约账户
-					</view>
-				</view>
-				<view class="capital-type">
-					<text class="type-left">全部</text>
-					<text class="type-rigth">USDT</text>
+	<view class="">
+		<switchPopup ref="switchPopupRef" :availableMoney="getBiMoney(from_field)" :from_field="from_field" :to_field="to_field">
+			<template #accountbox>
+				<view class="account-item" @click.stop="from_field !== 'change' ? selectBiType(from_field) : ''">
+					<text class="account-item-lable">{{ getBiName(from_field) }}账户</text>
+					<text class="iconfont" v-show="from_field !== 'change'">&#xe601;</text>
 				</view>
-				<view class="capital-nums">
-					<text class="num-title">可划转金额:</text>
-					<text class="num">29997.9123 USDT</text>
+				<view class="account-link" @click.stop="switchBiType">
+					<text class="iconfont">&#xe607;</text>
+					<text>划转</text>
 				</view>
-				<view class="capital-btn">
-					确定
+				<view class="account-item" @click.stop="to_field !== 'change' ? selectBiType(to_field) : ''">
+					<text class="account-item-lable">{{ getBiName(to_field) }}账户</text>
+					<text class="iconfont" v-show="to_field !== 'change'">&#xe601;</text>
 				</view>
-			</view>
-		</view>
-	</uni-popup>
+			</template>
+		</switchPopup>
+		<settingBi ref="settingBiRef" :activeBiType.sync="activeBiType"/>
+	</view>
 </template>
 
 <script>
+	import {
+		mapGetters
+	} from 'vuex'
+	import {
+		biName
+	} from "../card.js"
+	import settingBi from "./setting-bi.vue"
+	import switchPopup from "../switch.vue"
 	// 合约 - 币币
 	// 币币 - 合约 / 法币
 	export default {
+		name: "capitalSwitchModules",
 		data() {
 			return {
-
+				from_field: 'change',
+				to_field: 'lever',
+				activeBiType: ''
 			};
 		},
-		mounted() { 
-			this.$refs.popupRef.open();
+		watch: {
+			activeBiType: {
+				handler(newType, oldType) {
+					if (oldType === this.from_field) {
+						this.from_field = newType
+					}
+					if (oldType === this.to_field) {
+						this.to_field = newType
+					};
+				},
+				immediate: true
+			}
+		},
+		components: {
+			settingBi,
+			switchPopup
+		},
+		computed: {
+			...mapGetters([
+				'contractAccount',
+				'bibiAccount',
+				'legalAccount'
+			]),
+			getBiName() {
+				return function(key) {
+					return biName[key]
+				}
+			},
+			getBiMoney() {
+				return function(key) {
+					let nums = 0;
+					switch (key) {
+						case 'lever':
+							nums = this.contractAccount.usdt_totle
+							break;
+						case 'change':
+							nums = this.bibiAccount.usdt_totle
+							break;
+						case 'legal':
+							nums = this.legalAccount.usdt_totle
+							break;
+					};
+					return nums || 0
+				}
+			}
+		},
+		mounted() {
+
 		},
 		methods: {
+			// 切换币
+			switchBiType() {
+				const k = this.from_field;
+				this.from_field = this.to_field;
+				this.to_field = k;
+				// this.from_field:'legal',
+				// to_field:'change'
+			},
 			open() {
 				this.$nextTick(() => {
-					this.$refs.popupRef.open();
+					this.$refs.switchPopupRef.open();
 				})
 			},
-			close(){
-				this.$refs.popupRef.close();
+	 
+		 
+			selectBiType(val) {
+				this.activeBiType = val
+				console.log('selectBiType = ', this.activeBiType)
+				this.$nextTick(() => {
+					this.$refs.settingBiRef.open()
+				})
 			}
 
 		}
@@ -64,5 +118,5 @@
 </script>
 
 <style lang="scss" scoped>
-@import "~../switch.scss";
+	@import "~./../switch.scss";
 </style>

+ 124 - 32
pages/property/modules/Bibi/index.vue

@@ -1,45 +1,128 @@
 <template>
-	<view class="legal-tender-box">
-		<view class="lable-title">保证金</view>
-		<view class="capital-item">
-			<view class="capital-status" @click.stop="capitalStatus = !capitalStatus">
-				<view class="status-box">
-					<image v-show="capitalStatus" class="capital-icon" src="@/static/images/notarize.png"
-						mode="aspectFit"></image>
+	<view class="">
+		<card @updateShowMoneyStatus="(e) => showMoney = e">
+			<template #cardnum>
+				{{ bibiAccount.usdt_totle || '--'}}
+			</template>
+			<template #cardnums>
+				{{ bibiAccount.CNY || '--'}}
+			</template>
+			<template #cardmuen>
+				<block v-for="(item , index ) in cardMuen">
+					<view class="card-muen-item_2" @click.stop="cardBtns(item)">
+						<image class="item-icon" :src="item.icon" mode="aspectFit"></image>
+						<text class="item-name">{{item.name}}</text>
+					</view>
+				</block>
+			</template>
+
+		</card>
+		<view class="legal-tender-box">
+			<view class="lable-title">保证金</view>
+			<view class="capital-item">
+				<view class="capital-status" @click.stop="hideNoNums = !hideNoNums">
+					<view :class="['status-box' , !hideNoNums ? '' : 'show-status-box' ]">
+						<text v-show="hideNoNums" class="iconfont">&#xe6c5;</text>
+						<!-- <image v-show="hideNoNums" class="capital-icon" src="@/static/images/notarize.png"
+							mode="aspectFit"></image> -->
+					</view>
+					<text>隐藏为0的资产 </text>
+				</view>
+				<view class="capital-nums">
+					钱包:{{ bibiAccount.usdt_totle || '--'}} USDT
 				</view>
-				<text>隐藏为0的资产 </text>
-			</view>
-			<view class="capital-nums">
-				钱包:0.0914 USDT
 			</view>
+			<uni-table class="table-box" emptyText="暂无更多数据">
+				<!-- 表头行 -->
+				<uni-tr>
+					<uni-th align="left" style="flex: 1;">币种</uni-th>
+					<uni-th align="left" style="flex: 1;">账户权益</uni-th>
+					<uni-th align="right" style="flex: 1;">可用</uni-th>
+				</uni-tr>
+				<!-- 表格数据行 -->
+				<template v-if="bibiAccount.balance">
+					<uni-tr v-for="(item , index) in bibiAccount.balance" v-if="hideNoName(hideNoNums , index)">
+						<uni-td style="flex: 1;">{{ item.currency_name }}</uni-td>
+						<uni-td style="flex: 1;">{{ showMoney ? index % 2 ? 111 : 0.00 : '*****' }}</uni-td>
+						<uni-td style="text-align: right; flex: 1;">{{ showMoney ? 111 : '*****' }}</uni-td>
+					</uni-tr>
+				</template>
+			</uni-table>
+
+			<capitalSwitch ref="capitalSwitchRef"/>
 		</view>
-		<uni-table class="table-box" emptyText="暂无更多数据">
-			<!-- 表头行 -->
-			<uni-tr>
-				<uni-th align="left" style="flex: 1;">币种</uni-th>
-				<uni-th align="left" style="flex: 1;">账户权益</uni-th>
-				<uni-th align="right" style="flex: 1;">可用</uni-th>
-			</uni-tr>
-			<!-- 表格数据行 -->
-			<uni-tr v-for="item in 5">
-				<uni-td style="flex: 1;">USDT</uni-td>
-				<uni-td style="flex: 1;">298587458</uni-td>
-				<uni-td style="text-align: right; flex: 1;">29997.9123</uni-td>
-			</uni-tr>
-
-		</uni-table>
-
-
 	</view>
 </template>
 
 <script>
+	import card from "../card.vue"
+	import capitalSwitch from "./capital-switch.vue"
+	import {
+		checkBill
+	} from "../card.js"
+	import {
+		mapGetters
+	} from 'vuex'
 	export default {
 		name: 'BibiModules',
+		components: {
+			card,
+			capitalSwitch
+		},
+		computed: {
+			...mapGetters([
+				'contractAccount',
+				'bibiAccount'
+			])
+		},
 		data() {
 			return {
-				capitalStatus: true
+				showMoney: true,
+				hideNoNums: false,
+				cardMuen: [{
+					icon: require('@/static/logo.png'),
+					name: '充币',
+					path:'/pages/content/select-currency'
+				}, {
+					icon: require('@/static/logo.png'),
+					name: '提币'
+				}, {
+					icon: require('@/static/logo.png'),
+					name: '闪兑'
+				}, {
+					icon: require('@/static/logo.png'),
+					name: '划转',
+					btn: "BibiSwitch"
+				}, {
+					icon: require('@/static/logo.png'),
+					name: '记录',
+					path: '/pages/property/bill?type=1'
+				}],
 			};
+		},
+		methods: {
+			hideNoName(type, index) {
+				// console.log('hideNoName = ', type, index)
+				if (type) {
+					return index % 2
+				}
+				return true
+			},
+			cardBtns(item) {
+				const path = item?.path
+
+				if (!path) {
+					// 资金转换
+					this.$nextTick(() => {
+						this.$refs.capitalSwitchRef.open()
+					})
+				} else if (path) {
+
+					// '用户账单',
+					checkBill(path)
+				}
+
+			}
 		}
 	}
 </script>
@@ -75,21 +158,30 @@
 				padding-right: 20rpx;
 
 				.status-box {
-					width: 33rpx;
-					height: 33rpx;
+					width: 28rpx;
+					height: 28rpx;
 					background: #e7e7e7;
 					border-radius: 2rpx;
-					margin-right: 8rpx;
+					margin-right: 12rpx;
 					display: flex;
 					justify-content: center;
 					align-items: center;
 
+					.iconfont {
+						font-size: 24rpx;
+						color: #fff;
+					}
+
 					.capital-icon {
 						width: 24rpx;
 						height: 24rpx;
 					}
 				}
 
+				.show-status-box {
+					background-color: $Theme-Color;
+				}
+
 			}
 
 			.capital-status,

+ 126 - 0
pages/property/modules/Bibi/setting-bi.vue

@@ -0,0 +1,126 @@
+<template>
+	<uni-popup ref="popupRef" type="bottom">
+
+		<view class="popup-box">
+			<view class="popup-title">
+				<text class="title-side"></text>
+				<text class="title-name">选择账户</text>
+				<text class="title-side iconfont">&#xe621;</text>
+			</view>
+
+			<view class="stocks-content">
+				<block v-for="(item,index) in BiType">
+					<view class="stocks-item" @click.stop="settingBiType(item)">
+						<text class="stocks-text">{{ getBiName(item) }}账户</text>
+						<text v-if="item === activeBiType" class="active-stocks iconfont">&#xe627;</text>
+					</view>
+				</block>
+			</view>
+		</view>
+	</uni-popup>
+</template>
+<script>
+	import {
+		mapGetters
+	} from 'vuex'
+	import { biName } from "../card.js"
+	export default {
+		name: 'setting-color',
+		props:{
+			activeBiType:{
+				type:String,
+				default:''
+			}
+		},
+		data() {
+			return {
+				BiType:[
+					'legal',
+					'lever',
+				]
+			 
+			};
+		},
+		computed: {
+			getBiName(){
+				return function(key){
+					return biName[key]
+				}
+			},
+		},
+	 
+		mounted() {
+		// this.open()
+		},
+		methods: {
+			open() {
+				this.$nextTick(() => {
+					this.$refs.popupRef.open();
+				})
+			},
+			settingBiType(item){
+				this.$emit('update:activeBiType' , item)
+				this.$refs.popupRef.close();
+				 
+			}
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.popup-box {
+		width: 100%;
+		background-color: #Fff;
+		border-radius: 50rpx 50rpx 0px 0px;
+	
+		.popup-title {
+			width: 100%;
+			height: 106rpx;
+			border-radius: 50rpx 50rpx 0px 0px;
+			background-color: #F7F7F7 !important;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 40rpx;
+			font-weight: 700;
+	
+			.title-side {
+				flex-shrink: 0;
+				font-size: 28rpx;
+				width: 40rpx;
+				height: 100%;
+				line-height: 106rpx;
+				color: #666;
+				font-weight: 400;
+			}
+		}
+	
+		// <view class="stocks-content">
+		// 	<block v-for="(val,key,index) in stocksColorObj">
+		// 		<view class="stocks-item">
+		// 			<text class="stocks-text">{{ val }}</text>
+		// 			<text v-if="stocksColor === key" class="active-stocks iconfont">&#xe627;</text>
+		// 		</view>
+		// 	</block>
+		// </view>
+		.stocks-content{
+			width: 100%;
+			background-color: #Fff;
+			.stocks-item{
+				width: 100%;
+				height: 90rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				padding: 0 $pages-padding 0 60rpx;
+				border-bottom: 1rpx solid $border-color;
+				font-size: 28rpx;
+			}
+			.active-stocks{
+				color: $Theme-Color;
+			}
+		}
+	
+	}
+</style>

+ 103 - 27
pages/property/modules/GiftMoney/capital-switch.vue

@@ -1,69 +1,145 @@
 <template>
-	<uni-popup ref="popupRef">
+	<view class="">
+		<switchPopup ref="switchPopupRef" :availableMoney="getBiMoney(from_field)" :from_field="from_field"
+			:to_field="to_field">
+			<template #accounthint>
+				<view class="hint-text">
+					温馨提示:无限模式仅盈利部分可划转至合
+					约账户中,最小划转金额为100USDT
+				</view>
+			</template>
+			<template #accountbox>
+				<view class="account-item">
+					{{ getBiName(from_field) }}账户
+				</view>
+				<view class="account-link" >划转至</view>
+				<view class="account-item">
+					{{ getBiName(to_field) }}账户
+				</view>
+			</template>
+		</switchPopup>
+	</view>
+	<!-- <uni-popup ref="popupRef">
 
 		<view class="unopen-box">
-			<view class="unopen-title">
-				<text class="z-close"></text>
+			<text class="z-close iconfont" @click.stop="close">&#xe621;</text>
+			<view class="unopen-title"> 
 				<text>资金划转</text>
-				<text class="z-close" @click.stop="close">x</text>
 			</view>
 			<view class="unopen-content">
-				<view class="hint-text">
-					温馨提示:无限模式仅盈利部分可划转至合
-					约账户中,最小划转金额为100USDT
-				</view>
 				<view class="account-box">
-					<view class="account-item">
-						盈利账户
-					</view>
-					<view class="account-link"> 
-						<text>划转至</text>
-					</view>
-					<view class="account-item">
-						合约账户
-					</view>
+					
 				</view>
 				<view class="capital-type">
 					<text class="type-left">全部</text>
+					<input class="type-input" type="number">
 					<text class="type-rigth">USDT</text>
 				</view>
 				<view class="capital-nums">
 					<text class="num-title">可划转金额:</text>
-					<text class="num">29997.9123 USDT</text>
+					<text class="num">{{ getBiMoney(from_field) }} USDT</text>
 				</view>
-				<view class="capital-btn">
+				<view class="capital-btn" @click.stop="changeAccount">
 					确定
 				</view>
 			</view>
 		</view>
-	</uni-popup>
+	</uni-popup> -->
 </template>
 
 <script>
+	import {
+		mapGetters
+	} from 'vuex'
+	import {
+		biName
+	} from "../card.js"
+	import {
+		setChangeAccount
+	} from "./../card.js"
+	import switchPopup from "../switch.vue"
 	// 合约 - 币币
 	// 币币 - 合约 / 法币
 	export default {
+		name: "capitalSwitchModules",
+		components: {
+			switchPopup
+		},
 		data() {
 			return {
-
+				from_field: 'micro',
+				to_field: 'lever'
 			};
 		},
-		mounted() { 
+		computed: {
+			...mapGetters([
+				'contractAccount',
+				'GiftMoneyAccount'
+			]),
+			getBiName() {
+				return function(key) {
+					return biName[key]
+				}
+			},
+			getBiMoney() {
+				return function(key) {
+					let nums = 0;
+					switch (key) {
+						case 'micro':
+							nums = this.GiftMoneyAccount.usdt_totle
+							break;
+						case 'lever':
+							nums = this.contractAccount.usdt_totle
+							break;
+					}
+					console.log('contractAccount = ', this.contractAccount)
+					return nums || 0
+				}
+			}
+		},
+		mounted() {
+			// this.open()
 		},
 		methods: {
+			// 切换币
+			switchBiType() {
+				const k = this.from_field;
+				this.from_field = this.to_field;
+				this.to_field = k;
+				// this.from_field:'legal',
+				// to_field:'change'
+			},
 			open() {
 				this.$nextTick(() => {
-					this.$refs.popupRef.open();
+					this.$refs.switchPopupRef.open();
 				})
 			},
-			close(){
-				this.$refs.popupRef.close();
-			}
+		 
+			// changeAccount(){
+			// 	let data = {
+			// 		currency_id:'1',
+			// 		number:100,
+			// 		from_field:this.from_field,
+			// 		to_field:this.to_field
+			// 	}
+			// 	setChangeAccount(data).then(res => {
+
+			// 	}).catch(err => {
+
+			// 	}).finally(() => {})
+			// }
 
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-@import "~../switch.scss";
+	@import "~./../switch.scss";
+	.account-link{
+		justify-content: center;
+		font-size: 24rpx !important;
+	}
+	.account-item{
+		font-size: 28rpx !important;
+	}
 </style>

+ 119 - 49
pages/property/modules/GiftMoney/index.vue

@@ -1,52 +1,117 @@
 <template>
-	<view class="gift-money">
-		<view class="lable-title">保证金</view>
-		<uni-table class="table-box" emptyText="暂无更多数据">
-			<!-- 表头行 -->
-			<uni-tr>
-				<uni-th align="left">可用保证金</uni-th>
-				<uni-th align="center">已用保证金</uni-th>
-				<uni-th align="right">冻结</uni-th>
-			</uni-tr>
-			<!-- 表格数据行 -->
-			<uni-tr>
-				<uni-td>124.8028 USDT</uni-td>
-				<uni-td style="text-align: center;">100.0000 USDT</uni-td>
-				<uni-td style="text-align: right;">29997.9123</uni-td>
-			</uni-tr>
-
-		</uni-table>
-		<view class="account-money">
-			<view class="money-item">
-				赠金账户 124.8028 USDT
+	<view class="">
+		<card @updateShowMoneyStatus="(e) => showMoney = e">
+			<template #cardnum>
+				{{ GiftMoneyAccount.usdt_totle || '--'}}
+			</template>
+			<template #cardnums>
+				{{ GiftMoneyAccount.CNY || '--'}}
+			</template>
+			<template #cardmuen>
+				<block v-for="(item , index ) in cardMuen">
+					<view class="card-muen-item_1" @click.stop="cardBtns(item)">
+						<image class="item-icon" :src="item.icon" mode="aspectFit"></image>
+						<text class="item-name">{{item.name}}</text>
+					</view>
+				</block>
+			</template>
+
+		</card>
+		<view class="gift-money">
+			<view class="lable-title">保证金</view>
+			<uni-table class="table-box" emptyText="暂无更多数据">
+				<!-- 表头行 -->
+				<uni-tr>
+					<uni-th align="left">可用保证金</uni-th>
+					<uni-th align="center">已用保证金</uni-th>
+					<uni-th align="right">冻结</uni-th>
+				</uni-tr>
+				<!-- 表格数据行 -->
+				<uni-tr>
+					<uni-td>124.8028 USDT</uni-td>
+					<uni-td style="text-align: center;">100.0000 USDT</uni-td>
+					<uni-td style="text-align: right;">29997.9123</uni-td>
+				</uni-tr>
+
+			</uni-table>
+			<view class="account-money">
+				<view class="money-item">
+					赠金账户 124.8028 USDT
+				</view>
+				<view class="money-item">
+					盈利账户 0.0000 USDT
+				</view>
 			</view>
-			<view class="money-item">
-				盈利账户 0.0000 USDT
-			</view>
-		</view>
-		
-		<gap height="8rpx"/>
-		
-		<view class="lable-title">盈亏</view>
-		
-		<view class="Profit-loss">
-			<view class="Profit-loss-lable">
-				浮动盈亏
-			</view>
-			<view class="Profit-loss-value">
-				-1.8767 USDT
+
+			<gap />
+
+			<view class="lable-title">盈亏</view>
+
+			<view class="Profit-loss">
+				<view class="Profit-loss-lable">
+					浮动盈亏
+				</view>
+				<view class="Profit-loss-value">
+					-1.8767 USDT
+				</view>
 			</view>
 		</view>
+		<capital-switch ref="capitalSwitchRef" />
 	</view>
 </template>
 
 <script>
+	import card from "../card.vue"
+	import capitalSwitch from "./capital-switch.vue"
+	import {
+		checkBill
+	} from "../card.js"
+	import {
+		mapGetters
+	} from 'vuex'
 	export default {
 		name: 'GiftMoney',
+ 
+		computed: {
+			...mapGetters([
+				'GiftMoneyAccount',
+			])
+		},
+		components: {
+			card,
+			capitalSwitch
+		},
 		data() {
 			return {
-
+				showMoney: true,
+				cardMuen: [{
+					icon: require('@/static/logo.png'),
+					name: '资金划转',
+					btn: "GiftMoney"
+				}, {
+					icon: require('@/static/logo.png'),
+					name: '用户账单',
+					path: '/pages/property/bill?type=3'
+				}]
 			};
+		},
+		methods:{
+			cardBtns(item) {
+				const btn = item?.btn
+				const path = item?.path
+			
+				if (btn) {
+					// 资金转换
+					this.$nextTick(() => {
+						this.$refs.capitalSwitchRef.open()
+					})
+				} else if(path){
+					 
+					// '用户账单',
+					checkBill(path)
+				}
+			
+			}
 		}
 	}
 </script>
@@ -87,14 +152,15 @@
 
 			}
 
-			.uni-table-th { 
+			.uni-table-th {
 				padding: 20rpx 0 0;
 
 				&:nth-child(2) {
 					padding: 20rpx 20rpx 0;
 				}
 			}
-			.uni-table-td { 
+
+			.uni-table-td {
 				padding: 12rpx 0 20rpx;
 
 				&:nth-child(2) {
@@ -113,19 +179,22 @@
 		font-weight: 400;
 		color: #808080;
 		line-height: 30rpx;
-		.money-item{
-		padding-bottom: 12rpx;
-		&:last-child{
-			padding-bottom: 30rpx;
-		}
+
+		.money-item {
+			padding-bottom: 12rpx;
+
+			&:last-child {
+				padding-bottom: 30rpx;
+			}
 		}
-		
+
 	}
-	
-	.Profit-loss{
+
+	.Profit-loss {
 		width: 100%;
 		padding: 0 $pages-padding;
-		.Profit-loss-lable{
+
+		.Profit-loss-lable {
 			padding: 20rpx 0 12rpx;
 			font-size: 22rpx;
 			font-family: PingFang SC, PingFang SC-Regular;
@@ -133,8 +202,9 @@
 			color: #1a1a1a;
 			line-height: 30rpx;
 		}
-		.Profit-loss-value{
- 
+
+		.Profit-loss-value {
+
 			font-size: 26rpx;
 			font-family: PingFang SC, PingFang SC-Bold;
 			font-weight: 700;

+ 0 - 204
pages/property/modules/capital-switch.vue

@@ -1,204 +0,0 @@
-<template>
-	<uni-popup ref="popupRef">
-
-		<view class="unopen-box">
-			<view class="unopen-title">
-				<text class="z-close"></text>
-				<text>温馨提示</text>
-				<text class="z-close" @click.stop="close">x</text>
-			</view>
-			<view class="unopen-content">
-				<view class="account-box">
-					<view class="account-item">
-						合约账户
-					</view>
-					<view class="account-link">
-						<image src="../../../static/logo.png" mode="aspectFit"></image>
-						<text>划转</text>
-					</view>
-					<view class="account-item">
-						币币账户
-					</view>
-				</view>
-				<view class="capital-type">
-					<text class="type-left">全部</text>
-					<text class="type-rigth">USDT</text>
-				</view>
-				<view class="capital-nums">
-					<text class="num-title">可划转金额:</text>
-					<text class="num">29997.9123 USDT</text>
-				</view>
-				<view class="capital-btn">
-					确定
-				</view>
-			</view>
-		</view>
-	</uni-popup>
-</template>
-
-<script>
-	// 合约 - 币币
-	// 币币 - 合约 / 法币
-	export default {
-		name: "capitalSwitchModules",
-		data() {
-			return {
-
-			};
-		},
-		mounted() {
-		 
-		},
-		methods: {
-			open() {
-				this.$nextTick(() => {
-					this.$refs.popupRef.open();
-				})
-			},
-			close(){
-				this.$refs.popupRef.close();
-			}
-
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	$paddingLR: 32rpx;
-
-	.unopen-box {
-		width: 587rpx;
-		background-color: #fff;
-		border-radius: 12rpx;
-		overflow: hidden;
-
-		.unopen-title {
-			height: 90rpx;
-			font-size: 32rpx;
-			font-family: PingFang SC, PingFang SC-Bold;
-			font-weight: 700;
-			color: #1a1a1a;
-			line-height: 90rpx;
-			letter-spacing: 0.64rpx;
-			border-bottom: 1rpx solid #e6e6e6;
-			display: flex;
-			justify-content: space-between;
-			padding: 0 $paddingLR;
-			.z-close{
-				width: 25rpx;
-				height: 25rpx;
-				flex-shrink: 0;
-			}
-		}
-
-		.unopen-content {
-			padding: 73.5rpx $paddingLR 65rpx;
-
-			.account-box {
-				width: 100%;
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-
-				.account-item {
-					width: 220rpx;
-					height: 80rpx;
-					text-align: center;
-					line-height: 80rpx;
-					background: #f1f1f3;
-					border-radius: 6rpx;
-
-					font-size: 22rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					text-align: center;
-					color: #333333;
-				}
-
-				.account-link {
-					flex: 1;
-					display: flex;
-					flex-direction: column;
-					justify-content: space-around;
-					align-items: center;
-
-
-					font-size: 22rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					color: #05c175;
-					line-height: 30rpx;
-
-					image {
-						width: 30rpx;
-						height: 26rpx;
-					}
-				}
-			}
-
-			.capital-type {
-				width: 100%;
-				height: 84rpx;
-				border: 1rpx solid #b3b3b3;
-				margin-top: 30rpx;
-				padding: 0 20rpx;
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-
-				.type-left {
-
-					font-size: 24rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					color: #05c175;
-				}
-
-				.type-rigth {
-					font-size: 28rpx;
-					font-family: PingFang SC, PingFang SC-Bold;
-					font-weight: 700;
-					color: #1a1a1a;
-				}
-			}
-
-			// <view class="capital-nums">
-			// 	<text class="num-title">可划转金额:</text>
-			// 	<text class="num">29997.9123 USDT</text>
-			// </view>
-			.capital-nums {
-				width: 100%;
-				font-size: 28rpx;
-				font-family: PingFang SC, PingFang SC-Regular;
-				font-weight: 400;
-				text-align: center;
-				padding: 20rpx 0 30rpx;
-
-				.num-title {
-
-
-					color: #808080;
-				}
-
-				.num {
-
-					color: #05C175;
-				}
-			}
-			.capital-btn{
-				width: 100%;
-				height: 75rpx;
-				background: #05c175;
-				border-radius: 8rpx;
-				font-size: 32rpx;
-				font-family: PingFang SC, PingFang SC-Regular;
-				font-weight: 400;
-				color: #ffffff; 
-				letter-spacing: 0.64rpx;
-				text-align: center;
-				line-height: 75rpx;
-			}
-		}
-
-	}
-</style>

+ 32 - 0
pages/property/modules/card.js

@@ -0,0 +1,32 @@
+import { Api_setChangeAccount } from "@/api/index.js"
+
+export const biName = {
+	// match/legal/lever/change/micro
+	lever:'合约',
+	change:'币币',
+	legal:'法币',
+	// micro:'赠金'
+	micro:'盈利'
+}
+
+
+export const checkBill = (path = '') => {
+	uni.navigateTo({
+		url: path
+	});
+}
+
+
+// 资金划转
+export const setChangeAccount = (data) => {
+				console.log('0000')
+	return new Promise((resolve , reject) => {
+		Api_setChangeAccount(data).then(res => {
+			resolve()
+		}).catch(err => {
+			reject()
+		})
+	})
+	
+	
+}

+ 127 - 0
pages/property/modules/card.scss

@@ -0,0 +1,127 @@
+.box {
+		padding: 0 $pages-padding;
+	}
+
+	.card-box {
+		width: 100%;
+		min-height: 327rpx;
+		padding: 34rpx 30rpx;
+		background: linear-gradient(89deg, #05c373 1%, #8eeabb 99%);
+		border-radius: 18rpx;
+
+		.card-title {
+			width: 100%;
+			display: flex;
+			align-items: center;
+
+			.title {
+				font-size: 24rpx;
+				font-family: PingFang SC, PingFang SC-Regular;
+				font-weight: 400;
+				color: #ffffff;
+				line-height: 33rpx;
+			}
+
+			.icon {
+				width: 28rpx;
+				height: 18rpx;
+				margin-left: 10rpx;
+			}
+			.title-icon{
+				font-size: 28rpx;
+				color: #ffffff;
+			}
+		}
+
+		.card-num {
+			margin: 19rpx 0 11rpx;
+			font-size: 40rpx;
+			font-family: PingFang SC, PingFang SC-Regular;
+			font-weight: 400;
+			color: #ffffff;
+			line-height: 56rpx;
+			height: 56rpx;
+		}
+
+		.card-nums {
+			font-size: 20rpx;
+			font-family: PingFang SC, PingFang SC-Regular;
+			font-weight: 400;
+			color: #ffffff;
+			height: 28rpx;
+			display: flex;
+			align-items: center;
+			.nums-icon{
+				font-size: 20rpx;
+				margin-right: 10rpx;
+			}
+		}
+
+		.card-muen {
+			padding-top: 48rpx;
+			display: flex;
+			align-items: center;
+			flex-wrap: wrap;
+
+			::v-deep .card-muen-item_1 {
+				width: calc((100% - 22rpx) / 2);
+
+				min-height: 64rpx;
+				flex-shrink: 0;
+				background: #05bd73;
+				border: 1rpx solid rgba(255, 255, 255, 0.81);
+				border-radius: 6rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+
+				&:nth-child(even) {
+					margin-left: 22rpx;
+				}
+
+				&:nth-child(n + 3) {
+					margin-top: 22rpx;
+				}
+
+				.item-icon {
+					width: 38rpx;
+					height: 38rpx;
+					border-radius: 6rpx;
+				}
+
+				.item-name {
+					padding-left: 32rpx;
+
+
+					font-size: 30rpx;
+					font-family: PingFang SC, PingFang SC-Regular;
+					font-weight: 400;
+					color: #ffffff;
+				}
+			}
+
+			::v-deep .card-muen-item_2 {
+				flex-shrink: 0;
+				width: 20%;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+
+				.item-icon {
+					width: 32rpx;
+					height: 32rpx;
+					border-radius: 6rpx;
+				}
+
+				.item-name {
+					padding-top: 2.5px;
+					font-size: 22rpx;
+					font-family: PingFang SC, PingFang SC-Regular;
+					font-weight: 400;
+					color: #ffffff;
+					line-height: 30rpx;
+				}
+			}
+		}
+	}

+ 45 - 181
pages/property/modules/card.vue

@@ -3,16 +3,31 @@
 		<view class="card-box">
 			<view class="card-title">
 				<text class="title">资产估值(USDT)</text>
-				<image class="icon" src="../../../static/logo.png" mode="aspectFit"></image>
+				<text v-show="showMoney" @click.stop="showMoney = !showMoney"
+					class="title-icon iconfont">&#xe663;</text>
+				<text v-show="!showMoney" @click.stop="showMoney = !showMoney"
+					class="title-icon iconfont">&#xe664;</text>
+				<!-- <image class="icon" src="../../../static/logo.png" mode="aspectFit"></image> -->
 			</view>
-			<view class="card-num">
-				29858.7458
+			<view class="card-num" v-show="showMoney">
+				<slot name="cardnum"></slot>
 			</view>
-			<view class="card-nums">
-				¥ 205129.58
+			<view class="card-num" v-show="!showMoney">
+				*****
+			</view>
+			<view class="card-nums" v-show="showMoney">
+				<text class="nums-icon iconfont">&#xe623;</text>
+				<text class="nums-icon iconfont">&#xe615;</text>
+				<text>
+					<slot name="cardnums"></slot>
+				</text>
+			</view>
+			<view class="card-nums" v-show="!showMoney">
+				<text>*****</text>
 			</view>
 			<view class="card-muen">
-				<block v-for="(item , index ) in cardMuen[cardIndex]">
+				<slot name="cardmuen"></slot>
+				<!-- <block v-for="(item , index ) in cardMuen[cardIndex]">
 					<template v-if="[0,2,3].includes(cardIndex)">
 						<view class="card-muen-item_1" @click.stop="cardBtns(item)">
 							<image class="item-icon" :src="item.icon" mode="aspectFit"></image>
@@ -25,31 +40,28 @@
 							<text class="item-name">{{item.name}}</text>
 						</view>
 					</template>
-				</block>
+				</block> -->
 			</view>
 		</view>
-		<capital-switch ref="capitalSwitchRef" />
+		
 
 
-		<!-- 币币账户 / 资金转换 -->
-		<BibiSwitch ref="BibiSwitchRef" />
+ 
 
 		<!-- GiftMoney / 赠金账户 -->
-		<GiftMoney ref="GiftMoneyRef" />
+		<!-- <GiftMoney ref="GiftMoneyRef" /> -->
 
 
 	</view>
 </template>
 
 <script>
-	import capitalSwitch from "./capital-switch.vue"
-	import GiftMoney from "./GiftMoney/capital-switch.vue"
-	import BibiSwitch from "./Bibi/capital-switch.vue"
+  
 	export default {
 		name: 'cardModules',
 		props: {
-			userInfo:{
-				type:[String , Object],
+			userInfo: {
+				type: [String, Object],
 				default: null
 			},
 			cardIndex: {
@@ -58,64 +70,31 @@
 			}
 		},
 		components: {
-			capitalSwitch,
-			GiftMoney,
-			BibiSwitch
+			// capitalSwitch,
+			// GiftMoney,
+		 
+		},
+		watch:{
+			showMoney:{
+				handler(newStatus){
+					this.$emit('updateShowMoneyStatus' , newStatus)
+				},
+				immediate:true
+			}
 		},
 		data() {
-			return {
+			return { 
+				showMoney:true,
 				cardMuen: [
-					[{
-						icon: require('../../../static/logo.png'),
-						name: '资金划转',
-						btn: "capitalSwitch"
-					}, {
-						icon: require('../../../static/logo.png'),
-						name: '用户账单',
-						path: '/pages/property/bill?type=0'
-					}],
-					[{
-						icon: require('../../../static/logo.png'),
-						name: '充币'
-					}, {
-						icon: require('../../../static/logo.png'),
-						name: '提币'
-					}, {
-						icon: require('../../../static/logo.png'),
-						name: '闪兑'
-					}, {
-						icon: require('../../../static/logo.png'),
-						name: '划转',
-						btn: "BibiSwitch"
-					}, {
-						icon: require('../../../static/logo.png'),
-						name: '记录',
-						path: '/pages/property/bill?type=1'
-					}],
-					[{
-						icon: require('../../../static/logo.png'),
-						name: '资金划转'
-					}, {
-						icon: require('../../../static/logo.png'),
-						name: '用户账单',
-						path: '/pages/property/bill?type=2'
-					}],
-					[{
-						icon: require('../../../static/logo.png'),
-						name: '资金划转',
-						btn: "GiftMoney"
-					}, {
-						icon: require('../../../static/logo.png'),
-						name: '用户账单',
-						path: '/pages/property/bill?type=3'
-					}]
+					 
+					
 				]
 			};
 		},
 		methods: {
 			cardBtns(item) {
 				const btn = item?.btn
-				console.log('cardBtns ', btn)
+
 				if (btn) {
 					switch (btn) {
 						case 'capitalSwitch':
@@ -159,120 +138,5 @@
 </script>
 
 <style lang="scss" scoped>
-	.box {
-		padding: 0 $pages-padding;
-	}
-
-	.card-box {
-		width: 100%;
-		min-height: 327rpx;
-		padding: 34rpx 30rpx;
-		background: linear-gradient(89deg, #05c373 1%, #8eeabb 99%);
-		border-radius: 18rpx;
-
-		.card-title {
-			width: 100%;
-			display: flex;
-			align-items: center;
-
-			.title {
-				font-size: 24rpx;
-				font-family: PingFang SC, PingFang SC-Regular;
-				font-weight: 400;
-				color: #ffffff;
-				line-height: 33rpx;
-			}
-
-			.icon {
-				width: 28rpx;
-				height: 18rpx;
-				margin-left: 10rpx;
-			}
-		}
-
-		.card-num {
-			padding: 19rpx 0 11rpx;
-			font-size: 40rpx;
-			font-family: PingFang SC, PingFang SC-Regular;
-			font-weight: 400;
-			color: #ffffff;
-			line-height: 56rpx;
-		}
-
-		.card-nums {
-			font-size: 20rpx;
-			font-family: PingFang SC, PingFang SC-Regular;
-			font-weight: 400;
-			color: #ffffff;
-			line-height: 28rpx;
-		}
-
-		.card-muen {
-			padding-top: 48rpx;
-			display: flex;
-			align-items: center;
-			flex-wrap: wrap;
-
-			.card-muen-item_1 {
-				width: calc((100% - 22rpx) / 2);
-
-				min-height: 64rpx;
-				flex-shrink: 0;
-				background: #05bd73;
-				border: 1rpx solid rgba(255, 255, 255, 0.81);
-				border-radius: 6rpx;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-
-				&:nth-child(even) {
-					margin-left: 22rpx;
-				}
-
-				&:nth-child(n + 3) {
-					margin-top: 22rpx;
-				}
-
-				.item-icon {
-					width: 38rpx;
-					height: 38rpx;
-					border-radius: 6rpx;
-				}
-
-				.item-name {
-					padding-left: 32rpx;
-
-
-					font-size: 30rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					color: #ffffff;
-				}
-			}
-
-			.card-muen-item_2 {
-				flex-shrink: 0;
-				width: 20%;
-				display: flex;
-				flex-direction: column;
-				justify-content: center;
-				align-items: center;
-
-				.item-icon {
-					width: 32rpx;
-					height: 32rpx;
-					border-radius: 6rpx;
-				}
-
-				.item-name {
-					padding-top: 2.5px;
-					font-size: 22rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					color: #ffffff;
-					line-height: 30rpx;
-				}
-			}
-		}
-	}
+	@import "~./card.scss"
 </style>

+ 86 - 160
pages/property/modules/contract/capital-switch.vue

@@ -1,204 +1,130 @@
 <template>
-	<uni-popup ref="popupRef">
+	<view class="">
+		<switchPopup ref="switchPopupRef" :availableMoney="getBiMoney(from_field)" :from_field="from_field" :to_field="to_field">
+			<template #accountbox>
+				<view class="account-item">
+					{{ getBiName(from_field) }}账户
+				</view>
+				<view class="account-link" @click.stop="switchBiType">
+					<text class="iconfont">&#xe607;</text>
+					<text>划转</text>
+				</view>
+				<view class="account-item">
+					{{ getBiName(to_field) }}账户
+				</view>
+			</template>
+		</switchPopup> 
+	</view>
+	<!-- <uni-popup ref="popupRef">
 
 		<view class="unopen-box">
-			<view class="unopen-title">
-				<text class="z-close"></text>
-				<text>温馨提示</text>
-				<text class="z-close" @click.stop="close">x</text>
+			<text class="z-close iconfont" @click.stop="close">&#xe621;</text>
+			<view class="unopen-title"> 
+				<text>资金划转</text>
 			</view>
 			<view class="unopen-content">
 				<view class="account-box">
-					<view class="account-item">
-						合约账户
-					</view>
-					<view class="account-link">
-						<image src="../../../static/logo.png" mode="aspectFit"></image>
-						<text>划转</text>
-					</view>
-					<view class="account-item">
-						币币账户
-					</view>
+					
 				</view>
 				<view class="capital-type">
 					<text class="type-left">全部</text>
+					<input class="type-input" type="number">
 					<text class="type-rigth">USDT</text>
 				</view>
 				<view class="capital-nums">
 					<text class="num-title">可划转金额:</text>
-					<text class="num">29997.9123 USDT</text>
+					<text class="num">{{ getBiMoney(from_field) }} USDT</text>
 				</view>
-				<view class="capital-btn">
+				<view class="capital-btn" @click.stop="changeAccount">
 					确定
 				</view>
 			</view>
 		</view>
-	</uni-popup>
+	</uni-popup> -->
 </template>
 
 <script>
+	import {
+		mapGetters
+	} from 'vuex'
+	import { biName } from "../card.js"
+	import { setChangeAccount } from "./../card.js"
+	import switchPopup from "../switch.vue"
 	// 合约 - 币币
 	// 币币 - 合约 / 法币
 	export default {
 		name: "capitalSwitchModules",
+		components:{switchPopup},
 		data() {
 			return {
-
+				from_field:'lever',
+				to_field:'change'
 			};
 		},
+		computed: {
+			...mapGetters([
+				'contractAccount',
+				'bibiAccount'
+			]),
+			getBiName(){
+				return function(key){
+					return biName[key]
+				}
+			},
+			getBiMoney(){
+				return function(key){
+					let nums = 0;
+					switch(key){
+						case 'lever':
+						nums = this.contractAccount.usdt_totle
+						break;
+						case 'change':
+						nums = this.bibiAccount.usdt_totle
+						break;
+					}
+					console.log('contractAccount = ' , this.contractAccount)
+					return nums || 0
+				}
+			}
+		},
 		mounted() {
-		 
+			// this.open()
 		},
 		methods: {
+			// 切换币
+			switchBiType(){
+				const k = this.from_field;
+				this.from_field = this.to_field;
+				this.to_field = k;
+				// this.from_field:'legal',
+				// to_field:'change'
+			},
 			open() {
 				this.$nextTick(() => {
-					this.$refs.popupRef.open();
+					this.$refs.switchPopupRef.open();
 				})
 			},
-			close(){
+			close() {
 				this.$refs.popupRef.close();
-			}
+			},
+			// changeAccount(){
+			// 	let data = {
+			// 		currency_id:'1',
+			// 		number:100,
+			// 		from_field:this.from_field,
+			// 		to_field:this.to_field
+			// 	}
+			// 	setChangeAccount(data).then(res => {
+					
+			// 	}).catch(err => {
+					
+			// 	}).finally(() => {})
+			// }
 
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	$paddingLR: 32rpx;
-
-	.unopen-box {
-		width: 587rpx;
-		background-color: #fff;
-		border-radius: 12rpx;
-		overflow: hidden;
-
-		.unopen-title {
-			height: 90rpx;
-			font-size: 32rpx;
-			font-family: PingFang SC, PingFang SC-Bold;
-			font-weight: 700;
-			color: #1a1a1a;
-			line-height: 90rpx;
-			letter-spacing: 0.64rpx;
-			border-bottom: 1rpx solid #e6e6e6;
-			display: flex;
-			justify-content: space-between;
-			padding: 0 $paddingLR;
-			.z-close{
-				width: 25rpx;
-				height: 25rpx;
-				flex-shrink: 0;
-			}
-		}
-
-		.unopen-content {
-			padding: 73.5rpx $paddingLR 65rpx;
-
-			.account-box {
-				width: 100%;
-				display: flex;
-				align-items: center;
-				justify-content: space-between;
-
-				.account-item {
-					width: 220rpx;
-					height: 80rpx;
-					text-align: center;
-					line-height: 80rpx;
-					background: #f1f1f3;
-					border-radius: 6rpx;
-
-					font-size: 22rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					text-align: center;
-					color: #333333;
-				}
-
-				.account-link {
-					flex: 1;
-					display: flex;
-					flex-direction: column;
-					justify-content: space-around;
-					align-items: center;
-
-
-					font-size: 22rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					color: #05c175;
-					line-height: 30rpx;
-
-					image {
-						width: 30rpx;
-						height: 26rpx;
-					}
-				}
-			}
-
-			.capital-type {
-				width: 100%;
-				height: 84rpx;
-				border: 1rpx solid #b3b3b3;
-				margin-top: 30rpx;
-				padding: 0 20rpx;
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-
-				.type-left {
-
-					font-size: 24rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					color: #05c175;
-				}
-
-				.type-rigth {
-					font-size: 28rpx;
-					font-family: PingFang SC, PingFang SC-Bold;
-					font-weight: 700;
-					color: #1a1a1a;
-				}
-			}
-
-			// <view class="capital-nums">
-			// 	<text class="num-title">可划转金额:</text>
-			// 	<text class="num">29997.9123 USDT</text>
-			// </view>
-			.capital-nums {
-				width: 100%;
-				font-size: 28rpx;
-				font-family: PingFang SC, PingFang SC-Regular;
-				font-weight: 400;
-				text-align: center;
-				padding: 20rpx 0 30rpx;
-
-				.num-title {
-
-
-					color: #808080;
-				}
-
-				.num {
-
-					color: #05C175;
-				}
-			}
-			.capital-btn{
-				width: 100%;
-				height: 75rpx;
-				background: #05c175;
-				border-radius: 8rpx;
-				font-size: 32rpx;
-				font-family: PingFang SC, PingFang SC-Regular;
-				font-weight: 400;
-				color: #ffffff; 
-				letter-spacing: 0.64rpx;
-				text-align: center;
-				line-height: 75rpx;
-			}
-		}
-
-	}
+	 @import "~./../switch.scss";
 </style>

+ 91 - 21
pages/property/modules/contract/index.vue

@@ -1,35 +1,105 @@
 <template>
-	<view class="legal-tender-box">
-		 
-		<uni-table class="table-box" emptyText="暂无更多数据">
-			<!-- 表头行 -->
-			<uni-tr>
-				<uni-th align="left" style="flex: 1;">币种</uni-th>
-				<uni-th align="left" style="flex: 1;">账户权益</uni-th>
-				<uni-th align="left" style="flex: 1;">冻结</uni-th>
-				<uni-th align="right" style="flex: 1;">可用</uni-th>
-			</uni-tr>
-			<!-- 表格数据行 -->
-			<uni-tr v-for="item in 5">
-				<uni-td style="flex: 1;">USDT</uni-td>
-				<uni-td style="flex: 1;">298587458</uni-td>
-				<uni-td style="flex: 1;">000</uni-td>
-				<uni-td style="text-align: right; flex: 1;">29997.9123</uni-td>
-			</uni-tr>
-
-		</uni-table>
+	<view class="">
+		<card @updateShowMoneyStatus="(e) => showMoney = e">
+			<template #cardnum>
+				{{ contractAccount.usdt_totle || '--'}}
+			</template>
+			<template #cardnums>
+				{{ contractAccount.CNY || '--'}}
+			</template>
+			<template #cardmuen>
+				<block v-for="(item , index ) in cardMuen">
+					<view class="card-muen-item_1" @click.stop="cardBtns(item)">
+						<image class="item-icon" :src="item.icon" mode="aspectFit"></image>
+						<text class="item-name">{{item.name}}</text>
+					</view>
+				</block>
+			</template>
 
+		</card>
+		<view class="legal-tender-box">
 
+			<uni-table class="table-box" emptyText="暂无更多数据">
+				<!-- 表头行 -->
+				<uni-tr>
+					<uni-th align="left" style="flex: 1;">币种</uni-th>
+					<uni-th align="left" style="flex: 1;">账户权益</uni-th>
+					<uni-th align="left" style="flex: 1;">冻结</uni-th>
+					<uni-th align="right" style="flex: 1;">可用</uni-th>
+				</uni-tr>
+				<!-- 表格数据行 -->
+				<template v-if="contractAccount.balance">
+					<uni-tr v-for="item in contractAccount.balance">
+						<uni-td style="flex: 1;">{{ item.currency_name }}</uni-td>
+						<uni-td style="flex: 1;">{{ showMoney ? getNums(item.lock_lever_balance , item.usdt_price) : '*****' }}</uni-td>
+						<uni-td style="flex: 1;">{{ showMoney ? item.lock_lever_balance : '*****' }}</uni-td>
+						<uni-td style="text-align: right; flex: 1;">{{ showMoney ? item.usdt_price : '*****' }}</uni-td>
+					</uni-tr>
+				</template>
+			</uni-table>
+		</view>
+		
+		<capital-switch ref="capitalSwitchRef" />
 	</view>
 </template>
 
 <script>
+	import {
+		mapGetters
+	} from 'vuex'
+	import capitalSwitch from "./capital-switch.vue"
+	import card from "../card.vue"
+	import {
+		checkBill
+	} from "../card.js"
 	export default {
 		name: 'contractModules',
+		components: {
+			card,
+			capitalSwitch
+		},
+ 
 		data() {
 			return {
-				capitalStatus: true
+				showMoney:false,
+				cardMuen: [{
+					icon: require('@/static/logo.png'),
+					name: '资金划转',
+					btn: "capitalSwitch"
+				}, {
+					icon: require('@/static/logo.png'),
+					name: '用户账单',
+					path: '/pages/property/bill?type=0'
+				}],
 			};
+		},
+		
+		computed: {
+			...mapGetters([
+				'contractAccount',
+			])
+		},
+		methods: {
+			cardBtns(item) {
+				const btn = item?.btn
+				const path = item?.path
+
+				if (btn) {
+					// 资金转换
+					this.$nextTick(() => {
+						this.$refs.capitalSwitchRef.open()
+					})
+				} else if(path){
+					 
+					// '用户账单',
+					checkBill(path)
+				}
+
+			},
+			// 
+			getNums(a,b){
+				return this.$decimalNum.add(a,b)
+			}
 		}
 	}
 </script>
@@ -41,7 +111,7 @@
 		// padding: 0 $pages-padding ;
 		width: 100%;
 
-		 
+
 	}
 
 	.table-box {

+ 129 - 0
pages/property/modules/legalTender/capital-switch.vue

@@ -0,0 +1,129 @@
+<template>
+	<view class="">
+		<switchPopup ref="switchPopupRef" :availableMoney="getBiMoney(from_field)" :from_field="from_field" :to_field="to_field">
+			<template #accountbox>
+				<view class="account-item">
+					{{ getBiName(from_field) }}账户
+				</view>
+				<view class="account-link" @click.stop="switchBiType">
+					<text class="iconfont">&#xe607;</text>
+					<text>划转</text>
+				</view>
+				<view class="account-item">
+					{{ getBiName(to_field) }}账户
+				</view>
+			</template>
+		</switchPopup> 
+	</view>
+	<!-- <uni-popup ref="popupRef">
+
+		<view class="unopen-box">
+			<text class="z-close iconfont" @click.stop="close">&#xe621;</text>
+			<view class="unopen-title"> 
+				<text>资金划转</text>
+			</view>
+			<view class="unopen-content">
+				<view class="account-box">
+					
+				</view>
+				<view class="capital-type">
+					<text class="type-left">全部</text>
+					<input class="type-input" type="number">
+					<text class="type-rigth">USDT</text>
+				</view>
+				<view class="capital-nums">
+					<text class="num-title">可划转金额:</text>
+					<text class="num">{{ getBiMoney(from_field) }} USDT</text>
+				</view>
+				<view class="capital-btn" @click.stop="changeAccount">
+					确定
+				</view>
+			</view>
+		</view>
+	</uni-popup> -->
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from 'vuex'
+	import { biName } from "../card.js"
+	import { setChangeAccount } from "./../card.js"
+	import switchPopup from "../switch.vue"
+	// 合约 - 币币
+	// 币币 - 合约 / 法币
+	export default {
+		name: "capitalSwitchModules",
+		components:{switchPopup},
+		data() {
+			return {
+				from_field:'legal',
+				to_field:'change'
+			};
+		},
+		computed: {
+			...mapGetters([
+				'legalAccount',
+				'bibiAccount'
+			]),
+			getBiName(){
+				return function(key){
+					return biName[key]
+				}
+			},
+			getBiMoney(){
+				return function(key){
+					let nums = 0;
+					switch(key){
+						case 'legal':
+						nums = this.legalAccount.usdt_totle
+						break;
+						case 'change':
+						nums = this.bibiAccount.usdt_totle
+						break;
+					} 
+					return nums || 0
+				}
+			}
+		},
+		mounted() {
+			// this.open()
+		},
+		methods: {
+			// 切换币
+			switchBiType(){
+				const k = this.from_field;
+				this.from_field = this.to_field;
+				this.to_field = k;
+				// this.from_field:'legal',
+				// to_field:'change'
+			},
+			open() {
+				this.$nextTick(() => {
+					this.$refs.switchPopupRef.open();
+				})
+			},
+			close() {
+				this.$refs.popupRef.close();
+			},
+			// changeAccount(){
+			// 	let data = {
+			// 		currency_id:'1',
+			// 		number:100,
+			// 		from_field:this.from_field,
+			// 		to_field:this.to_field
+			// 	}
+			// 	setChangeAccount(data).then(res => {
+					
+			// 	}).catch(err => {
+					
+			// 	}).finally(() => {})
+			// }
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	 @import "~./../switch.scss";
+</style>

+ 94 - 21
pages/property/modules/legalTender/index.vue

@@ -1,42 +1,115 @@
 <template>
-	<view class="legal-tender-box">
-
-		<uni-table class="table-box" emptyText="暂无更多数据">
-			<!-- 表头行 -->
-			<uni-tr>
-				<uni-th align="left" style="flex: 1;">币种</uni-th>
-				<uni-th align="left" style="flex: 1;">账户权益</uni-th>
-				<uni-th align="left" style="flex: 1;">冻结</uni-th>
-				<uni-th align="right" style="flex: 1;">可用</uni-th>
-			</uni-tr>
-			<!-- 表格数据行 -->
-			<uni-tr v-for="item in 5">
-				<uni-td style="flex: 1;">USDT</uni-td>
-				<uni-td style="flex: 1;">298587458</uni-td>
-				<uni-td style="flex: 1;">00000</uni-td>
-				<uni-td style="text-align: right, flex: 1;">29997.9123</uni-td>
-			</uni-tr>
-
-		</uni-table>
+	<view>
+		<card @updateShowMoneyStatus="(e) => showMoney = e">
+			<template #cardnum>
+				{{ legalAccount.usdt_totle || '--'}}
+			</template>
+			<template #cardnums>
+				{{ legalAccount.CNY || '--'}}
+			</template>
+			<template #cardmuen>
+				<block v-for="(item , index ) in cardMuen">
+					<view class="card-muen-item_1" @click.stop="cardBtns(item)">
+						<image class="item-icon" :src="item.icon" mode="aspectFit"></image>
+						<text class="item-name">{{item.name}}</text>
+					</view>
+				</block>
+			</template>
 
+		</card>
+		<view class="legal-tender-box">
 
+			<uni-table class="table-box" emptyText="暂无更多数据">
+				<!-- 表头行 -->
+				<uni-tr>
+					<uni-th align="left" style="flex: 1;">币种</uni-th>
+					<uni-th align="left" style="flex: 1;">账户权益</uni-th>
+					<uni-th align="left" style="flex: 1;">冻结</uni-th>
+					<uni-th align="right" style="flex: 1;">可用</uni-th>
+				</uni-tr>
+				<!-- 表格数据行 -->
+				<template v-if="legalAccount.balance">
+					<uni-tr v-for="item in legalAccount.balance">
+						<uni-td style="flex: 1;">{{ item.currency_name }}</uni-td>
+						<uni-td style="flex: 1;">{{ showMoney ? 111 : '*****' }}</uni-td>
+						<uni-td style="flex: 1;">{{ showMoney ? 111 : '*****' }}</uni-td>
+						<uni-td style="text-align: right; flex: 1;">{{ showMoney ? 111 : '*****' }}</uni-td>
+					</uni-tr>
+				</template>
+				<!-- <uni-tr v-for="item in 5">
+					<uni-td style="flex: 1;">USDT</uni-td>
+					<uni-td style="flex: 1;">298587458</uni-td>
+					<uni-td style="flex: 1;">00000</uni-td>
+					<uni-td style="text-align: right, flex: 1;">29997.9123</uni-td>
+				</uni-tr> -->
+
+			</uni-table>
+
+
+		</view>
+		
+		<capital-switch ref="capitalSwitchRef" />
 	</view>
 </template>
 
 <script>
+	import card from "../card.vue"
+	import capitalSwitch from "./capital-switch.vue"
+	import {
+		checkBill
+	} from "../card.js"
+	import {
+		mapGetters
+	} from 'vuex'
 	export default {
 		name: 'legalTenderModules',
+ 
+		components: {
+			card,
+			capitalSwitch
+		},
+		computed: {
+			...mapGetters([
+				'legalAccount',
+			])
+		},
 		data() {
 			return {
-
+				showMoney: true,
+				cardMuen: [{
+					icon: require('@/static/logo.png'),
+					name: '资金划转'
+				}, {
+					icon: require('@/static/logo.png'),
+					name: '用户账单',
+					path: '/pages/property/bill?type=2'
+				}],
 			};
+		},
+		methods:{
+			cardBtns(item) { 
+				const path = item?.path
+			
+				if (!path) {
+					// 资金转换
+					this.$nextTick(() => {
+						this.$refs.capitalSwitchRef.open()
+					})
+				} else  {
+					 
+					// '用户账单',
+					checkBill(path)
+				}
+			
+			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
 	@import "~./../table.scss";
-	.legal-tender-box{
+
+	.legal-tender-box {
 		padding: 0 $pages-padding ;
 		width: 100%;
 	}

+ 115 - 136
pages/property/modules/switch.scss

@@ -1,145 +1,124 @@
-$paddingLR: 32rpx;
-
-	.unopen-box {
-		width: 587rpx;
-		background-color: #fff;
-		border-radius: 12rpx;
-		overflow: hidden;
-
-		.unopen-title {
-			height: 90rpx;
-			font-size: 32rpx;
-			font-family: PingFang SC, PingFang SC-Bold;
-			font-weight: 700;
-			color: #1a1a1a;
-			line-height: 90rpx;
-			letter-spacing: 0.64rpx;
-			border-bottom: 1rpx solid #e6e6e6;
-			display: flex;
-			justify-content: space-between;
-			padding: 0 $paddingLR;
-			.z-close{
-				width: 25rpx;
-				height: 25rpx;
-				flex-shrink: 0;
-			}
-		}
-
-		.unopen-content {
-			padding: 73.5rpx $paddingLR 65rpx;
-			.hint-text{
-			 
-				font-size: 28rpx;
-				font-family: PingFang SC, PingFang SC-Regular;
-				font-weight: 400;
-				color: #808080;
-				line-height: 42rpx;
-				padding-bottom: 52rpx;
-			}
-			.account-box {
-				width: 100%;
-				display: flex;
+ .unopen-box{
+	 width: 668rpx;
+	 background-color: #fff;
+	 border-radius: 6rpx;
+	 padding: 60rpx 60rpx 40rpx;
+	 position: relative;
+	 .z-close{
+		 position: absolute;
+		 right: 20rpx;
+		 top: 20rpx;
+		color: #c6c3c3e6;
+		font-weight: bold;
+	 }
+	 .unopen-title{
+		 font-size: 48rpx;
+		 font-weight: bold;
+		 text-align: center;
+		 letter-spacing: 1px;
+		 line-height: 1.1;
+	 }
+	 .hint-text{
+		 padding-top: 50rpx;
+		 font-size: 26rpx;
+	 }
+	 .unopen-content{
+		 width: 100%;
+		 padding-top: 50rpx;
+		 
+		 .account-box{
+			 width: 100%;
+			 display: flex;
+			 justify-content: space-between;
+			 align-items: stretch;
+			 .account-link{
+				 width: 100rpx;
+				 display: flex;
+				 flex-direction: column;
+				 font-size: 22rpx;
 				align-items: center;
-				justify-content: space-between;
-
-				.account-item {
-					width: 220rpx;
-					height: 80rpx;
-					text-align: center;
-					line-height: 80rpx;
-					background: #f1f1f3;
-					border-radius: 6rpx;
-
-					font-size: 22rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					text-align: center;
-					color: #333333;
-				}
-
-				.account-link {
-					flex: 1;
-					display: flex;
-					flex-direction: column;
-					justify-content: space-around;
-					align-items: center;
-
-
-					font-size: 22rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					color: #05c175;
-					line-height: 30rpx;
-
-					image {
-						width: 30rpx;
-						height: 26rpx;
-					}
+				color: $Theme-Color;
+				.iconfont{
+					font-size: 24rpx;
+					transform: rotateY(180deg);
+					margin-bottom: 16rpx;
+					// font-weight: bold;
 				}
-			}
-
-			.capital-type {
-				width: 100%;
-				height: 84rpx;
-				border: 1rpx solid #b3b3b3;
-				margin-top: 30rpx;
-				padding: 0 20rpx;
+			 }
+			 .account-item{
+				flex: 1;
+				height: 80rpx;
+				background-color: #f1f1f3;
+				line-height: 80rpx;
+				font-size: 22rpx;
+				border-radius: 6rpx;
 				display: flex;
-				justify-content: space-between;
+				justify-content: center;
 				align-items: center;
-
-				.type-left {
-
-					font-size: 24rpx;
-					font-family: PingFang SC, PingFang SC-Regular;
-					font-weight: 400;
-					color: #05c175;
+				padding: 0 10rpx;
+				.account-item-lable{
+					flex: 1;
+					text-align: center;
 				}
-
-				.type-rigth {
-					font-size: 28rpx;
-					font-family: PingFang SC, PingFang SC-Bold;
-					font-weight: 700;
-					color: #1a1a1a;
+				.iconfont{
+					flex-shrink: 0;
+					font-size: 20rpx;
+					color: $Theme-Color;
 				}
+			 }
+		 }
+		 .capital-type{
+			 margin-top: 30rpx;
+			width: 100%;
+			height: 80rpx;
+			border: 1px solid $border-color6;
+			border-radius: 6rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 20rpx;
+			.type-left{
+				font-size: 24rpx;
+				color: $Theme-Color;
+				flex-shrink: 0;
+				// font-weight: bold;
 			}
-
-			// <view class="capital-nums">
-			// 	<text class="num-title">可划转金额:</text>
-			// 	<text class="num">29997.9123 USDT</text>
-			// </view>
-			.capital-nums {
-				width: 100%;
-				font-size: 28rpx;
-				font-family: PingFang SC, PingFang SC-Regular;
-				font-weight: 400;
-				text-align: center;
-				padding: 20rpx 0 30rpx;
-
-				.num-title {
-
-
-					color: #808080;
-				}
-
-				.num {
-
-					color: #05C175;
-				}
+			.type-input{
+				flex: 1;
+				height: 100%;
+				font-size: 26rpx;
+				font-weight: bold;
+				padding:0 20rpx;
+				letter-spacing: 1px;
 			}
-			.capital-btn{
-				width: 100%;
-				height: 75rpx;
-				background: #05c175;
-				border-radius: 8rpx;
-				font-size: 32rpx;
-				font-family: PingFang SC, PingFang SC-Regular;
-				font-weight: 400;
-				color: #ffffff; 
-				letter-spacing: 0.64rpx;
-				text-align: center;
-				line-height: 75rpx;
+			.type-rigth{
+				flex-shrink: 0;
+				font-size: 24rpx;
+				font-weight: 900;
+				color: #000;
 			}
-		}
-
-	}
+		 }
+		 
+		 .capital-nums{
+			 width: 100%;
+			 padding: 50rpx 0;
+			 font-size: 26rpx;
+			 text-align: right;
+			 color: #acacae;
+			 .num{
+				 color: $Theme-Color;
+				 font-weight: bold;
+			 }
+		 }
+		 
+		 .capital-btn{
+			 width: 100%;
+			 height: 80rpx;
+			 background-color: $Theme-Color;
+			 border-radius: 6rpx;
+			 text-align: center;
+			 line-height: 80rpx;
+			 color: #fff;
+		 }
+	 }
+ }

+ 145 - 0
pages/property/modules/switch.vue

@@ -0,0 +1,145 @@
+<template>
+	<uni-popup ref="popupRef">
+
+		<view class="unopen-box">
+			<text class="z-close iconfont" @click.stop="close">&#xe621;</text>
+			<view class="unopen-title"> 
+				<text>资金划转</text>
+			</view>
+			<slot name="accounthint"></slot>
+			
+			<view class="unopen-content">
+				<view class="account-box">
+					<slot name="accountbox"></slot>
+				</view>
+				<view class="capital-type">
+					<text class="type-left">全部</text>
+					<input class="type-input" type="number" v-model="moneyNum">
+					<text class="type-rigth">USDT</text>
+				</view>
+				<view class="capital-nums">
+					<text class="num-title">可划转金额:</text>
+					<text class="num">{{ availableMoney }} USDT</text>
+				</view>
+				<view class="capital-btn" @click.stop="changeAccount">
+					确定
+				</view>
+			</view>
+		</view>
+	</uni-popup>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from 'vuex'
+	import { biName , setChangeAccount} from "./card.js" 
+ 
+	// 合约 - 币币
+	// 币币 - 合约 / 法币
+	export default {
+		name: "capitalSwitchModules",
+		data() {
+			return {
+				moneyNum:''
+			};
+		},
+		props:{
+			availableMoney:{
+				type:[Number , String],
+				default:0
+			},
+			from_field:{
+				type:String,
+				default:''
+			},
+			to_field:{
+				type:String,
+				default:''
+			},
+		},
+		watch:{
+			activeBiType:{
+				handler(newType , oldType){
+					if(oldType === this.from_field){
+						this.from_field = newType
+					}
+					if(oldType === this.to_field){
+						this.to_field = newType
+					};
+				},
+				immediate:true
+			}
+		},
+	 
+		computed: {
+			...mapGetters([
+				'contractAccount',
+				'bibiAccount',
+				'legalAccount'
+			]),
+			getBiName(){
+				return function(key){
+					return biName[key]
+				}
+			},
+			getBiMoney(){
+				return function(key){
+					let nums = 0;
+					switch(key){
+						case 'lever':
+						nums = this.contractAccount.usdt_totle
+						break;
+						case 'change':
+						nums = this.bibiAccount.usdt_totle
+						break;
+						case 'legal':
+						nums = this.legalAccount.usdt_totle
+						break;
+					};
+					return nums || 0
+				}
+			}
+		},
+		mounted() {
+	 
+		},
+		methods: {
+			// 切换币
+			switchBiType(){
+				const k = this.from_field;
+				this.from_field = this.to_field;
+				this.to_field = k;
+				// this.from_field:'legal',
+				// to_field:'change'
+			},
+			open() {
+				this.$nextTick(() => {
+					this.$refs.popupRef.open();
+				})
+			},
+			close() {
+				this.$refs.popupRef.close();
+			},
+			changeAccount(){
+				let data = {
+					currency_id:'1',
+					number:this.moneyNum,
+					from_field:this.from_field,
+					to_field:this.to_field
+				}
+				setChangeAccount(data).then(res => {
+					
+				}).catch(err => {
+					
+				}).finally(() => {})
+			},
+			 
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	 @import "~./switch.scss";
+</style>

+ 1 - 5
pages/property/modules/table.scss

@@ -38,7 +38,7 @@
 			padding-top: 20rpx;
 			padding-bottom: 20rpx;
  
-			font-size: 26rpx;
+			font-size: 24rpx;
 			font-family: PingFang SC, PingFang SC-Bold;
 			font-weight: 700;
 			text-align: left;
@@ -49,9 +49,5 @@
 				padding-left: 0;
 			}
 		}
-		
-		
 	}
-	
-	
 }

BIN
static/fontsize/Alimama_ShuHeiTi_Bold.ttf


BIN
static/fontsize/Alimama_ShuHeiTi_Bold.woff


BIN
static/fontsize/Alimama_ShuHeiTi_Bold.woff2


+ 13 - 4
static/fontsize/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: 'iconfont';  /* Project id 4023758 */
-  src: url('https://at.alicdn.com/t/c/font_4023758_mituiqa7l6.woff2?t=1682392643449') format('woff2'),
-       url('https://at.alicdn.com/t/c/font_4023758_mituiqa7l6.woff?t=1682392643449') format('woff'),
-       url('https://at.alicdn.com/t/c/font_4023758_mituiqa7l6.ttf?t=1682392643449') format('truetype');
+  src: url('https://at.alicdn.com/t/c/font_4023758_bx01ckwyoh8.woff2?t=1682473472918') format('woff2'),
+       url('https://at.alicdn.com/t/c/font_4023758_bx01ckwyoh8.woff?t=1682473472918') format('woff'),
+       url('https://at.alicdn.com/t/c/font_4023758_bx01ckwyoh8.ttf?t=1682473472918') format('truetype');
 }
 .iconfont {
 	font-family: "iconfont" !important;
@@ -11,4 +11,13 @@
 	-webkit-font-smoothing: antialiased;
 	-webkit-text-stroke-width: 0.2px;
 	-moz-osx-font-smoothing: grayscale;
-}
+}
+
+/* CDN 服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
+/* @font-face {
+  font-family: "阿里妈妈数黑体 Bold";
+  font-weight: 700;
+  src: url("//at.alicdn.com/wf/webfont/htkwHOngcAgr/cd5jmESI4mLV.woff2") format("woff2"),
+	   url("//at.alicdn.com/wf/webfont/htkwHOngcAgr/ww0FFZPh6C0H.woff") format("woff");
+	   font-display: swap;
+} */

+ 19 - 0
static/fontsize/instruction.txt

@@ -0,0 +1,19 @@
+A. 在哪里可以下载阿里妈妈数黑体?
+渠道一:https://www.iconfont.cn/fonts/detail?cnid=a9fXc2HD9n7s
+渠道二:fonts.alibabagroup.com
+
+
+B. 阿里阿里妈妈数黑体简介
+基本信息:阿里妈妈数黑体为中文简体字库,收纳的中文字符包括但不限于GB2312,共计6767个汉字;英文大小写共52个;常用标点符号共206个,总计7025个字符。 
+
+设计说明:阿里妈妈数黑体字型饱满、体态中正,布白极具现代韵律,落笔厚实而简练;字里行间流露出先锋、前卫和时尚的视觉感受。适用于电商、广告、品牌形象、推广物料等场景。
+
+C. 使用反馈、商业合作等问题,请email:
+alimama-font@list.alibaba-inc.com
+——
+重要!安装前请先阅读此文档
+请先按照下面流程安装文件夹里的字体包。
+
+1. 打开字体文件夹,根据不同系统需要选择OTF或TTF版本
+
+2. 字体所包含只有一个字重(双击安装)。

BIN
static/fontsize/阿里妈妈数黑体.zip


+ 7 - 1
store/getters.js

@@ -3,6 +3,12 @@ const getters = {
 	stocksColor: state => state.app.stocksColor,
 	headHeight: state => state.app.headHeight,
 	statusBarHeight: state => state.app.statusBarHeight,
-
+	
+	// 资产
+	contractAccount: state => state.possession.contractAccount,
+	bibiAccount: state => state.possession.bibiAccount,
+	legalAccount: state => state.possession.legalAccount,
+	GiftMoneyAccount: state => state.possession.GiftMoneyAccount,
+	
 }
 export default getters

+ 2 - 0
store/index.js

@@ -1,6 +1,7 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
 import app from './modules/app.config.js'
+import possession from "./modules/possession.js"
 import getters from "./getters.js"
  
 
@@ -9,6 +10,7 @@ Vue.use(Vuex)
 const store = new Vuex.Store({
   modules: {
     app,
+	possession
     
   },
   getters

+ 71 - 0
store/modules/possession.js

@@ -0,0 +1,71 @@
+ // 资产
+ import {
+ 	Api_getAccountInfo
+ } from "@/api/index.js"
+
+
+ const state = {
+	contractAccount:{},
+	bibiAccount:{},
+	legalAccount:{},
+	GiftMoneyAccount:{}
+ }
+
+ const mutations = {
+ 	SET_CONTRACT: (state, contract) => {
+		// 合约账户
+ 		state.contractAccount = contract;
+ 	},
+	SET_BIBI: (state, bibi) => {
+		// 币币账户
+		state.bibiAccount = bibi;
+	},
+	SET_LEGAL: (state, legal) => {
+		// 法币账户
+		state.legalAccount = legal;
+	},
+	SET_GIFTMONEY: (state, GiftMoney) => {
+		// 赠金账户
+		state.GiftMoneyAccount = GiftMoney;
+	},
+ 	// SET_STOCKS_COLOR: (state, code) => {
+ 	// 	state.stocksColor = code
+ 	// },
+ 	// SET_TOKEN: (state, token) => {
+ 	// 	setToken(token)
+ 	// 	state.token = token
+ 	// }
+
+ }
+
+ const actions = {
+ 	// setToken = (token) => {
+ 	// console.log('token = ' , token)
+ 	// }
+ 	// 获取资产
+ 	getPossession({
+ 		commit
+ 	}, data) {
+ 		// commit('SET_TOKEN', token)
+ 		return new Promise((resolve, reject) => {
+ 			Api_getAccountInfo().then(res => {
+				commit('SET_CONTRACT' , res.lever_wallet);
+				commit('SET_BIBI' , res.change_wallet);
+				commit('SET_LEGAL' , res.legal_wallet);
+				commit('SET_GIFTMONEY' , res.micro_wallet);
+ 				console.log('this.UserInfo = ', res)
+				resolve()
+ 			}).catch(err => {
+ 				reject()
+ 			})
+ 		})
+ 	},
+
+ }
+
+ export default {
+ 	namespaced: true,
+ 	state,
+ 	mutations,
+ 	actions
+ }

+ 32 - 0
utils/common.js

@@ -1,6 +1,9 @@
 // import config from "./config"
 // import store from "@/store/index.js"
 
+import {
+	Decimal
+} from 'decimal.js'
 import config from "./config.js"
 export const setToken = (tokenVal) => {
 	try {
@@ -50,3 +53,32 @@ export const reverseBack = () => {
 		})
 	}
 }
+
+export const decimalNum = {
+	// 加法
+	add:(a , b) => {
+		return new Decimal(a).add(new Decimal(b)) 
+	},
+	// 减法
+	sub:(a , b) => {
+		return new Decimal(a).sub(new Decimal(b))
+	},
+	// 乘法
+	mul:(a , b) => {
+		return new Decimal(a).mul(new Decimal(b))
+	},
+	// 除法
+	div:(a , b) => {
+		return new Decimal(a).div(new Decimal(b))
+	},
+	
+	// // 加法
+	// let c = new Decimal(a).add(new Decimal(b)) 
+	// // 减法
+	// let d = new Decimal(a).sub(new Decimal(b))
+	// // 乘法
+	// let e = new Decimal(a).mul(new Decimal(b))
+	// // 除法
+	// let f = new Decimal(a).div(new Decimal(b))
+ 
+}

+ 3 - 1
utils/initialize.js

@@ -1,14 +1,16 @@
 
 import config from "./config.js"
+import { decimalNum } from "./common.js"
 
 // import share from "@/components/headModules/share.vue"
 // import reverseBack from "@/components/headModules/reverse-back.vue"
 
 export default {
-	install(Vue) {
+	install(Vue) {decimalNum
 		// 挂载全局对象
 		Vue.prototype.$config = config; // 全局配置
 		Vue.prototype.$stocksColorObj = config.stocksColorObj; // 股票颜色
+		Vue.prototype.$decimalNum = decimalNum; // 股票颜色
 
 		// Vue.component('share', share)
 		// Vue.component('reverseBack', reverseBack)

+ 2 - 0
utils/request.js

@@ -72,6 +72,8 @@ export const request = async (opt = {}) => {
 	opt.timeout = 5000 // 请求超时时间
 
 	opt.header = headers
+	
+	console.log('opt = ' , opt)
 	const result = new Promise((resolve, reject) => {
 		const handler = uni.request(Object.assign({}, opt, {
 			success: (res) => {