['同步线上数据']

This commit is contained in:
2021-11-22 15:35:50 +08:00
12 changed files with 598 additions and 51486 deletions

29
App.vue
View File

@@ -36,12 +36,29 @@
success: modalRes => { success: modalRes => {
if (modalRes.confirm) { if (modalRes.confirm) {
if (plus.os.name == "Android") { if (plus.os.name == "Android") {
plus.runtime.openURL(res.info.download, err => { uni.showToast({
uni.showToast({ title: '新版本下载中,将在下载完成后自动为您安装更新包',
title: err, icon : 'none'
icon : 'none' })
}) uni.downloadFile({
}); url : res.info.download,
success : apkPick=> {
plus.runtime.install(apkPick.tempFilePath, '', installRES => {
// 安装完成用于提示新版本引导,暂时无用
}, installERR => {
// 安装失败
})
},
fail(err){
uni.showToast({
title: '安装包下载失败,请检查您的网络或稍后重试',
icon : 'none'
})
}
})
// plus.runtime.openURL(res.info.download, err => {
// console.log(err)
// }, 'com.android.browser');
} else{ } else{
uni.showToast({ uni.showToast({
title: 'IOS应用暂未上架请打开测试(TestFlight)工具点击更新', title: 'IOS应用暂未上架请打开测试(TestFlight)工具点击更新',

View File

@@ -28,11 +28,29 @@ const thawlog = (data) => {
url: 'user/account/thawlog', url: 'user/account/thawlog',
method: 'POST', method: 'POST',
data data
}, true)
}
// 获取新的一批水晶
const crystalsBefore = (data) => {
return request({
url: 'user/account/crystals/before',
})
}
// 批量领取水晶
const allThawall = (data) => {
return request({
url: 'user/account/thawall',
method: 'POST',
data
}) })
} }
export { export {
chain, chain,
crystals, crystals,
thawlog thawlog,
crystalsBefore,
allThawall
} }

View File

@@ -2,8 +2,8 @@
"name" : "链商星球", "name" : "链商星球",
"appid" : "__UNI__1F65101", "appid" : "__UNI__1F65101",
"description" : "安徽星煌,链商星球商家工具", "description" : "安徽星煌,链商星球商家工具",
"versionName" : "1.1.9", "versionName" : "1.2.0",
"versionCode" : 119, "versionCode" : 120,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

137
package-lock.json generated
View File

@@ -4,6 +4,138 @@
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"requires": {
"color-convert": "^2.0.1"
}
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"requires": {
"fill-range": "^7.0.1"
}
},
"chalk": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"enhanced-resolve": {
"version": "5.8.3",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz",
"integrity": "sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA==",
"requires": {
"graceful-fs": "^4.2.4",
"tapable": "^2.2.0"
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"requires": {
"to-regex-range": "^5.0.1"
}
},
"graceful-fs": {
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg=="
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
},
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
},
"lru-cache": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
"requires": {
"yallist": "^4.0.0"
}
},
"micromatch": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
"integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==",
"requires": {
"braces": "^3.0.1",
"picomatch": "^2.2.3"
}
},
"picomatch": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
"integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw=="
},
"semver": {
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"requires": {
"lru-cache": "^6.0.0"
}
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"requires": {
"has-flag": "^4.0.0"
}
},
"tapable": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"requires": {
"is-number": "^7.0.0"
}
},
"ts-loader": {
"version": "9.2.6",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.6.tgz",
"integrity": "sha512-QMTC4UFzHmu9wU2VHZEmWWE9cUajjfcdcws+Gh7FhiO+Dy0RnR1bNz0YCHqhI0yRowCE9arVnNxYHqELOy9Hjw==",
"requires": {
"chalk": "^4.1.0",
"enhanced-resolve": "^5.0.0",
"micromatch": "^4.0.0",
"semver": "^7.3.4"
}
},
"uni-read-pages": { "uni-read-pages": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz", "resolved": "https://registry.npmjs.org/uni-read-pages/-/uni-read-pages-1.0.5.tgz",
@@ -23,6 +155,11 @@
"version": "3.6.2", "version": "3.6.2",
"resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz", "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.6.2.tgz",
"integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw==" "integrity": "sha512-ETW44IqCgBpVomy520DT5jf8n0zoCac+sxWnn+hMe/CzaSejb/eVw2YToiXYX+Ex/AuHHia28vWTq4goAexFbw=="
},
"yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
} }
} }
} }

View File

@@ -13,6 +13,7 @@
"author": "web唐明明", "author": "web唐明明",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"ts-loader": "^9.2.6",
"uni-read-pages": "^1.0.5", "uni-read-pages": "^1.0.5",
"uni-simple-router": "^2.0.7", "uni-simple-router": "^2.0.7",
"uview-ui": "^1.8.4", "uview-ui": "^1.8.4",

View File

@@ -1,12 +1,12 @@
{ {
"pages": [{ "pages": [{
"path" : "pages/guide/guide", "path": "pages/guide/guide",
"style" : { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"disableScroll": true "disableScroll": true
} }
},{ }, {
"path": "pages/index/index", "path": "pages/index/index",
"name": "Index", "name": "Index",
"style": { "style": {
@@ -30,7 +30,7 @@
"style": { "style": {
"navigationBarTitleText": "通证商城 购你所想", "navigationBarTitleText": "通证商城 购你所想",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundColor": "#8b64fd", "backgroundColor": "#8b64fd",
"buttons": [{ "buttons": [{
@@ -49,7 +49,7 @@
"style": { "style": {
"navigationBarTitleText": "搜索列表" "navigationBarTitleText": "搜索列表"
} }
}, { }, {
"path": "pages/goods/goodsClassify", "path": "pages/goods/goodsClassify",
"name": "goodsClassify", "name": "goodsClassify",
"style": { "style": {
@@ -111,19 +111,19 @@
"auth": true, "auth": true,
"style": { "style": {
"navigationBarTitleText": "节点中心", "navigationBarTitleText": "节点中心",
"navigationStyle":"custom", "navigationStyle": "custom",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"type": "transparent", "type": "transparent",
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)", "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)",
"buttons": [{ "buttons": [{
"text": "\ue601", "text": "\ue601",
"fontSrc":"/static/iconfont.ttf", "fontSrc": "/static/iconfont.ttf",
"background": "rgba(0,0,0,0)" "background": "rgba(0,0,0,0)"
},{ }, {
"text": "\ue602", "text": "\ue602",
"fontSrc":"/static/iconfont.ttf", "fontSrc": "/static/iconfont.ttf",
"background": "rgba(0,0,0,0)" "background": "rgba(0,0,0,0)"
}] }]
} }
@@ -136,7 +136,7 @@
"style": { "style": {
"navigationBarTitleText": "我的权证", "navigationBarTitleText": "我的权证",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -149,7 +149,7 @@
"style": { "style": {
"navigationBarTitleText": "权证详情", "navigationBarTitleText": "权证详情",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -162,7 +162,7 @@
"style": { "style": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "已使用服务类订单", "navigationBarTitleText": "已使用服务类订单",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -175,7 +175,7 @@
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarTitleText": "订单详情", "navigationBarTitleText": "订单详情",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -188,31 +188,31 @@
"style": { "style": {
"navigationBarTitleText": "已经提货", "navigationBarTitleText": "已经提货",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
} }
} }
},{ }, {
"path": "pages/user/order/mallShipmentsRefund", "path": "pages/user/order/mallShipmentsRefund",
"name": "mallShipmentsRefund", "name": "mallShipmentsRefund",
"style": { "style": {
"navigationBarTitleText": "退货申请", "navigationBarTitleText": "退货申请",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
} }
} }
},{ }, {
"path": "pages/user/order/mallRefundsInfo", "path": "pages/user/order/mallRefundsInfo",
"name": "MallRefundsInfo", "name": "MallRefundsInfo",
"style": { "style": {
"navigationBarTitleText": "退货申请", "navigationBarTitleText": "退货申请",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -224,7 +224,7 @@
"style": { "style": {
"navigationBarTitleText": "查看物流", "navigationBarTitleText": "查看物流",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -236,7 +236,7 @@
"style": { "style": {
"navigationBarTitleText": "提货单详情页面", "navigationBarTitleText": "提货单详情页面",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -249,7 +249,7 @@
"style": { "style": {
"navigationBarTitleText": "地址管理", "navigationBarTitleText": "地址管理",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -261,7 +261,7 @@
"style": { "style": {
"navigationBarTitleText": "地址新增", "navigationBarTitleText": "地址新增",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -309,15 +309,15 @@
"style": { "style": {
"navigationBarTitleText": "开通节点", "navigationBarTitleText": "开通节点",
"navigationBarBackgroundColor": "#774ffd", "navigationBarBackgroundColor": "#774ffd",
"navigationBarTextStyle":"white" "navigationBarTextStyle": "white"
} }
}, { }, {
"path": "pages/vip/agree", "path": "pages/vip/agree",
"name": "vipAgree", "name": "vipAgree",
"style": { "style": {
"navigationBarTitleText": "用户协议", "navigationBarTitleText": "用户协议",
"navigationBarTextStyle":"white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -341,13 +341,13 @@
"name": "goodsManagement", "name": "goodsManagement",
"style": { "style": {
"navigationBarTitleText": "商品权证管理", "navigationBarTitleText": "商品权证管理",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
"text": "发布", "text": "发布",
"width": "78px", "width": "78px",
"fontSize": "15px", "fontSize": "15px",
"color":"#8b64fd" "color": "#8b64fd"
}] }]
} }
} }
@@ -358,12 +358,12 @@
"style": { "style": {
"navigationBarTitleText": "发布权证类目" "navigationBarTitleText": "发布权证类目"
} }
},{ }, {
"path": "pages/goods/details", "path": "pages/goods/details",
"name": "goodsDetails", "name": "goodsDetails",
"style": { "style": {
"navigationBarTitleText": "权证详情", "navigationBarTitleText": "权证详情",
"navigationBarTextStyle":"white", "navigationBarTextStyle": "white",
"titleNView": { "titleNView": {
"backgroundColor": "#7c52fc", "backgroundColor": "#7c52fc",
"type": "transparent", "type": "transparent",
@@ -391,13 +391,13 @@
"name": "couponsManagement", "name": "couponsManagement",
"style": { "style": {
"navigationBarTitleText": "优惠券管理", "navigationBarTitleText": "优惠券管理",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
"text": "创建", "text": "创建",
"width": "78px", "width": "78px",
"fontSize": "15px", "fontSize": "15px",
"color":"#8b64fd" "color": "#8b64fd"
}] }]
} }
} }
@@ -407,13 +407,13 @@
"name": "couponsAdd", "name": "couponsAdd",
"style": { "style": {
"navigationBarTitleText": "创建优惠券", "navigationBarTitleText": "创建优惠券",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
"text": "发布", "text": "发布",
"width": "78px", "width": "78px",
"fontSize": "15px", "fontSize": "15px",
"color":"#8b64fd" "color": "#8b64fd"
}] }]
} }
} }
@@ -493,16 +493,16 @@
"navigationBarTitleText": "通证钱包", "navigationBarTitleText": "通证钱包",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor":"#976dff" "navigationBarBackgroundColor": "#976dff"
} }
}, { }, {
"path": "pages/wallet/redProperty", "path": "pages/wallet/redProperty",
"name": "walletRedProperty", "name": "walletRedProperty",
"style": { "style": {
"navigationBarTitleText": "现金红包", "navigationBarTitleText": "现金红包",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor":"#976dff" "navigationBarBackgroundColor": "#976dff"
} }
}, },
{ {
@@ -512,7 +512,7 @@
"navigationBarTitleText": "提现通证", "navigationBarTitleText": "提现通证",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor":"#976dff" "navigationBarBackgroundColor": "#976dff"
} }
}, },
{ {
@@ -522,7 +522,7 @@
"navigationBarTitleText": "提现红包", "navigationBarTitleText": "提现红包",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"navigationBarBackgroundColor":"#976dff" "navigationBarBackgroundColor": "#976dff"
} }
}, { }, {
"path": "pages/verification/index", "path": "pages/verification/index",
@@ -530,8 +530,8 @@
"auth": true, "auth": true,
"style": { "style": {
"navigationBarTitleText": "扫码核销", "navigationBarTitleText": "扫码核销",
"navigationBarTextStyle":"white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -543,8 +543,8 @@
"auth": true, "auth": true,
"style": { "style": {
"navigationBarTitleText": "核销记录", "navigationBarTitleText": "核销记录",
"navigationBarTextStyle":"white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -556,13 +556,13 @@
"auth": true, "auth": true,
"style": { "style": {
"navigationBarTitleText": "门店管理", "navigationBarTitleText": "门店管理",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
"text": "添加", "text": "添加",
"width": "78px", "width": "78px",
"fontSize": "15px", "fontSize": "15px",
"color":"#8b64fd" "color": "#8b64fd"
}] }]
} }
} }
@@ -580,13 +580,13 @@
"auth": true, "auth": true,
"style": { "style": {
"navigationBarTitleText": "员工管理", "navigationBarTitleText": "员工管理",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
"text": "添加", "text": "添加",
"width": "78px", "width": "78px",
"fontSize": "15px", "fontSize": "15px",
"color":"#8b64fd" "color": "#8b64fd"
}] }]
} }
} }
@@ -597,13 +597,13 @@
"auth": true, "auth": true,
"style": { "style": {
"navigationBarTitleText": "添加员工", "navigationBarTitleText": "添加员工",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
"text": "保存", "text": "保存",
"width": "78px", "width": "78px",
"fontSize": "15px", "fontSize": "15px",
"color":"#8b64fd" "color": "#8b64fd"
}] }]
} }
} }
@@ -621,13 +621,13 @@
"auth": true, "auth": true,
"style": { "style": {
"navigationBarTitleText": "基础信息", "navigationBarTitleText": "基础信息",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"buttons": [{ "buttons": [{
"text": "保存", "text": "保存",
"width": "78px", "width": "78px",
"fontSize": "15px", "fontSize": "15px",
"color":"#8b64fd" "color": "#8b64fd"
}] }]
} }
} }
@@ -639,7 +639,7 @@
"navigationBarTitleText": "贡献值记录", "navigationBarTitleText": "贡献值记录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -652,7 +652,7 @@
"navigationBarTitleText": "添加银行卡", "navigationBarTitleText": "添加银行卡",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -665,7 +665,7 @@
"navigationBarTitleText": "银行卡列表", "navigationBarTitleText": "银行卡列表",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -678,7 +678,7 @@
"navigationBarTitleText": "红包提现记录", "navigationBarTitleText": "红包提现记录",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",
"app-plus":{ "app-plus": {
"titleNView": { "titleNView": {
"backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)" "backgroundImage": "linear-gradient(to right, #7c52fc, #976dff)"
} }
@@ -710,52 +710,52 @@
}] }]
} }
} }
},{ }, {
"path": "pages/market/logs", "path": "pages/market/logs",
"name": "marketLogs", "name": "marketLogs",
"style": { "style": {
"navigationBarTitleText": "成交历史", "navigationBarTitleText": "成交历史",
"navigationBarBackgroundColor":"#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
},{ }, {
"path" : "pages/market/details", "path": "pages/market/details",
"name" : "marketDetails", "name": "marketDetails",
"style" : { "style": {
"navigationBarTitleText": "转让详情" "navigationBarTitleText": "转让详情"
} }
},{ }, {
"path" : "pages/market/goods", "path": "pages/market/goods",
"name" : "marketGoods", "name": "marketGoods",
"style": { "style": {
"navigationBarTitleText": "锚定商品", "navigationBarTitleText": "锚定商品",
"titleNView": { "titleNView": {
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"type": "transparent" "type": "transparent"
} }
} }
},{ }, {
"path" : "pages/market/transfer", "path": "pages/market/transfer",
"name" : "marketTransfer", "name": "marketTransfer",
"style": { "style": {
"navigationBarTitleText": "转让权证", "navigationBarTitleText": "转让权证",
"backgroundColor": "#FFFFFF" "backgroundColor": "#FFFFFF"
} }
},{ }, {
"path" : "pages/market/management", "path": "pages/market/management",
"name" : "marketManag", "name": "marketManag",
"style": { "style": {
"navigationBarTitleText": "权证转让管理", "navigationBarTitleText": "权证转让管理",
"titleNView": { "titleNView": {
"backgroundColor": "#FFFFFF", "backgroundColor": "#FFFFFF",
"buttons": [{ "buttons": [{
"text": "转让记录", "text": "转让记录",
"fontSize": "14", "fontSize": "14",
"width": "80", "width": "80",
"color": "#774ffd" "color": "#774ffd"
}] }]
} }
} }
},{ }, {
"path": "pages/store/return", "path": "pages/store/return",
"name": "Return", "name": "Return",
"style": { "style": {
@@ -804,12 +804,19 @@
"navigationBarTitleText": "订单审核", "navigationBarTitleText": "订单审核",
"navigationBarBackgroundColor": "#FFFFFF" "navigationBarBackgroundColor": "#FFFFFF"
} }
}, {
"path": "pages/queue/queue",
"style": {
"navigationBarTitleText": "队列",
"enablePullDownRefresh": false
}
} }
], ],
"globalStyle": { "globalStyle": {
"backgroundColor": "#F5F5F5", "backgroundColor": "#F5F5F5",
"navigationBarBackgroundColor":"#FFFFFF", "navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle":"black" "navigationBarTextStyle": "black"
}, },
"tabBar": { "tabBar": {
"borderStyle": "white", "borderStyle": "white",
@@ -828,12 +835,12 @@
"iconPath": "static/tabBar/tabBar_icon_01.png", "iconPath": "static/tabBar/tabBar_icon_01.png",
"selectedIconPath": "static/tabBar/tabBar_show_01.png", "selectedIconPath": "static/tabBar/tabBar_show_01.png",
"pagePath": "pages/found/index" "pagePath": "pages/found/index"
},{ }, {
"text": "通证商城", "text": "通证商城",
"iconPath": "static/tabBar/tabBar_icon_03.png", "iconPath": "static/tabBar/tabBar_icon_03.png",
"selectedIconPath": "static/tabBar/tabBar_show_03.png", "selectedIconPath": "static/tabBar/tabBar_show_03.png",
"pagePath": "pages/equity/index" "pagePath": "pages/equity/index"
},{ }, {
"text": "转让市场", "text": "转让市场",
"iconPath": "static/tabBar/tabBar_icon_04.png", "iconPath": "static/tabBar/tabBar_icon_04.png",
"selectedIconPath": "static/tabBar/tabBar_show_04.png", "selectedIconPath": "static/tabBar/tabBar_show_04.png",

View File

@@ -21,8 +21,7 @@
</view> </view>
<block v-if="isAuth"> <block v-if="isAuth">
<view class="ore-lists"> <view class="ore-lists">
<view class="oct-float ore-item" v-for="(item, index) in crystalArr" :key="index" <view class="oct-float ore-item" v-for="(item, index) in crystalArr" :key="index" :style="{left: item.left + '%', top: item.top + '%'}" @click="ledCrystal(index)">
:style="{left: item.left + '%', top: item.top + '%'}" @click="ledCrystal(index)">
<block v-if="item.amount !== null"> <block v-if="item.amount !== null">
<view class="oct-icon"> <view class="oct-icon">
<image src="@/static/icons/crystal-icon.png" mode="widthFix" class="icon" /> <image src="@/static/icons/crystal-icon.png" mode="widthFix" class="icon" />
@@ -37,6 +36,13 @@
<view class="text">发权证<uni-icons type="arrowright" color="#FFFFFF" size="12"></uni-icons> <view class="text">发权证<uni-icons type="arrowright" color="#FFFFFF" size="12"></uni-icons>
</view> </view>
</view> </view>
<view class="oct-float ore-item-key" @click="getAllThawall" v-if="crystalArr.length > 1">
<view class="oct-icon">
<image src="@/static/icons/crystals-icon.png" mode="widthFix" class="icon" />
</view>
<view class="text">一键领取<uni-icons type="arrowright" color="#FFFFFF" size="12"></uni-icons>
</view>
</view>
</view> </view>
</block> </block>
<block v-else> <block v-else>
@@ -121,41 +127,38 @@
</template> </template>
<script> <script>
import { import { chain, crystals, thawlog, crystalsBefore, allThawall } from '@/apis/interfaces/chain'
chain,
crystals,
thawlog
} from '@/apis/interfaces/chain'
import F2 from '@/uni_modules/lime-f2/components/lime-f2/f2.min.js' import F2 from '@/uni_modules/lime-f2/components/lime-f2/f2.min.js'
import lF2 from '@/uni_modules/lime-f2/components/lime-f2/' import lF2 from '@/uni_modules/lime-f2/components/lime-f2/'
import Queue from '@/public/queue'
let queue = new Queue()
export default { export default {
components: { components: { lF2 },
lF2
},
data() { data() {
return { return {
isAuth: false, isAuth: false,
chains: { // 区块链统计 chains: { // 区块链统计
balance: 0, balance : 0,
height: 0, height : 0,
number: 0, number : 0,
score: 0, score : 0,
up: 0, up : 0,
stone: 0 stone : 0
}, },
account: { // 账户 account: { // 账户
coin: 0, coin : 0,
crystal: 0 crystal : 0
}, },
crystalArr: [], // 待领取 crystalArr : [], // 待领取
allIds: [], // 可领取ids categoryArr : [], // 推荐列表
categoryArr: [], // 推荐列表 help : {}, // 帮助信息
help: {}, // 帮助信息 userAuth : { // 用户认证状态
userAuth: { // 用户认证状态
certification: false, certification: false,
company: false, company : false,
vip: false vip : false
} },
// 领取贡献值队列
queueState : false
}; };
}, },
onShow() { onShow() {
@@ -229,35 +232,98 @@
}, },
// 领取贡献值 // 领取贡献值
ledCrystal(index) { ledCrystal(index) {
// 播放音频 this.playAudio()
// 领取提示信息
uni.showToast({
image: require('@/static/icons/crystal-icon.png'),
title: '+' + this.crystalArr[index].amount,
duration: 2000
})
// 处理领取队列
queue.enqueue(this.crystalArr[index].log_id)
if(!this.queueState){
let queueTime
this.queueState = true
this.startQueue(queueTime)
}
// 移出贡献值数据
this.crystalArr.splice(index, 1)
},
// 领取贡献值队列
startQueue(outTime){
outTime = setInterval(() => {
if(queue.isNull()){
clearInterval(outTime)
this.queueState = false
this.getCrystalsBefore()
return
}
queue.front().then(val => {
thawlog({
thaw_id: val,
}).then(res => {
this.$set(this.account, 'crystal', res.crystal)
}).catch(err => {
uni.showToast({
icon: 'none',
title: err.message
})
})
})
queue.dequeue()
}, 500)
},
// 批量领取贡献值
getAllThawall(){
let ids = []
let amounts = 0
ids = this.crystalArr.map(val => {
amounts += Number(val.amount)
return val.log_id
})
allThawall({
all_ids: ids
}).then(res => {
this.playAudio()
// 领取提示信息
uni.showToast({
image: require('@/static/icons/crystals-icon.png'),
title: '+' + amounts.toFixed(2),
duration: 2000
})
this.crystalArr = []
this.$set(this.account, 'crystal', res.crystal)
this.getCrystalsBefore()
}).catch(err => {
uni.showToast({
icon : 'none',
title: err.message
})
})
},
// 刷新贡献值
getCrystalsBefore(){
if(this.crystalArr.length <= 0){
crystalsBefore().then(res => {
this.crystalArr = res.crystal_array
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
}
},
// 播放领取提示信息
playAudio(){
const innerAudioContext = uni.createInnerAudioContext(); const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true; innerAudioContext.autoplay = true;
innerAudioContext.src = require('@/static/mp3/crystal.mp3'); innerAudioContext.src = require('@/static/mp3/crystal.mp3');
// 请求接口
thawlog({
thaw_id: this.crystalArr[index].log_id,
all_ids: this.allIds
}).then(res => {
uni.showToast({
image: require('@/static/icons/crystal-icon.png'),
title: '+' + this.crystalArr[index].amount,
duration: 2000
})
this.$set(this.account, 'crystal', res.crystal)
this.ids = res.all_ids
if (JSON.stringify(res.last) === '[]') {
this.$set(this.crystalArr, index, {
amount: null
})
return
}
this.$set(this.crystalArr, index, res.last)
}).catch(err => {
uni.showToast({
icon: 'none',
title: err
})
})
}, },
// occ信息 // occ信息
getIndex() { getIndex() {
@@ -632,6 +698,12 @@
top: 12%; top: 12%;
} }
.ore-item-key{
@extend .oct-float-item;
left: $margin;
top: 20%;
}
.ore-item { .ore-item {
@extend .oct-float-item; @extend .oct-float-item;
} }

64
pages/queue/queue.vue Normal file
View File

@@ -0,0 +1,64 @@
<template>
<view>
<view class="item" v-for="(item, index) in items" :key="index" @click="onEnqueue(item)">{{item}}入列</view>
</view>
</template>
<script>
import Queue from '@/public/queue'
let queue = new Queue()
export default {
data() {
return {
items: [0,1,2,3,4,5,6,7,8,9],
start: false
};
},
created() {
},
methods:{
onEnqueue(e){
let startTime
queue.enqueue(e)
if(!this.start){
this.start = true
this.startQueue(queue, startTime)
}
},
startQueue(outTime){
outTime = setInterval(() => {
if(queue.isNull()){
clearInterval(outTime)
this.start = false
return
}
queue.front().then(val => {
console.log(val)
// 此处处理对接接口请求
})
queue.dequeue()
}, 1000)
}
}
}
</script>
<style lang="scss">
.item{
margin: $margin;
background: white;
text-align: center;
color: $mian-color;
line-height: 90rpx;
font-weight: bold;
}
.button{
background: white;
margin: $margin;
height: 90rpx;
line-height: 90rpx;
text-align: center;
}
</style>

27
public/queue.ts Normal file
View File

@@ -0,0 +1,27 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 处理队列
*/
export default class Queue {
constructor(arg: Array) {
this.arrData = arg || []
}
enqueue(el) {
this.arrData.push(el)
}
dequeue(el) {
return this.arrData.shift()
}
front() {
return new Promise((resolve, reject) => {
resolve(this.arrData[0])
})
}
isNull() {
return this.arrData.length === 0
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

0
tsconfig.json Normal file
View File

File diff suppressed because one or more lines are too long