1 Star 0 Fork 1

小沈曰/OA仿钉钉考勤H5

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
main.js 942 Bytes
Copy Edit Raw Blame History
耿守卫 authored 2023-03-06 11:48 . 初始化提交
import App from './App'
import vant from 'vant'
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'
try {
function isPromise(obj) {
return (
!!obj &&
(typeof obj === "object" || typeof obj === "function") &&
typeof obj.then === "function"
);
}
// 统一 vue2 API Promise 化返回格式与 vue3 保持一致
uni.addInterceptor({
returnValue(res) {
if (!isPromise(res)) {
return res;
}
return new Promise((resolve, reject) => {
res.then((res) => {
if (res[0]) {
reject(res[0]);
} else {
resolve(res[1]);
}
});
});
},
});
} catch (error) { }
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
const app = createSSRApp(App).use(vant)
return {
app
}
}
// #endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/szlsay/dingtalk-attend.git
git@gitee.com:szlsay/dingtalk-attend.git
szlsay
dingtalk-attend
OA仿钉钉考勤H5
master

Search

23e8dbc6 1850385 7e0993f3 1850385