功能update
This commit is contained in:
parent
6d311b2cb6
commit
85b9464b18
@ -212,6 +212,7 @@ subPackages: [
|
|||||||
'exclusiveService',
|
'exclusiveService',
|
||||||
'myDynamic',
|
'myDynamic',
|
||||||
'logoutDefault',
|
'logoutDefault',
|
||||||
|
'ImageCropper',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -118,7 +118,7 @@ wepy.component({
|
|||||||
console.log(vm.uploadData, 'vm.uploadData')
|
console.log(vm.uploadData, 'vm.uploadData')
|
||||||
if (vm.uploadData) {
|
if (vm.uploadData) {
|
||||||
vm.$showLoading(`上传中...`)
|
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
|
let filePathUrl = vm.uploadData.host + '/' + vm.uploadData.dir + fileName
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
url: vm.uploadData.host,
|
url: vm.uploadData.host,
|
||||||
@ -182,7 +182,7 @@ wepy.component({
|
|||||||
let vm = this
|
let vm = this
|
||||||
vm.$showToast(`网络环境异常,请稍后重试`)
|
vm.$showToast(`网络环境异常,请稍后重试`)
|
||||||
wx.request({
|
wx.request({
|
||||||
url: `${service.host}/ali/upload/sts/token`,
|
url: `${service.host}/ali/upload/signature`,
|
||||||
header: {
|
header: {
|
||||||
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
|
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
|
||||||
'X-Requested-With': 'XMLHttpRequest'
|
'X-Requested-With': 'XMLHttpRequest'
|
||||||
@ -192,16 +192,7 @@ wepy.component({
|
|||||||
success: ({code, data}) => {
|
success: ({code, data}) => {
|
||||||
vm.uploadData = data.data
|
vm.uploadData = data.data
|
||||||
vm.$app.$options.globalData.uploadData = data.data
|
vm.$app.$options.globalData.uploadData = data.data
|
||||||
// vm.date = new Date()
|
vm.uploadFile(filePath, type, filePaths, index)
|
||||||
// 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')
|
console.log('1111111111')
|
||||||
|
|||||||
@ -87,8 +87,8 @@
|
|||||||
default: ''
|
default: ''
|
||||||
},
|
},
|
||||||
is_base_info: {
|
is_base_info: {
|
||||||
type: String,
|
type: Boolean,
|
||||||
default: ''
|
default: false
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -474,6 +474,7 @@
|
|||||||
height:100%;
|
height:100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
z-index: 1;
|
||||||
.main{
|
.main{
|
||||||
flex:1;
|
flex:1;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
1292
src/components/wepy-image-cropper.wpy
Normal file
1292
src/components/wepy-image-cropper.wpy
Normal file
File diff suppressed because it is too large
Load Diff
1320
src/components/wepy-image-cropperV2.wpy
Normal file
1320
src/components/wepy-image-cropperV2.wpy
Normal file
File diff suppressed because it is too large
Load Diff
@ -11,11 +11,11 @@
|
|||||||
<view class="bold font_32 text-black">{{ listCount.follow_count || '0' }}</view>
|
<view class="bold font_32 text-black">{{ listCount.follow_count || '0' }}</view>
|
||||||
<view class="font_24">关注</view>
|
<view class="font_24">关注</view>
|
||||||
</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="bold font_32 text-black">{{ listCount.fans_count || '0' }}</view>
|
||||||
<view class="font_24">粉丝</view>
|
<view class="font_24">粉丝</view>
|
||||||
</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="bold font_32 text-black">{{ listCount.preview_count || '0' }}</view>
|
||||||
<view class="font_24">访客</view>
|
<view class="font_24">访客</view>
|
||||||
</view>
|
</view>
|
||||||
@ -222,16 +222,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <block v-if="posterConfig">-->
|
<block v-show="posterConfig">
|
||||||
<!-- <!– 生成海报–>-->
|
<!-- 生成海报-->
|
||||||
<!-- <poster type="2d" id="poster" ref="poster" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig}}"-->
|
<poster type="2d" id="poster" ref="poster" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig}}"
|
||||||
<!-- bind:success="onPosterSuccess">-->
|
bind:success="onPosterSuccess">
|
||||||
<!-- </poster>-->
|
</poster>
|
||||||
<!-- <!– 分享微信卡片–>-->
|
<!-- 分享微信卡片-->
|
||||||
<!-- <poster type="2d" id="posterV1" ref="posterV1" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig1}}"-->
|
<poster type="2d" id="posterV1" ref="posterV1" hide-loading="{{false}}" preload="{{false}}" config="{{posterConfig1}}"
|
||||||
<!-- bind:success="onPosterSuccessWx" >-->
|
bind:success="onPosterSuccessWx" >
|
||||||
<!-- </poster>-->
|
</poster>
|
||||||
<!-- </block>-->
|
</block>
|
||||||
<block v-if="!hide && posterConfig">
|
<block v-if="!hide && posterConfig">
|
||||||
<shareComponent :hide.sync="hide" :shareImage.sync="invite_pic"></shareComponent>
|
<shareComponent :hide.sync="hide" :shareImage.sync="invite_pic"></shareComponent>
|
||||||
</block>
|
</block>
|
||||||
@ -249,11 +249,7 @@
|
|||||||
import https from '../../mixins/https'
|
import https from '../../mixins/https'
|
||||||
import base from '../../mixins/base'
|
import base from '../../mixins/base'
|
||||||
import {service} from '../../config.js'
|
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
|
const app = getApp().$wepy.$options
|
||||||
// import shareComponent from '../../components/shareComponent'
|
// import shareComponent from '../../components/shareComponent'
|
||||||
import {getPhoneNumber} from '../../utils/util'
|
import {getPhoneNumber} from '../../utils/util'
|
||||||
@ -636,51 +632,53 @@
|
|||||||
// var recordTime = String(parseFloat(new Date(repTime).getTime()) / 1000)
|
// var recordTime = String(parseFloat(new Date(repTime).getTime()) / 1000)
|
||||||
// self.UID = recordTime.substring(recordTime.length - 5) + String(data.id)
|
// self.UID = recordTime.substring(recordTime.length - 5) + String(data.id)
|
||||||
wx.setStorageSync('UID', self.UID)
|
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.posterConfig = self.shareConfig
|
||||||
// self.$nextTick(() => {
|
console.log('333===0999')
|
||||||
// setTimeout(() => {
|
self.$nextTick(() => {
|
||||||
// self.$wx.selectComponent('#poster').onCreate(true, self)
|
setTimeout(() => {
|
||||||
// }, 100)
|
console.log(self.$wx.selectComponent('#poster'), self.$refs.poster, '---99')
|
||||||
// })
|
self.$wx.selectComponent('#poster').onCreate(true, self.$wx)
|
||||||
|
}, 100)
|
||||||
|
})
|
||||||
// 小程序分享
|
// 小程序分享
|
||||||
// self.title = `我是"${data.user.nickname}",这是我的小程序卡片`
|
self.title = `我是"${data.user.nickname}",这是我的小程序卡片`
|
||||||
// if (data.photo || data.avatar) {
|
if (data.photo || data.avatar) {
|
||||||
// let year = '', city = '', degree = '', industry_sub = ''
|
let year = '', city = '', degree = '', industry_sub = ''
|
||||||
// if (data.profile_courtship.birthday) {
|
if (data.profile_courtship.birthday) {
|
||||||
// year = data.profile_courtship.birthday.slice(2, 4) + '年'
|
year = data.profile_courtship.birthday.slice(2, 4) + '年'
|
||||||
// }
|
}
|
||||||
// if (data.profile_courtship.city) {
|
if (data.profile_courtship.city) {
|
||||||
// city = data.profile_courtship.city
|
city = data.profile_courtship.city
|
||||||
// }
|
}
|
||||||
// if (data.profile_courtship.degree) {
|
if (data.profile_courtship.degree) {
|
||||||
// degree = data.profile_courtship.degree
|
degree = data.profile_courtship.degree
|
||||||
// }
|
}
|
||||||
// if (data.industry_sub) {
|
if (data.industry_sub) {
|
||||||
// industry_sub = data.industry_sub
|
industry_sub = data.industry_sub
|
||||||
// }
|
}
|
||||||
// console.log(year, city, degree, industry_sub)
|
console.log(year, city, degree, industry_sub)
|
||||||
// self.shareConfig1.texts[0].text = `${year} | ${city}`
|
self.shareConfig1.texts[0].text = `${year} | ${city}`
|
||||||
// self.shareConfig1.texts[1].text = `${degree} | ${industry_sub}`
|
self.shareConfig1.texts[1].text = `${degree} | ${industry_sub}`
|
||||||
// self.shareConfig1.images[0].url = data.photo || data.avatar
|
self.shareConfig1.images[0].url = data.photo || data.avatar
|
||||||
// self.posterConfig1 = self.shareConfig1
|
self.posterConfig1 = self.shareConfig1
|
||||||
// self.$nextTick(() => {
|
self.$nextTick(() => {
|
||||||
// setTimeout(() => {
|
setTimeout(() => {
|
||||||
// self.$wx.selectComponent('#posterV1').onCreate(true)
|
self.$wx.selectComponent('#posterV1').onCreate(true, self.$wx)
|
||||||
// }, 100)
|
}, 100)
|
||||||
// })
|
})
|
||||||
// } else {
|
} else {
|
||||||
// // 重新获取分享码
|
// 重新获取分享码
|
||||||
// self.$showToast('分享图片获取失败')
|
self.$showToast('分享图片获取失败')
|
||||||
// }
|
}
|
||||||
console.log(self.posterConfig1, '7777')
|
console.log(self.posterConfig1, '7777')
|
||||||
this.init = true
|
this.init = true
|
||||||
this.user = data.user
|
this.user = data.user
|
||||||
this.user.rank_id = data.rank_profile.rank_id
|
this.user.rank_id = data.rank_profile.rank_id
|
||||||
// this.user.card_num = data.approve_profile.card_num
|
// this.user.card_num = data.approve_profile.card_num
|
||||||
// this.user.is_approved = data.approve_profile.is_approved
|
this.user.is_approved = data.approve_profile.is_approved
|
||||||
// this.user.is_real_approved = data.approve_profile.is_real_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_photo_audited = data.approve_profile.is_photo_audited
|
||||||
// this.user.name = data.approve_profile.name
|
// this.user.name = data.approve_profile.name
|
||||||
this.listCount = {
|
this.listCount = {
|
||||||
friend_count: data.friend_count,
|
friend_count: data.friend_count,
|
||||||
@ -791,7 +789,7 @@
|
|||||||
console.log(url, text)
|
console.log(url, text)
|
||||||
let titles = ['好友', '关注', '粉丝', '访客'], {is_base_info} = app.globalData,
|
let titles = ['好友', '关注', '粉丝', '访客'], {is_base_info} = app.globalData,
|
||||||
vm = this, {id} = wx.getStorageSync('userInfo')
|
vm = this, {id} = wx.getStorageSync('userInfo')
|
||||||
if (titles.includes(text) && is_base_info !== 2) {
|
if (titles.includes(text) && !is_base_info) {
|
||||||
vm.showVisitorModel = true
|
vm.showVisitorModel = true
|
||||||
return
|
return
|
||||||
// return vm.$invoke('visitorModel', 'showModal', '0') // 游客模式,无法查看
|
// return vm.$invoke('visitorModel', 'showModal', '0') // 游客模式,无法查看
|
||||||
|
|||||||
267
src/pages/users/ImageCropper.wpy
Normal file
267
src/pages/users/ImageCropper.wpy
Normal 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>
|
||||||
@ -116,7 +116,8 @@
|
|||||||
justShow: false,
|
justShow: false,
|
||||||
holdShow: false,
|
holdShow: false,
|
||||||
againShow: false,
|
againShow: false,
|
||||||
approve_history_body_reason: ''
|
approve_history_body_reason: '',
|
||||||
|
uploadData: null
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// this.$parent.getTracker(this.$root.$name, this.config.navigationBarTitleText)
|
// this.$parent.getTracker(this.$root.$name, this.config.navigationBarTitleText)
|
||||||
@ -141,81 +142,197 @@
|
|||||||
|
|
||||||
uploadFile(filePaths, text) {
|
uploadFile(filePaths, text) {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.setImgArr = wx.getStorageSync('authenticationImg')
|
console.log(filePaths, 'filePath')
|
||||||
wx.uploadFile({
|
console.log(vm.uploadData, 'vm.uploadData')
|
||||||
url: service.image_upload,
|
if (vm.uploadData) {
|
||||||
filePath: filePaths,
|
vm.$showLoading(`上传中...`)
|
||||||
method: 'POST',
|
let fileName = new Date().getTime() + Math.floor(Math.random() * 150) + '.' + filePaths.split('.').pop().toLowerCase()
|
||||||
name: 'fileData',
|
let filePathUrl = vm.uploadData.host + '/' + vm.uploadData.dir + fileName
|
||||||
header: {
|
wx.uploadFile({
|
||||||
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
|
url: vm.uploadData.host,
|
||||||
'content-type': 'multipart/form-data',
|
filePath: filePaths,
|
||||||
'X-Requested-With': 'XMLHttpRequest'
|
name: 'file', // 必须填file。
|
||||||
},
|
formData: {
|
||||||
success: (res) => {
|
key: vm.uploadData.dir + fileName,
|
||||||
let value = JSON.parse(res.data).data
|
policy: vm.uploadData.policy,
|
||||||
if (value && !vm.audit) {
|
OSSAccessKeyId: vm.uploadData.access_id,
|
||||||
vm.nodata = true
|
signature: vm.uploadData.signature
|
||||||
if (text) {
|
// 'x-oss-security-token': securityToken // 使用STS签名时必传。
|
||||||
if (text == 'back') {
|
},
|
||||||
vm.photo.splice(2, 1, value)
|
header: {
|
||||||
} else if (text == 'just') {
|
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
|
||||||
vm.photo.splice(1, 1, value)
|
// '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 {
|
setTimeout(() => {
|
||||||
vm.photo.splice(0, 1, value)
|
vm.loading = false
|
||||||
}
|
}, 500)
|
||||||
setTimeout(() => {
|
} else if (filePathUrl && vm.audit) {
|
||||||
vm.loading = false
|
// vm.showSubmit = true
|
||||||
}, 500)
|
vm.nodata = true
|
||||||
} else if (value && vm.audit) {
|
if (text) {
|
||||||
// vm.showSubmit = true
|
if (text == 'back') {
|
||||||
vm.nodata = true
|
vm.photo.splice(2, 1, filePathUrl)
|
||||||
if (text) {
|
vm.backShow = true
|
||||||
if (text == 'back') {
|
} else if (text == 'just') {
|
||||||
vm.photo.splice(2, 1, value)
|
vm.photo.splice(1, 1, filePathUrl)
|
||||||
vm.backShow = true
|
vm.justShow = true
|
||||||
} else if (text == 'just') {
|
}
|
||||||
vm.photo.splice(1, 1, value)
|
} else {
|
||||||
vm.justShow = true
|
vm.photo.splice(0, 1, filePathUrl)
|
||||||
|
vm.holdShow = true
|
||||||
}
|
}
|
||||||
} else {
|
setTimeout(() => {
|
||||||
vm.photo.splice(0, 1, value)
|
|
||||||
vm.holdShow = true
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
vm.loading = false
|
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)
|
} else {
|
||||||
console.log(vm.setImgArr)
|
let vm = this
|
||||||
if (vm.photo[0] != vm.setImgArr[0] && vm.photo[1] != vm.setImgArr[1] && vm.photo[2] != vm.setImgArr[2]) {
|
vm.$showToast(`网络环境异常,请稍后重试`)
|
||||||
vm.showSubmit = true
|
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
|
console.log('1111111111')
|
||||||
}
|
}
|
||||||
},
|
|
||||||
fail: (res) => {
|
|
||||||
vm.loading = false
|
|
||||||
vm.$showToast('上传失败,请重新上传')
|
|
||||||
},
|
|
||||||
complete: () => {
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 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) {
|
chooseimage(type) {
|
||||||
let vm = this
|
let vm = this
|
||||||
wx.chooseImage({
|
wx.chooseMedia({
|
||||||
count: 1,
|
count: 1,
|
||||||
// sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
// sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||||
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
vm.loading = true
|
vm.loading = true
|
||||||
vm.uploadFile(res.tempFilePaths[0], type)
|
console.log(res, 'res====')
|
||||||
|
vm.uploadFile(res.tempFiles[0].tempFilePath, type)
|
||||||
},
|
},
|
||||||
fail: () => {
|
fail: () => {
|
||||||
vm.loading = false
|
vm.loading = false
|
||||||
@ -227,7 +344,7 @@
|
|||||||
let that = this,
|
let that = this,
|
||||||
data = {
|
data = {
|
||||||
chat_user_id: that.chat_user_id,
|
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') : ''
|
from_user_id: wx.getStorageSync('from_user_id') ? wx.getStorageSync('from_user_id') : ''
|
||||||
}
|
}
|
||||||
if (that.showSubmit || that.againShow) {
|
if (that.showSubmit || that.againShow) {
|
||||||
@ -235,7 +352,7 @@
|
|||||||
return that.$showToast('请上传手持身份证照')
|
return that.$showToast('请上传手持身份证照')
|
||||||
}
|
}
|
||||||
that.$showLoading('提交中...')
|
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
|
that.loading = false
|
||||||
// if (!that.audit) {
|
// if (!that.audit) {
|
||||||
that.modalName = 'showAudit'
|
that.modalName = 'showAudit'
|
||||||
@ -264,7 +381,7 @@
|
|||||||
|
|
||||||
// 初始化页面数据
|
// 初始化页面数据
|
||||||
initPageData() {
|
initPageData() {
|
||||||
this.$get({url: `${service.host}/approve/profile`}, {
|
this.$get({url: `${service.host}/user/approve/profile`}, {
|
||||||
success: ({code, data}) => {
|
success: ({code, data}) => {
|
||||||
this.is_real_approved = data.is_real_approved
|
this.is_real_approved = data.is_real_approved
|
||||||
if (data.identification_photos.length != 0) {
|
if (data.identification_photos.length != 0) {
|
||||||
|
|||||||
@ -78,7 +78,7 @@ import {getPhoneNumber} from '../../utils/util'
|
|||||||
content: 0,
|
content: 0,
|
||||||
value: '',
|
value: '',
|
||||||
mobile: '',
|
mobile: '',
|
||||||
imgList: ['https://image.fulllinkai.com/202407/29/81VtbuoehYoi8ade6037c96a5b403f5311e662f6fae8.jpg'],
|
imgList: [],
|
||||||
id: '',
|
id: '',
|
||||||
title: '',
|
title: '',
|
||||||
lable: [],
|
lable: [],
|
||||||
|
|||||||
@ -331,19 +331,30 @@ import base from '../../mixins/base'
|
|||||||
that.tscList = []
|
that.tscList = []
|
||||||
that.submitList = []
|
that.submitList = []
|
||||||
}
|
}
|
||||||
|
that.customHobbiesList = wx.getStorageSync('customHobList') || []
|
||||||
that.hobbiesList = that.hobbiesList.map(item => {
|
// 兴趣爱好有值
|
||||||
|
if (data.interest_label && data.interest_label.length > 0) {
|
||||||
|
that.hobbiesList = that.hobbiesList.map(item => {
|
||||||
return {
|
return {
|
||||||
title: item.title,
|
title: item.title,
|
||||||
show: that.selectHobbiesList.includes(item.title)
|
show: data.interest_label.includes(item.title)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
that.customHobbiesList = that.customHobbiesList.map(item => {
|
that.customHobbiesList = that.customHobbiesList.map(item => {
|
||||||
return {
|
return {
|
||||||
title: item,
|
title: item,
|
||||||
show: that.selCustomList.includes(item.title)
|
show: data.interest_label.includes(item.title)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.customHobbiesList = that.customHobbiesList.map(item => {
|
||||||
|
return {
|
||||||
|
title: item,
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
try {
|
try {
|
||||||
// this.mate_conditon = data.mate_conditon
|
// this.mate_conditon = data.mate_conditon
|
||||||
let ageArr = data.mate_conditon.age.split('-', 2)
|
let ageArr = data.mate_conditon.age.split('-', 2)
|
||||||
@ -445,7 +456,7 @@ import base from '../../mixins/base'
|
|||||||
let that = this
|
let that = this
|
||||||
if (this.throttleShow) {
|
if (this.throttleShow) {
|
||||||
// this.throttleShow = false
|
// this.throttleShow = false
|
||||||
if (!this.value) {
|
if (!this.value && that.text != '兴趣爱好') {
|
||||||
this.$showToast('请输入内容')
|
this.$showToast('请输入内容')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -466,8 +477,7 @@ import base from '../../mixins/base'
|
|||||||
return item.show
|
return item.show
|
||||||
}).map(item => { return item.title })
|
}).map(item => { return item.title })
|
||||||
console.log(defaultHob, customHob, '----999-----')
|
console.log(defaultHob, customHob, '----999-----')
|
||||||
return
|
data.interest_label = [...defaultHob, ...customHob]
|
||||||
// data.interest_hobby = that.value
|
|
||||||
} else if (that.text == '期望对方') {
|
} else if (that.text == '期望对方') {
|
||||||
data.ideal_mate = that.value
|
data.ideal_mate = that.value
|
||||||
if (this.ageIndex.length != 0) {
|
if (this.ageIndex.length != 0) {
|
||||||
@ -690,7 +700,10 @@ import base from '../../mixins/base'
|
|||||||
let data = {
|
let data = {
|
||||||
customName: that.customName
|
customName: that.customName
|
||||||
}
|
}
|
||||||
|
|
||||||
that.customHobbiesList.push({title: that.customName, show: false})
|
that.customHobbiesList.push({title: that.customName, show: false})
|
||||||
|
let list = that.customHobbiesList.map(item => item.title)
|
||||||
|
wx.setStorageSync('customHobList', list)
|
||||||
that.modalName = ''
|
that.modalName = ''
|
||||||
// that.$post({url: `${service.host}/addresses/v2`}, data).then(({code, data}) => {
|
// that.$post({url: `${service.host}/addresses/v2`}, data).then(({code, data}) => {
|
||||||
// that.getuser()
|
// that.getuser()
|
||||||
@ -703,6 +716,8 @@ import base from '../../mixins/base'
|
|||||||
customName: item
|
customName: item
|
||||||
}
|
}
|
||||||
that.customHobbiesList.splice(index, 1)
|
that.customHobbiesList.splice(index, 1)
|
||||||
|
let list = that.customHobbiesList.map(item => item.title)
|
||||||
|
wx.setStorageSync('customHobList', list)
|
||||||
console.log(that.customHobbiesList, 'that.customHobbiesList==')
|
console.log(that.customHobbiesList, 'that.customHobbiesList==')
|
||||||
// that.$delete({url: `${service.host}/addresses/v2`}).then(({code, data}) => {
|
// that.$delete({url: `${service.host}/addresses/v2`}).then(({code, data}) => {
|
||||||
// that.getuser()
|
// that.getuser()
|
||||||
|
|||||||
@ -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{
|
.textareaStyle{
|
||||||
margin-top: -8rpx;
|
margin-top: -8rpx;
|
||||||
width: 80vw;
|
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','兴趣爱好','日常生活你有什么爱好?可以写一下')"/>
|
<image src="https://images.ufutx.com/202004/13/c9505127b21e909aae5a609987f5ac66.png" class="icon flo_r" mode="widthFix" @tap="showModal('interest_hobby','兴趣爱好','日常生活你有什么爱好?可以写一下')"/>
|
||||||
</view>
|
</view>
|
||||||
<view class="mainPhoto" @tap="showModal('interest_hobby','兴趣爱好','日常生活你有什么爱好?可以写一下')">
|
<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 v-else class="color-bbb">日常生活你有什么爱好?可以写一下</view>
|
||||||
<!--<view>{{mylibs.introduction}}</view>-->
|
<!--<view>{{mylibs.introduction}}</view>-->
|
||||||
</view>
|
</view>
|
||||||
@ -1223,7 +1246,10 @@
|
|||||||
url: images
|
url: images
|
||||||
}
|
}
|
||||||
}).then(({code, data}) => {
|
}).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.lipImgs.push(data)
|
||||||
vm.choosePicsShow = false
|
vm.choosePicsShow = false
|
||||||
clearTimeout(vm.nextTimer)
|
clearTimeout(vm.nextTimer)
|
||||||
|
|||||||
@ -118,9 +118,10 @@
|
|||||||
import wepy from '@wepy/core'
|
import wepy from '@wepy/core'
|
||||||
import https from '../../mixins/https'
|
import https from '../../mixins/https'
|
||||||
import base from '../../mixins/base'
|
import base from '../../mixins/base'
|
||||||
|
|
||||||
import { service } from '../../config.js'
|
import { service } from '../../config.js'
|
||||||
|
|
||||||
|
const app = getApp().$wepy.$options
|
||||||
|
|
||||||
wepy.page({
|
wepy.page({
|
||||||
mixins: [base, https],
|
mixins: [base, https],
|
||||||
data: {
|
data: {
|
||||||
@ -177,8 +178,8 @@
|
|||||||
this.chat_user_id = e.chat_user_id
|
this.chat_user_id = e.chat_user_id
|
||||||
}
|
}
|
||||||
this.rankList = []
|
this.rankList = []
|
||||||
this.system = wx.getStorageSync('system')
|
this.system = app.globalData.systemInfo.system.split(' ')[0]
|
||||||
console.log(this.system, '222')
|
console.log(this.system, '2224')
|
||||||
if (this.system == 'iOS') {
|
if (this.system == 'iOS') {
|
||||||
this.$redirectTo(`/pages/users/upgradeVIP2?chat_user_id=${this.chat_user_id}`)
|
this.$redirectTo(`/pages/users/upgradeVIP2?chat_user_id=${this.chat_user_id}`)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<view class="font_24 white flo_l" style="color: #f7e4ad;width: 70%; ">
|
<view class="font_24 white flo_l" style="color: #f7e4ad;width: 70%; ">
|
||||||
{{user.rank_deadline?user.rank_deadline+'到期':'未开通'}}
|
{{user.rank_deadline?user.rank_deadline+'到期':'未开通'}}
|
||||||
</view>
|
</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)">
|
<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">
|
<view :class="{'bg-grey': !item.id}" class="swiper-item radius shadow margin-top">
|
||||||
<image :src="item.pic" mode="aspectFill" style="width: 100%"></image>
|
<image :src="item.pic" mode="aspectFill" style="width: 100%"></image>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user