From 9c64e1873201ba354ce73d995b44caed635ef5a2 Mon Sep 17 00:00:00 2001
From: lanzhihui <503792708@qq.com>
Date: Sun, 29 Sep 2024 11:01:17 +0800
Subject: [PATCH] update
---
src/components/chooseImageTips.wpy | 2 +-
src/components/uploadPic.wpy | 2 +-
src/components/userTitle.wpy | 7 +-
src/components/wepy-image-cropper.wpy | 4 +-
src/components/wepy-image-cropperV2.wpy | 1320 -----------------------
src/mixins/https.js | 2 +-
src/pages/home/registration.wpy | 61 +-
src/pages/tabBar/user.wpy | 209 ++--
src/pages/users/ImageCropper.wpy | 10 +-
src/pages/users/artificial.wpy | 22 +-
src/pages/users/blacklist.wpy | 1 +
src/pages/users/exclusiveService.wpy | 2 +-
src/pages/users/friendlist.wpy | 2 +-
src/pages/users/logout.wpy | 2 +-
src/pages/users/myCertification.wpy | 8 +-
src/pages/users/myDynamic.wpy | 126 +--
src/pages/users/setTing.wpy | 227 +---
src/pages/users/unmarriV2.wpy | 3 +-
src/pages/users/upgradeVIP.wpy | 6 +-
src/pages/users/upgradeVIP2.wpy | 28 +-
20 files changed, 258 insertions(+), 1786 deletions(-)
delete mode 100644 src/components/wepy-image-cropperV2.wpy
diff --git a/src/components/chooseImageTips.wpy b/src/components/chooseImageTips.wpy
index e13f099..be2111e 100644
--- a/src/components/chooseImageTips.wpy
+++ b/src/components/chooseImageTips.wpy
@@ -1,6 +1,6 @@
-
+
diff --git a/src/components/uploadPic.wpy b/src/components/uploadPic.wpy
index 4acfbf8..29a5813 100644
--- a/src/components/uploadPic.wpy
+++ b/src/components/uploadPic.wpy
@@ -97,7 +97,7 @@ wepy.component({
for (let item of res.tempFiles) {
console.log(item, '====')
let type = item.fileType == 'video' ? 'video' : 'img'
- vm.uploadFile(item.tempFilePath, type, item.tempFilePath, index++)
+ vm.uploadFile(item.tempFilePath, type, res.tempFiles, index++)
}
},
fail: () => {
diff --git a/src/components/userTitle.wpy b/src/components/userTitle.wpy
index b4e3e6a..9dfb9e1 100644
--- a/src/components/userTitle.wpy
+++ b/src/components/userTitle.wpy
@@ -7,11 +7,12 @@
- 审核中
- 未通过
+ {{user.is_photo_audited}}
+ 审核中
+ 未通过
- 上传头像
+ 上传头像
diff --git a/src/components/wepy-image-cropper.wpy b/src/components/wepy-image-cropper.wpy
index b90c0c2..40f2ea4 100644
--- a/src/components/wepy-image-cropper.wpy
+++ b/src/components/wepy-image-cropper.wpy
@@ -333,7 +333,7 @@
methods: {
_draw(callback) {
console.log(this.imgSrc)
- if (!this.imgSrc) return
+ if (!this.imgSrc || !this.ctx) return
let draw = () => {
// 图片实际大小
let img_width = this.img_width * this.scale * this.export_scale
@@ -350,7 +350,7 @@
})
}
console.log(this.ctx, 'this.ctx=333')
- if (this.ctx.width != this.width || this.ctx.height != this.height) {
+ if (this.ctx && (this.ctx.width != this.width || this.ctx.height != this.height)) {
// 优化拖动裁剪框,所以必须把宽高设置放在离用户触发渲染最近的地方
this._canvas_height = this.height
this._canvas_width = this.width
diff --git a/src/components/wepy-image-cropperV2.wpy b/src/components/wepy-image-cropperV2.wpy
deleted file mode 100644
index 8f76cff..0000000
--- a/src/components/wepy-image-cropperV2.wpy
+++ /dev/null
@@ -1,1320 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 选择图片
- 确定
-
-
-
-
-
-
- {
- usingComponents: {
- chooseImageTips: '~@/components/chooseImageTips',
- }
- }
-
diff --git a/src/mixins/https.js b/src/mixins/https.js
index 6817fbe..3810024 100644
--- a/src/mixins/https.js
+++ b/src/mixins/https.js
@@ -95,7 +95,7 @@ export default {
wx.removeStorageSync('formId')
resolve({statusCode, ...data})
} else if (data.code === 1) {
- resolve({statusCode, ...data})
+ // resolve({statusCode, ...data})
console.error(data.message)
// console.log(this.$app.$options.globalData)
if (this.$is == 'pages/service/GroupChatPage' && data.message.includes('已断开连接')) {
diff --git a/src/pages/home/registration.wpy b/src/pages/home/registration.wpy
index c75a412..bad45cb 100644
--- a/src/pages/home/registration.wpy
+++ b/src/pages/home/registration.wpy
@@ -244,6 +244,21 @@ wepy.page({
unionid: '',
enterprise: ''
},
+ onShow(e) {
+ console.log(e, 'e===')
+ if (e && e.photo) {
+ this.photo = e.photo
+ }
+ console.log(this.photo, '===')
+ },
+ onLoad() {
+ let vm = this
+ let timestamp = Date.parse(new Date())
+ let date = new Date(timestamp)
+ let Y = date.getFullYear()
+ vm.endDate = `${Y - 12}-01-01`
+ vm.beginData = `${Y - 120}-01-01`
+ },
methods: {
hideCut(e) {
wx.showTabBar({
@@ -253,7 +268,15 @@ wepy.page({
},
complete() {
let vm = this
- console.log(vm.photo, 'vm.photo==')
+ console.log(this.photo, vm.photo, 'vm.photo==')
+ if (!vm.photo && wx.getStorageSync('baseImage')) {
+ vm.photo = wx.getStorageSync('baseImage')
+ wx.removeStorageSync('baseImage')
+ }
+ if (!vm.photo) {
+ return vm.$showToast('请上传你的头像')
+ }
+ console.log(vm.photo, 'vm.photo=')
if (!vm.name) {
return vm.$showToast('请输入昵称')
} else if (vm.name.length < 2 || vm.name.length > 10) {
@@ -262,15 +285,13 @@ wepy.page({
if (vm.name.includes('福恋')) {
return vm.$showToast('请勿输入带“福恋”关键字的昵称!')
}
- if (vm.photo == '') {
- return vm.$showToast('请上传你的头像')
- }
+
if (!vm.sex) {
return vm.$showToast('请选择你的性别')
}
- if (!vm.mobile) {
- return vm.$showToast('请选择绑定手机号')
- }
+ // if (!vm.mobile) {
+ // return vm.$showToast('请选择绑定手机号')
+ // }
if (!vm.birthday) {
return vm.$showToast('请选择你的生日')
}
@@ -287,7 +308,7 @@ wepy.page({
let data = {
photo: vm.photo,
nickname: vm.name,
- mobile: vm.mobile,
+ mobile: vm.mobile || '15813393343',
sex: vm.sex === '男' ? 1 : 2,
belief: vm.belief,
state: vm.emotion,
@@ -345,15 +366,7 @@ wepy.page({
})
}
},
- // 选择的图片和取消功能
- changeVal(data) {
- console.log(data, 'data=2222')
- let vm = this
- if (data) {
- vm.photo = data[0].filePath
- }
- vm.chooseShow = false
- },
+
// 关闭上传头像弹窗
closeUploadPic() {
let vm = this
@@ -369,20 +382,8 @@ wepy.page({
vm.displayCity = e.city.replace(/市/g, '')
vm.address = {country: e.country, province: e.province, city: e.city}
}
- },
- onShow(e) {
- if (e && e.photo) {
- this.photo = e.photo
- }
- },
- onLoad() {
- let vm = this
- let timestamp = Date.parse(new Date())
- let date = new Date(timestamp)
- let Y = date.getFullYear()
- vm.endDate = `${Y - 12}-01-01`
- vm.beginData = `${Y - 120}-01-01`
}
+
})
diff --git a/src/pages/tabBar/user.wpy b/src/pages/tabBar/user.wpy
index 6e899c9..38a9973 100644
--- a/src/pages/tabBar/user.wpy
+++ b/src/pages/tabBar/user.wpy
@@ -114,7 +114,7 @@
-
+
@@ -138,7 +138,7 @@
src="https://image.fulllinkai.com/202204/14/2c8b0665f901bd2e3b1b7afafd0629c3.png"
mode="widthFix">
-
+
更换头像将重新审核,确定仍要更换成为未认证状态吗?
@@ -151,13 +151,13 @@
-
+
联系专属客服
-
+
长按识别二维码,联系客服
@@ -166,13 +166,12 @@
-
+
-
-
+
+
-
@@ -186,6 +185,7 @@
+
@@ -1499,7 +1489,8 @@
loginTips: '~@/components/loginTips',
chooseImageTips: '~@/components/chooseImageTips',
shareComponent: '~@/components/shareComponent',
- poster: "plugin://FL-plugin/poster"
+ poster: "plugin://FL-plugin/poster",
+ loginDialog: '~@/components/loginDialog',
}
}
diff --git a/src/pages/users/ImageCropper.wpy b/src/pages/users/ImageCropper.wpy
index f9b1daa..8b9537a 100644
--- a/src/pages/users/ImageCropper.wpy
+++ b/src/pages/users/ImageCropper.wpy
@@ -96,8 +96,12 @@
prevPage = pages[pages.length - 2]
}
if (prevPage) {
- prevPage.setData({photo: photo})
- prevPage.onShow({photo: photo})
+ let dataV1 = prevPage.data.photo
+ console.log(dataV1, '34===')
+ dataV1 = photo
+ prevPage.setData({photo: dataV1})
+ prevPage.onShow({photo: dataV1})
+ wx.setStorageSync('baseImage', dataV1)
}
wx.navigateBack({
delta: 1
@@ -156,7 +160,7 @@
let data = {
photo: path
}
- this.$put({url: `${service.user}/photo`, data}).then(({code, data}) => {
+ this.$put({url: `${service.host}/user/register/profile`, data}).then(({code, data}) => {
this.$Toast_success('上传成功')
this.$gotoBack(1)
}).finally(() => {
diff --git a/src/pages/users/artificial.wpy b/src/pages/users/artificial.wpy
index 86d3e0b..d391969 100644
--- a/src/pages/users/artificial.wpy
+++ b/src/pages/users/artificial.wpy
@@ -14,7 +14,7 @@
-
+
请拍摄上传手持身份证照
@@ -24,7 +24,7 @@
正在审核中
- 审核失败,请重新上传
+ 审核失败,请重新上传
@@ -38,7 +38,7 @@
正在审核中
- 审核失败,请重新上传
+ 审核失败,请重新上传
@@ -50,7 +50,7 @@
正在审核中
- 审核失败,请重新上传
+ 审核失败,请重新上传
@@ -68,7 +68,7 @@
提交认证
重新提交
- 人脸识别
+ 人脸识别
@@ -79,7 +79,7 @@
- {{approve_history_body_reason}}
+ {{approve_history_body_reason}}