-
BINsrc/assets/img/wealth/bg.png
-
BINsrc/assets/img/wealth/button.png
-
BINsrc/assets/img/wealth/gai.png
-
BINsrc/assets/img/wealth/history.png
-
BINsrc/assets/img/wealth/home.png
-
BINsrc/assets/img/wealth/rule.png
-
BINsrc/assets/img/wealth/tanchuang.png
-
BINsrc/assets/img/wealth/text.png
-
BINsrc/assets/img/wealth/wheel.png
-
BINsrc/assets/img/wealth/zhizhen.png
-
66src/utils/common.js
-
79src/views/wealth/goldenWheel.vue
Before Width: 375 | Height: 812 | Size: 260 KiB |
Before Width: 240 | Height: 94 | Size: 24 KiB |
Before Width: 120 | Height: 123 | Size: 29 KiB |
Before Width: 25 | Height: 25 | Size: 1.2 KiB |
Before Width: 23 | Height: 25 | Size: 1.2 KiB |
Before Width: 25 | Height: 25 | Size: 1.1 KiB |
Before Width: 104 | Height: 22 | Size: 406 B |
Before Width: 328 | Height: 144 | Size: 59 KiB |
Before Width: 333 | Height: 334 | Size: 126 KiB |
Before Width: 45 | Height: 89 | Size: 4.9 KiB |
@ -0,0 +1,66 @@ |
|||
// 封装与app之间的通信
|
|||
var api = {} |
|||
|
|||
|
|||
api.packageFun = function (funName, fun = function () { }, data = {}) { |
|||
var JWrandom = this.fullClose(10000, 99999) |
|||
data.JWrandom = JWrandom |
|||
try { |
|||
if (data.platform == 2) { // app apicloud
|
|||
window.api.sendEvent({ |
|||
name: funName, |
|||
extra: { |
|||
data: data |
|||
} |
|||
}) |
|||
} else if (data.platform == 3) { // ios
|
|||
let params = { |
|||
name: funName, |
|||
extra: { |
|||
data: data |
|||
} |
|||
} |
|||
window.webkit.messageHandlers.getTouJiaoData.postMessage(JSON.stringify(params)) |
|||
} else if (data.platform == 4) { // 安卓
|
|||
let params = { |
|||
name: funName, |
|||
extra: { |
|||
data: data |
|||
} |
|||
} |
|||
window.android.getTouJiaoData(JSON.stringify(params)) |
|||
} else if (data.platform == 5) { // uniapp
|
|||
let params = { |
|||
name: funName, |
|||
extra: { |
|||
data: data |
|||
} |
|||
} |
|||
window.uni.postMessage({ |
|||
data: { |
|||
val: JSON.stringify(params) |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
catch (e) { |
|||
console.log(e) |
|||
} |
|||
|
|||
window[funName + JWrandom] = fun |
|||
try { |
|||
window.parent[funName + JWrandom] = fun |
|||
} catch (error) { |
|||
|
|||
} |
|||
} |
|||
|
|||
//获取随机数
|
|||
api.fullClose = function (n, m) { |
|||
var result = Math.random() * (m + 1 - n) + n; |
|||
while (result > m) { |
|||
result = Math.random() * (m + 1 - n) + n; |
|||
} |
|||
return parseInt(result); |
|||
} |
|||
export default api |