uni-oaview 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div>我真的是服了 现在已经风湿了{{ a }}</div>
2
+ <div>我真的是服了 现在已经风湿了,防守打法打算我现在正在看电视{{ a }}</div>
3
3
  </template>
4
4
 
5
5
  <script lang="ts" setup>
@@ -20,7 +20,11 @@
20
20
  import { ref, reactive } from 'vue';
21
21
  const formRef = ref();
22
22
  const props = defineProps({
23
- password: String,
23
+ password: {
24
+ type: String,
25
+ default:
26
+ 'f0d5937ddef983a4fbf56eec5c84ab78e7402fd6b55b8b7271f75f676b57bae1afe09a476702f414c12b5259899db3790ab1d8915827f2f956f48c8ab4af7541',
27
+ },
24
28
  });
25
29
  const emit = defineEmits(['loginSuccess']);
26
30
  const formData = reactive({
@@ -54,7 +58,7 @@
54
58
  url: `${baseUrl}/api/auth/verification/get?t=${Date.now()}`,
55
59
  method: 'POST',
56
60
  success: (res: any) => {
57
- const { pid, image } = res.data.data;
61
+ const { pid, image } = res?.data?.data || {};
58
62
  imageSrc.value = image;
59
63
  ppid.value = pid;
60
64
  },
@@ -78,7 +82,7 @@
78
82
  },
79
83
  },
80
84
  success: (res: any) => {
81
- const { uuid: id, email, ...otherParams } = res.data.data;
85
+ const { uuid: id, email, ...otherParams } = res?.data?.data;
82
86
  const userInfo = {
83
87
  id,
84
88
  email,
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <image v-if="isShow" :src="imgSrc" class="img-box" @error="handleImgError" />
3
+ <image v-else :src="imgs" class="img-box" />
4
+ </template>
5
+
6
+ <script lang="ts" setup>
7
+ import { computed, ref } from 'vue';
8
+ import imgs from '../../imgs/user-default.svg';
9
+
10
+ const props = defineProps({
11
+ username: {
12
+ type: String,
13
+ default: uni.getStorageSync('userInfo')?.username,
14
+ },
15
+ });
16
+ const isShow = ref(true);
17
+ const baseUrl = uni.getStorageSync('baseUrl');
18
+ const imgSrc = computed(() => {
19
+ return `${baseUrl === '' ? 'http://192.168.10.11:8065' : baseUrl}/api/v4/users/image/notrust?id=${props.username}`;
20
+ });
21
+ const handleImgError = () => {
22
+ isShow.value = false;
23
+ };
24
+ </script>
25
+ <style scoped lang="scss">
26
+ .img-box {
27
+ width: 100%;
28
+ height: 100%;
29
+ display: block;
30
+ }
31
+ </style>
@@ -35,7 +35,7 @@
35
35
  @touchstart="start"
36
36
  @touchmove="move"
37
37
  >
38
- <image style="width: 40rpx; height: 40rpx" src="@/static/icon/debug.svg" />
38
+ <image style="width: 40rpx; height: 40rpx" src="../../imgs/debug.svg" />
39
39
  </view>
40
40
  </template>
41
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uni-oaview",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "uniapp小程序组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "typings": "dist/index.d.ts",
@@ -36,9 +36,20 @@
36
36
  "rollup-plugin-terser": "^7.0.2",
37
37
  "rollup-plugin-typescript2": "^0.27.2",
38
38
  "rollup-plugin-vue": "^6.0.0",
39
- "typescript": "^4.0.2"
39
+ "typescript": "^4.0.2",
40
+ "uniapp-log-sdk": "^1.1.1",
41
+ "uview-plus": "^3.1.30",
42
+ "@vueuse/core": "^9.12.0",
43
+ "clipboard": "^2.0.11",
44
+ "dayjs": "1.11.7",
45
+ "@dcloudio/uni-ui": "^1.4.26"
40
46
  },
41
47
  "peerDependencies": {
42
- "uniapp-log-sdk": "^1.1.1"
48
+ "uniapp-log-sdk": "^1.1.1",
49
+ "uview-plus": "^3.1.30",
50
+ "@vueuse/core": "^9.12.0",
51
+ "clipboard": "^2.0.11",
52
+ "dayjs": "1.11.7",
53
+ "@dcloudio/uni-ui": "^1.4.26"
43
54
  }
44
55
  }
@@ -1,9 +0,0 @@
1
- <template>
2
- <div ></div>
3
- </template>
4
-
5
- <script lang='ts' setup>
6
-
7
- </script>
8
- <style scoped lang='scss'>
9
- </style>