This commit is contained in:
lanzhihui 2024-09-29 16:36:49 +08:00
parent c14c981e89
commit 0b497d3fdc
7 changed files with 44 additions and 31 deletions

View File

@ -10,7 +10,7 @@
flex-direction: column;
align-items: center;
justify-content: space-between;
background: red;
background: #f8f8f8;
}
</style>
<script>

View File

@ -717,10 +717,10 @@
let titles = ['好友', '关注', '粉丝', '访客'], {is_base_info} = app.globalData,
vm = this, {id} = wx.getStorageSync('userInfo')
// 校验是否完成注册资料
// if (!vm.$signInVerify()) {
// vm.loginShow = true
// return
// }
if (!vm.$signInVerify()) {
vm.loginShow = true
return
}
if (titles.includes(text) && !is_base_info) {
vm.showVisitorModel = true
return

View File

@ -160,7 +160,7 @@
let data = {
photo: path
}
this.$put({url: `${service.host}/user/register/profile`, data}).then(({code, data}) => {
this.$post({url: `${service.host}/user/photo`, data}).then(({code, data}) => {
this.$Toast_success('上传成功')
this.$gotoBack(1)
}).finally(() => {

View File

@ -10,14 +10,14 @@
<view class="page__bd" v-for="(item,index) in list" :key="index" >
<view class="flo_l borrowlist" @tap="gotoFriendPage(item)" @longpress="remove(item.id)">
<view class="flo_l weui-cell__hd" >
<image src="{{item.linking_user.avatar}}" mode="aspectFill" style="width: 120rpx;height: 120rpx;border-radius: 12rpx;" class="flo_l"></image>
<image :src="item.photo|| item.avatar" mode="aspectFill" style="width: 120rpx;height: 120rpx;border-radius: 12rpx;" class="flo_l"></image>
</view>
<view class="flo_l" style="width: 78%;">
<view class="font_28 flo_l color-666 ellipsis_1 bold" style="margin-left: 20rpx;">
{{item.linking_user.nickname}}
{{item.nickname}}
</view>
<view class="font_28 flo_l ellipsis_1" style="margin-left: 6rpx;margin-top: 2rpx;">
<image src="https://images.ufutx.com/202002/20/a92b5d29dedb9932568f97fcdff865bc.png" mode="aspectFit" v-if="item.linking_user.sex == 1" style="width: 38rpx;height: 38rpx;" class="flo_l"></image>
<image src="https://images.ufutx.com/202002/20/a92b5d29dedb9932568f97fcdff865bc.png" mode="aspectFit" v-if="item.sex == 1" style="width: 38rpx;height: 38rpx;" class="flo_l"></image>
<image src="https://images.ufutx.com/202002/20/40b26d71cf2af9b1be0f874605c6ef2f.png" mode="aspectFit" v-else style="width: 38rpx;height: 38rpx;" class="flo_l"></image>
</view>
</view>
@ -155,7 +155,7 @@ wepy.page({
confirmText: '确定',
success: function (res) {
if (res.confirm) {
vm.$delete({url: `${service.host}user/${id}/linking/blacklist`}).then(({code, data}) => {
vm.$delete({url: `${service.host}/user/${id}/linking/blacklist`}).then(({code, data}) => {
vm.$showToast('移除成功')
vm.page = 1
vm.getLibraries()

View File

@ -4,7 +4,7 @@
<tabSearchV2 title="搜索昵称" BColor="#F8F8F8" inputColor="#fff" @search="getSearch"></tabSearchV2>
</view>
<view class="container">
<view :class="{'touch-move-active': item.isTouchMove && title != '关注我的'}" class="touch-item" bindtouchstart="touchstart" bindtouchmove="touchmove" v-for="(item,index) in list" :key="index" @tap="gotoFriendPage(item)">
<view :class="{'touch-move-active': item.isTouchMove && title != '关注我的'}" class="touch-item " bindtouchstart="touchstart" bindtouchmove="touchmove" v-for="(item,index) in list" data-index="{{index}}" :key="index" @tap="gotoFriendPage(item)">
<view class="content_list f-fc">
<view class="cu-avatar round lg" :style="{backgroundImage:'url('+(item.photo || item.circle_avatar)+');'}"></view>
<view class="f-fcfs f-fdc m_ct">
@ -214,7 +214,10 @@ wepy.page({
_this.loading = false
return
}
data = data.data
data = data.data.map(item => {
item.isTouchMove = false
return item
})
for (var i = 0; i < data.length; i++) {
if (data[i].pivot && data[i].pivot.created_at) {
data[i].pivot.created_at = data[i].pivot.created_at.split(' ', 1)
@ -227,9 +230,13 @@ wepy.page({
return
}
if (_this.list.length === 0 || _this.page === 1) {
_this.list = data
_this.list = data.map(item => {
item.isTouchMove = false
return item
})
} else {
data.map(function (item, index) {
item.isTouchMove = false
_this.list.push(item)
})
}
@ -299,30 +306,34 @@ wepy.page({
},
gotoNew(e) {
let item = e
this.$goto(`/pages/home/chitchat?id=${item.id}&name=${item.nickname}&type=${item.type}&icon=${item.photo}`)
this.$goto(`/pages/news/chitchat?id=${item.id}&name=${item.nickname}&type=${item.type}&icon=${item.photo}`)
},
touchstart (e) {
let vm = this
vm.list.forEach(function (v, i) {
if (v.isTouchMove) { v.isTouchMove = false }
})
vm.startX = e.changedTouches[0].clientX
vm.startY = e.changedTouches[0].clientY
vm.startX = e.$wx.changedTouches[0].clientX
vm.startY = e.$wx.changedTouches[0].clientY
},
touchmove (e) {
var that = this
that.index = e.currentTarget.dataset.index
that.index = e.$wx.currentTarget.dataset.index
var startX = that.startX
var startY = that.startY
var touchMoveX = e.changedTouches[0].clientX
var touchMoveY = e.changedTouches[0].clientY
var touchMoveX = e.$wx.changedTouches[0].clientX
var touchMoveY = e.$wx.changedTouches[0].clientY
var angle = that.angle({ X: startX, Y: startY }, { X: touchMoveX, Y: touchMoveY })
that.list.forEach(function (v, i) {
v.isTouchMove = false
if (Math.abs(angle) > 30) return
if (i == that.index) {
if (touchMoveX > startX) { v.isTouchMove = false } else { v.isTouchMove = true }
if (touchMoveX > startX) {
v.isTouchMove = false
} else {
v.isTouchMove = true
}
}
})
},
@ -355,14 +366,14 @@ wepy.page({
this.inputVal = ''
},
inputTyping(e) {
this.inputVal = e.detail.value
this.inputVal = e.$wx.detail.value
console.log(this.inputVal)
this.page = 1
this.getLibraries(this.inputVal)
},
tabClick(e) {
this.sliderOffset = e.currentTarget.offsetLeft
this.activeIndex = e.currentTarget.id
this.sliderOffset = e.$wx.currentTarget.offsetLeft
this.activeIndex = e.$wx.currentTarget.id
this.getLibraries()
},
goto(url) {

View File

@ -708,8 +708,8 @@
<view class="info-avatar">
<image :src="mylibs.photo" class="info-avatar-image" @tap="choosePic"></image>
<image src="https://image.fulllinkai.com/202407/31/7c61c1831473d9793b3d0dd75edcb4b2.png" class="info-avatar-upload"></image>
<view class="info-avatar-audit colorfff font_24" v-if="mylibs.is_photo_audited==-1 || mylibs.is_photo_audited==0">
{{mylibs.is_photo_audited==-1 ? '形象照审核未通过' : '形象照审核中...'}}
<view class="info-avatar-audit colorfff font_24" v-if="mylibs.is_photo_audited==0 || mylibs.is_photo_audited==2">
{{mylibs.is_photo_audited==0 ? '形象照审核未通过' : '形象照审核中...'}}
</view>
</view>
</view>
@ -1196,16 +1196,17 @@
},
getDailyVip() { // 领取24小时VIP
let vm = this
if (!vm.mylibs.can_get_daily_rank) {
console.log(vm.profile_count, 'vm.mylibs.profile_count')
if (vm.profile_count != 100) {
vm.modalName = 'prompt'
return
}
vm.$showLoading('领取中...')
this.$post({url: `${service.host}/get/daily/super/rank`}, {
this.$post({url: `${service.host}/rank/daily/complete/profile`}, {
success: ({code, data}) => {
console.log('领取成功')
vm.modalName = 'successful'
vm.mylibs.has_get_daily_rank = 1
vm.mylibs.has_get_daily_rank = true
wx.hideLoading()
},

View File

@ -357,13 +357,13 @@
}
that.$post({url: url, data}).then(({code, data}) => {
that.trade_no = data.trade_no
if (data.wx_pay.length == 0) {
if (data.length == 0) {
that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
that.getUserData()
that.$Toast_success('支付成功')
})
} else {
let wxconfig = data.wx_pay.config
let wxconfig = data.config
// wx.config(JSON.parse(response.data.data.order.wx_pay.js));
if (wxconfig.payment_debug) {
return that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
@ -372,7 +372,7 @@
})
}
wx.requestPayment({
timeStamp: wxconfig.timestamp, // 支付签名时间戳注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
timeStamp: wxconfig.timeStamp, // 支付签名时间戳注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
nonceStr: wxconfig.nonceStr, // 支付签名随机串,不长于 32 位
package: wxconfig.package, // 统一支付接口返回的prepay_id参数值提交格式如prepay_id=***
signType: wxconfig.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
@ -384,6 +384,7 @@
})
},
fail: function (res) {
console.log(res, '===')
wx.showToast({
title: '已取消支付',
icon: 'none',