|
@@ -6,6 +6,8 @@ import {
|
|
|
} from "./common.js"
|
|
|
import store from '@/store/index.js'
|
|
|
|
|
|
+import md5 from "md5"
|
|
|
+
|
|
|
export function webViewHref(url, pam = {}) {
|
|
|
|
|
|
var defaultPam = {
|
|
@@ -103,4 +105,47 @@ export const navToPage = (function() {
|
|
|
})
|
|
|
// #endif
|
|
|
}
|
|
|
-})()
|
|
|
+})()
|
|
|
+
|
|
|
+// export const crossPage = (function() {
|
|
|
+// var funs = {}
|
|
|
+// var funco = {
|
|
|
+// $emit(name, data) {
|
|
|
+// if (funs[name]) {
|
|
|
+// Object.keys(funs[name]).map(key => {
|
|
|
+// funs[name][key](data)
|
|
|
+// })
|
|
|
+// }
|
|
|
+// uni.setStorageSync(name, data);
|
|
|
+// },
|
|
|
+
|
|
|
+// $on(name, fun) {
|
|
|
+// if (!funs[name]) {
|
|
|
+// funs[name] = {}
|
|
|
+// }
|
|
|
+// funs[name][md5(fun.toString())] = fun
|
|
|
+// },
|
|
|
+
|
|
|
+// $off(name, fun) {
|
|
|
+// var skey = md5(fun.toString())
|
|
|
+// if (funs[name] && funs[name][skey]) {
|
|
|
+// delete funs[name][skey]
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// (function tiemID(){
|
|
|
+// Object.keys(funs).map(name=>{
|
|
|
+// var data = uni.getStorageSync(name);
|
|
|
+// if (funs[name]) {
|
|
|
+// Object.keys(funs[name]).map(key => {
|
|
|
+// funs[name][key](data)
|
|
|
+// })
|
|
|
+// }
|
|
|
+// })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+// setTimeout(tiemID,300)
|
|
|
+// })()
|
|
|
+// return funco
|
|
|
+// })()
|