|
|
@@ -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: "挖矿中"
|