Pārlūkot izejas kodu

调整钱包,挖矿UI

yll 4 gadi atpakaļ
vecāks
revīzija
465a8bcc73

+ 1 - 0
view/xcx/app.json

@@ -65,6 +65,7 @@
     "components/general-window/index",
     "pages/message/index",
     "pages/mine_rule/index",
+    "pages/leader_board/index",
     "pages/message_details/index"
   ],
   "subPackages": [

+ 4 - 2
view/xcx/app.wxss

@@ -51,10 +51,12 @@ button::after{border:0;}
 .loadingpic {
 	animation: load 3s linear 1s infinite;
 }
- .loading-list {
+
+.loading-list {
 	animation: load linear 1s infinite;
   font-size:40rpx;margin-right:22rpx;
-}  
+}
+
 .loading{width:100%;height:100rpx;line-height:100rpx;align-items:center;justify-content:center;position: relative;text-align:center;}
 .loading .line{position: absolute;width: 450rpx;left: 150rpx;top: 50rpx;height: 1px;border-top:1px solid #eee ;}
 .loading .text{position: relative;display: inline-block;padding: 0 20rpx;background: #fff;z-index: 2;color: #777;}

+ 170 - 9
view/xcx/components/mine/index.js

@@ -14,28 +14,189 @@ Component({
    * 组件的初始数据
    */
   data: {
-    symbol: "BTC",
-    icon: "/images/one.png",
-    btnTxt: "开始挖矿",
+    btnTxt: "启动",
     history: [{
-      "symbol": "doge",
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": 0,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": -1,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 1,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": 0,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": -1,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": 0,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": -1,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": 0,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": -1,
+    },{
+      "symbol": "DOGE",
       "icon": "/images/one.png",
       "amount": 12.00034,
-      "ts": "2021/05/10 15:50:03",
+      "ts": "2021-05-10",
       "from": "abcde034345dd",
       "to": "aabde2343df34",
       "out": 0,
     },{
-      "symbol": "doge",
+      "symbol": "DOGE",
       "icon": "/images/one.png",
       "amount": 12.00034,
-      "ts": "2021/05/10 17:12:42",
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": -1,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": 0,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": -1,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": 0,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": -1,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": 0,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": -1,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": 0,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021-05-10",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": -1,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021/05/10 15:50",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": 0,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021/05/10 17:12",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": -1,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021/05/10 15:50",
+      "from": "abcde034345dd",
+      "to": "aabde2343df34",
+      "out": 0,
+    },{
+      "symbol": "DOGE",
+      "icon": "/images/one.png",
+      "amount": 12.00034,
+      "ts": "2021/05/10 17:12",
       "from": "abcde034345dd",
       "to": "aabde2343df34",
       "out": -1,
     }],
+    symbol: "DOGE",
+    icon: "/images/one.png",
     totals: 9999.9999,
-    progress: 99.999,
+    progress: 99.999, // 0 表示已停止
+    
     timer: null,
     coinTimer: null
   },
@@ -87,7 +248,7 @@ Component({
       }, 1000);
     },
 
-    drawClick: function() {
+    onClickStart: function() {
       let that = this;
       that.setData({
         btnTxt: "挖矿中"

+ 33 - 37
view/xcx/components/mine/index.wxml

@@ -1,44 +1,40 @@
 <view class="mine">
-  <view class="banner">
-    <view>
-      
-    </view>
-  </view>
-  <view class="content">
-    <button class="btn" bindtap="drawClick">{{btnTxt}}</button>
-    <view class="bottom">
-      <view class="space"></view>
-      <button class="rule" bindtap="goRule">活动规则</button>
-    </view>
-  </view>
-  <view class="details">
-    <view class="totals">
+    <!-- total -->
+    <view class="head">
       <image src="{{icon}}"></image>
-      <view class="text">
-        <view class="title">当前总数</view>
-        <view class="value">{{totals}}<text class="bit">{{symbol}}</text></view>
-      </view>
-    </view>
-    <view class="progress">
-        <view class="title">当前进度</view>
-        <view class="value">{{progress}}<text class="bit">{{symbol}}</text></view>
-    </view>
-  </view>
-  <view class="history">
-    <view class="title">
-      <image src="/images/historyTitle.png"></image>
+      <text class="balance">{{totals}}</text> 
     </view>
-    <view class="noRecord" wx:if="{{history.length < 1}}">暂时没有记录</view>
-    <view wx:else>
-      <view wx:for="{{history}}" wx:key="index" class="item">
-      <view>
-        {{ item.ts }}
-        {{ item.out >=0 ? "挖矿" : "导出" }}
-        <text class="{{item.out >= 0 ? 'out' : 'in'}}">{{item.amount}}</text>
-        <text class="symbol">{{item.symbol}}</text>
-        <image class="icon" src="{{item.icon}}"></image>
+    <!-- digging -->
+    <view class="main">
+      <view class="left">
+        <button class="start" bindtap="onClickStart">{{btnTxt}}</button>
+      </view>
+      <view class="right">
+        <view class="current">
+          <text class="progress">{{progress}}</text>
+        </view>
       </view>
     </view>
+    <!-- history -->
+    <view class="his">
+      <view class="his-img">
+        <image src="/images/historyTitle.png"></image>
+      </view>
+      <view class="no-record" wx:if="{{history.length <= 0}}">
+        <text>没有记录</text>
+      </view>
+      <view wx:else>
+        <scroll-view class="records" scroll-y="true" scroll-with-animation="true">
+          <view wx:for="{{history}}" wx:key="index" class="item {{ item.out != 0 ? 'color' : '' }}">
+            <view class="icon">
+              <image src="{{item.icon}}"></image>
+            </view>
+            <text class="symbol">{{item.symbol}}</text>
+            <text class="direction">{{ item.out != 0 ? "获取" : "导出" }}</text>
+            <text class="amount">{{item.out != 0 ? item.amount : -item.amount}}</text>
+            <text class="time">{{ item.ts }}</text>
+          </view>
+        </scroll-view>
+      </view>
     </view>
-  </view>
 </view>

+ 133 - 29
view/xcx/components/mine/index.wxss

@@ -1,29 +1,133 @@
-.mine { text-align: center; margin: auto; background-color: #f5f5f5; }
-.mine .banner { width: 100%; height: 360rpx;  margin: 20rpx auto; background-color: #fff; }
-.mine .content { width: 100%; height: 200rpx; background-color: #fff; margin-top: 20rpx; padding-top: 20rpx; }
-.mine .content .btn { width: 300rpx; height: 100rpx; line-height: 100rpx; margin: auto; background-color: #e93323!important;  color: #fff; border-radius: 45rpx; }
-.mine .content .bottom { display: flex; }
-.mine .content .bottom .space { width: 100%; flex-shrink: 2; }
-.mine .content .bottom .rule { font-size: 32rpx; text-decoration: underline; width: 156rpx; margin-right: 46rpx; }
-
-.mine .details { width: 100%; background-color: #fff; margin-top: 20rpx; display: flex; height: 120rpx; padding-top: 10rpx; padding-bottom: 10rpx;}
-.mine .details .totals { flex-shrink: 2; margin-left: 32rpx;  width: 50%; text-align: left; display: flex; }
-.mine .details .totals image { width: 86rpx; height: 86rpx; }
-.mine .details .totals .text { margin-left: 20rpx; }
-.mine .details .totals .title { font-size: 28rpx; }
-.mine .details .totals .value { font-size: 40rpx; }
-.mine .details .totals .value .bit { font-weight: bold; margin-left: 8rpx; }
-.mine .details .progress { text-align: left; }
-.mine .details .progress .title { font-size: 28rpx; }
-.mine .details .progress .value { font-size: 40rpx; }
-.mine .details .progress .value .bit { font-weight: bold; margin-left: 8rpx; }
-
-.mine .history { width: 100%; background-color: #fff; margin-top: 20rpx; }
-.mine .history .title { height: 88rpx; width: 431rpx; margin: auto; margin-bottom: 20rpx; }
-.mine .history .title image { width: 100%; height: 100%; }
-.mine .history .noRecord { margin-top: 42rpx; color: gray; }
-.mine .history .item { height: 64rpx; line-height: 64rpx; margin-top: 10rpx; text-align: left; margin-left: 64rpx; }
-.mine .history .item .out { color: red; }
-.mine .history .item .in { color: green; }
-.mine .history .item .symbol { margin-left: 12rpx; }
-.mine .history .item .icon { width: 48rpx; height: 48rpx; margin-left: 12rpx; margin-right: 12rpx; }
+.mine {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  background-color: #fff;
+}
+
+.mine .head {
+  display: flex;
+  flex-direction: row;
+  justify-content: center; 
+  align-items: center; 
+  margin-top:20rpx;
+}
+.mine .head image {
+  height: 48rpx; 
+  width: 48rpx;
+  margin: 0 10rpx;
+}
+.mine .head .balance {color: #e93323;}
+
+.mine .main {
+  display: flex;
+  flex-direction: row;
+  margin-top: 36rpx;
+  height: 240rpx;
+}
+
+.mine .main .left {
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+  flex-grow: 2;
+}
+
+.main .left .start {
+  width: 200rpx; 
+  height: 200rpx;
+  background-color: #e93323!important; 
+  color: #fff; 
+  border-radius: 50%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  align-items: center;
+}
+
+.mine .main .right { 
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+  flex-grow: 3;
+}
+
+.mine .main .right .current {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  align-items: flex-start;
+}
+
+.mine .main .right .current .progress {
+  font-size: 48rpx;
+  color: green;
+}
+
+.mine .his {
+  display: flex;
+  flex-direction: column;
+  justify-content: flex-start;
+}
+
+.mine .his .his-img {
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+}
+.mine .his .his-img image {
+  width: 431rpx;
+  height: 88rpx;
+}
+
+.mine .his .no-record {
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  margin-top: 32rpx;
+  color: gray;
+}
+
+.mine .his .records {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  margin: 32rpx 20rpx;
+}
+.mine .his .records .item {
+  display: flex;
+  flex-direction: row;
+  justify-content: flex-start;
+  height: 54rpx;
+  margin: 10rpx;
+}
+.mine .his .records .color {
+  color: forestgreen;
+}
+.mine .his .records .icon {
+  width: 10%;
+}
+
+.mine .his .records .icon image {
+  width: 48rpx;
+  height: 48rpx;
+}
+
+.mine .his .records .item .symbol {
+  display: flex;
+  width: 15%;
+}
+.mine .his .records .item .direction {
+  display: flex;
+  width: 15%;
+}
+
+.mine .his .records .item .amount {
+  display: flex;
+  width: 30%;
+}
+.mine .his .records .item .time {
+  display: flex;
+  width: 30%;
+}

+ 2 - 2
view/xcx/config.js

@@ -1,8 +1,8 @@
 module.exports = {
   // 请求域名 格式: https://您的域名
-  HTTP_REQUEST_URL:'https://twong.shotshock.shop',
+  HTTP_REQUEST_URL:'http://twong.h',
   // Socket链接 暂不做配置
-  WSS_SERVER_URL:'',
+  WSS_SERVER_URL:'wss://twong.shotshock.shop',
 
 
   // 以下配置非开发者,无需修改

+ 1 - 2
view/xcx/pages/index/index.wxml

@@ -119,7 +119,7 @@
         </view>
         -->
 
-        <!-- 直播列表,后台暂不支持
+        <!-- 直播列表,后台暂不支持 -->
         <view class="liveBroadcast" wx:if='{{liveList.length || liveInfo.roomid}}'>
           <view class="publicTitle acea-row row-center-wrapper">
             <image src="/images/tv.png"></image>
@@ -148,7 +148,6 @@
             </scroll-view>
           </view>
         </view>
-        -->
 
         <!-- 秒杀,屏蔽
         <view class="flashSale" wx:if="{{seckillCont}}">

+ 1 - 1
view/xcx/pages/message/index.js

@@ -14,7 +14,7 @@ Page({
    */
   data: {
     parameter: {
-      title: "消息",
+      'title': "消息",
       'navbar': '1',
       'return': '1',
       'color': false,

+ 0 - 1
view/xcx/pages/news_list/index.js

@@ -1,6 +1,5 @@
 import { getArticleCategoryList, getArticleList, getArticleHotList, getArticleBannerList} from '../../api/api.js';
 
-
 const app = getApp();
 Page({
 

+ 5 - 8
view/xcx/pages/user_goods_collection/index.js

@@ -1,11 +1,8 @@
 // pages/collectionGoods/index.js
-
 import { getCollectUserList, getProductHot, collectDel} from '../../api/store.js';
 
-
 const app=getApp();
 Page({
-
   /**
    * 页面的初始数据
    */
@@ -13,7 +10,7 @@ Page({
     parameter: {
       'navbar': '1',
       'return': '1',
-      'title': '收藏商品',
+      'title': '收藏',
       'color': false
     },
     host_product:[],
@@ -26,7 +23,7 @@ Page({
   },
   /**
    * 授权回调
-  */
+   */
   onLoadFun:function(){
     this.get_user_collect_product();
     this.get_host_product();
@@ -39,7 +36,7 @@ Page({
   },
   /**
    * 获取收藏产品
-  */
+   */
   get_user_collect_product:function(){
     var that=this;
     if (this.data.loading) return;
@@ -63,7 +60,7 @@ Page({
   },
   /**
    * 取消收藏
-  */
+   */
   delCollection:function(e){
     var id = e.target.dataset.id, that = this, index = e.target.dataset.index;
     collectDel(id).then(res=>{
@@ -75,7 +72,7 @@ Page({
   },
   /**
    * 获取我的推荐
-  */
+   */
   get_host_product: function () {
     var that = this;
     getProductHot().then(res=>{

+ 2 - 2
view/xcx/pages/user_goods_collection/index.wxml

@@ -11,8 +11,8 @@
       </view>
    </navigator>
    <view class='loadingicon acea-row row-center-wrapper'>
-        <text class='loading iconfont icon-jiazai' hidden='{{loading==false}}'></text>{{loadTitle}}
-     </view>
+      <text class='loading iconfont icon-jiazai' hidden='{{loading==false}}'></text>{{loadTitle}}
+   </view>
 </view>
 <view class='noCommodity' wx:elif="{{!collectProductList.length && page > 1}}">
    <view class='pictrue'><image src='/images/noCollection.png'></image></view>

+ 19 - 2
view/xcx/pages/user_money/index.wxml

@@ -40,6 +40,7 @@
         <view>积分中心</view>
       </navigator>
     </view>
+    <!--
     <view class='advert acea-row row-between-wrapper'>
       <navigator class='item acea-row row-between-wrapper' hover-class='none' url='/pages/user_sgin/index'>
         <view class='text'>
@@ -56,6 +57,21 @@
         <view class='pictrue'><image src='/images/money.png'></image></view>
       </navigator>
     </view>
+    -->
+    <view class="list">
+      <view class='item acea-row row-between-wrapper'>
+        <view class='picTxt acea-row row-between-wrapper'>
+          <view class='iconfont icon-hebingxingzhuang'>
+          </view>
+          <view class='text'>
+            <view class='line1'>BTC</view>
+          </view>
+      	</view>
+        <navigator hover-class='none' url='/pages/activity/goods_combination/index' class='bnt' wx:if="{{activity.is_pink}}">立即参与</navigator>
+        <view class='bnt end' wx:else>已结束</view>
+      </view>
+    </view>
+    <!--
     <view class='list'>
       <view class='item acea-row row-between-wrapper'>
         <view class='picTxt acea-row row-between-wrapper'>
@@ -91,7 +107,8 @@
         <view class='bnt end' wx:else>已结束</view>
       </view>
     </view>
-   </view>
-   <recommend host_product="{{host_product}}"></recommend>
+     -->
+  </view>
+  <recommend host_product="{{host_product}}"></recommend>
 </view>
 <authorize bind:onLoadFun='onLoadFun' iShidden="{{iShidden}}"></authorize>

+ 1 - 1
view/xcx/project.config.json

@@ -13,7 +13,7 @@
     "newFeature": true,
     "coverView": true,
     "nodeModules": true,
-    "autoAudits": false,
+    "autoAudits": true,
     "showShadowRootInWxmlPanel": true,
     "scopeDataCheck": false,
     "uglifyFileName": true,