图片压缩等

master
yujialong 2 years ago
parent a1496eb3e8
commit 253a87531b
  1. 12
      apis/modules/user.js
  2. 2
      apis/request.js
  3. 4
      manifest.json
  4. 37
      pages/account/account.vue
  5. 1
      pages/clientDetail/clientDetail.vue
  6. 1
      pages/editCourse/editCourse.vue
  7. 1
      pages/orderDetail/orderDetail.vue
  8. 1
      pages/orders/orders.vue
  9. 5
      pages/person/person.vue
  10. 18
      pages/phone/phone.vue
  11. BIN
      static/image/avatar.png
  12. BIN
      static/image/index/index1.png
  13. BIN
      static/image/index/index10.png
  14. BIN
      static/image/index/index2.png
  15. BIN
      static/image/index/index3.png
  16. BIN
      static/image/index/index4.png
  17. BIN
      static/image/index/index5.png
  18. BIN
      static/image/index/index6.png
  19. BIN
      static/image/index/index7.png
  20. BIN
      static/image/index/index8.png
  21. BIN
      static/image/index/index9.png
  22. BIN
      static/image/login1.png
  23. BIN
      static/image/login2.png
  24. BIN
      static/image/logo.png
  25. BIN
      static/image/none.png
  26. BIN
      static/image/person-bg.png
  27. BIN
      static/image/person1.png
  28. BIN
      static/image/person2.png
  29. BIN
      static/image/person3.png
  30. BIN
      static/image/person4.png
  31. BIN
      static/image/phone.png
  32. BIN
      static/image/qrcode.png
  33. BIN
      static/image/tab1-1.png
  34. BIN
      static/image/tab1.png
  35. BIN
      static/image/tab2-1.png
  36. BIN
      static/image/tab2.png
  37. BIN
      static/image/tab3-1.png
  38. BIN
      static/image/tab3.png
  39. BIN
      static/image/wechat.png

@ -33,4 +33,16 @@ export const sendPhoneOrEmailCode = (data) => {
return post('users/users/userAccount/sendPhoneOrEmailCode', data) return post('users/users/userAccount/sendPhoneOrEmailCode', data)
} }
export const changeAccount = account => {
return post(`users/applets/mine/changeAccount?account=${account}`)
}
export const changePhoneNumber = phone => {
return post(`users/applets/mine/changePhoneNumber?phone=${phone}`)
}
export const checkIfAnAccountExists = account => {
return post(`users/applets/mine/checkIfAnAccountExists?account=${account}`)
}
export const updateUserAvatars = `http://39.108.250.202:9000/users/users/userAccount/updateUserAvatars` export const updateUserAvatars = `http://39.108.250.202:9000/users/users/userAccount/updateUserAvatars`

@ -14,7 +14,7 @@ const request = options => {
const header = Object.assign({}, config.headers, { const header = Object.assign({}, config.headers, {
token: uni.getStorageSync('token') token: uni.getStorageSync('token')
}) })
const otherUrl = ['my', 'generateInvitationCode', 'weChatAppletCallback', 'userBinding', 'getUserRolesPermissionMenu'] const otherUrl = ['generateInvitationCode', 'weChatAppletCallback', 'userBinding', 'getUserRolesPermissionMenu']
return new Promise((resolve, reject)=>{ return new Promise((resolve, reject)=>{
const { url } = options const { url } = options
uni.request({ uni.request({

@ -51,7 +51,9 @@
/* */ /* */
"appid" : "wx77a8a2a23138998b", "appid" : "wx77a8a2a23138998b",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false,
"es6" : true,
"minified" : true
}, },
"usingComponents" : true "usingComponents" : true
}, },

@ -1,43 +1,42 @@
<template> <template>
<view class="page"> <view class="page">
<view class="input"> <view class="input">
<uni-easyinput v-model.trim="account" placeholder="请输入账号"></uni-easyinput> <uni-easyinput v-model.trim="account" placeholder="请输入账号" @input="accountChange"></uni-easyinput>
</view> </view>
<button type="primary" @click="submit">确认</button> <button type="primary" @click="submit">确认</button>
</view> </view>
</template> </template>
<script> <script>
import { queryUserInfoDetails, updatePersonCenter } from '@/apis/modules/user.js' import { checkIfAnAccountExists, changeAccount } from '@/apis/modules/user.js'
export default { export default {
data() { data() {
return { return {
timer: null,
account: '', account: '',
hrUserInfo: {}, repeat: false
personalFileList: [],
userAccountList: [],
} }
}, },
onShow() { onShow() {
this.getInfo()
}, },
methods: { methods: {
// //
getInfo() { accountChange() {
queryUserInfoDetails().then(({ result }) => { clearTimeout(this.timer)
this.hrUserInfo = result.hrUserInfo this.timer = setTimeout(() => {
this.userAccountList = result.userAccountList checkIfAnAccountExists(this.account).then(() => {
}).catch(e => {}) this.repeat = false
}).catch(e => {
this.repeat = true
})
}, 500)
}, },
submit() { submit() {
const { account, hrUserInfo, userAccountList } = this const { account } = this
if(!account) return this.$util.errMsg('请输入账号') if(!account) return this.$util.errMsg('请输入账号')
userAccountList[0].userId = hrUserInfo.userId if (this.repeat) return this.$util.errMsg('账号已存在!')
userAccountList[0].account = account changeAccount(account).then(res => {
updatePersonCenter({
hrUserInfo,
userAccountList
}).then(res => {
this.$util.sucMsg('修改成功!') this.$util.sucMsg('修改成功!')
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({

@ -284,6 +284,7 @@
.page { .page {
height: calc(100vh - 120rpx - env(safe-area-inset-bottom)); height: calc(100vh - 120rpx - env(safe-area-inset-bottom));
overflow: auto; overflow: auto;
-webkit-overflow-scrolling: touch;
} }
.info { .info {
.name { .name {

@ -311,6 +311,7 @@
.page { .page {
height: calc(100vh - 140rpx - env(safe-area-inset-bottom)); height: calc(100vh - 140rpx - env(safe-area-inset-bottom));
overflow: auto; overflow: auto;
-webkit-overflow-scrolling: touch;
} }
.block { .block {
position: relative; position: relative;

@ -402,6 +402,7 @@
.page { .page {
height: calc(100vh - 300rpx - env(safe-area-inset-bottom)); height: calc(100vh - 300rpx - env(safe-area-inset-bottom));
overflow: auto; overflow: auto;
-webkit-overflow-scrolling: touch;
} }
.show { .show {
height: calc(100vh - 130rpx - env(safe-area-inset-bottom)); height: calc(100vh - 130rpx - env(safe-area-inset-bottom));

@ -222,7 +222,6 @@
}, },
// //
del(e) { del(e) {
console.log(e);
const that = this const that = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',

@ -5,7 +5,7 @@
<view class="info"> <view class="info">
<image class="avatar" :src="avatar" mode=""></image> <image class="avatar" :src="avatar" mode=""></image>
<view class="text"> <view class="text">
<view class="name">{{ userName }}</view> <view class="name">{{ my.info.userName }}</view>
<view class="phone">{{ my.info.phone }}</view> <view class="phone">{{ my.info.phone }}</view>
</view> </view>
</view> </view>
@ -84,13 +84,14 @@
}, },
// 退 // 退
logout() { logout() {
const that = this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定要退出账号吗?', content: '确定要退出账号吗?',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
uni.clearStorageSync() uni.clearStorageSync()
this.$util.to('../login/login') that.$util.to('../login/login')
} }
} }
}) })

@ -12,7 +12,7 @@
</template> </template>
<script> <script>
import { queryUserInfoDetails, bindPhoneOrEmail, sendPhoneOrEmailCode } from '@/apis/modules/user.js' import { sendPhoneOrEmailCode, changePhoneNumber } from '@/apis/modules/user.js'
export default { export default {
data() { data() {
return { return {
@ -28,15 +28,9 @@
} }
}, },
onShow() { onShow() {
this.getInfo()
}, },
methods: { methods: {
//
getInfo() {
queryUserInfoDetails().then(({ result }) => {
this.userId = result.hrUserInfo.userId
}).catch(e => {})
},
// //
sendCode() { sendCode() {
const { phone } = this.form const { phone } = this.form
@ -78,13 +72,7 @@
const { phone, code } = this.form const { phone, code } = this.form
if (!phone) return this.$util.errMsg('请输入手机号') if (!phone) return this.$util.errMsg('请输入手机号')
if (!code) return this.$util.errMsg('请输入验证码') if (!code) return this.$util.errMsg('请输入验证码')
bindPhoneOrEmail({ changePhoneNumber(phone).then(res => {
userId: this.userId,
phone,
types: 2,
code,
opener: this.phoneOpener
}).then(res => {
this.$util.sucMsg('修改成功!') this.$util.sucMsg('修改成功!')
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 975 B

After

Width:  |  Height:  |  Size: 840 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 327 B

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 B

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 335 B

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

After

Width:  |  Height:  |  Size: 672 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 B

After

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 643 B

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 B

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 B

After

Width:  |  Height:  |  Size: 552 B

Loading…
Cancel
Save