cmy vor 1 Jahr
Ursprung
Commit
dd157cdc38
63 geänderte Dateien mit 1807 neuen und 1291 gelöschten Zeilen
  1. 24 0
      api/game.js
  2. 6 7
      components/footer/list.js
  3. 46 15
      libs/i18n/lang/cn.json
  4. 41 6
      libs/i18n/lang/en.json
  5. 47 12
      libs/i18n/lang/tw.json
  6. 1 1
      manifest.json
  7. 20 0
      package-lock.json
  8. 5 0
      package.json
  9. 11 23
      pages.json
  10. 255 614
      pages/index/entertainment.vue
  11. 149 183
      pages/index/index.vue
  12. 148 0
      pages/index/information - 副本.vue
  13. 19 103
      pages/index/information.vue
  14. 67 24
      pages/index/user.vue
  15. 1 1
      pages/myPledge/myPledge.vue
  16. 5 3
      pages/myPledge/zyXingqing.vue
  17. 1 3
      pages/public/forget.vue
  18. 4 3
      pages/public/login.vue
  19. 5 9
      pages/public/register.vue
  20. 398 108
      pages/user/money/recharge.vue
  21. 166 0
      pages/user/money/recharge备份.vue
  22. 1 1
      pages/user/money/team.vue
  23. 15 2
      pages/user/money/withdrawal.vue
  24. 1 1
      pages/user/set/set.vue
  25. 182 143
      pages/user/set/transaction.vue
  26. 5 5
      pages/user/set/userinfo.vue
  27. 22 14
      pages/user/shareQrCode.vue
  28. BIN
      static/icon/user-R.png
  29. BIN
      static/icon/user-U.png
  30. BIN
      static/img/dice1.png
  31. BIN
      static/img/dice2.png
  32. BIN
      static/img/dice3.png
  33. BIN
      static/img/dice4.png
  34. BIN
      static/img/dice5.png
  35. BIN
      static/img/dice6.png
  36. BIN
      static/img/logo.png
  37. BIN
      static/img/money_pay_1.png
  38. BIN
      static/img/money_pay_2.png
  39. BIN
      static/img/money_pay_3.png
  40. BIN
      static/img/money_pay_4.png
  41. BIN
      static/img/shouye1.png
  42. BIN
      static/img/sz1.png
  43. BIN
      static/shouye/fenxiang.png
  44. BIN
      static/shouye/huiyuan.png
  45. BIN
      static/shouye/index-bottom.png
  46. BIN
      static/shouye/index-content.png
  47. BIN
      static/shouye/index_item_1.png
  48. BIN
      static/shouye/index_item_2.png
  49. BIN
      static/shouye/index_logo.png
  50. BIN
      static/shouye/jiaoyi.png
  51. BIN
      static/shouye/liuyan.png
  52. BIN
      static/shouye/shouye1.png
  53. BIN
      static/shouye/shouye4.png
  54. BIN
      static/shouye/shouye5.png
  55. BIN
      static/shouye/shouye6.png
  56. BIN
      static/shouye/shouye7.png
  57. BIN
      static/shouye/shouye8.png
  58. BIN
      static/shouye/shouye9.png
  59. BIN
      static/shouye/tuichu.png
  60. 1 1
      store/index.js
  61. 3 3
      uni.scss
  62. 153 3
      utils/loginUtils.js
  63. 5 3
      utils/request.js

+ 24 - 0
api/game.js

@@ -49,4 +49,28 @@ export  function gameBetIn(data) {
 		method: 'post',
 		data
 	});
+}
+// 互娱  测试
+export  function gameTest() {
+	return request({
+		url: `/api/test`,
+		method: 'post',
+	});
+}
+// 充值
+export  function gamecharge(data) {
+	return request({
+		url: `/api/charge`,
+		method: 'get',
+		data
+	});
+}
+
+// 充值完成
+export  function gamechargePost(data) {
+	return request({
+		url: `/api/charge`,
+		method: 'post',
+		data
+	});
 }

+ 6 - 7
components/footer/list.js

@@ -6,19 +6,18 @@ export function navList(that) {
       icon: "static/tabBar/shouye.png",
       activeIcon: "static/tabBar/shouye-home.png",
     },
-   
     {
       label: "home.d1",
       tel: "pledge",
       icon: "static/tabBar/baoya.png",
       activeIcon: "static/tabBar/baoya-home.png",
     },
-	{
-	  label: "home.d2",
-	  tel: "entertainment",
-	  icon: "static/tabBar/huyu.png",
-	  activeIcon: "static/tabBar/huyu-home.png",
-	},
+	// {
+	//   label: "home.d2",
+	//   tel: "entertainment",
+	//   icon: "static/tabBar/huyu.png",
+	//   activeIcon: "static/tabBar/huyu-home.png",
+	// },
     {
       label: "home.d3",
       tel: "information",

+ 46 - 15
libs/i18n/lang/cn.json

@@ -1,8 +1,5 @@
 {
 	"home":{
-		"k1": "最新价格",
-		"b0": "24H涨跌幅",
-		"b8": "名称",
 		"d0": "首页",
 		"d1": "质押",
 		"d2": "互娱",
@@ -10,14 +7,52 @@
 		"d4": "我的"
 	},
 	"homepledge":{
+		"PKR介绍":"PKR介绍",
+		"description":"<p style='text-indent:2rem'>Polker(PKR)是第壹款内存块链在线竞猜游戏,它使用虚幻引擎4实现身临其境的强大游戏玩法,同时利用可证明的公平和TRNG系统实现真正透明的游戏玩法。</p><p style='text-indent:2rem'>PKR还使用已经获得专利和正在申请专利的技术,允许用户下注数+种加密货币,而无需将其持有的资产转换为单壹支持的加密货币标准。</p><p style='text-indent:2rem'>POLKER旨在在Substrate(Polkadot)上运行,旨在支持具有令人惊叹的3D角色、视觉效果和环境的下壹代虚拟现实。</p>",
+		"体验场":"体验场",
+		"自由场":"自由场",
+		"游戏流程":"游戏流程",
+		"合作伙伴":"合作伙伴",
+		"活跃用户":"活跃用户",
+		"累计返奖":"累计返奖",
+		"总用户":"总用户",
+		"链接钱包":"链接钱包",
 		"m1":"我的质押",
-		"m0":"互娱共享",
+		"m0":"质押项目",
 		"m2":"起投",
 		"m3":"天",
 		"total": "总额",
 		"a4": "日均收益率",
 		"a5": "立即加入"
 	},
+	"indexenter":{
+		"第":"第",
+		"期":"期",
+		"距离结束": "距离结束",
+		"结果":"结果",
+		"大": "大",
+		"小": "小",
+		"奇": "奇",
+		"偶": "偶",
+		"竞猜总额": "竞猜总额",
+		"本场累计":"本场累计",
+		"确认":"确认",
+		"清空":"清空",
+		"近期记录":"近期记录",
+		"确定":"确定",
+		"取消":"取消",
+		"期号":"期号",
+		"竞猜数":"竞猜数",
+		"竞猜值":"竞猜值"
+	},
+	"recharge":{
+		"请输入充值金额":"请输入充值金额",
+		"立即充值":"立即充值",
+		"申请失败":"申请失败"
+	},
+	"withdrawal":{
+		"暂未开放":"暂未开放"
+	},
 	"homeinformation":{
 		"m1":"互娱玩法介绍",
 		"m0":"互娱游戏推广计划",
@@ -68,7 +103,7 @@
 		"a10":"团队交易总量",
 		"b1":"我的工具",
 		"b2":"余额明细",
-		"b3":"互娱记录",
+		"b3":"开奖记录",
 		"b4":"会员列表",
 		"b5":"分享链接",
 		"b6":"在线留言",
@@ -91,10 +126,9 @@
 	"enter": {
 		"u1": "下单金额",
 		"u2": "单期最高",
-		"u3": "k线类型",
-		"u4": "下",
+		"u4": "小",
 		"u5": "奇",
-		"u6": "",
+		"u6": "",
 		"u7": "偶",
 		"u8": "距离结束",
 		"u9": "订单列表",
@@ -128,17 +162,17 @@
 		"u3": "复制地址",
 		"u4": "链名称",
 		"u5": "提示:充值大于5000U,请先充值一笔小额的,到账之后再进行大额充值。充值地址每个人都是唯一的!请一定要仔细确认避免充错!",
-		"u6": "提币网络",
+		"u6": "提币类型",
 		"u7": "提币地址",
 		"u8": "提币数量",
 		"u9": "提现须知",
 		"u10": "使用步骤",
-		"u11": "输入您要提现的币种、网络、地址、数量,点击“下一步”",
+		"u11": "输入您要提现的币种、地址、数量,点击“下一步”",
 		"u12": "确认资讯无误后输入资金密码完成验证,点击“确认提现”",
 		"u13": "每日提现上限2次;",
 		"u14": "提现成功后,提现地址将自动保存以便于下次使用;",
 		"u15": "请注意每个人的地址都是唯一的,请一定要仔细确认避免提错!",
-		"u16": "确认提币",
+		"u16": "申请提币",
 		"u17": "请输入提币地址",
 		"u18": "请输入体现数量",
 		"u19": "余额",
@@ -179,7 +213,6 @@
 		"a5": "详情",
 		"a6": "互娱金额",
 		"a7": "推广数",
-		
 		"b1": "长按保存图片",
 		"b2": "保存海报",
 		"b3": "邀请您进入绿津",
@@ -487,10 +520,8 @@
 		"f6": "个人资料",
 		"f7": "修改登录密码"
 	},
-	
-	
 	"login": {
-		"a0": "互娱共享",
+		"a0": "PKR",
 		"a1": "请输入手机号/邮箱",
 		"a2": "密码",
 		"a3": "请输入密码",

+ 41 - 6
libs/i18n/lang/en.json

@@ -1,8 +1,5 @@
 {
 	"home":{
-		"k1": "Latest Price",
-		"b0": "24H Rise and fall",
-		"b8": "Type",
 		"d0": "Home",
 		"d1": "Pledge",
 		"d2": "Game",
@@ -10,6 +7,16 @@
 		"d4": "My"
 	},
 	"homepledge":{
+		"PKR介绍":"PKR description",
+		"description":"<p style='text-indent:2rem'>Polker (PKR) is the first blockchain online quiz game that uses Unreal Engine 4 to achieve immersive and powerful gameplay, while leveraging provable fairness and TRNG systems to achieve truly transparent gameplay.</p><p style='text-indent:2rem'>PKR also uses patented and patent-pending technology that allows users to bet on multiple cryptocurrencies without having to convert their assets into a single supported cryptocurrency standard.</p><p style='text-indent:2rem'>POLKER is designed to run on Substrate (Polkadot), aiming to support the next generation of virtual reality with stunning 3D characters, visual effects, and environments.</p>",
+		"体验场":"experience",
+		"自由场":"free field",
+		"游戏流程":"Game flow",
+		"合作伙伴":"Partner companies",
+		"活跃用户":"Active Users",
+		"累计返奖":"All Reward",
+		"总用户":"Total users",
+		"链接钱包":"Link wallet",
 		"m1":"My pledge",
 		"m0":"Pledge Game",
 		"m2":"Start",
@@ -18,6 +25,34 @@
 		"a4": "Daily profit",
 		"a5": "Buy"
 	},
+	"indexenter":{
+		"第":"No.",
+		"期":"",
+		"距离结束": "Distance End",
+		"结果":"End",
+		"大": "big",
+		"小": "small",
+		"奇": "odd",
+		"偶": "even",
+		"竞猜总额": "Total amount of guess",
+		"本场累计":"Cumulative amount of this game",
+		"确认":"confirm",
+		"清空":"Empty it",
+		"近期记录":"History",
+		"确定":"confirm",
+		"取消":"cancel",
+		"期号":"No",
+		"竞猜数":"Guess",
+		"竞猜值":"Guessing value"
+	},
+	"recharge":{
+		"请输入充值金额":"Please enter the recharge amount",
+		"立即充值":"Recharge immediately",
+		"申请失败":"Application failed"
+	},
+	"withdrawal":{
+		"暂未开放":"Not yet open"
+	},
 	"zy":{
 		"m0":"Daily return",
 		"m1":"Limited",
@@ -63,12 +98,12 @@
 		"u3": "Copy",
 		"u4": "Name",
 		"u5": " Note: If the recharge amount is greater than 5000U, please recharge a small amount first, and then proceed with the large amount recharge after it is credited. The recharge address is unique for each person! Please be sure to double-check and avoid recharging to the wrong address!",
-	    "u6": "Cash withdrawal network",
+	    "u6": "Cash withdrawal type",
 	    "u7": "Cash withdrawal address",
 	    "u8": "Cash withdrawal count",
 		"u9": "Withdrawal Notice",
 		"u10": "Usage steps",
-		"u11": "Enter the currency, network, address, and amount you want to withdraw, then click Next",
+		"u11": "Enter the currency, address, and amount you want to withdraw, and click Next",
 		"u12": "After confirming the information is correct, enter your fund password for verification, and click Confirm Withdrawal",
 		"u13": "Daily withdrawal limit: 2 times;",
 		"u14": "After successful withdrawal, the withdrawal address will be automatically saved for future use",
@@ -580,7 +615,7 @@
 	},
 	
 	"login": {
-		"a0": "Game",
+		"a0": "PKR",
 		"a1": "Please enter phone number/mailbox",
 		"a2": "Password",
 		"a3": "Please enter a password",

+ 47 - 12
libs/i18n/lang/tw.json

@@ -1,23 +1,58 @@
 {
 	"home":{
-		"k1": "最新價格",
-		"b0": "24H漲跌幅",
-		"b8": "名稱",
 		"d0": "首頁",
 		"d1": "質押",
 		"d2": "互娛",
 		"d3": "資訊",
 		"d4": "我的"
-	},
+		},
 	"homepledge":{
+		"PKR介绍":"PKR介绍",
+		"description":"<p style='text-indent:2rem'>Polker(PKR)是第壹款區塊鏈在線競猜遊戲,它使用虛幻引擎4實現身臨其境的強大遊戲玩法,同時利用可證明的公平和TRNG系統實現真正透明的遊戲玩法。</p><p style='text-indent:2rem'>PKR還使用已經獲得專利和正在申請專利的技術,允許用戶下注數+種加密貨幣,而無需將其持有的資産轉換爲單壹支持的加密貨幣標准。</p><p style='text-indent:2rem'>POLKER 旨在在 Substrate (Polkadot)上運行,旨在支持具有令人驚歎的 3D 角色、視覺效果和環境的下壹代虛擬現實。</p>"	,
+		"体验场":"體驗場",
+		"自由场":"自由場",
+		"游戏流程":"遊戲流程",
+		"合作伙伴":"合作夥伴",
+		"活跃用户":"活躍用戶",
+		"累计返奖":"累計返獎",
+		"总用户":"總用戶",
+		"链接钱包":"連結錢包",
 		"m1":"我的質押",
-		"m0":"互娛共享",
+		"m0":"質押項目",
 		"m2":"起投",
 		"m3":"天",
 		"total": "總額",
 		"a4": "日均收益率",
 		"a5": "立即加入"
 	},
+	"indexenter":{
+		"第":"第",
+		"期":"期",
+		"距离结束": "距離結束",
+		"结果":"結果",
+		"大": "大",
+		"小": "小",
+		"奇": "奇",
+		"偶": "偶",
+		"竞猜总额": "競猜總額",
+		"本场累计":"本場累計",
+		"确认":"確認",
+		"清空":"清空",
+		"近期记录":"近期記錄",
+		"确定":"確定",
+		"取消":"取消",
+		"期号":"期號",
+		"竞猜数":"競猜數",
+		"竞猜值":"競猜值"
+	},
+	"recharge":{
+		"请输入充值金额":"請輸入充值金額",
+		"立即充值":"立即充值",
+		"申请失败":"申請失敗"
+	},
+	"withdrawal":{
+		"暂未开放":"暫未開放"
+	},
 	"homeinformation":{
 		"m1":"互娛遊戲玩法介紹",
 		"m0":"互娛遊戲推廣計劃",
@@ -67,7 +102,7 @@
 		"a10":"團隊交易總量",
 		"b1":"我的工具",
 		"b2":"餘額明細",
-		"b3":"互娛記錄",
+		"b3":"開獎記錄",
 		"b4":"會員列表",
 		"b5":"分享鏈接",
 		"b6":"在線留言",
@@ -92,9 +127,9 @@
 		"u1": "下單金額",
 		"u2": "單期最高",
 		"u3": "k線類型",
-		"u4": "",
+		"u4": "",
 		"u5": "奇",
-		"u6": "",
+		"u6": "",
 		"u7": "偶",
 		"u8": "距離結束",
 		"u9": "訂單列表",
@@ -128,17 +163,17 @@
 		"u3": "複製地址",
 		"u4": "鏈名稱",
 		"u5": "提示:充值大於5000U,請先充值一筆小額的,到賬之後再進行大額充值。充值地址每個人都是唯一的!請一定要仔細確認避免充錯!",
-		"u6": "提幣網絡",
+		"u6": "提幣類型",
 		"u7": "提幣地址",
 		"u8": "提幣數量",
 		"u9": "提現須知",
 		"u10": "使用步驟",
-		"u11": "輸入您要提現的幣種、網絡、地址、數量,點擊“下一步”",
+		"u11": "輸入您要提現的幣種、地址、數量,點擊“下一步”",
 		"u12": "確認資訊無誤後輸入資金密碼完成驗證,點擊“確認提現”",
 		"u13": "每日提現上限2次;",
 		"u14": "提現成功後,提現地址將自動保存以便於下次使用;",
 		"u15": "請注意每個人的地址都是唯一的,請一定要仔細確認避免提錯!",
-		"u16": "確認提幣",
+		"u16": "申請提幣",
 		"u17": "請輸入提幣地址",
 		"u18": "請輸入體現數量",
 		"u19": "余額",
@@ -577,7 +612,7 @@
 	},
 	
 	"login": {
-		"a0": "互娛共享",
+		"a0": "PKR",
 		"a1": "請输入手機號/郵箱",
 		"a2": "密碼",
 		"a3": "請輸入密碼",

+ 1 - 1
manifest.json

@@ -108,7 +108,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://www.accle.shop/"
+                    "target" : "https://polkep.xyz"
                 }
             }
         },

+ 20 - 0
package-lock.json

@@ -0,0 +1,20 @@
+{
+  "name": "PKR",
+  "lockfileVersion": 3,
+  "requires": true,
+  "packages": {
+    "": {
+      "dependencies": {
+        "@metamask/detect-provider": "^2.0.0"
+      }
+    },
+    "node_modules/@metamask/detect-provider": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@metamask/detect-provider/-/detect-provider-2.0.0.tgz",
+      "integrity": "sha512-sFpN+TX13E9fdBDh9lvQeZdJn4qYoRb/6QF2oZZK/Pn559IhCFacPMU1rMuqyXoFQF3JSJfii2l98B87QDPeCQ==",
+      "engines": {
+        "node": ">=14.0.0"
+      }
+    }
+  }
+}

+ 5 - 0
package.json

@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "@metamask/detect-provider": "^2.0.0"
+  }
+}

+ 11 - 23
pages.json

@@ -4,7 +4,7 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "",
+				"navigationBarTitleText": "Home",
 				"navigationStyle": "custom"
 			}
 		},
@@ -12,7 +12,7 @@
 		{
 			"path": "pages/index/pledge",
 			"style": {
-				"navigationBarTitleText": "互娛共享",
+				"navigationBarTitleText": "Project",
 				"navigationStyle": "custom"
 			}
 		},
@@ -20,15 +20,16 @@
 		{
 			"path": "pages/index/entertainment",
 			"style": {
-				"navigationBarTitleText": "",
-				"navigationStyle": "custom"
+				"navigationBarTitleText": "Game",
+				"navigationBarBackgroundColor":"#000000",
+				"navigationBarTextStyle":"white"
 			}
 		},
 		// 资讯
 		{
 			"path": "pages/index/information",
 			"style": {
-				"navigationBarTitleText": "",
+				"navigationBarTitleText": "News",
 				"navigationStyle": "custom"
 			}
 		},
@@ -36,22 +37,16 @@
 			"path": "pages/public/register",
 			"style": {
 				"navigationBarTitleText": "注册",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
+				"navigationBarBackgroundColor":"#000000",
+				"navigationBarTextStyle":"white"
 			}
 		},
 		{
 			"path": "pages/public/login",
 			"style": {
 				"navigationBarTitleText": "登录",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
+				"navigationBarBackgroundColor":"#000000",
+				"navigationBarTextStyle":"white"
 			}
 		},
 		{
@@ -82,7 +77,7 @@
 				// #ifndef MP-WEIXIN
 				"navigationStyle": "custom",
 				// #endif
-				"navigationBarTitleText": "个人中心"
+				"navigationBarTitleText": "My"
 			}
 		},
 		{
@@ -267,13 +262,6 @@
 				"selectedIconPath": "static/tabBar/baoya-home.png",
 				"text": "質押"
 			},
-			{
-				"visible": false,
-				"pagePath": "pages/index/entertainment",
-				"iconPath": "static/tabBar/huyu.png",
-				"selectedIconPath": "static/tabBar/huyu-home.png",
-				"text": "互娛"
-			},
 			{
 				"visible": false,
 				"pagePath": "pages/index/information",

Datei-Diff unterdrückt, da er zu groß ist
+ 255 - 614
pages/index/entertainment.vue


+ 149 - 183
pages/index/index.vue

@@ -6,8 +6,8 @@
 				<text class="tet">{{$t('login.a0')}}</text>
 			</view>
 			<view class="flex">
-				<view class="icon2 text margin-r-10" v-if="userInfo.nickname">
-					{{userInfo.nickname}}
+				<view class="icon2 text clamp margin-r-10" >
+					{{userInfo.account||'链接钱包'}}
 				</view>
 				<view class="icon1  margin-r-10">
 					<image class="langTip" src="../../static/shouye/shouye2.png" mode="scaleToFill"></image>
@@ -22,56 +22,69 @@
 				</view>
 			</view>
 		</view>
-
-		<!-- 轮播图 -->
-		<view class="uni-margin-wrap margin-b-10">
-			<swiper indicator-color='rgba(255,255,255,0.69)' indicator-active-color='#FFF' class="swiper" circular
-				:indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
-				<swiper-item class="swiper-box">
-					<image class="swiper-item" src="../../static/shouye/shouye4.png" mode="scaleToFill"></image>
-				</swiper-item>
-				<swiper-item class="swiper-box">
-					<image class="swiper-item" src="../../static/shouye/shouye4.png" mode="scaleToFill"></image>
-				</swiper-item>
-			</swiper>
-		</view>
-		<!-- 底部 -->
-		<view class="tra flex margin-b-10">
-			<view class="tra-item">
-				{{$t('home.b8')}}
-			</view>
-			<view class="tra-item">
-				{{$t('home.k1')}}
-			</view>
-			<view class="tra-item">
-				{{$t('home.b0')}}
-			</view>
+		<view class="flex item">
+			<navigator v-for="(item,ind) in gameList" :url="`entertainment?title=${item.name}&id=${item.id}`">
+				<view class="item-style flex">
+					<image class="item-tip" :src="`../../static/shouye/index_item_${ind+1}.png`" mode="scaleToFill">
+					</image>
+					<view class="name">
+						{{item.name}}
+					</view>
+					<view class="item-next flex-center">
+						<image src="../../static/img/zhiya1.png" mode="widthFix" class="next-img"></image>
+					</view>
+				</view>
+			</navigator>
 		</view>
-		<!-- 每一项 -->
-		<view class="list flex" v-for="(item,ind) in navList">
-			<view class="list-item flex-start">
-				<!-- <image class="img margin-r-10" :src="item.img" mode="scaleToFill"> </image> -->
-				<text class="tli">{{item.name}}</text>
+		<view class="flex shop-detail-data">
+			<view class="data-list">
+				<view class="num-box">
+					<text>{{active_user}}</text><text class="num-tip">+</text>
+				</view>
+				<view class="name">
+					{{$t('homepledge.活跃用户')}}
+				</view>
 			</view>
-			<view class="list-item">
-				{{item.newVlaue}}
+			<view class="data-list">
+				<view class="num-box">
+					<text>1000000</text><text class="num-tip">+</text>
+				</view>
+				<view class="name">
+					{{$t('homepledge.累计返奖')}}
+				</view>
 			</view>
-			<view class="list-item flex items-right">
-				<view class="box" :class="{green:item.new24Value>0,red:item.new24Value<=0}">
-					{{item.new24Value}}
+			<view class="data-list">
+				<view class="num-box">
+					<text>10000</text><text class="num-tip">+</text>
+				</view>
+				<view class="name">
+					{{$t('homepledge.总用户')}}
 				</view>
 			</view>
 		</view>
+
+		<view class="title">
+			{{$t('homepledge.游戏流程')}}
+		</view>
+		<image class="conetnt-img" src="../../static/shouye/index-content.png" mode="widthFix"></image>
+		<view class="title">
+			{{$t('homepledge.合作伙伴')}}
+		</view>
+		<image class="conetnt-img" src="../../static/shouye/index-bottom.png" mode="widthFix"></image>
 		<taber tab='index'></taber>
 	</view>
 </template>
 <script>
 	import {
-		prices
-	} from "@/api/index.js"
+		getIndex
+	} from '@/api/index.js';
+	import {
+		getGameList,
+	} from "@/api/game.js";
 	import {
 		mapState,
-		mapActions
+		mapActions,
+		mapMutations
 	} from "vuex";
 	import taber from "@/components/footer/footer.vue";
 	export default {
@@ -80,13 +93,8 @@
 		},
 		data() {
 			return {
-				indicatorDots: true,
-				autoplay: true,
-				interval: 5000,
-				duration: 500,
-				navList: [],
-				timeout:'',
-				
+				gameList: [],
+				active_user: '0'
 			}
 		},
 		computed: {
@@ -103,14 +111,6 @@
 				return label
 			}
 		},
-		filters: {
-			decimalPlaces(value) {
-				if (typeof value !== 'number') {
-					return value;
-				}
-				return value.toFixed(5);
-			}
-		},
 		onLoad(option) {
 			// #ifndef MP
 			if (option.spread) {
@@ -127,53 +127,40 @@
 				});
 			}
 			// #endif
-			this.loadData()
 		},
 		onShow() {
-			this.timeout = setInterval(this.loadData,60000)
-		},
-		onHide() {
-			clearInterval(this.timeout);
+			this.getGameList();
+			this.loadData();
 		},
 		methods: {
+			...mapMutations('user', ['setUserInfo', 'login']),
 			...mapActions({
 				setLang: "setLang",
 			}),
-
-			getCurrent() {
-				let pages = getCurrentPages();
-				let curPage = pages[pages.length - 1];
-				return curPage
-			},
-			selectLang(value) {
-				this.setLang(this.langList[value.detail.value].value);
-				let path = '/' + this.getCurrent().route
-			},
-
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				const that = this;
-				prices({})
+			// 请求载入数据
+			async loadData() {
+				getIndex({})
 					.then(({
 						data
 					}) => {
-						let arr = [];
-						for (let key in data.prices) {
-							let item = data.prices[key];
-							let ar = item.data[0];
-							arr.push({
-								name: key,
-								newVlaue: ar.idxPx,
-								new24Value: Number(((ar.idxPx - ar.open24h) / ar.open24h).toFixed(5))
-							})
-						}
-						that.navList = arr
+						this.active_user = data.active_user
+						console.log(data);
 					})
-					.catch(e => {
-						console.log(e);
-					});
+					.catch(e => {});
+			},
+			selectLang(value) {
+				this.setLang(this.langList[value.detail.value].value);
 			},
 
+			getGameList() {
+				getGameList().then((res) => {
+					this.gameList = res.data.list;
+
+					if (this.gameList.length > 2) {
+						this.gameList = this.gameList.slice(0, 2)
+					}
+				})
+			},
 		},
 	}
 </script>
@@ -185,6 +172,79 @@
 		padding-top: var(--status-bar-height);
 	}
 
+	.title {
+		color: $base-color;
+		text-align: center;
+		font-size: 58rpx;
+
+	}
+
+	.item {
+		padding: 30rpx;
+
+		.item-style {
+			border-radius: 20rpx;
+			width: 320rpx;
+			padding: 30rpx 0;
+			background-color: #191A1F;
+			flex-direction: column;
+			color: #FFFFFF;
+			font-size: 38rpx;
+
+			.item-tip {
+				width: 209rpx;
+				height: 209rpx;
+			}
+
+			.name {
+				font-weight: bold;
+			}
+
+			.item-next {
+				margin-top: 20rpx;
+				width: 34rpx;
+				height: 34rpx;
+				border-radius: 20rpx;
+				background-color: $color-yellow;
+				font-size: 0;
+
+				.next-img {
+					width: 10rpx;
+				}
+			}
+		}
+	}
+
+	.shop-detail-data {
+		padding: 50rpx 30rpx;
+
+		.data-list {
+			text-align: center;
+
+			.num-box {
+				color: #FFF;
+				font-size: 40rpx;
+				font-weight: bold;
+
+				.num-tip {
+					font-size: $font-lg;
+					color: $color-yellow;
+				}
+			}
+
+			.name {
+				font-size: $font-sm;
+				color: $font-color-disabled;
+			}
+		}
+	}
+
+	.conetnt-img {
+		width: 690rpx;
+		margin: 30rpx;
+		margin-top: 50rpx;
+	}
+
 	.top {
 		font-weight: 500;
 		padding: 40rpx 30rpx 24rpx 30rpx;
@@ -224,6 +284,7 @@
 			font-size: 24rpx;
 			color: #FFFFFF;
 			padding: 10rpx 20rpx;
+			max-width: 200rpx;
 		}
 
 		.text1 {
@@ -231,99 +292,4 @@
 			color: #FFFFFF;
 		}
 	}
-
-	.uni-margin-wrap {
-		height: 394rpx;
-
-		.swiper {
-			height: 100%;
-
-			.swiper-box {
-				height: 100%;
-				text-align: center;
-
-				.swiper-item {
-					width: 100%;
-					height: 100%;
-				}
-			}
-		}
-	}
-
-	.tra {
-		height: 93rpx;
-		background: #2B2A26;
-		padding: 0 30rpx;
-		font-size: 24rpx;
-		color: #999999;
-
-		.tra-item {
-			width: 33.3%;
-		}
-
-		.tra-item:nth-child(2) {
-			text-align: center;
-		}
-
-		.tra-item:nth-child(3) {
-			text-align: right;
-		}
-	}
-
-	.list {
-		font-weight: bold;
-		font-size: 30rpx;
-		color: #FFFFFF;
-		padding: 20rpx 30rpx 20rpx 30rpx;
-		line-height: 1;
-		border-bottom: 1px solid #2B2A26;
-
-		.list-item:nth-child(2) {
-			text-align: center;
-		}
-
-		.list-item:nth-child(3) {
-			text-align: right;
-		}
-
-		.list-item {
-			width: 33.3%;
-
-			.box {
-				padding: 20rpx 0;
-				min-width: 150rpx;
-				text-align: center;
-				border-radius: 10rpx;
-
-				&.red {
-					background-color: $uni-color-error;
-				}
-
-				&.green {
-					background-color: $color-green;
-				}
-			}
-
-			.img {
-				width: 60rpx;
-				height: 60rpx;
-			}
-
-			.button {
-				padding: 10rpx 20rpx;
-				border-radius: 10rpx;
-				min-width: 150rpx;
-				text-align: center;
-				display: inline-block;
-
-				&.up {
-					background: #FB5E57;
-				}
-
-				&.dom {
-					background: #77DA90;
-				}
-			}
-		}
-	}
 </style>

+ 148 - 0
pages/index/information - 副本.vue

@@ -0,0 +1,148 @@
+<template>
+	<view class="content">
+		<view class="list flex" @click="nav('/pages/introduce/introduce')">
+			<image class="img" src="../../static/img/zixun1.png" mode="scaleToFill"></image>
+			<view class="text">
+				{{$t('homeinformation.m1')}}
+			</view>
+		</view>
+		<view class="list flex" @click="nav('/pages/introduce/promotion')">
+			<image class="img" src="../../static/img/zixun2.png" mode="scaleToFill"></image>
+			<view class="text">
+				{{$t('homeinformation.m0')}}
+			</view>
+		</view>
+		<view class="list flex" @click="nav('/pages/introduce/game')">
+			<image class="img" src="../../static/img/zixun3.png" mode="scaleToFill"></image>
+			<view class="text">
+				{{$t('homeinformation.m2')}}
+			</view>
+		</view>
+		<view class="list flex" @click="navigatorH">
+			<image class="img" src="../../static/img/zixun4.png" mode="scaleToFill"></image>
+			<view class="text">
+				{{$t('login.a0')}}
+			</view>
+		</view>
+		<view class="tit padding-t-30 margin-t-20">
+			{{$t('homeinformation.m4')}}
+		</view>
+
+		<view class="pro flex">
+			<view class="im">
+				<image class="image" src="../../static/img/zixun7.png" mode="heightFix"></image>
+				<view class="wen flex">{{$t('homeinformation.m5')}}</view>
+			</view>
+			<view class="im">
+				<image class="image" src="../../static/img/zixun8.png" mode="heightFix"></image>
+				<view class="wen flex">{{$t('homeinformation.m6')}}</view>
+			</view>
+		</view>
+
+		<view class="infor flex">
+			<view class="im">
+				<image class="image" src="../../static/img/zixun10.png" mode="heightFix"></image>
+				<view class="wen flex">{{$t('homeinformation.m7')}}</view>
+			</view>
+			<view class="im">
+				<image class="image" src="../../static/img/zixun6.png" mode="heightFix"></image>
+				<view class="wen flex">{{$t('homeinformation.m8')}}</view>
+			</view>
+			<view class="im">
+				<image class="image" src="../../static/img/zixun9.png" mode="heightFix"></image>
+				<view class="wen flex">{{$t('homeinformation.m9')}}</view>
+			</view>
+		</view>
+		<taber tab='information'></taber>
+	</view>
+</template>
+
+<script>
+	import taber from "@/components/footer/footer.vue";
+	export default {
+		components: {
+			taber
+		},
+		data() {
+			return {};
+		},
+		methods: {
+			nav(url) {
+				uni.navigateTo({
+					url
+				})
+			},
+			navigatorH() {
+				uni.switchTab({
+					url: '/pages/index/entertainment'
+				})
+			},
+		}
+	};
+</script>
+
+<style lang="scss">
+	.content {
+		width: 750rpx;
+		background-color: $page-color-base;
+		padding-top: var(--status-bar-height);
+		padding-bottom: 30rpx;
+	}
+
+	.list {
+		margin: 0 30rpx;
+		align-items: flex-start;
+		padding: 30rpx 0;
+		border-bottom: 1px solid rgba(255,255,255,0.3);
+		.img {
+			width: 200rpx;
+			height: 160rpx;
+		}
+
+		.text {
+			padding: 10rpx 0;
+			padding-left: 20rpx;
+			
+			font-size: 30rpx;
+			font-weight: bold;
+			color: #FFFFFF;
+			flex-grow: 1;
+		}
+	}
+
+	.infor {
+		margin-top: 30rpx;
+		justify-content: space-around;
+		padding: 0 20rpx;
+	}
+	.pro {
+		padding: 0 155rpx;
+		padding-top: 50rpx;
+		
+	}
+	.im {
+		width: 200rpx;
+		background-color: #191a1f;
+		text-align: center;
+		padding: 0 10rpx;
+		padding-top: 30rpx;
+		font-weight: bold;
+		border-radius: 20rpx;
+		.image {
+			height: 100rpx;
+		}
+		.wen {
+			justify-content: center;
+			height: 100rpx;
+			color: #FFFFFF;
+			font-size: 20rpx;
+			text-align: center;
+		}
+	}
+	.tit {
+		text-align: center;
+		font-size: 49rpx;
+		font-weight: 500;
+		color: #FFFFFF;
+	}
+</style>

+ 19 - 103
pages/index/information.vue

@@ -1,57 +1,11 @@
 <template>
 	<view class="content">
-		<view class="list flex" @click="nav('/pages/introduce/introduce')">
-			<image class="img" src="../../static/img/zixun1.png" mode="scaleToFill"></image>
-			<view class="text">
-				{{$t('homeinformation.m1')}}
-			</view>
+		<image src="../../static/shouye/index_logo.png" mode="scaleToFill" class="index-logo"></image>
+		<view class="title">
+			{{$t('homepledge.PKR介绍')}}
 		</view>
-		<view class="list flex" @click="nav('/pages/introduce/promotion')">
-			<image class="img" src="../../static/img/zixun2.png" mode="scaleToFill"></image>
-			<view class="text">
-				{{$t('homeinformation.m0')}}
-			</view>
-		</view>
-		<view class="list flex" @click="nav('/pages/introduce/game')">
-			<image class="img" src="../../static/img/zixun3.png" mode="scaleToFill"></image>
-			<view class="text">
-				{{$t('homeinformation.m2')}}
-			</view>
-		</view>
-		<view class="list flex" @click="navigatorH">
-			<image class="img" src="../../static/img/zixun4.png" mode="scaleToFill"></image>
-			<view class="text">
-				{{$t('login.a0')}}
-			</view>
-		</view>
-		<view class="tit padding-t-30 margin-t-20">
-			{{$t('homeinformation.m4')}}
-		</view>
-
-		<view class="pro flex">
-			<view class="im">
-				<image class="image" src="../../static/img/zixun7.png" mode="heightFix"></image>
-				<view class="wen flex">{{$t('homeinformation.m5')}}</view>
-			</view>
-			<view class="im">
-				<image class="image" src="../../static/img/zixun8.png" mode="heightFix"></image>
-				<view class="wen flex">{{$t('homeinformation.m6')}}</view>
-			</view>
-		</view>
-
-		<view class="infor flex">
-			<view class="im">
-				<image class="image" src="../../static/img/zixun10.png" mode="heightFix"></image>
-				<view class="wen flex">{{$t('homeinformation.m7')}}</view>
-			</view>
-			<view class="im">
-				<image class="image" src="../../static/img/zixun6.png" mode="heightFix"></image>
-				<view class="wen flex">{{$t('homeinformation.m8')}}</view>
-			</view>
-			<view class="im">
-				<image class="image" src="../../static/img/zixun9.png" mode="heightFix"></image>
-				<view class="wen flex">{{$t('homeinformation.m9')}}</view>
-			</view>
+		<view class="description">
+			<rich-text :nodes="$t('homepledge.description')"></rich-text>
 		</view>
 		<taber tab='information'></taber>
 	</view>
@@ -89,60 +43,22 @@
 		padding-bottom: 30rpx;
 	}
 
-	.list {
-		margin: 0 30rpx;
-		align-items: flex-start;
-		padding: 30rpx 0;
-		border-bottom: 1px solid rgba(255,255,255,0.3);
-		.img {
-			width: 200rpx;
-			height: 160rpx;
-		}
-
-		.text {
-			padding: 10rpx 0;
-			padding-left: 20rpx;
-			
-			font-size: 30rpx;
-			font-weight: bold;
-			color: #FFFFFF;
-			flex-grow: 1;
-		}
-	}
-
-	.infor {
-		margin-top: 30rpx;
-		justify-content: space-around;
-		padding: 0 20rpx;
-	}
-	.pro {
-		padding: 0 155rpx;
-		padding-top: 50rpx;
-		
-	}
-	.im {
-		width: 200rpx;
-		background-color: #191a1f;
+	.title {
+		color: $base-color;
 		text-align: center;
-		padding: 0 10rpx;
-		padding-top: 30rpx;
-		font-weight: bold;
-		border-radius: 20rpx;
-		.image {
-			height: 100rpx;
-		}
-		.wen {
-			justify-content: center;
-			height: 100rpx;
-			color: #FFFFFF;
-			font-size: 20rpx;
-			text-align: center;
-		}
+		font-size: 58rpx;
+	
 	}
-	.tit {
-		text-align: center;
-		font-size: 49rpx;
-		font-weight: 500;
+	.index-logo {
+		width: 297rpx;
+		height: 270rpx;
+		margin: 0 226rpx;
+	}
+	.description {
 		color: #FFFFFF;
+		font-size: $font-base;
+		padding: 30rpx;
+		line-height: 2rem;
+	
 	}
 </style>

+ 67 - 24
pages/index/user.vue

@@ -9,12 +9,12 @@
 						mode="scaleToFill">
 					</image>
 					<view class="info">
-						<view class="infor margin-b-20">{{ userInfo.nickname || '游客' }}</view>
-						<view class="uservip flex-start" v-if="userInfo.vip">
+						<view class="infor margin-b-20">{{ user.nickname || '游客' }}</view>
+						<view class="uservip flex-start" v-if="user.vip">
 							<text>
-							{{ userInfo.vip_name}}
+							{{ user.vip_name}}
 							</text>
-							<image class="vipIcon" :src="userInfo.vip_icon" mode="scaleToFill"></image>
+							<image class="vipIcon" :src="user.vip_icon" mode="scaleToFill"></image>
 						</view>
 					</view>
 				</view>
@@ -25,13 +25,37 @@
 		<view class="body">
 			<template v-if="hasLogin">
 				<view v-if="show" class="yue margin-b-30">
-					<view class="te">
-						{{$t('user.c1')}}
-					</view>
-					<view class="tex">
-						{{userWallet}}U
+					<view class="flex">
+						<view class="item">
+							<view class="te flex-start">
+								<image class="tip margin-r-10" src="../../static/icon/user-U.png" mode="scaleToFill" ></image>
+								<text>
+								USDT
+								</text>
+							</view>
+							<view class="tex">
+								{{userWallet}}
+							</view>
+							<view class="texmoney">
+								≈¥{{userWalletRmb}}
+							</view>
+						</view>
+						<view class="item">
+							<view class="te flex-start">
+								<image class="tip margin-r-10" src="../../static/icon/user-R.png" mode="scaleToFill" ></image>
+								<text>
+								PKR
+								</text>
+							</view>
+							<view class="tex">
+								{{userPKR}}
+							</view>
+							<view class="texmoney">
+								≈¥{{userPKRRmb}}
+							</view>
+						</view>
 					</view>
-					<view class="btn flex">
+					<view class="btn margin-t-30 flex">
 						<button @click="navTo('/pages/user/money/recharge')" class="btn1"> <text>{{$t('user.a7')}}</text>
 						</button>
 						<button @click="navTo('/pages/user/money/withdrawal')" class="btn1"> <text>{{$t('user.a6')}}</text>
@@ -170,6 +194,9 @@
 				current: 2,
 				show: true,
 				userWallet: 0, //余额 
+				userWalletRmb:0,
+				userPKR:0,
+				userPKRRmb:0,
 				extractTotalPrice: '', //累计体现
 				sum_win: '', //累计收益
 				sum_bet: '', //个人交易量
@@ -218,6 +245,9 @@
 				gameWallet().then((res) => {
 					const balance = Number(res.data.back.USDT.money.money);
 					this.userWallet = +balance.toFixed(2);
+					this.userWalletRmb = Number(res.data.back.USDT.rmb);
+					this.userPKR =  Number(res.data.back.PKR.money.money);
+					this.userPKRRmb = Number(res.data.back.PKR.rmb);
 					// this.userWallet = +res.data.back.USDT.money.money
 				})
 			},
@@ -295,7 +325,7 @@
 					margin-left: 10rpx;
 				}
 				.uservip {
-					font-size: 20rpx;
+					font-size: 30rpx;
 					font-weight: 500;
 					color: #93794B;
 				}
@@ -318,23 +348,36 @@
 		color: #FFFFFF;
 
 		.yue {
-			border-radius: 60rpx;
-			background-color: #000000;
 			text-align: center;
 			padding-top: 40rpx;
 			padding-bottom: 35rpx;
-
-			.te {
-				font-size: 26rpx;
-				font-weight: 500;
-				padding-bottom: 30rpx;
-			}
-
-			.tex {
-				font-size: 48rpx;
-				font-weight: bold;
-				padding-bottom: 50rpx;
+			.item{
+				background-color: #000000;
+				border-radius: 30rpx;
+				padding: 30rpx;
+				text-align: left;
+				width: 48%;
+				.te {
+					font-size: 26rpx;
+					font-weight: 500;
+					padding-bottom: 30rpx;
+					.tip{
+						width:64rpx ;
+						height: 64rpx;
+					}
+				}
+				
+				.tex {
+					font-size: $font-lg;
+					font-weight: bold;
+					padding-bottom: 30rpx;
+				}
+				.texmoney{
+					font-size: $font-lg;
+					color:$font-color-disabled;
+				}
 			}
+			
 
 			.btn {
 				padding: 0 50rpx;

+ 1 - 1
pages/myPledge/myPledge.vue

@@ -49,7 +49,7 @@
 									</view>
 									<view class="list-item">
 										<view class="item"> {{item.income}} </view>
-										<view class="item"> USDT </view>
+										<view class="item"> PKR </view>
 									</view>
 									<view class="list-item">
 										<view class="item">

+ 5 - 3
pages/myPledge/zyXingqing.vue

@@ -63,7 +63,7 @@
 				<view class="icon flex-start">
 					<image class="ic" src="../../static/img/xq3.png" mode=""></image>
 					<view class="jiaru">
-						{{$t('zy.m14')}}:{{base.single_time_max*1}}*({{base.day_get}}%+100%)*{{base.day}}
+						{{$t('zy.m14')}}:{{base.single_time_max*1}}*{{base.day_get}}%*{{base.day}}
 					</view>
 				</view>
 
@@ -80,7 +80,7 @@
 			</view>
 			<view class="flex">
 				<view class="dangqian">{{$t('zy.m18')}}:</view>
-				<view class="dqs">{{userWallet}}</view>
+				<view class="dqs">{{userWallet}} USDT</view>
 			</view>
 		</view>
 		<view class="aaa"></view>
@@ -185,6 +185,7 @@
 			},
 			gameWallet() {
 				gameWallet().then((res) => {
+
 					this.userWallet = +res.data.back.USDT.money.money
 				})
 			},
@@ -195,8 +196,9 @@
 				}).then(
 					(res) => {
 						that.base = res.data.data;
-						that.allMoney = that.base.single_time_max * (that.base.day_get * 1 + 100) * that.base.day /
+						that.allMoney = that.base.single_time_max * (that.base.day_get * 1) * that.base.day /
 							100;
+						that.allMoney = that.allMoney+' PKR';
 					}
 				).catch(
 					(res) => {

+ 1 - 3
pages/public/forget.vue

@@ -1,9 +1,8 @@
 <template>
 	<view class="container">
 		<view class="container_text">
-			<image class="banner-img" src="/static/img/shouye1.png" mode="scaleToFill"></image>
+			<image class="banner-img" src="/static/img/logo.png" mode="widthFix"></image>
 		</view>
-		<view class="loginTitle"><text>{{$t('login.a0')}}</text></view>
 		<view class="login_text">
 			<view class="login_input flex_item">
 				<view class="login_img"><image src="/static/icon/ze.png"></image></view>
@@ -151,7 +150,6 @@ page {
 	top: 0rpx;
 	.banner-img {
 		width: 144rpx;
-		height: 144rpx;
 		margin-top: 100rpx;
 		margin-left: 302rpx;
 	}

+ 4 - 3
pages/public/login.vue

@@ -1,9 +1,8 @@
 <template>
 	<view class="container">
 		<view class="container_text">
-			<image class="banner-img" src="/static/img/shouye1.png" mode="scaleToFill"></image>
+			<image class="banner-img" src="/static/img/logo.png" mode="widthFix"></image>
 		</view>
-		<view class="loginTitle"><text>{{$t('login.a0')}}</text></view>
 		<view class="login_text">
 			<view class="login_input flex">
 				<view class="login_img">
@@ -81,6 +80,9 @@
 		},
 		onLoad() {
 			let obj = this;
+			uni.setNavigationBarTitle({
+				title: this.$t("login.a4"),
+			});
 			// #ifdef APP-PLUS
 			let system = uni.getStorageSync('platform');
 			// 判断是否为ios
@@ -349,7 +351,6 @@
 
 		.banner-img {
 			width: 144rpx;
-			height: 144rpx;
 			margin-top: 100rpx;
 			margin-left: 302rpx;
 		}

+ 5 - 9
pages/public/register.vue

@@ -1,9 +1,8 @@
 <template>
 	<view class="container">
 		<view class="container_text">
-			<image class="banner-img" src="/static/img/shouye1.png" mode="scaleToFill"></image>
+			<image class="banner-img" src="/static/img/logo.png" mode="widthFix"></image>
 		</view>
-		<view class="loginTitle"><text>{{$t('login.a0')}}</text></view>
 		<view class="login_text">
 			<view class="login_input flex">
 				<view class="login_img">
@@ -82,6 +81,9 @@
 			};
 		},
 		onLoad(option) {
+			uni.setNavigationBarTitle({
+				title: this.$t("login.a7"),
+			});
 			// #ifndef MP
 			if (option.spread) {
 				// 存储其他邀请人
@@ -111,7 +113,6 @@
 		methods: {
 			// #ifdef H5
 			domApp(type) {
-				console.log('111');
 				const bool = navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger';
 				if (bool) {
 					uni.showModal({
@@ -255,14 +256,10 @@
 
 	.container_text {
 		width: 100%;
-		height: 500rpx;
-		top: 0rpx;
-
+		text-align: center;
 		.banner-img {
 			width: 144rpx;
-			height: 144rpx;
 			margin-top: 100rpx;
-			margin-left: 302rpx;
 		}
 	}
 
@@ -271,7 +268,6 @@
 		position: relative;
 		padding: 100rpx 102rpx;
 		background-color: #000000;
-		margin-top: -180rpx;
 		border-radius: 20rpx;
 
 		.login_input {

+ 398 - 108
pages/user/money/recharge.vue

@@ -1,166 +1,456 @@
 <template>
-	<view class="all padding-c-30 padding-v-30">
-		<view class="top">
-			<view class="topO"> {{$t('userinfo.u4')}} </view>
-			<view class="topT flex-start padding-t-30">
-				<view class="tt">USDT-TRC20</view>
+	<view class="content">
+		<view class="main-jg"></view>
+		<view class="add-wrapper">
+			<view class="add-box">
+				<view class="add-log">$</view>
+				<input type="text" v-model="money" :placeholder="$t('recharge.请输入充值金额')" placeholder-class="place"
+					@keyup="clearNoNum()" />
 			</view>
-			<view class="topS flex-start">
-				<view class="S">{{$t('userinfo.u1')}}</view>
-				<view class="SS clamp padding-c-10">{{ address }}</view>
-				<image class="SSS" src="/static/icon/cz.png" mode="" @click="copy(address)">
-				</image>
-			</view>
-			<!-- 根据地址生成二维码 -->
-			<view class="qr flex-center">
-				<uqrcode h5DownloadName='myqrcode' ref="qrcode" canvas-id="qrcode" :value="address" size="240" sizeUnit='rpx'>
-				</uqrcode>
-			</view>
-
-			<view class="last flex">
-				<view class="le" @click="savePic">
-					<view class="lef">{{$t('userinfo.u2')}}</view>
+			<view class="jg" style="height: 1px; background-color: #E6E6E6;"></view>
+			<view class="add-tags">
+				<view class="tag" v-for="(item, index) in addTags" :key="item" @click="tagClick(index)"
+					:class="{ action: currentIndex === index && money == addTags[index] }">
+					<text>{{ item }}</text>
+					USDT
 				</view>
-				<view class="le" style="margin-left: 30rpx;">
-					<view class="lef" @click="copy(address)">{{$t('userinfo.u3')}}</view>
-				</view>
-			</view>
-		</view>
-		<view class="buttom">
-			<view class="but">
-				{{$t('userinfo.u5')}}
 			</view>
 		</view>
+		<view class="main-jg"></view>
+		<button class="add-btn up" :class="{ 'active-bg': payLoding }"
+			@click="!payLoding ? confirm() : ''">{{$t('recharge.立即充值')}}</button>
+
 	</view>
 </template>
 
 <script>
 	import {
-		qianBao
-	} from "@/api/wallet.js"
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+
+	import {
+		gamecharge,
+		gamechargePost
+	} from '@/api/game.js';
+
+	import {
+		mapState
+	} from 'vuex';
+	import detectEthereumProvider from '@metamask/detect-provider'
 	export default {
+		filters: {
+			getMoneyStyle
+		},
 		data() {
 			return {
-				address: '',
-				qr:''
+				money: '', //充值金额
+				payLoding: false, //是否加载中
+				addTags: [300, 200, 150, 100, 50],
+				currentIndex: '',
 			};
 		},
-		mounted() {},
-		onReady() {},
+		computed: {
+			// #ifdef H5
+			...mapState(['weichatObj']),
+			// #endif
+			...mapState('user', ['userInfo'])
+		},
 		onLoad() {
 			uni.setNavigationBarTitle({
-				title: this.$t("tab.a3"),
+				title: this.$t('user.a7')
 			});
-			this.qianBao()
 		},
 		methods: {
-			// 二维码地址
-			async qianBao() {
-				const res = await qianBao()
-				this.address = res.data.back.USDT.money.address;
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 切换选中对象
+			tabRadio(e) {
+				console.log(e)
+				this.type = e;
 			},
-			// 复制地址
-			copy(value) {
-				uni.setClipboardData({
-					data: value,
-					success: function() {
-						//调用方法成功
-						console.log("success");
-					},
+			// 提交
+			async confirm() {
+				let obj = this;
+				if (this.money == 0) {
+					return this.$api.msg(this.$t('recharge.请输入充值金额'));
+				}
+
+				obj.payLoding = true;
+				uni.showLoading({
+					title: 'loding...',
+					mask:true
 				});
+				try {
+					const res = await gamecharge({
+						token: "USDT",
+						num: this.money,
+					})
+					const txHash = await ethereum.request({
+						method: 'eth_sendTransaction',
+						params: [{
+							from: obj.userInfo.account, // The user's active address.
+							to: res.data.to,
+							value: 0,
+							data: res.data.data.data,
+						}]
+					})
+					const PKR_RECHARGE = "PKR_RECHARGE" + (new Date()).getTime()
+					const sign = await ethereum.request({
+						"method": "personal_sign",
+						"params": [
+							PKR_RECHARGE,
+							obj.userInfo.account
+						]
+					})
+					const req = await gamechargePost({
+						num: obj.money,
+						token: "USDT",
+						transactionHash: txHash,
+						msg: PKR_RECHARGE,
+						sign:sign
+					});
+					uni.showToast({
+						title:this.$t('userinfo.u24')
+					})
+					obj.payLoding = false;
+				} catch (e) {
+					obj.payLoding = false;
+					uni.showToast({
+						title:this.$t('recharge.申请失败'),
+						icon:'error'
+					})
+				}
 			},
-			savePic(Url) {
-				this.$refs.qrcode.save({});
+			//获取订单列表
+			loadData(source) {
+				console.log(source);
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				navItem.loadingType = 'loading';
+				setTimeout(() => {
+					let orderList = [];
+					orderList.forEach(item => {
+						navItem.orderList.push(item);
+					});
+					//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
+					this.$set(navItem, 'loaded', true);
+					//判断是否还有数据, 有改为 more, 没有改为noMore
+					navItem.loadingType = 'more';
+				}, 600);
 			},
-		},
+			tagClick(index) {
+				this.currentIndex = index;
+				this.money = this.addTags[index];
+			},
+			clearNoNum() {
+				this.money = this.money.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
+				switch (this.money) {
+					case '300':
+						this.currentIndex = 0;
+						break;
+					case '200':
+						this.currentIndex = 1;
+						break;
+					case '150':
+						this.currentIndex = 2;
+						break;
+					case '100':
+						this.currentIndex = 3;
+						break;
+					case '50':
+						this.currentIndex = 4;
+						break;
+				}
+			},
+			btnClick() {
+				this.isSect = !this.isSect
+			},
+		}
 	};
 </script>
 
 <style lang="scss">
-	.all {
-		line-height: 1;
-		color: #ffffff;
+	page {
+		height: 100%;
+		background-color: #fff;
 	}
 
-	.top {
-		padding: 40rpx 30rpx;
-		background: #191a1f;
-		border-radius: 20rpx;
+	.add-btn {
 
-		.topO {
-			font-size: $font-lg;
-			font-weight: bold;
+		&.modified {
+			color: $base-color;
 		}
 
-		.topT {
-			.tt {
-				padding: 20rpx 24rpx;
-				border-radius: 10rpx;
-				border: 2px solid #ddba82;
-				font-size: 26rpx;
-				font-weight: bold;
-				color: #feb041;
-			}
+		&.up {
+
+			background: linear-gradient(-90deg, #FAC545, #FFE000);
+			color: #6B4216;
 		}
 
-		.topS {
-			padding-top: 30rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 604rpx;
+		height: 90rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
 
-			.S {
-				font-size: $font-lg;
-				font-weight: bold;
+	}
+
+	.row-box {
+		margin-top: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+
+		.title {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
+
+		.row {
+			display: flex;
+			align-items: center;
+			position: relative;
+			height: 80rpx;
+
+			.tit {
 				flex-shrink: 0;
+				width: 40rpx;
+				font-size: 30rpx;
+				color: $font-color-dark;
 			}
 
-			.SS {
-				font-size: $font-sm;
-				flex-grow: 1;
+			.input {
+				flex: 1;
+				font-size: 30rpx;
+				color: $font-color-dark;
 			}
 
-			.SSS {
-				flex-shrink: 0;
-				width: 29rpx;
-				height: 29rpx;
+			.iconlocation {
+				font-size: 36rpx;
+				color: $font-color-light;
+			}
+
+			.buttom {
+				color: $font-color;
+				font-size: $font-base;
 			}
 		}
 	}
 
-	.qr {
-		margin: 0 auto;
-		margin-top: 34rpx;
-		width: 275rpx;
-		height: 275rpx;
+	.list {
+		padding-left: 30rpx;
+		margin-top: 30rpx;
+		background-color: #ffffff;
+
+		.box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 120rpx;
+			border-bottom: 1px solid $border-color-light;
+
+			.icon {
+				font-size: 48rpx;
+				padding-right: 20rpx;
+			}
+
+			.iconweixin1 {
+				color: #18bf16;
+			}
+
+			.iconzhifubao {
+				color: #08aaec;
+			}
+
+			.title-box {
+				flex-grow: 1;
+				text-align: left;
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-base;
+				}
+
+				.node {
+					font-size: $font-sm;
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	/deep/ .uni-radio-input {
+		width: 45rpx;
+		height: 45rpx;
+	}
+
+	.active-bg {
+		background-color: $color-gray !important;
+	}
+
+	.now {
+		width: 100%;
+		height: 86rpx;
+		padding: 0 26rpx 0 47rpx;
+		display: flex;
+		justify-content: space-between;
+		line-height: 86rpx;
 		background-color: #fff;
+		// margin-bottom: 21rpx;
+
+		view {
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #333333;
+		}
+
+		.now-money {
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #FF4C4C;
+		}
 	}
 
-	.last {
-		margin-top: 50rpx;
-		padding: 0 30rpx;
+	.add-wrapper {
+		width: 750rpx;
+		height: 338rpx;
+		padding-left: 30rpx;
+		background: #ffffff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
 
-		.le {
-			padding: 20rpx 0;
-			width: 250rpx;
-			border: 2px solid #DDBA82;
-			text-align: center;
-			border-radius: 10rpx;
+		// margin-bottom: 22rpx;
+		.add-box {
+			width: 100%;
+			height: 103rpx;
+			display: flex;
+			flex-direction: row;
+			justify-content: space-between;
+			padding: 0 39rpx 0 10rpx;
+			align-items: center;
 
-			.lef {
-				font-size: 26rpx;
+			.add-log {
+				font-size: 37rpx;
 				font-weight: bold;
-				color: #FEB041;
+			}
+
+			input {
+				height: 30rpx;
+				font-size: 32rpx;
+				font-weight: 500;
+				color: #000;
+				line-height: 40px;
+				text-align: right;
+				flex-grow: 1;
+
+				.place {
+					color: #bfbfbf;
+				}
+			}
+		}
+
+		.jg {
+			width: 100%;
+		}
+
+		.add-tags {
+			height: 234rpx;
+			padding-top: 47rpx;
+			padding-bottom: 17rpx;
+			display: flex;
+			flex-direction: row;
+			flex-wrap: wrap;
+
+			// justify-content: space-between;
+			.tag {
+				width: 210rpx;
+				height: 70rpx;
+				background-color: #f0f0f0;
+				border-radius: 4rpx;
+				margin: 0 30rpx 30rpx 0;
+				text-align: center;
+				line-height: 70rpx;
+				font-size: 22rpx;
+
+				text {
+					font-size: 32rpx;
+					font-weight: 500;
+				}
+			}
+
+			.action {
+				color: #6B4216;
+				background: linear-gradient(-90deg, #FAC545, #FFE000);
 			}
 		}
 	}
 
-	.buttom {
-		background: #191a1f;
-		border-radius: 20rpx;
-		margin-top: 30rpx;
-		padding: 30rpx;
-		.but {
-			font-size: 26rpx;
-			font-weight: 500;
-			line-height: 45rpx;
+	.btn-wrapper {
+		padding: 49rpx 32rpx 0 40rpx;
+		height: 183rpx;
+		display: flex;
+		justify-content: space-between;
+		background-color: #fff;
+
+		.iconweixin1 {
+			color: #18bf16;
+			font-size: 48rpx;
+			display: flex;
+
+			view {
+				// display: inline-block;
+				height: 48rpx;
+				text-align: 48rpx;
+				padding-left: 20rpx;
+				// padding-top: 10rpx;
+				color: #000000;
+				font-size: 30rpx;
+			}
+		}
+
+		.btn {
+			width: 36rpx;
+			height: 36rpx;
+			border: 4rpx #333 solid;
+			border-radius: 8rpx 8rpx;
+
+			image {
+				// display: none;
+				width: 100%;
+				height: 100%;
+			}
+
+			.action {
+				display: none;
+			}
+		}
+
+		.actiont {
+			border: none;
 		}
 	}
+
+	.main-jg {
+		width: 100%;
+		height: 21rpx;
+		background-color: #f8f6f6;
+	}
 </style>

+ 166 - 0
pages/user/money/recharge备份.vue

@@ -0,0 +1,166 @@
+<template>
+	<view class="all padding-c-30 padding-v-30">
+		<view class="top">
+			<view class="topO"> {{$t('userinfo.u4')}} </view>
+			<view class="topT flex-start padding-t-30">
+				<view class="tt">USDT-TRC20</view>
+			</view>
+			<view class="topS flex-start">
+				<view class="S">{{$t('userinfo.u1')}}</view>
+				<view class="SS clamp padding-c-10">{{ address }}</view>
+				<image class="SSS" src="/static/icon/cz.png" mode="" @click="copy(address)">
+				</image>
+			</view>
+			<!-- 根据地址生成二维码 -->
+			<view class="qr flex-center">
+				<uqrcode h5DownloadName='myqrcode' ref="qrcode" canvas-id="qrcode" :value="address" size="240" sizeUnit='rpx'>
+				</uqrcode>
+			</view>
+
+			<view class="last flex">
+				<view class="le" @click="savePic">
+					<view class="lef">{{$t('userinfo.u2')}}</view>
+				</view>
+				<view class="le" style="margin-left: 30rpx;">
+					<view class="lef" @click="copy(address)">{{$t('userinfo.u3')}}</view>
+				</view>
+			</view>
+		</view>
+		<view class="buttom">
+			<view class="but">
+				{{$t('userinfo.u5')}}
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		qianBao
+	} from "@/api/wallet.js"
+	export default {
+		data() {
+			return {
+				address: '',
+				qr:''
+			};
+		},
+		mounted() {},
+		onReady() {},
+		onLoad() {
+			uni.setNavigationBarTitle({
+				title: this.$t("tab.a3"),
+			});
+			this.qianBao()
+		},
+		methods: {
+			// 二维码地址
+			async qianBao() {
+				const res = await qianBao()
+				this.address = res.data.back.USDT.money.address;
+			},
+			// 复制地址
+			copy(value) {
+				uni.setClipboardData({
+					data: value,
+					success: function() {
+						//调用方法成功
+						console.log("success");
+					},
+				});
+			},
+			savePic(Url) {
+				this.$refs.qrcode.save({});
+			},
+		},
+	};
+</script>
+
+<style lang="scss">
+	.all {
+		line-height: 1;
+		color: #ffffff;
+	}
+
+	.top {
+		padding: 40rpx 30rpx;
+		background: #191a1f;
+		border-radius: 20rpx;
+
+		.topO {
+			font-size: $font-lg;
+			font-weight: bold;
+		}
+
+		.topT {
+			.tt {
+				padding: 20rpx 24rpx;
+				border-radius: 10rpx;
+				border: 2px solid #ddba82;
+				font-size: 26rpx;
+				font-weight: bold;
+				color: #feb041;
+			}
+		}
+
+		.topS {
+			padding-top: 30rpx;
+
+			.S {
+				font-size: $font-lg;
+				font-weight: bold;
+				flex-shrink: 0;
+			}
+
+			.SS {
+				font-size: $font-sm;
+				flex-grow: 1;
+			}
+
+			.SSS {
+				flex-shrink: 0;
+				width: 29rpx;
+				height: 29rpx;
+			}
+		}
+	}
+
+	.qr {
+		margin: 0 auto;
+		margin-top: 34rpx;
+		width: 275rpx;
+		height: 275rpx;
+		background-color: #fff;
+	}
+
+	.last {
+		margin-top: 50rpx;
+		padding: 0 30rpx;
+
+		.le {
+			padding: 20rpx 0;
+			width: 250rpx;
+			border: 2px solid #DDBA82;
+			text-align: center;
+			border-radius: 10rpx;
+
+			.lef {
+				font-size: 26rpx;
+				font-weight: bold;
+				color: #FEB041;
+			}
+		}
+	}
+
+	.buttom {
+		background: #191a1f;
+		border-radius: 20rpx;
+		margin-top: 30rpx;
+		padding: 30rpx;
+		.but {
+			font-size: 26rpx;
+			font-weight: 500;
+			line-height: 45rpx;
+		}
+	}
+</style>

+ 1 - 1
pages/user/money/team.vue

@@ -41,7 +41,7 @@
 				<view class="boxT">
 					<text v-if="item.pm==1">+</text>
 					<text v-if="item.pm==0">-</text>
-					<text class="mon">{{item.number}}</text>
+					<text class="mon">{{item.number*1}}</text>
 				</view>
 			</view>
 		</scroll-view>

+ 15 - 2
pages/user/money/withdrawal.vue

@@ -5,7 +5,8 @@
 				{{$t('userinfo.u6')}}
 			</view>
 			<view class="topT flex-start padding-b-30">
-				<view class="TT">USDT-TRC20</view>
+				<view class="TT">USDT</view>
+				<view class="TT noaction" @click="openPkr">PKR</view>
 			</view>
 			<view class="topO">
 				{{$t('userinfo.u7')}}
@@ -86,6 +87,13 @@
 			this.gameWallet();
 		},
 		methods: {
+			openPkr(){
+				uni.showToast({
+					// title: '余额不足!',
+					title: this.$t("withdrawal.暂未开放"),
+					icon: 'error'
+				});
+			},
 			// 支付弹窗
 			openPayPassword() {
 				if (this.userWallet < this.withdrawal) {
@@ -170,7 +178,7 @@
 		background: #191A1F;
 		border-radius: 20rpx;
 		padding: 40rpx 30rpx;
-
+		
 		.topO {
 			font-size: $font-lg;
 			padding-bottom: 30rpx;
@@ -183,6 +191,11 @@
 				font-size: 26rpx;
 				color: #FEB041;
 				padding: 20rpx 24rpx;
+				&.noaction{
+					margin-left: 20rpx;
+					border-color: #999999;
+					color: #999999;
+				}
 			}
 
 		}

+ 1 - 1
pages/user/set/set.vue

@@ -2,7 +2,7 @@
 	<view class="container">
 		<uni-list>
 		    <uni-list-item :title="$t('safe.f6')" clickable showArrow  @click="navTo('/pages/user/set/userinfo')" ></uni-list-item>
-			<uni-list-item :title="$t('safe.f7')" clickable showArrow  @click="navTo('/pages/user/set/password')" ></uni-list-item>
+			<!-- <uni-list-item :title="$t('safe.f7')" clickable showArrow  @click="navTo('/pages/user/set/password')" ></uni-list-item> -->
 			<uni-list-item :title="$t('safe.d1')" clickable showArrow  @click="navTo('/pages/user/set/transaction')" ></uni-list-item>
 		</uni-list>
 		<view class="list-cell log-out-btn" @click="toLogout">

+ 182 - 143
pages/user/set/transaction.vue

@@ -2,173 +2,212 @@
 	<view class="container">
 		<view class="row b-b">
 			<text class="tit">{{$t('set.a3')}}</text>
-			<input class="input" disabled v-model="account" type="text" :placeholder="$t('reg.a3')" placeholder-class="placeholder" />
+			<input class="input" disabled v-model="account" type="text" :placeholder="$t('reg.a3')"
+				placeholder-class="placeholder" />
 		</view>
 		<view class="row b-b">
 			<text class="tit">{{$t('reg.a8')}}</text>
-			<input class="input" v-model="password" type="password" :placeholder="$t('reg.a9')" placeholder-class="placeholder" />
+			<input class="input" v-model="password" type="password" :placeholder="$t('reg.a9')"
+				placeholder-class="placeholder" />
 		</view>
 		<view class="row b-b">
 			<text class="tit">{{$t('reg.b0')}}</text>
-			<input class="input" v-model="repeat" type="password" :placeholder="$t('reg.b1')" placeholder-class="placeholder" />
+			<input class="input" v-model="repeat" type="password" :placeholder="$t('reg.b1')"
+				placeholder-class="placeholder" />
 		</view>
-		<view class="row b-b">
+		<!-- <view class="row b-b">
 			<text class="tit">{{$t('reg.a6')}}</text>
 			<input class="input" v-model="captcha" type="text" :placeholder="$t('reg.a7')" placeholder-class="placeholder" />
 			<view class="code" @click="verification">{{ countDown == 0 ? $t('reg.c6') : countDown }}</view>
-		</view>
-		<button class="add-btn" :class="{'bg-gray':loding}" @click="loding?'':confirm()">{{$t('common.submit')}}</button>
+		</view> -->
+		<button class="add-btn" :class="{'bg-gray':loding}"
+			@click="loding?'':confirm()">{{$t('common.submit')}}</button>
 	</view>
 </template>
 
 <script>
-import { verify } from '@/api/login.js';
-import { mapState } from 'vuex';
-import { Reset } from '@/api/set.js';
-export default {
-	data() {
-		return {
-			time: '', //保存倒计时对象
-			countDown: 0, //倒计时
-			account: '', //手机号
-			captcha: '', //验证码
-			password: '' ,//密码
-			repeat: '', //确认密码
-			loding:false,//是否载入中
-		};
-	},
-	computed: {
-		...mapState("user",['userInfo'])
-	},
-	onLoad() {
-		if(this.userInfo.account == null){
-			this.account = '';
-		}else{
-			this.account = this.userInfo.account;
-			this.show = false;
-		}
-		uni.setNavigationBarTitle({
-			title: this.$t("tab.b3"),
-		});
-	},
-	watch: {
-		// 监听倒计时
-		countDown(i) {
-			if (i == 0) {
-				clearInterval(this.time);
-			}
-		}
-	},
-	methods: {
-		//发送验证码
-		verification() {
-			let obj = this;
-			if (this.account == '') {
-				this.$api.msg(obj.$t("safe.b5"));
-				return;
-			}
-			// if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
-			// 	this.$api.msg(obj.$t("safe.b8"));
-			// 	return;
-			// }
-			// 判断是否在倒计时
-			if (obj.countDown > 0) {
-				return false;
+	import {
+		verify
+	} from '@/api/login.js';
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		Reset
+	} from '@/api/set.js';
+	import detectEthereumProvider from '@metamask/detect-provider'
+	export default {
+		data() {
+			return {
+				time: '', //保存倒计时对象
+				countDown: 0, //倒计时
+				account: '', //手机号
+				captcha: '', //验证码
+				password: '', //密码
+				repeat: '', //确认密码
+				loding: false, //是否载入中
+			};
+		},
+		computed: {
+			...mapState("user", ['userInfo'])
+		},
+		onLoad() {
+			if (this.userInfo.account == null) {
+				this.account = '';
 			} else {
-				obj.countDown = 60;
-				obj.time = setInterval(() => {
-					obj.countDown--;
-				}, 1000);
-				//调用验证码接口
-				verify({
-					phone: obj.account,
-					type: ''
-				})
-					.then(({ data }) => {})
-					.catch(err => {
-						console.log(err);
-					});
+				this.account = this.userInfo.account;
+				this.show = false;
+			}
+			uni.setNavigationBarTitle({
+				title: this.$t("tab.b3"),
+			});
+		},
+		watch: {
+			// 监听倒计时
+			countDown(i) {
+				if (i == 0) {
+					clearInterval(this.time);
+				}
 			}
 		},
-	
-		confirm(e) {
-		  this.loding = true;
-		  uni.showLoading({
-		  	title: this.$t("userinfo.u23"),
-		  	mask: true
-		  });
-		  Reset({
-		  	account: this.account,
-		  	captcha: this.captcha,
-		  	password: this.password,
-			repeat: this.repeat
-		  })
-		  	.then(() => {
-		  		this.loding = false;
-				uni.showToast({
-					title: this.$t("safe.d3"),
-					icon:"success",
-					mask:true
+		methods: {
+			//发送验证码
+			verification() {
+				let obj = this;
+				if (this.account == '') {
+					this.$api.msg(obj.$t("safe.b5"));
+					return;
+				}
+				// if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
+				// 	this.$api.msg(obj.$t("safe.b8"));
+				// 	return;
+				// }
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.account,
+							type: ''
+						})
+						.then(({
+							data
+						}) => {})
+						.catch(err => {
+							console.log(err);
+						});
+				}
+			},
+
+			async confirm(e) {
+				this.loding = true;
+				uni.showLoading({
+					title: this.$t("userinfo.u23"),
+					mask: true
 				});
-		  	})
-		  	.catch(err => {
-		  		this.loding = false;
-		  		console.log(err);
-		  	});
+				const provider = await detectEthereumProvider();
+				// 链接到MetaMask
+				ethereum.request({
+					method: 'eth_requestAccounts'
+				}).then((account) => {
+					console.log(account, 'account');
+					// this.$store.commit('accounts/connect_wallet', account[0]);
+					// localStorage.setItem('accounts', account)
+					const PKR_LOGIN = 'PKR_RESET' + (new Date()).getTime();
+					ethereum.request({
+						"method": "personal_sign",
+						"params": [
+							PKR_LOGIN,
+							account[0]
+						]
+					}).then((res) => {
+						Reset({
+								password: this.password,
+								repeat: this.repeat,
+								sign:res,
+								account: account[0],
+								msg:PKR_LOGIN
+							})
+							.then(() => {
+								this.loding = false;
+								uni.showToast({
+									title: this.$t("safe.d3"),
+									icon: "success",
+									mask: true
+								});
+							})
+							.catch(err => {
+								this.loding = false;
+								console.log(err);
+							});
+					});
+				});
+
+
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	background: #f3f3f3;
-}
-.row {
-	
-	display: flex;
-	align-items: center;
-	position: relative;
-	padding: 0 30rpx;
-	height: 110rpx;
-	background: $font-color-white;
+	page {
+		background: #f3f3f3;
+	}
 
-	.tit {
-		min-width: 130rpx;
-		flex-shrink: 0;
-		font-size: 30rpx;
+	.row {
+
+		display: flex;
+		align-items: center;
+		position: relative;
+		padding: 0 30rpx;
+		height: 110rpx;
+		background: $font-color-white;
+
+		.tit {
+			min-width: 130rpx;
+			flex-shrink: 0;
+			font-size: 30rpx;
+		}
+
+		.input {
+			flex: 1;
+			font-size: 30rpx;
+			color: $font-color-light;
+			padding-left: 20rpx;
+		}
+
+		.iconlocation {
+			font-size: 36rpx;
+			color: $font-color-light;
+		}
 	}
-	.input {
-		flex: 1;
-		font-size: 30rpx;
-		color: $font-color-light;
-		padding-left: 20rpx;
+
+	.add-btn {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		height: 100rpx;
+		margin: 60rpx auto;
+		font-size: $font-lg;
+		background-color: #FFF;
+		border: none;
 	}
-	.iconlocation {
-		font-size: 36rpx;
-		color: $font-color-light;
+
+	.bg-gray {
+		background-color: $color-gray;
 	}
-}
-.add-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	height: 100rpx;
-	margin: 60rpx auto;
-	font-size: $font-lg;
-	background-color: #FFF;
-	border:none;
-}
 
-.bg-gray{
-	background-color: $color-gray;
-}
-.code {
-	color: #000s;
-	font-size: 23rpx;
-	border-left: 1px solid #eeeeee;
-	width: 150rpx;
-	flex-shrink: 0;
-	text-align: center;
-}
-</style>
+	.code {
+		color: #000s;
+		font-size: 23rpx;
+		border-left: 1px solid #eeeeee;
+		width: 150rpx;
+		flex-shrink: 0;
+		text-align: center;
+	}
+</style>

+ 5 - 5
pages/user/set/userinfo.vue

@@ -8,16 +8,16 @@
 			<text class="tit">{{$t('set.a2')}}</text>
 			<input class="input" type="text" v-model="userInfo.nickname" placeholder-class="placeholder"/>
 		</view>
-		<view class="row">
+		<vie<!-- w class="row">
 			<text class="tit">{{$t('set.a3')}}</text>
 			<view class="input">
-				{{userInfo.phone}}
+				{{userInfo.account}}
 			</view>
-		</view>
-		<view class="row">
+		</view> -->
+		<!-- <view class="row">
 			<text class="tit">ID</text>
 			<input class="input" type="text"  disabled="true" v-model="userInfo.uid" placeholder-class="placeholder" />
-		</view>
+		</view> -->
 		<view class="list-cell log-out-btn" @click="confirm">
 			<text class="cell-tit">{{$t('set.a4')}}</text>
 		</view>

+ 22 - 14
pages/user/shareQrCode.vue

@@ -14,10 +14,10 @@
 				</view>
 			</view>
 			<view class="listT">
-				<view class="TT flex">
+				<!-- <view class="TT flex">
 					<view class="lsT">{{$t('gameList.a2')}}</view>
 					<view class="lisT">{{item.room.game.timebar}}</view>
-				</view>
+				</view> -->
 				<view class="TT flex">
 					<view class="lsT">{{$t('gameList.a4')}}</view>
 					<view class="lisT">{{item.num}}U</view>
@@ -46,7 +46,10 @@
 				</view>
 				<view class="TT flex">
 					<view class="lsT">{{$t('gameList.a10')}}</view>
-					<view class="lisT" v-if="item.room.result_info">{{item.room.result_info.c}}</view>
+					<view class="lisT flex" v-if="item.room.result_info">
+					<image v-for="ls in item.room.result_info" class="dice"
+						:src="`../../static/img/dice${ls}.png`" mode="scaleToFill"></image>
+					</view>
 				</view>
 				<view class="TT flex">
 					<view class="lsT">{{$t('gameList.a5')}}</view>
@@ -97,15 +100,11 @@
 					let list = res.data.bet_log.map((res) => {
 						res.num = +res.num;
 						res.get = +res.get;
-							let info = res.room.result_info;
-						if(info){
-							info.c = Number(info.c);
-							info.o = Number(info.o);
-						}
+						res.room.result_info =  res.room.result_info.split(",");
 						let result = res.room.result
 						if (result) {
 							let arr = [];
-							const ar =result.split(",")
+							const ar = result.split(",")
 							for (let i = 0; i < ar.length; i++) {
 								const s = ar[i].split(':');
 								arr.push({
@@ -119,7 +118,7 @@
 						return res
 					})
 					that.list = that.list.concat(list)
-					console.log('1111111',list);
+					console.log('1111111', list);
 					that.page++
 					if (list.length == that.limit) {
 						that.loadingType = 'more'
@@ -159,12 +158,15 @@
 				padding: 10rpx 20rpx;
 				font-size: 22rpx;
 				font-weight: 500;
-				&.red{
+
+				&.red {
 					background: $color-yellow;
 				}
-				&.green{
+
+				&.green {
 					background: $color-green;
 				}
+
 				&.primary {
 					background: #01ebf6;
 				}
@@ -187,10 +189,16 @@
 			.lisT {
 				font-size: $font-lg;
 				font-weight: bold;
-				&.red{
+				.dice {
+					width: 54rpx;
+					height: 54rpx;
+					margin-left: 10rpx;
+				}
+				&.red {
 					color: #df5660;
 				}
-				&.green{
+
+				&.green {
 					color: $color-green;
 				}
 			}

BIN
static/icon/user-R.png


BIN
static/icon/user-U.png


BIN
static/img/dice1.png


BIN
static/img/dice2.png


BIN
static/img/dice3.png


BIN
static/img/dice4.png


BIN
static/img/dice5.png


BIN
static/img/dice6.png


BIN
static/img/logo.png


BIN
static/img/money_pay_1.png


BIN
static/img/money_pay_2.png


BIN
static/img/money_pay_3.png


BIN
static/img/money_pay_4.png


BIN
static/img/shouye1.png


BIN
static/img/sz1.png


BIN
static/shouye/fenxiang.png


BIN
static/shouye/huiyuan.png


BIN
static/shouye/index-bottom.png


BIN
static/shouye/index-content.png


BIN
static/shouye/index_item_1.png


BIN
static/shouye/index_item_2.png


BIN
static/shouye/index_logo.png


BIN
static/shouye/jiaoyi.png


BIN
static/shouye/liuyan.png


BIN
static/shouye/shouye1.png


BIN
static/shouye/shouye4.png


BIN
static/shouye/shouye5.png


BIN
static/shouye/shouye6.png


BIN
static/shouye/shouye7.png


BIN
static/shouye/shouye8.png


BIN
static/shouye/shouye9.png


BIN
static/shouye/tuichu.png


+ 1 - 1
store/index.js

@@ -6,7 +6,7 @@ Vue.use(Vuex)
 
 const store = new Vuex.Store({
 	state: {
-		baseURL: 'http://www.accle.shop', //请求地址配置
+		baseURL: 'https://polkep.xyz', //请求地址配置
 		urlFile: '/index', //项目部署所在文件夹
 		loginInterceptor: false, //是否打开强制登录
 		// #ifdef H5 || MP-WEIXIN

+ 3 - 3
uni.scss

@@ -4,7 +4,7 @@ $page-row-spacing: 30rpx;
 $page-color-base: #000; //页面背景颜色
 $page-color-light: #f8f6fc;
 // 主题颜色
-$base-color: #fdb242; //项目颜色
+$base-color: #FEB041; //项目颜色
 $box-shadow-color: #5dbc7c; //阴影颜色
 $font-color: #5dbc7c; //字体颜色
 $font-color-spec: #5dbc7c; //可操作文字颜色
@@ -31,7 +31,7 @@ $border-color-light: #ebeef5; //亮灰
 // uni自带边框颜色
 $uni-border-color: #ebeef5;
 /*颜色*/
-$color-yellow: #f0ad4e;
+$color-yellow: #FEB041;
 $color-gray: #999999;
 $color-green: #5dbc7c;
 $color-red: #dd524d;
@@ -40,7 +40,7 @@ $image-bg-color: #eee;
 /* 行为相关颜色 */
 $uni-color-primary: #5dbc7c;
 $uni-color-success: #4cd964;
-$uni-color-warning: #f0ad4e;
+$uni-color-warning: #FEB041;
 $uni-color-error: #dd524d;
 // 提交框阴影
 $box-shadow: 0rpx 0rpx 10rpx 10rpx #f3f3f3;

+ 153 - 3
utils/loginUtils.js

@@ -1,3 +1,12 @@
+import detectEthereumProvider from '@metamask/detect-provider'
+import {
+	login
+} from '@/api/login.js';
+import {
+	getUserInfo
+} from '@/api/user.js';
+import store from '../store'
+
 export function getActionPage() {
 	let pages = getCurrentPages();
 	return pages[pages.length - 1]
@@ -14,6 +23,9 @@ export function interceptor() {
 	// if (weichatBrowser) {
 	// 	url = '/pages/public/wxLogin';
 	// }
+	setPeovider();
+	return
+
 	// #endif
 	// #ifdef MP-WEIXIN
 	url = '/pages/public/wxLogin';
@@ -32,7 +44,7 @@ export function saveUrl() {
 }
 
 // 处理分享链接地址
-export function getPageUrl(showSpeard=false) {
+export function getPageUrl(showSpeard = false) {
 	let page = getActionPage();
 	let path = '/' + page.route;
 	let url = '';
@@ -45,9 +57,9 @@ export function getPageUrl(showSpeard=false) {
 			// 判断有无邀请人
 			if (a != 'speard') {
 				url += a + "=" + page.options[a] + "&"
-			}else{
+			} else {
 				// 判断是否需要存储邀请人
-				if(showSpeard){
+				if (showSpeard) {
 					url += a + "=" + page.options[a] + "&"
 				}
 			}
@@ -57,3 +69,141 @@ export function getPageUrl(showSpeard=false) {
 	// 返回处理邀请人后的邀请地址
 	return path
 }
+
+async function setPeovider() { // 检测提供者
+	uni.showLoading({
+		title: '检测授权中...',
+		mask: true
+	});
+	const provider = await detectEthereumProvider();
+	if (provider) {
+		startApp(provider); // Initialize your app
+	} else {
+		uni.showToast({
+			title: '请先安装MetaMask插件',
+			icon: 'none',
+			duration: 3500
+		});
+		return false;
+	}
+};
+// 检测插件
+async function startApp(provider) {
+	if (provider !== window.ethereum) {
+		uni.showToast({
+			title: '安装了多个钱包,加载失败',
+			icon: 'none',
+			duration: 3500
+		});
+		return false
+	} else {
+		uni.showLoading({
+			mask: true
+		});
+	}
+	const srcid = await ethereum.request({
+		method: 'eth_chainId'
+	});
+	if (srcid != '0x38') {
+		try {
+			const src = await ethereum.request({
+				method: 'wallet_switchEthereumChain',
+				params: [{
+					chainId: '0x38'
+				}],
+			});
+			console.log('233')
+			login_metamask()
+		} catch (switchError) {
+			if (switchError.code === 4902) {
+				try {
+					const src = await ethereum.request({
+						method: 'wallet_addEthereumChain',
+						params: [{
+							chainId: '0x38',
+							chainName: 'BSC',
+							rpcUrls: ['https://bsc-dataseed2.ninicoin.io'],
+						}, ],
+					});
+					login_metamask()
+					console.log(src, 'src');
+				} catch (addError) {
+					console.log(addError);
+				}
+			}
+		}
+	} else {
+		login_metamask()
+	}
+};
+async function login_metamask() {
+	eth_requestAccounts(); // 拿到账户对应的账号
+	ethereum.on('accountsChanged', (accounts) => { // 地址修改时收到通知
+		store.commit('user/logout');
+		console.log('234');
+		setPeovider(); // 重新登录
+	});
+	// 监听
+	// ethereum.on('chainChanged', (res)=>{
+	// 	console.log('235')
+	// 	store.commit('user/logout');
+	// 	setPeovider(); // 重新登录
+	// });
+	// ethereum.on('connect', (connectInfo) => { 
+	// 	// 当 MetaMask 提供者第一次能够向链 提交 RPC 请求时,它会发出此事件。
+	// 	uni.clearStorage();
+	// 	// Time to reload your interface with accounts[0]!
+	// 	loginDapp();
+	// });
+	ethereum.on('disconnect', (error) => { // 如果 MetaMask 提供者无法向任何链提        交 RPC 请求,它会发出此事件。
+		console.log(error);
+		// 这里可以打印一下error
+	});
+	// ethereum.on('message', (message) => { // MetaMask 提供者在收到一些应该通知消费者的消息时发出此事件。
+	// 	console.log(message.data.result.hash)
+	// })
+};
+async function eth_requestAccounts() { // 链接到MetaMask
+	ethereum.request({
+		method: 'eth_requestAccounts'
+	}).then((account) => {
+		console.log(account, 'account');
+		// this.$store.commit('accounts/connect_wallet', account[0]);
+		// localStorage.setItem('accounts', account)
+		const PKR_LOGIN = 'PKR_LOGIN' + (new Date()).getTime();
+		ethereum.request({
+			"method": "personal_sign",
+			"params": [
+				PKR_LOGIN,
+				account[0]
+			]
+		}).then((res) => {
+			console.log(res, 'res');
+			console.log(res.length, 'reschangdu');
+			toLogin(res, account[0], PKR_LOGIN);
+		});
+	});
+};
+// 登录
+async function toLogin(sign, account, msg) {
+	const that = getApp();
+	login({
+			sign,
+			account,
+			msg: msg
+		})
+		.then(function(e) {
+			uni.setStorageSync('token', e.data.token);
+			getUserInfo({}).then(e => {
+				console.log(store);
+				store.commit('user/login')
+				// 保存返回用户数据
+				// obj.setUserInfo();
+				store.commit('user/setUserInfo', e.data);
+				uni.hideLoading()
+			});
+		})
+		.catch(function(e) {
+			console.log(e);
+		});
+};

+ 5 - 3
utils/request.js

@@ -9,7 +9,7 @@ import {
 service.interceptors.response(
 	response => {
 		try {
-			const lang = getApp();
+			const that = getApp();
 			let res = response.data;
 			// 解析字符串为数字
 			if (res.status !== 200) {
@@ -19,8 +19,10 @@ service.interceptors.response(
 					store.commit('user/logout');
 					// 判断是否开启强制登录
 					uni.showModal({
-						title: lang.$t('enter.c4'),
-						content: lang.$t('enter.b5'),
+						title: that.$t('enter.c4'),
+						content: that.$t('enter.b5'),
+						cancelText: that.$t('indexenter.取消'),
+						confirmText: that.$t('indexenter.确定'),
 						success: (e) => {
 							// 判断是否点击确认按钮
 							if (e.confirm) {

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.