12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <script>
- import { conn } from "./utils/WebIM";
- import { initEid } from "./mp_ecard_sdk/main";
- export default {
- onLaunch: function () {
- initEid();
-
- setTimeout(() => {
- if (uni.getStorageSync("token")) {
- this.HXlogin();
-
- } else {
-
-
-
-
-
- }
- }, 800);
- },
- onShow: function () {
-
- },
- onHide: function () {
-
- },
- methods: {
- HXlogin() {
-
- if (uni.getStorageSync("user_no") && uni.getStorageSync("pwd")) {
- var user_no = uni.getStorageSync("user_no");
- var pwd = uni.getStorageSync("pwd");
- conn
- .open({
- user: user_no,
- pwd: pwd,
- appKey: conn.appkey,
- })
- .then(() => {
- console.log("res");
- })
- .catch((reason) => {
- console.log("失败", reason);
- });
- }
- },
- },
- };
- </script>
- <style lang="scss">
- page {
- background-color: #f4f4f4;
- }
- .uni-bar {
- background-color: #f4f4f4;
- }
- @import "@/uview-ui/index.scss";
- </style>
|