功能update

This commit is contained in:
lanzhihui 2024-09-26 11:41:20 +08:00
parent 6d311b2cb6
commit 85b9464b18
13 changed files with 3182 additions and 153 deletions

View File

@ -212,6 +212,7 @@ subPackages: [
'exclusiveService',
'myDynamic',
'logoutDefault',
'ImageCropper',
]
},
{

View File

@ -118,7 +118,7 @@ wepy.component({
console.log(vm.uploadData, 'vm.uploadData')
if (vm.uploadData) {
vm.$showLoading(`上传中...`)
let fileName = new Date().getTime() + Math.floor(Math.random() * 150) + '.' + type.split('/').pop().toLowerCase()
let fileName = new Date().getTime() + Math.floor(Math.random() * 150) + '.' + filePath.split('.').pop().toLowerCase()
let filePathUrl = vm.uploadData.host + '/' + vm.uploadData.dir + fileName
wx.uploadFile({
url: vm.uploadData.host,
@ -182,7 +182,7 @@ wepy.component({
let vm = this
vm.$showToast(`网络环境异常,请稍后重试`)
wx.request({
url: `${service.host}/ali/upload/sts/token`,
url: `${service.host}/ali/upload/signature`,
header: {
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
'X-Requested-With': 'XMLHttpRequest'
@ -192,16 +192,7 @@ wepy.component({
success: ({code, data}) => {
vm.uploadData = data.data
vm.$app.$options.globalData.uploadData = data.data
// vm.date = new Date()
// vm.date.setHours( vm.date.getHours() + 1)
// vm.olicyText = {
// expiration: vm.toISOString(), // 设置policy过期时间。
// conditions: [
// // 限制上传大小。
// ["content-length-range", 0, 1024 * 1024 * 1024],
// ],
// }
// vm.uploadData.policy = Base64.encode(JSON.stringify(policyText)) // policy必须为base64的string。
vm.uploadFile(filePath, type, filePaths, index)
}
})
console.log('1111111111')

View File

@ -87,8 +87,8 @@
default: ''
},
is_base_info: {
type: String,
default: ''
type: Boolean,
default: false
}
},
@ -474,6 +474,7 @@
height:100%;
display: flex;
align-items: center;
z-index: 1;
.main{
flex:1;
display: flex;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -11,11 +11,11 @@
<view class="bold font_32 text-black">{{ listCount.follow_count || '0' }}</view>
<view class="font_24">关注</view>
</view>
<view class="text-center flo_l mainFA" @tap="goto('/pages/users/review?type=fans&title=关注我的','粉丝')">
<view class="text-center flo_l mainFA" @tap="goto('/pages/news/visitor?type=fans&title=关注我的','粉丝')">
<view class="bold font_32 text-black">{{ listCount.fans_count || '0' }}</view>
<view class="font_24">粉丝</view>
</view>
<view class="text-center flo_l mainFA" @tap="goto('/pages/users/review?type=visitor&title=访客','访客')">
<view class="text-center flo_l mainFA" @tap="goto('/pages/news/visitor?type=visitor&title=访客','访客')">
<view class="bold font_32 text-black">{{ listCount.preview_count || '0' }}</view>
<view class="font_24">访客</view>
</view>
@ -222,16 +222,16 @@
</view>
</view>
</view>
<!-- <block v-if="posterConfig">-->
<!-- &lt;!&ndash; 生成海报&ndash;&gt;-->
<!-- <poster type="2d" id="poster" ref="poster" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig}}"-->
<!-- bind:success="onPosterSuccess">-->
<!-- </poster>-->
<!-- &lt;!&ndash; 分享微信卡片&ndash;&gt;-->
<!-- <poster type="2d" id="posterV1" ref="posterV1" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig1}}"-->
<!-- bind:success="onPosterSuccessWx" >-->
<!-- </poster>-->
<!-- </block>-->
<block v-show="posterConfig">
<!-- 生成海报-->
<poster type="2d" id="poster" ref="poster" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig}}"
bind:success="onPosterSuccess">
</poster>
<!-- 分享微信卡片-->
<poster type="2d" id="posterV1" ref="posterV1" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig1}}"
bind:success="onPosterSuccessWx" >
</poster>
</block>
<block v-if="!hide && posterConfig">
<shareComponent :hide.sync="hide" :shareImage.sync="invite_pic"></shareComponent>
</block>
@ -249,11 +249,7 @@
import https from '../../mixins/https'
import base from '../../mixins/base'
import {service} from '../../config.js'
// import visitorModel from '../../components/visitorModel' // 访客弹框
// import userTitle from '../../components/userTitle'
// import loginTips from '../../components/loginTips'
// import chooseImageTips from '../../components/chooseImageTips'
const app = getApp().$wepy.$options
// import shareComponent from '../../components/shareComponent'
import {getPhoneNumber} from '../../utils/util'
@ -636,51 +632,53 @@
// var recordTime = String(parseFloat(new Date(repTime).getTime()) / 1000)
// self.UID = recordTime.substring(recordTime.length - 5) + String(data.id)
wx.setStorageSync('UID', self.UID)
self.shareConfig.images[1].url = data.user_share_qrcode
self.shareConfig.images[1].url = data.user_share_qrcode || 'https://local-pictures.oss-cn-shenzhen.aliyuncs.com/202409/12/1726111703932.img'
self.posterConfig = self.shareConfig
// self.$nextTick(() => {
// setTimeout(() => {
// self.$wx.selectComponent('#poster').onCreate(true, self)
// }, 100)
// })
console.log('333===0999')
self.$nextTick(() => {
setTimeout(() => {
console.log(self.$wx.selectComponent('#poster'), self.$refs.poster, '---99')
self.$wx.selectComponent('#poster').onCreate(true, self.$wx)
}, 100)
})
// 小程序分享
// self.title = `我是"${data.user.nickname}",这是我的小程序卡片`
// if (data.photo || data.avatar) {
// let year = '', city = '', degree = '', industry_sub = ''
// if (data.profile_courtship.birthday) {
// year = data.profile_courtship.birthday.slice(2, 4) + '年'
// }
// if (data.profile_courtship.city) {
// city = data.profile_courtship.city
// }
// if (data.profile_courtship.degree) {
// degree = data.profile_courtship.degree
// }
// if (data.industry_sub) {
// industry_sub = data.industry_sub
// }
// console.log(year, city, degree, industry_sub)
// self.shareConfig1.texts[0].text = `${year} | ${city}`
// self.shareConfig1.texts[1].text = `${degree} | ${industry_sub}`
// self.shareConfig1.images[0].url = data.photo || data.avatar
// self.posterConfig1 = self.shareConfig1
// self.$nextTick(() => {
// setTimeout(() => {
// self.$wx.selectComponent('#posterV1').onCreate(true)
// }, 100)
// })
// } else {
// // 重新获取分享码
// self.$showToast('分享图片获取失败')
// }
self.title = `我是"${data.user.nickname}",这是我的小程序卡片`
if (data.photo || data.avatar) {
let year = '', city = '', degree = '', industry_sub = ''
if (data.profile_courtship.birthday) {
year = data.profile_courtship.birthday.slice(2, 4) + '年'
}
if (data.profile_courtship.city) {
city = data.profile_courtship.city
}
if (data.profile_courtship.degree) {
degree = data.profile_courtship.degree
}
if (data.industry_sub) {
industry_sub = data.industry_sub
}
console.log(year, city, degree, industry_sub)
self.shareConfig1.texts[0].text = `${year} | ${city}`
self.shareConfig1.texts[1].text = `${degree} | ${industry_sub}`
self.shareConfig1.images[0].url = data.photo || data.avatar
self.posterConfig1 = self.shareConfig1
self.$nextTick(() => {
setTimeout(() => {
self.$wx.selectComponent('#posterV1').onCreate(true, self.$wx)
}, 100)
})
} else {
// 重新获取分享码
self.$showToast('分享图片获取失败')
}
console.log(self.posterConfig1, '7777')
this.init = true
this.user = data.user
this.user.rank_id = data.rank_profile.rank_id
// this.user.card_num = data.approve_profile.card_num
// this.user.is_approved = data.approve_profile.is_approved
// this.user.is_real_approved = data.approve_profile.is_real_approved
// this.user.is_photo_audited = data.approve_profile.is_photo_audited
this.user.is_approved = data.approve_profile.is_approved
this.user.is_real_approved = data.approve_profile.is_real_approved
this.user.is_photo_audited = data.approve_profile.is_photo_audited
// this.user.name = data.approve_profile.name
this.listCount = {
friend_count: data.friend_count,
@ -791,7 +789,7 @@
console.log(url, text)
let titles = ['好友', '关注', '粉丝', '访客'], {is_base_info} = app.globalData,
vm = this, {id} = wx.getStorageSync('userInfo')
if (titles.includes(text) && is_base_info !== 2) {
if (titles.includes(text) && !is_base_info) {
vm.showVisitorModel = true
return
// return vm.$invoke('visitorModel', 'showModal', '0') // 游客模式,无法查看

View File

@ -0,0 +1,267 @@
<template>
<WepyImageCropper id="image-cropper" :limit_move="limit_move" :newPic.sync="newPic" :disable_rotate="disable_rotate" :disable_ratio="disable_ratio" :borderColor="borderColor" :width="width" :height="height" :min_width="width" :min_height="height" :imgSrc.sync="src" @load.user="cropperload" @imageload.user="loadimage" @tapcut.user="clickcut" @saveCut.user="saveCut" :quality="quality" ref="child"></WepyImageCropper>
</template>
<script>
import wepy from '@wepy/core'
import {service} from '../../config.js'
import base from '../../mixins/base'
import https from '../../mixins/https'
wepy.page({
mixins: [base, https],
// config = {
// navigationBarTitleText: '上传图片'
// }
// components = {
// WepyImageCropper
// }
data: {
src: '',
quality: 1,
width: 300, // 宽度
height: 300, // 高度
cut_top: 212,
cut_left: 37,
chooseShow: false,
limit_move: true,
disable_ratio: true,
disable_rotate: true,
jumpString: null,
borderColor: '#D92553',
filePaths: '',
jump: '',
newPic: 0,
uploadData: null
},
onLoad(e) {
this.src = e.src
this.jumpString = e.jumpString
this.newPic = e.newPic
this.jump = e.jump
},
onShow() {
// let headPortraitImg = wx.getStorageSync('headPortraitImg')
// if(headPortraitImg){
// this.src = headPortraitImg
// }
},
onReady() { // 开始裁剪
// this.src = 'https://images.ufutx.com/201907/19/c66ed5d4a3900b873815b4856758931e.jpeg'
// wx.showLoading({
// title: '加载中'
// })
},
imgSrcCut(e) {
},
methods: {
uploadFile(type) {
let vm = this
console.log(vm.filePaths, 'filePath')
console.log(vm.uploadData, 'vm.uploadData')
if (vm.uploadData) {
vm.$showLoading(`上传中...`)
let fileName = new Date().getTime() + Math.floor(Math.random() * 150) + '.' + vm.filePaths.split('.').pop().toLowerCase()
let filePathUrl = vm.uploadData.host + '/' + vm.uploadData.dir + fileName
wx.uploadFile({
url: vm.uploadData.host,
filePath: vm.filePaths,
name: 'file', // 必须填file。
formData: {
key: vm.uploadData.dir + fileName,
policy: vm.uploadData.policy,
OSSAccessKeyId: vm.uploadData.access_id,
signature: vm.uploadData.signature
// 'x-oss-security-token': securityToken // 使用STS签名时必传。
},
header: {
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
// 'content-type': 'multipart/form-data',
'X-Requested-With': 'XMLHttpRequest'
},
success: (res) => {
if (res.statusCode === 204) {
console.log(filePathUrl, '上传成功')
if (this.jump === '/pages/users/userInfo') {
this.$redirectTo(`${this.jump}?image=${filePathUrl}`)
} else if (this.jumpString === 'basicData') {
let photo = filePathUrl
// this.$preload('image',path)
var pages = getCurrentPages()
var prevPage = ''
if (pages.length >= 2) {
prevPage = pages[pages.length - 2]
}
if (prevPage) {
prevPage.photoCity(photo)
}
wx.navigateBack({
delta: 1
})
} else {
vm.upDataAvatar(filePathUrl)
}
// if (vm.num == 1) {
// vm.$emit('changeVal', dataV2)
// } else {
// if (vm.uploadPics.length <= vm.num) {
// vm.uploadPics.push(dataV2)
// } else {
// console.log('==--099')
// vm.$emit('changeVal', vm.uploadPics)
// }
// }
}
},
fail: (err) => {
wx.showModal({ // 使用模态框提示用户进行操作
title: `温馨提示:`,
content: `很抱歉` + err,
showCancel: false,
confirmText: `确定`,
success: function (res) {
if (res.confirm) {
vm.$gotoBack(1)
vm.$emit('changeVal', '')
}
}
})
}
})
} else {
let vm = this
vm.$showToast(`网络环境异常,请稍后重试`)
wx.request({
url: `${service.host}/ali/upload/signature`,
header: {
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
'X-Requested-With': 'XMLHttpRequest'
},
method: 'get',
data: {},
success: ({code, data}) => {
vm.uploadData = data.data
vm.$app.$options.globalData.uploadData = data.data
vm.uploadFile()
// vm.date = new Date()
// vm.date.setHours( vm.date.getHours() + 1)
// vm.olicyText = {
// expiration: vm.toISOString(), // 设置policy过期时间。
// conditions: [
// // 限制上传大小。
// ["content-length-range", 0, 1024 * 1024 * 1024],
// ],
// }
// vm.uploadData.policy = Base64.encode(JSON.stringify(policyText)) // policy必须为base64的string。
}
})
console.log('1111111111')
}
},
upDataAvatar(path) {
let data = {
photo: path
}
this.$put({url: `${service.user}/photo`, data}).then(({code, data}) => {
this.$Toast_success('上传成功')
this.$gotoBack(1)
}).finally(() => {
wx.hideLoading()
})
},
upDataAvatarV2(path) {
this.$showLoading('加载中...')
let data = {
photo: path
}
this.$put({url: `${service.user}/photo`, data}).then(({code, data}) => {
// this.$Toast_success('上传成功')
this.$gotoBack(1)
}).finally(() => {
wx.hideLoading()
})
},
cropperload(e) {
console.log('cropper初始化完成:' + e)
},
loadimage(e) {
console.log('图片加载完成', e)
},
// chooseimage() {
// let vm = this
// wx.chooseImage({
// count: 1,
// // sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
// sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
// sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
// success: (res) => {
// vm.filePaths = res.tempFilePaths[0]
// vm.$apply()
// vm.uploadFile()
// }
// })
// },
clickcut(e) {
console.log(e) // 点击裁剪框阅览图片
// wx.previewImage({
// current: e.url, // 当前显示图片的http链接
// urls: [e.url] // 需要预览的图片http链接列表
// })
},
saveCut(e) {
console.log(e.url, '1212') // 点击上传图片
console.log(e) // 点击上传图片
console.log('src------------------------------------', this.src) // 点击上传图片
if (this.src == e.url && this.jumpString) {
this.$gotoBack(1)
this.upDataAvatarV2(e.url)
return
}
this.filePaths = e.url
this.uploadFile('img')
this.$showLoading('上传图片中...')
}
}
})
</script>
<style lang="less">
.main-box{
width: 100%;
}
/*width: 80vw;*/
/*height: 10vh;*/
/*position: fixed;*/
/*bottom: 0;*/
/*left: 0;*/
/*z-index: 999999;*/
/*padding: 0 10vw;*/
/*.main-cancel,.main-save{*/
/*background: #d1d1d1;*/
/*padding: 8rpx 0;*/
/*width: 200rpx;*/
/*border-radius: 6rpx;*/
/*color: #D92553;*/
/*}*/
/*.main-save{*/
/*color: white;*/
/*background: #D92553;*/
/*}*/
/*}*/
</style>
<config>
{
navigationBarTitleText: '编辑资料',
enablePullDownRefresh: false,
backgroundColorTop: '#ffffff',
backgroundColorBottom: '#ffffff',
usingComponents: {
WepyImageCropper: '~@/components/wepy-image-cropper',
}
}
</config>

View File

@ -116,7 +116,8 @@
justShow: false,
holdShow: false,
againShow: false,
approve_history_body_reason: ''
approve_history_body_reason: '',
uploadData: null
},
onShow() {
// this.$parent.getTracker(this.$root.$name, this.config.navigationBarTitleText)
@ -141,81 +142,197 @@
uploadFile(filePaths, text) {
let vm = this
vm.setImgArr = wx.getStorageSync('authenticationImg')
wx.uploadFile({
url: service.image_upload,
filePath: filePaths,
method: 'POST',
name: 'fileData',
header: {
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
'content-type': 'multipart/form-data',
'X-Requested-With': 'XMLHttpRequest'
},
success: (res) => {
let value = JSON.parse(res.data).data
if (value && !vm.audit) {
vm.nodata = true
if (text) {
if (text == 'back') {
vm.photo.splice(2, 1, value)
} else if (text == 'just') {
vm.photo.splice(1, 1, value)
console.log(filePaths, 'filePath')
console.log(vm.uploadData, 'vm.uploadData')
if (vm.uploadData) {
vm.$showLoading(`上传中...`)
let fileName = new Date().getTime() + Math.floor(Math.random() * 150) + '.' + filePaths.split('.').pop().toLowerCase()
let filePathUrl = vm.uploadData.host + '/' + vm.uploadData.dir + fileName
wx.uploadFile({
url: vm.uploadData.host,
filePath: filePaths,
name: 'file', // 必须填file。
formData: {
key: vm.uploadData.dir + fileName,
policy: vm.uploadData.policy,
OSSAccessKeyId: vm.uploadData.access_id,
signature: vm.uploadData.signature
// 'x-oss-security-token': securityToken // 使用STS签名时必传。
},
header: {
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
// 'content-type': 'multipart/form-data',
'X-Requested-With': 'XMLHttpRequest'
},
success: (res) => {
if (filePathUrl && !vm.audit) {
vm.nodata = true
if (text) {
if (text == 'back') {
vm.photo.splice(2, 1, filePathUrl)
} else if (text == 'just') {
vm.photo.splice(1, 1, filePathUrl)
}
} else {
vm.photo.splice(0, 1, filePathUrl)
}
} else {
vm.photo.splice(0, 1, value)
}
setTimeout(() => {
vm.loading = false
}, 500)
} else if (value && vm.audit) {
// vm.showSubmit = true
vm.nodata = true
if (text) {
if (text == 'back') {
vm.photo.splice(2, 1, value)
vm.backShow = true
} else if (text == 'just') {
vm.photo.splice(1, 1, value)
vm.justShow = true
setTimeout(() => {
vm.loading = false
}, 500)
} else if (filePathUrl && vm.audit) {
// vm.showSubmit = true
vm.nodata = true
if (text) {
if (text == 'back') {
vm.photo.splice(2, 1, filePathUrl)
vm.backShow = true
} else if (text == 'just') {
vm.photo.splice(1, 1, filePathUrl)
vm.justShow = true
}
} else {
vm.photo.splice(0, 1, filePathUrl)
vm.holdShow = true
}
} else {
vm.photo.splice(0, 1, value)
vm.holdShow = true
}
setTimeout(() => {
setTimeout(() => {
vm.loading = false
}, 500)
}, 500)
}
wx.hideLoading()
console.log(vm.photo)
console.log(vm.setImgArr)
if (vm.photo[0] != vm.setImgArr[0] && vm.photo[1] != vm.setImgArr[1] && vm.photo[2] != vm.setImgArr[2]) {
vm.showSubmit = true
}
if (vm.audit) {
vm.againShow = true
}
},
fail: (err) => {
wx.showModal({ // 使用模态框提示用户进行操作
title: `温馨提示:`,
content: `很抱歉` + err,
showCancel: false,
confirmText: `确定`,
success: function (res) {
if (res.confirm) {
vm.$gotoBack(1)
vm.$emit('changeVal', '')
}
}
})
}
console.log(vm.photo)
console.log(vm.setImgArr)
if (vm.photo[0] != vm.setImgArr[0] && vm.photo[1] != vm.setImgArr[1] && vm.photo[2] != vm.setImgArr[2]) {
vm.showSubmit = true
})
} else {
let vm = this
vm.$showToast(`网络环境异常,请稍后重试`)
wx.request({
url: `${service.host}/ali/upload/signature`,
header: {
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
'X-Requested-With': 'XMLHttpRequest'
},
method: 'get',
data: {},
success: ({code, data}) => {
console.log(filePaths, data, 'd=====')
vm.uploadData = data.data
vm.$app.$options.globalData.uploadData = data.data
vm.uploadFile(filePaths)
// vm.date = new Date()
// vm.date.setHours( vm.date.getHours() + 1)
// vm.olicyText = {
// expiration: vm.toISOString(), // 设置policy过期时间。
// conditions: [
// // 限制上传大小。
// ["content-length-range", 0, 1024 * 1024 * 1024],
// ],
// }
// vm.uploadData.policy = Base64.encode(JSON.stringify(policyText)) // policy必须为base64的string。
}
if (vm.audit) {
vm.againShow = true
}
},
fail: (res) => {
vm.loading = false
vm.$showToast('上传失败,请重新上传')
},
complete: () => {
}
})
})
console.log('1111111111')
}
},
// uploadFile(filePaths, text) {
// let vm = this
// vm.setImgArr = wx.getStorageSync('authenticationImg')
// wx.uploadFile({
// url: service.image_upload,
// filePath: filePaths,
// method: 'POST',
// name: 'fileData',
// header: {
// 'Authorization': 'Bearer ' + wx.getStorageSync('token'),
// 'content-type': 'multipart/form-data',
// 'X-Requested-With': 'XMLHttpRequest'
// },
// success: (res) => {
// let value = JSON.parse(res.data).data
// if (value && !vm.audit) {
// vm.nodata = true
// if (text) {
// if (text == 'back') {
// vm.photo.splice(2, 1, value)
// } else if (text == 'just') {
// vm.photo.splice(1, 1, value)
// }
// } else {
// vm.photo.splice(0, 1, value)
// }
// setTimeout(() => {
// vm.loading = false
// }, 500)
// } else if (value && vm.audit) {
// // vm.showSubmit = true
// vm.nodata = true
// if (text) {
// if (text == 'back') {
// vm.photo.splice(2, 1, value)
// vm.backShow = true
// } else if (text == 'just') {
// vm.photo.splice(1, 1, value)
// vm.justShow = true
// }
// } else {
// vm.photo.splice(0, 1, value)
// vm.holdShow = true
// }
// setTimeout(() => {
// vm.loading = false
// }, 500)
// }
//
// console.log(vm.photo)
// console.log(vm.setImgArr)
// if (vm.photo[0] != vm.setImgArr[0] && vm.photo[1] != vm.setImgArr[1] && vm.photo[2] != vm.setImgArr[2]) {
// vm.showSubmit = true
// }
// if (vm.audit) {
// vm.againShow = true
// }
// },
// fail: (res) => {
// vm.loading = false
// vm.$showToast('上传失败,请重新上传')
// },
// complete: () => {
// }
// })
// },
chooseimage(type) {
let vm = this
wx.chooseImage({
wx.chooseMedia({
count: 1,
// sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: (res) => {
vm.loading = true
vm.uploadFile(res.tempFilePaths[0], type)
console.log(res, 'res====')
vm.uploadFile(res.tempFiles[0].tempFilePath, type)
},
fail: () => {
vm.loading = false
@ -227,7 +344,7 @@
let that = this,
data = {
chat_user_id: that.chat_user_id,
photos: that.photo,
photos: JSON.stringify(that.photo),
from_user_id: wx.getStorageSync('from_user_id') ? wx.getStorageSync('from_user_id') : ''
}
if (that.showSubmit || that.againShow) {
@ -235,7 +352,7 @@
return that.$showToast('请上传手持身份证照')
}
that.$showLoading('提交中...')
that.$post({url: `${service.host}/app/manual/approve`, data}).then(({code, res}) => {
that.$post({url: `${service.host}/user/manual/approve`, data}).then(({code, res}) => {
that.loading = false
// if (!that.audit) {
that.modalName = 'showAudit'
@ -264,7 +381,7 @@
// 初始化页面数据
initPageData() {
this.$get({url: `${service.host}/approve/profile`}, {
this.$get({url: `${service.host}/user/approve/profile`}, {
success: ({code, data}) => {
this.is_real_approved = data.is_real_approved
if (data.identification_photos.length != 0) {

View File

@ -78,7 +78,7 @@ import {getPhoneNumber} from '../../utils/util'
content: 0,
value: '',
mobile: '',
imgList: ['https://image.fulllinkai.com/202407/29/81VtbuoehYoi8ade6037c96a5b403f5311e662f6fae8.jpg'],
imgList: [],
id: '',
title: '',
lable: [],

View File

@ -331,19 +331,30 @@ import base from '../../mixins/base'
that.tscList = []
that.submitList = []
}
that.hobbiesList = that.hobbiesList.map(item => {
that.customHobbiesList = wx.getStorageSync('customHobList') || []
// 兴趣爱好有值
if (data.interest_label && data.interest_label.length > 0) {
that.hobbiesList = that.hobbiesList.map(item => {
return {
title: item.title,
show: that.selectHobbiesList.includes(item.title)
title: item.title,
show: data.interest_label.includes(item.title)
}
})
that.customHobbiesList = that.customHobbiesList.map(item => {
return {
title: item,
show: that.selCustomList.includes(item.title)
})
that.customHobbiesList = that.customHobbiesList.map(item => {
return {
title: item,
show: data.interest_label.includes(item.title)
}
})
} else {
that.customHobbiesList = that.customHobbiesList.map(item => {
return {
title: item,
show: false
}
})
}
})
try {
// this.mate_conditon = data.mate_conditon
let ageArr = data.mate_conditon.age.split('-', 2)
@ -445,7 +456,7 @@ import base from '../../mixins/base'
let that = this
if (this.throttleShow) {
// this.throttleShow = false
if (!this.value) {
if (!this.value && that.text != '兴趣爱好') {
this.$showToast('请输入内容')
return
}
@ -466,8 +477,7 @@ import base from '../../mixins/base'
return item.show
}).map(item => { return item.title })
console.log(defaultHob, customHob, '----999-----')
return
// data.interest_hobby = that.value
data.interest_label = [...defaultHob, ...customHob]
} else if (that.text == '期望对方') {
data.ideal_mate = that.value
if (this.ageIndex.length != 0) {
@ -690,7 +700,10 @@ import base from '../../mixins/base'
let data = {
customName: that.customName
}
that.customHobbiesList.push({title: that.customName, show: false})
let list = that.customHobbiesList.map(item => item.title)
wx.setStorageSync('customHobList', list)
that.modalName = ''
// that.$post({url: `${service.host}/addresses/v2`}, data).then(({code, data}) => {
// that.getuser()
@ -703,6 +716,8 @@ import base from '../../mixins/base'
customName: item
}
that.customHobbiesList.splice(index, 1)
let list = that.customHobbiesList.map(item => item.title)
wx.setStorageSync('customHobList', list)
console.log(that.customHobbiesList, 'that.customHobbiesList==')
// that.$delete({url: `${service.host}/addresses/v2`}).then(({code, data}) => {
// that.getuser()

View File

@ -335,6 +335,25 @@
}
}
}
.ui-hobbies-big-box {
//margin: 20rpx 30rpx;
.hobbies-box {
position: relative;
margin-right: 20rpx;
margin-bottom: 24rpx;
padding: 10rpx 22rpx;
height: 60rpx;
background: #f5f5f5;
border-radius: 30rpx;
}
.hobbies-box-select {
color: #FFFFFF;
background: #FF5380;
}
}
.textareaStyle{
margin-top: -8rpx;
width: 80vw;
@ -818,7 +837,11 @@
<image src="https://images.ufutx.com/202004/13/c9505127b21e909aae5a609987f5ac66.png" class="icon flo_r" mode="widthFix" @tap="showModal('interest_hobby','兴趣爱好','日常生活你有什么爱好?可以写一下')"/>
</view>
<view class="mainPhoto" @tap="showModal('interest_hobby','兴趣爱好','日常生活你有什么爱好?可以写一下')">
<text v-if="mylibs.interest_hobby" class="color-333">{{mylibs.interest_hobby}}</text>
<view class="f-fc ui-wrap ui-hobbies-big-box" v-if="mylibs.interest_label">
<view class="hobbies-box " v-for="(item,index) in mylibs.interest_label" :key="index">
{{item}}
</view>
</view>
<view v-else class="color-bbb">日常生活你有什么爱好?可以写一下</view>
<!--<view>{{mylibs.introduction}}</view>-->
</view>
@ -1223,7 +1246,10 @@
url: images
}
}).then(({code, data}) => {
vm.photos = [...vm.photos, ...data]
let dataV = data.map(item => {
return { photo: item }
})
vm.photos = [...vm.photos, ...dataV]
vm.lipImgs.push(data)
vm.choosePicsShow = false
clearTimeout(vm.nextTimer)

View File

@ -118,9 +118,10 @@
import wepy from '@wepy/core'
import https from '../../mixins/https'
import base from '../../mixins/base'
import { service } from '../../config.js'
const app = getApp().$wepy.$options
wepy.page({
mixins: [base, https],
data: {
@ -177,8 +178,8 @@
this.chat_user_id = e.chat_user_id
}
this.rankList = []
this.system = wx.getStorageSync('system')
console.log(this.system, '222')
this.system = app.globalData.systemInfo.system.split(' ')[0]
console.log(this.system, '2224')
if (this.system == 'iOS') {
this.$redirectTo(`/pages/users/upgradeVIP2?chat_user_id=${this.chat_user_id}`)
return

View File

@ -23,7 +23,7 @@
<view class="font_24 white flo_l" style="color: #f7e4ad;width: 70%; ">
{{user.rank_deadline?user.rank_deadline+'到期':'未开通'}}
</view>
<swiper class="card-swiper" circular="true" bindchange="cardSwiper" current="{{cardCur}}">
<swiper class="card-swiper" circular="true" previous-margin="1px" bindchange="cardSwiper" current="{{cardCur}}">
<swiper-item v-for="(item,index) in rankList" :key="index" class="{{cardCur==index?'cur':''}}" @tap="showFn(index)">
<view :class="{'bg-grey': !item.id}" class="swiper-item radius shadow margin-top">
<image :src="item.pic" mode="aspectFill" style="width: 100%"></image>