...
|
...
|
@@ -3,12 +3,8 @@ |
3
|
3
|
<!-- 公共组件-每个页面必须引入 -->
|
4
|
4
|
<public-module></public-module>
|
5
|
5
|
<view @click="upAvatar" class="u-flex set-main">
|
6
|
|
- <view class="main-image">
|
7
|
|
- <image class="image" :src="avatar || '../../static/logo.png'"></image>
|
8
|
|
- </view>
|
9
|
|
- <view class="main-right-image">
|
10
|
|
- <image class="image" src="../../static/arrow-right.png"></image>
|
11
|
|
- </view>
|
|
6
|
+ <view class="main-image"><image class="image" :src="avatar || '../../static/logo.png'"></image></view>
|
|
7
|
+ <view class="main-right-image"><image class="image" src="../../static/arrow-right.png"></image></view>
|
12
|
8
|
</view>
|
13
|
9
|
<view class="u-m-t-20 basic-text"><text class="text">基本资料</text></view>
|
14
|
10
|
<view class="basic-main">
|
...
|
...
|
@@ -20,35 +16,48 @@ |
20
|
16
|
<u--input placeholder="请输入手机号码" v-model="myInfoModel.phoneNumber" border="none"></u--input>
|
21
|
17
|
</u-form-item>
|
22
|
18
|
<u-form-item labelWidth="80px" label="用户账号" prop="username" borderBottom ref="item1">
|
23
|
|
- <u--input disabled placeholder="请输入用户账号 " v-model="myInfoModel.username" border="none">
|
24
|
|
- </u--input>
|
|
19
|
+ <u--input disabled placeholder="请输入用户账号 " v-model="myInfoModel.username" border="none"></u--input>
|
25
|
20
|
</u-form-item>
|
26
|
21
|
<u-form-item labelWidth="80px" label="邮箱地址" prop="email" borderBottom ref="item1">
|
27
|
22
|
<u--input placeholder="请输入邮箱地址" v-model="myInfoModel.email" border="none"></u--input>
|
28
|
23
|
</u-form-item>
|
29
|
|
- <u-form-item @click="
|
|
24
|
+ <u-form-item
|
|
25
|
+ @click="
|
30
|
26
|
showDate = true;
|
31
|
27
|
hideKeyboard();
|
32
|
|
- " labelWidth="80px" label="有效期" prop="accountExpireTime" ref="item1">
|
33
|
|
- <u--input v-model="myInfoModel.accountExpireTime" placeholder="请选择有效期" border="none">
|
34
|
|
- </u--input>
|
35
|
|
- <u-datetime-picker :formatter="formatter" :show="showDate" :value="datetime" mode="dateTime"
|
36
|
|
- closeOnClickOverlay @confirm="dateConfirm" @cancel="dateClose" @close="dateClose">
|
37
|
|
- </u-datetime-picker>
|
|
28
|
+ "
|
|
29
|
+ labelWidth="80px"
|
|
30
|
+ label="有效期"
|
|
31
|
+ prop="accountExpireTime"
|
|
32
|
+ ref="item1"
|
|
33
|
+ >
|
|
34
|
+ <u--input v-model="myInfoModel.accountExpireTime" placeholder="请选择有效期" border="none"></u--input>
|
|
35
|
+ <u-datetime-picker
|
|
36
|
+ :formatter="formatter"
|
|
37
|
+ :show="showDate"
|
|
38
|
+ :value="datetime"
|
|
39
|
+ mode="dateTime"
|
|
40
|
+ closeOnClickOverlay
|
|
41
|
+ @confirm="dateConfirm"
|
|
42
|
+ @cancel="dateClose"
|
|
43
|
+ @close="dateClose"
|
|
44
|
+ ></u-datetime-picker>
|
38
|
45
|
</u-form-item>
|
39
|
46
|
</u--form>
|
40
|
47
|
</view>
|
41
|
48
|
<view class="basic-bottom u-flex">
|
42
|
49
|
<view class="item" v-if="info.data.isThirdLoginAndNoDind && isJudgeBindBtn">
|
43
|
|
- <button class="submit" size="default" @click="clearAccountFunc" :style="{ background: InfoColor }"><text
|
44
|
|
- class="un-bind-text">解绑</text></button>
|
|
50
|
+ <button class="submit" size="default" @click="clearAccountFunc" :style="{ background: InfoColor }"><text class="un-bind-text">解绑</text></button>
|
45
|
51
|
</view>
|
46
|
|
- <view class="item" style="margin-right: 60rpx;" :style="[
|
|
52
|
+ <view
|
|
53
|
+ class="item"
|
|
54
|
+ style="margin-right: 60rpx;"
|
|
55
|
+ :style="[
|
47
|
56
|
{ position: info.data.isThirdLoginAndNoDind && isJudgeBindBtn ? '' : 'relative' },
|
48
|
57
|
{ right: info.data.isThirdLoginAndNoDind && isJudgeBindBtn ? '' : '-190rpx' }
|
49
|
|
- ]">
|
50
|
|
- <button class="submit" size="default" @click="onSubmitFunc" :style="{ background: PrimaryColor }"><text
|
51
|
|
- class="un-bind-text">确认</text></button>
|
|
58
|
+ ]"
|
|
59
|
+ >
|
|
60
|
+ <button class="submit" size="default" @click="onSubmitFunc" :style="{ background: PrimaryColor }"><text class="un-bind-text">确认</text></button>
|
52
|
61
|
</view>
|
53
|
62
|
</view>
|
54
|
63
|
<!-- #ifdef MP -->
|
...
|
...
|
@@ -69,182 +78,182 @@ |
69
|
78
|
</template>
|
70
|
79
|
|
71
|
80
|
<script>
|
72
|
|
- import {
|
73
|
|
- mapMutations
|
74
|
|
- } from 'vuex';
|
75
|
|
- import baseUrl from '@/config/baseUrl.js';
|
76
|
|
- import {
|
77
|
|
- mapState
|
78
|
|
- } from 'vuex';
|
79
|
|
-
|
80
|
|
- export default {
|
81
|
|
-
|
82
|
|
- data() {
|
83
|
|
- return {
|
84
|
|
- showBind: false,
|
85
|
|
- PrimaryColor: '#377DFF', //主题色
|
86
|
|
- InfoColor: '#00C9A7', //主题色
|
87
|
|
- myInfoModel: {
|
88
|
|
-
|
89
|
|
- realName: '',
|
90
|
|
- phoneNumber: '',
|
91
|
|
- username: '',
|
92
|
|
- email: '',
|
93
|
|
- accountExpireTime: ''
|
94
|
|
-
|
95
|
|
- },
|
96
|
|
-
|
97
|
|
- rules: {
|
98
|
|
- phoneNumber: [{
|
99
|
|
- required: true,
|
100
|
|
- message: "请输入正确的手机号码",
|
101
|
|
- trigger: "change",
|
102
|
|
- }, {
|
103
|
|
- pattern: /^1[3-9][0-9]{9}$/,
|
104
|
|
- message: "请输入正确的手机号码"
|
105
|
|
- }
|
106
|
|
-
|
107
|
|
- ],
|
108
|
|
- email: [{
|
109
|
|
- required: true,
|
110
|
|
- message: "请输入正确的邮箱号",
|
111
|
|
- trigger: "change",
|
112
|
|
- }, {
|
113
|
|
- pattern: /^[0-9a-zA-Z]+@(([0-9a-zA-Z]+)[.])+[a-z]{3}$/,
|
114
|
|
- message: "请输入正确的邮箱号"
|
115
|
|
- }
|
|
81
|
+import { mapMutations } from 'vuex';
|
|
82
|
+import baseUrl from '@/config/baseUrl.js';
|
|
83
|
+import { mapState } from 'vuex';
|
116
|
84
|
|
117
|
|
- ],
|
|
85
|
+export default {
|
|
86
|
+ data() {
|
|
87
|
+ return {
|
|
88
|
+ showBind: false,
|
|
89
|
+ PrimaryColor: '#377DFF', //主题色
|
|
90
|
+ InfoColor: '#00C9A7', //主题色
|
|
91
|
+ myInfoModel: {
|
|
92
|
+ realName: '',
|
|
93
|
+ phoneNumber: '',
|
|
94
|
+ username: '',
|
|
95
|
+ email: '',
|
|
96
|
+ accountExpireTime: ''
|
|
97
|
+ },
|
118
|
98
|
|
119
|
|
- },
|
120
|
|
- showDate: false,
|
121
|
|
- dateTime: Number(new Date()),
|
122
|
|
- avatar: '',
|
123
|
|
- id: '',
|
124
|
|
- info: {},
|
125
|
|
- openIds: '',
|
126
|
|
- isUpdatePersonOrLoginInfo: false,
|
127
|
|
- isJudgeBindBtn: true
|
128
|
|
- };
|
129
|
|
- },
|
130
|
|
- onReady() {
|
131
|
|
- this.$refs.myForm.setRules(this.rules)
|
132
|
|
- },
|
133
|
|
- onLoad(e) {
|
134
|
|
- console.log(e);
|
135
|
|
- if (e.data !== null) {
|
136
|
|
- let params = JSON.parse(e.data);
|
137
|
|
- this.info = params;
|
138
|
|
- this.myInfoModel.realName = params.data.realName;
|
139
|
|
- this.myInfoModel.phoneNumber = params.data.phoneNumber;
|
140
|
|
- this.myInfoModel.username = params.data.username;
|
141
|
|
- this.myInfoModel.email = params.data.email;
|
142
|
|
- this.myInfoModel.accountExpireTime = params.data.accountExpireTime;
|
143
|
|
- this.avatar = params.data.avatar == undefined ? '../../static/logo.png' : params.data.avatar;
|
144
|
|
- this.id = params.data.userId;
|
145
|
|
- }
|
146
|
|
- },
|
147
|
|
- onShow() {
|
148
|
|
- let getOpenId = getApp().globalData.openId;
|
149
|
|
- if (getOpenId) {
|
150
|
|
- this.openIds = getOpenId;
|
151
|
|
- console.log('OPenid', this.openIds);
|
|
99
|
+ rules: {
|
|
100
|
+ phoneNumber: [
|
|
101
|
+ {
|
|
102
|
+ required: true,
|
|
103
|
+ message: '请输入正确的手机号码',
|
|
104
|
+ trigger: 'change'
|
|
105
|
+ },
|
|
106
|
+ {
|
|
107
|
+ pattern: /^1[3-9][0-9]{9}$/,
|
|
108
|
+ message: '请输入正确的手机号码'
|
|
109
|
+ }
|
|
110
|
+ ],
|
|
111
|
+ email: [
|
|
112
|
+ {
|
|
113
|
+ required: true,
|
|
114
|
+ message: '请输入正确的邮箱号',
|
|
115
|
+ trigger: 'change'
|
|
116
|
+ },
|
|
117
|
+ {
|
|
118
|
+ pattern: /^[0-9a-zA-Z]+@(([0-9a-zA-Z]+)[.])+[a-z]{3}$/,
|
|
119
|
+ message: '请输入正确的邮箱号'
|
|
120
|
+ }
|
|
121
|
+ ]
|
|
122
|
+ },
|
|
123
|
+ showDate: false,
|
|
124
|
+ dateTime: Number(new Date()),
|
|
125
|
+ avatar: '',
|
|
126
|
+ id: '',
|
|
127
|
+ info: {},
|
|
128
|
+ openIds: '',
|
|
129
|
+ isUpdatePersonOrLoginInfo: false,
|
|
130
|
+ isJudgeBindBtn: true
|
|
131
|
+ };
|
|
132
|
+ },
|
|
133
|
+ onReady() {
|
|
134
|
+ this.$refs.myForm.setRules(this.rules);
|
|
135
|
+ },
|
|
136
|
+ onLoad(e) {
|
|
137
|
+ console.log(e);
|
|
138
|
+ if (e.data !== null) {
|
|
139
|
+ let params = JSON.parse(e.data);
|
|
140
|
+ this.info = params;
|
|
141
|
+ this.myInfoModel.realName = params.data.realName;
|
|
142
|
+ this.myInfoModel.phoneNumber = params.data.phoneNumber;
|
|
143
|
+ this.myInfoModel.username = params.data.username;
|
|
144
|
+ this.myInfoModel.email = params.data.email;
|
|
145
|
+ this.myInfoModel.accountExpireTime = params.data.accountExpireTime;
|
|
146
|
+ this.avatar = params.data.avatar == undefined ? '../../static/logo.png' : params.data.avatar;
|
|
147
|
+ this.id = params.data.userId;
|
|
148
|
+ }
|
|
149
|
+ },
|
|
150
|
+ onShow() {
|
|
151
|
+ let getOpenId = getApp().globalData.openId;
|
|
152
|
+ if (getOpenId) {
|
|
153
|
+ this.openIds = getOpenId;
|
|
154
|
+ console.log('OPenid', this.openIds);
|
|
155
|
+ }
|
|
156
|
+ },
|
|
157
|
+ computed: {
|
|
158
|
+ ...mapState(['userInfo'])
|
|
159
|
+ },
|
|
160
|
+ methods: {
|
|
161
|
+ ...mapMutations(['setUserInfo', 'emptyUserInfo']),
|
|
162
|
+ confrimBind(e) {
|
|
163
|
+ if (e) {
|
|
164
|
+ //解绑
|
|
165
|
+ let httpData = {
|
|
166
|
+ appUserId: e.data?.userId,
|
|
167
|
+ thirdUserId: e.data?.thirdUserId == null ? this.openIds : e.data?.thirdUserId
|
|
168
|
+ };
|
|
169
|
+ uni.$u.http.delete('/yt/third', httpData).then(res => {
|
|
170
|
+ if (res) {
|
|
171
|
+ uni.showToast({
|
|
172
|
+ title: '解绑成功'
|
|
173
|
+ });
|
|
174
|
+ this.showBind = false;
|
|
175
|
+ this.isJudgeBindBtn = false;
|
|
176
|
+ uni.reLaunch({
|
|
177
|
+ url: '/publicLoginSubPage/public/login'
|
|
178
|
+ });
|
|
179
|
+ this.emptyUserInfo();
|
|
180
|
+ } else {
|
|
181
|
+ uni.showToast({
|
|
182
|
+ title: '解绑失败'
|
|
183
|
+ });
|
|
184
|
+ this.showBind = false;
|
|
185
|
+ }
|
|
186
|
+ });
|
152
|
187
|
}
|
153
|
188
|
},
|
154
|
|
- computed: {
|
155
|
|
- ...mapState(['userInfo'])
|
|
189
|
+ clearAccountFunc() {
|
|
190
|
+ this.showBind = true;
|
156
|
191
|
},
|
157
|
|
- methods: {
|
158
|
|
- ...mapMutations(['setUserInfo']),
|
159
|
|
- confrimBind(e) {
|
160
|
|
- if (e) {
|
161
|
|
- //解绑
|
162
|
|
- let httpData = {
|
163
|
|
- appUserId: e.data?.userId,
|
164
|
|
- thirdUserId: e.data?.thirdUserId == null ? this.openIds : e.data?.thirdUserId
|
165
|
|
- };
|
166
|
|
- uni.$u.http.delete('/yt/third', httpData).then(res => {
|
167
|
|
- if (res) {
|
168
|
|
- uni.showToast({
|
169
|
|
- title: '解绑成功'
|
170
|
|
- });
|
171
|
|
- this.showBind = false;
|
172
|
|
- this.isJudgeBindBtn = false;
|
173
|
|
- } else {
|
174
|
|
- uni.showToast({
|
175
|
|
- title: '解绑失败'
|
176
|
|
- });
|
177
|
|
- this.showBind = false;
|
|
192
|
+ // 修改头像
|
|
193
|
+ async upAvatar() {
|
|
194
|
+ let token;
|
|
195
|
+ token = this.userInfo.isToken || uni.getStorageSync('userInfo').isToken || undefined;
|
|
196
|
+ // #ifdef H5
|
|
197
|
+ token = window.sessionStorage.getItem('userInfo').isToken;
|
|
198
|
+ // #endif
|
|
199
|
+ if (!token) return uni.$u.toast('请登录后上传图片');
|
|
200
|
+ uni.chooseImage({
|
|
201
|
+ count: 1,
|
|
202
|
+ sourceType: ['camera', 'album'],
|
|
203
|
+ success: res => {
|
|
204
|
+ const tempFilePaths = res.tempFilePaths;
|
|
205
|
+ //限制上传的图片大小不超过5M
|
|
206
|
+ let resSize = res.tempFiles[0].size;
|
|
207
|
+ if (resSize > 5242880) {
|
|
208
|
+ uni.showToast({
|
|
209
|
+ title: '上传的图片大小不能超过5M',
|
|
210
|
+ icon: 'none',
|
|
211
|
+ duration: 2000,
|
|
212
|
+ mask: true
|
|
213
|
+ });
|
|
214
|
+ return;
|
|
215
|
+ }
|
|
216
|
+ //获取图片扩展名
|
|
217
|
+ const fileTxt = res.tempFilePaths[0].split('.').pop();
|
|
218
|
+ const judgeType = fileTxt == 'jpg' || fileTxt == 'jpeg' || fileTxt == 'png';
|
|
219
|
+ if (!judgeType) {
|
|
220
|
+ uni.showToast({
|
|
221
|
+ title: '请上传指定图片类型(jpg、jpeg、png)',
|
|
222
|
+ icon: 'none',
|
|
223
|
+ duration: 2000,
|
|
224
|
+ mask: true
|
|
225
|
+ });
|
|
226
|
+ return;
|
|
227
|
+ }
|
|
228
|
+ uni.uploadFile({
|
|
229
|
+ url: `${baseUrl.baseUrl}/yt/oss/upload`,
|
|
230
|
+ filePath: tempFilePaths[0],
|
|
231
|
+ name: 'file',
|
|
232
|
+ header: {
|
|
233
|
+ 'content-type': 'multipart/form-data',
|
|
234
|
+ Authorization: 'Bearer ' + token
|
|
235
|
+ },
|
|
236
|
+ formData: {},
|
|
237
|
+ success: res => {
|
|
238
|
+ let objImage = JSON.parse(res.data);
|
|
239
|
+ this.avatar = objImage.fileStaticUri;
|
|
240
|
+ uni.$u.toast('头像上传成功');
|
178
|
241
|
}
|
179
|
242
|
});
|
180
|
243
|
}
|
181
|
|
- },
|
182
|
|
- clearAccountFunc() {
|
183
|
|
- this.showBind = true;
|
184
|
|
- },
|
185
|
|
- // 修改头像
|
186
|
|
- async upAvatar() {
|
187
|
|
- let token;
|
188
|
|
- token = this.userInfo.isToken || uni.getStorageSync('userInfo').isToken || undefined;
|
189
|
|
- // #ifdef H5
|
190
|
|
- token = window.sessionStorage.getItem('userInfo').isToken;
|
191
|
|
- // #endif
|
192
|
|
- if (!token) return uni.$u.toast('请登录后上传图片');
|
193
|
|
- uni.chooseImage({
|
194
|
|
- count: 1,
|
195
|
|
- sourceType: ['camera', 'album'],
|
196
|
|
- success: res => {
|
197
|
|
- const tempFilePaths = res.tempFilePaths;
|
198
|
|
- //限制上传的图片大小不超过5M
|
199
|
|
- let resSize = res.tempFiles[0].size;
|
200
|
|
- if (resSize > 5242880) {
|
201
|
|
- uni.showToast({
|
202
|
|
- title: '上传的图片大小不能超过5M',
|
203
|
|
- icon: 'none',
|
204
|
|
- duration: 2000,
|
205
|
|
- mask: true
|
206
|
|
- });
|
207
|
|
- return;
|
208
|
|
- }
|
209
|
|
- //获取图片扩展名
|
210
|
|
- const fileTxt = res.tempFilePaths[0].split('.').pop();
|
211
|
|
- const judgeType = fileTxt == 'jpg' || fileTxt == 'jpeg' || fileTxt == 'png';
|
212
|
|
- if (!judgeType) {
|
213
|
|
- uni.showToast({
|
214
|
|
- title: '请上传指定图片类型(jpg、jpeg、png)',
|
215
|
|
- icon: 'none',
|
216
|
|
- duration: 2000,
|
217
|
|
- mask: true
|
218
|
|
- });
|
219
|
|
- return;
|
220
|
|
- }
|
221
|
|
- uni.uploadFile({
|
222
|
|
- url: `${baseUrl.baseUrl}/yt/oss/upload`,
|
223
|
|
- filePath: tempFilePaths[0],
|
224
|
|
- name: 'file',
|
225
|
|
- header: {
|
226
|
|
- 'content-type': 'multipart/form-data',
|
227
|
|
- Authorization: 'Bearer ' + token
|
228
|
|
- },
|
229
|
|
- formData: {},
|
230
|
|
- success: res => {
|
231
|
|
- let objImage = JSON.parse(res.data);
|
232
|
|
- this.avatar = objImage.fileStaticUri;
|
233
|
|
- uni.$u.toast('头像上传成功');
|
234
|
|
- }
|
235
|
|
- });
|
236
|
|
- }
|
237
|
|
- });
|
238
|
|
- },
|
239
|
|
- onSubmitFunc() {
|
240
|
|
- let httpData = {
|
241
|
|
- avatar: this.avatar,
|
242
|
|
- email: this.myInfoModel.email,
|
243
|
|
- id: this.id,
|
244
|
|
- phoneNumber: this.myInfoModel.phoneNumber,
|
245
|
|
- realName: this.myInfoModel.realName
|
246
|
|
- };
|
247
|
|
- this.$refs.myForm.validate().then(res => {
|
|
244
|
+ });
|
|
245
|
+ },
|
|
246
|
+ onSubmitFunc() {
|
|
247
|
+ let httpData = {
|
|
248
|
+ avatar: this.avatar,
|
|
249
|
+ email: this.myInfoModel.email,
|
|
250
|
+ id: this.id,
|
|
251
|
+ phoneNumber: this.myInfoModel.phoneNumber,
|
|
252
|
+ realName: this.myInfoModel.realName
|
|
253
|
+ };
|
|
254
|
+ this.$refs.myForm
|
|
255
|
+ .validate()
|
|
256
|
+ .then(res => {
|
248
|
257
|
uni.$u.http
|
249
|
258
|
.put('/yt/user/center', httpData)
|
250
|
259
|
.then(res => {
|
...
|
...
|
@@ -260,66 +269,67 @@ |
260
|
269
|
});
|
261
|
270
|
}, 500);
|
262
|
271
|
}
|
263
|
|
- }).catch(e => {
|
264
|
|
- uni.$u.toast(e.data.message);
|
265
|
|
- });
|
266
|
|
- }).catch(errors => {
|
267
|
|
- uni.$u.toast('校验失败')
|
|
272
|
+ })
|
|
273
|
+ .catch(e => {
|
|
274
|
+ uni.$u.toast(e.data.message);
|
|
275
|
+ });
|
268
|
276
|
})
|
269
|
|
-
|
270
|
|
- },
|
271
|
|
- dateClose() {
|
272
|
|
- this.showDate = false;
|
273
|
|
- },
|
274
|
|
- dateConfirm(e) {
|
275
|
|
- this.showDate = false;
|
276
|
|
- this.myInfoModel.userInfo.accountExpireTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss');
|
277
|
|
- },
|
278
|
|
- //格式化日期
|
279
|
|
- formatter(type, value) {
|
280
|
|
- if (type === 'year') {
|
281
|
|
- return `${value}年`;
|
282
|
|
- }
|
283
|
|
- if (type === 'month') {
|
284
|
|
- return `${value}月`;
|
285
|
|
- }
|
286
|
|
- if (type === 'day') {
|
287
|
|
- return `${value}日`;
|
288
|
|
- }
|
289
|
|
- if (type === 'hour') {
|
290
|
|
- return `${value}时`;
|
291
|
|
- }
|
292
|
|
- if (type === 'minute') {
|
293
|
|
- return `${value}分`;
|
294
|
|
- }
|
295
|
|
- return value;
|
296
|
|
- },
|
297
|
|
- //隐藏输入框
|
298
|
|
- hideKeyboard() {
|
299
|
|
- uni.hideKeyboard();
|
|
277
|
+ .catch(errors => {
|
|
278
|
+ uni.$u.toast('校验失败');
|
|
279
|
+ });
|
|
280
|
+ },
|
|
281
|
+ dateClose() {
|
|
282
|
+ this.showDate = false;
|
|
283
|
+ },
|
|
284
|
+ dateConfirm(e) {
|
|
285
|
+ this.showDate = false;
|
|
286
|
+ this.myInfoModel.userInfo.accountExpireTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss');
|
|
287
|
+ },
|
|
288
|
+ //格式化日期
|
|
289
|
+ formatter(type, value) {
|
|
290
|
+ if (type === 'year') {
|
|
291
|
+ return `${value}年`;
|
|
292
|
+ }
|
|
293
|
+ if (type === 'month') {
|
|
294
|
+ return `${value}月`;
|
|
295
|
+ }
|
|
296
|
+ if (type === 'day') {
|
|
297
|
+ return `${value}日`;
|
300
|
298
|
}
|
|
299
|
+ if (type === 'hour') {
|
|
300
|
+ return `${value}时`;
|
|
301
|
+ }
|
|
302
|
+ if (type === 'minute') {
|
|
303
|
+ return `${value}分`;
|
|
304
|
+ }
|
|
305
|
+ return value;
|
|
306
|
+ },
|
|
307
|
+ //隐藏输入框
|
|
308
|
+ hideKeyboard() {
|
|
309
|
+ uni.hideKeyboard();
|
301
|
310
|
}
|
302
|
|
- };
|
|
311
|
+ }
|
|
312
|
+};
|
303
|
313
|
</script>
|
304
|
314
|
|
305
|
315
|
<style lang="scss" scoped>
|
306
|
|
- .userName{
|
307
|
|
- background-color: green;
|
308
|
|
- }
|
309
|
|
- @import './static/set.scss';
|
|
316
|
+.userName {
|
|
317
|
+ background-color: green;
|
|
318
|
+}
|
|
319
|
+@import './static/set.scss';
|
310
|
320
|
|
311
|
|
- /deep/ .u-line {
|
312
|
|
- width: 662rpx !important;
|
313
|
|
- }
|
|
321
|
+/deep/ .u-line {
|
|
322
|
+ width: 662rpx !important;
|
|
323
|
+}
|
314
|
324
|
|
315
|
|
- /deep/ .u-form-item {
|
316
|
|
- height: 100rpx !important;
|
317
|
|
- }
|
|
325
|
+/deep/ .u-form-item {
|
|
326
|
+ height: 100rpx !important;
|
|
327
|
+}
|
318
|
328
|
|
319
|
|
- /deep/ .u-form-item:nth-child(3) {
|
320
|
|
- .u-form-item__body {
|
321
|
|
- background: #f5f7fa !important;
|
322
|
|
- width: 663rpx !important;
|
323
|
|
- }
|
|
329
|
+/deep/ .u-form-item:nth-child(3) {
|
|
330
|
+ .u-form-item__body {
|
|
331
|
+ background: #f5f7fa !important;
|
|
332
|
+ width: 663rpx !important;
|
324
|
333
|
}
|
|
334
|
+}
|
325
|
335
|
</style> |
...
|
...
|
|