update
This commit is contained in:
parent
c14c981e89
commit
0b497d3fdc
@ -10,7 +10,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
background: red;
|
background: #f8f8f8;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -717,10 +717,10 @@
|
|||||||
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 (!vm.$signInVerify()) {
|
if (!vm.$signInVerify()) {
|
||||||
// vm.loginShow = true
|
vm.loginShow = true
|
||||||
// return
|
return
|
||||||
// }
|
}
|
||||||
if (titles.includes(text) && !is_base_info) {
|
if (titles.includes(text) && !is_base_info) {
|
||||||
vm.showVisitorModel = true
|
vm.showVisitorModel = true
|
||||||
return
|
return
|
||||||
|
|||||||
@ -160,7 +160,7 @@
|
|||||||
let data = {
|
let data = {
|
||||||
photo: path
|
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.$Toast_success('上传成功')
|
||||||
this.$gotoBack(1)
|
this.$gotoBack(1)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
|||||||
@ -10,14 +10,14 @@
|
|||||||
<view class="page__bd" v-for="(item,index) in list" :key="index" >
|
<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 borrowlist" @tap="gotoFriendPage(item)" @longpress="remove(item.id)">
|
||||||
<view class="flo_l weui-cell__hd" >
|
<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>
|
||||||
<view class="flo_l" style="width: 78%;">
|
<view class="flo_l" style="width: 78%;">
|
||||||
<view class="font_28 flo_l color-666 ellipsis_1 bold" style="margin-left: 20rpx;">
|
<view class="font_28 flo_l color-666 ellipsis_1 bold" style="margin-left: 20rpx;">
|
||||||
{{item.linking_user.nickname}}
|
{{item.nickname}}
|
||||||
</view>
|
</view>
|
||||||
<view class="font_28 flo_l ellipsis_1" style="margin-left: 6rpx;margin-top: 2rpx;">
|
<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>
|
<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>
|
||||||
</view>
|
</view>
|
||||||
@ -155,7 +155,7 @@ wepy.page({
|
|||||||
confirmText: '确定',
|
confirmText: '确定',
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
if (res.confirm) {
|
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.$showToast('移除成功')
|
||||||
vm.page = 1
|
vm.page = 1
|
||||||
vm.getLibraries()
|
vm.getLibraries()
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<tabSearchV2 title="搜索昵称" BColor="#F8F8F8" inputColor="#fff" @search="getSearch"></tabSearchV2>
|
<tabSearchV2 title="搜索昵称" BColor="#F8F8F8" inputColor="#fff" @search="getSearch"></tabSearchV2>
|
||||||
</view>
|
</view>
|
||||||
<view class="container">
|
<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="content_list f-fc">
|
||||||
<view class="cu-avatar round lg" :style="{backgroundImage:'url('+(item.photo || item.circle_avatar)+');'}"></view>
|
<view class="cu-avatar round lg" :style="{backgroundImage:'url('+(item.photo || item.circle_avatar)+');'}"></view>
|
||||||
<view class="f-fcfs f-fdc m_ct">
|
<view class="f-fcfs f-fdc m_ct">
|
||||||
@ -214,7 +214,10 @@ wepy.page({
|
|||||||
_this.loading = false
|
_this.loading = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data = data.data
|
data = data.data.map(item => {
|
||||||
|
item.isTouchMove = false
|
||||||
|
return item
|
||||||
|
})
|
||||||
for (var i = 0; i < data.length; i++) {
|
for (var i = 0; i < data.length; i++) {
|
||||||
if (data[i].pivot && data[i].pivot.created_at) {
|
if (data[i].pivot && data[i].pivot.created_at) {
|
||||||
data[i].pivot.created_at = data[i].pivot.created_at.split(' ', 1)
|
data[i].pivot.created_at = data[i].pivot.created_at.split(' ', 1)
|
||||||
@ -227,9 +230,13 @@ wepy.page({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (_this.list.length === 0 || _this.page === 1) {
|
if (_this.list.length === 0 || _this.page === 1) {
|
||||||
_this.list = data
|
_this.list = data.map(item => {
|
||||||
|
item.isTouchMove = false
|
||||||
|
return item
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
data.map(function (item, index) {
|
data.map(function (item, index) {
|
||||||
|
item.isTouchMove = false
|
||||||
_this.list.push(item)
|
_this.list.push(item)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -299,30 +306,34 @@ wepy.page({
|
|||||||
},
|
},
|
||||||
gotoNew(e) {
|
gotoNew(e) {
|
||||||
let item = 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) {
|
touchstart (e) {
|
||||||
let vm = this
|
let vm = this
|
||||||
vm.list.forEach(function (v, i) {
|
vm.list.forEach(function (v, i) {
|
||||||
if (v.isTouchMove) { v.isTouchMove = false }
|
if (v.isTouchMove) { v.isTouchMove = false }
|
||||||
})
|
})
|
||||||
vm.startX = e.changedTouches[0].clientX
|
vm.startX = e.$wx.changedTouches[0].clientX
|
||||||
vm.startY = e.changedTouches[0].clientY
|
vm.startY = e.$wx.changedTouches[0].clientY
|
||||||
},
|
},
|
||||||
touchmove (e) {
|
touchmove (e) {
|
||||||
var that = this
|
var that = this
|
||||||
that.index = e.currentTarget.dataset.index
|
that.index = e.$wx.currentTarget.dataset.index
|
||||||
var startX = that.startX
|
var startX = that.startX
|
||||||
var startY = that.startY
|
var startY = that.startY
|
||||||
var touchMoveX = e.changedTouches[0].clientX
|
var touchMoveX = e.$wx.changedTouches[0].clientX
|
||||||
var touchMoveY = e.changedTouches[0].clientY
|
var touchMoveY = e.$wx.changedTouches[0].clientY
|
||||||
var angle = that.angle({ X: startX, Y: startY }, { X: touchMoveX, Y: touchMoveY })
|
var angle = that.angle({ X: startX, Y: startY }, { X: touchMoveX, Y: touchMoveY })
|
||||||
|
|
||||||
that.list.forEach(function (v, i) {
|
that.list.forEach(function (v, i) {
|
||||||
v.isTouchMove = false
|
v.isTouchMove = false
|
||||||
if (Math.abs(angle) > 30) return
|
if (Math.abs(angle) > 30) return
|
||||||
if (i == that.index) {
|
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 = ''
|
this.inputVal = ''
|
||||||
},
|
},
|
||||||
inputTyping(e) {
|
inputTyping(e) {
|
||||||
this.inputVal = e.detail.value
|
this.inputVal = e.$wx.detail.value
|
||||||
console.log(this.inputVal)
|
console.log(this.inputVal)
|
||||||
this.page = 1
|
this.page = 1
|
||||||
this.getLibraries(this.inputVal)
|
this.getLibraries(this.inputVal)
|
||||||
},
|
},
|
||||||
tabClick(e) {
|
tabClick(e) {
|
||||||
this.sliderOffset = e.currentTarget.offsetLeft
|
this.sliderOffset = e.$wx.currentTarget.offsetLeft
|
||||||
this.activeIndex = e.currentTarget.id
|
this.activeIndex = e.$wx.currentTarget.id
|
||||||
this.getLibraries()
|
this.getLibraries()
|
||||||
},
|
},
|
||||||
goto(url) {
|
goto(url) {
|
||||||
|
|||||||
@ -708,8 +708,8 @@
|
|||||||
<view class="info-avatar">
|
<view class="info-avatar">
|
||||||
<image :src="mylibs.photo" class="info-avatar-image" @tap="choosePic"></image>
|
<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>
|
<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">
|
<view class="info-avatar-audit colorfff font_24" v-if="mylibs.is_photo_audited==0 || mylibs.is_photo_audited==2">
|
||||||
{{mylibs.is_photo_audited==-1 ? '形象照审核未通过' : '形象照审核中...'}}
|
{{mylibs.is_photo_audited==0 ? '形象照审核未通过' : '形象照审核中...'}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -1196,16 +1196,17 @@
|
|||||||
},
|
},
|
||||||
getDailyVip() { // 领取24小时VIP
|
getDailyVip() { // 领取24小时VIP
|
||||||
let vm = this
|
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'
|
vm.modalName = 'prompt'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
vm.$showLoading('领取中...')
|
vm.$showLoading('领取中...')
|
||||||
this.$post({url: `${service.host}/get/daily/super/rank`}, {
|
this.$post({url: `${service.host}/rank/daily/complete/profile`}, {
|
||||||
success: ({code, data}) => {
|
success: ({code, data}) => {
|
||||||
console.log('领取成功')
|
console.log('领取成功')
|
||||||
vm.modalName = 'successful'
|
vm.modalName = 'successful'
|
||||||
vm.mylibs.has_get_daily_rank = 1
|
vm.mylibs.has_get_daily_rank = true
|
||||||
|
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
},
|
},
|
||||||
|
|||||||
@ -357,13 +357,13 @@
|
|||||||
}
|
}
|
||||||
that.$post({url: url, data}).then(({code, data}) => {
|
that.$post({url: url, data}).then(({code, data}) => {
|
||||||
that.trade_no = data.trade_no
|
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.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
||||||
that.getUserData()
|
that.getUserData()
|
||||||
that.$Toast_success('支付成功')
|
that.$Toast_success('支付成功')
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
let wxconfig = data.wx_pay.config
|
let wxconfig = data.config
|
||||||
// wx.config(JSON.parse(response.data.data.order.wx_pay.js));
|
// wx.config(JSON.parse(response.data.data.order.wx_pay.js));
|
||||||
if (wxconfig.payment_debug) {
|
if (wxconfig.payment_debug) {
|
||||||
return that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
return that.$post({url: `${service.host}/order/${that.trade_no}/callback`}).then(({code, data}) => {
|
||||||
@ -372,7 +372,7 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
wx.requestPayment({
|
wx.requestPayment({
|
||||||
timeStamp: wxconfig.timestamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
|
timeStamp: wxconfig.timeStamp, // 支付签名时间戳,注意微信jssdk中的所有使用timestamp字段均为小写。但最新版的支付后台生成签名使用的timeStamp字段名需大写其中的S字符
|
||||||
nonceStr: wxconfig.nonceStr, // 支付签名随机串,不长于 32 位
|
nonceStr: wxconfig.nonceStr, // 支付签名随机串,不长于 32 位
|
||||||
package: wxconfig.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***)
|
package: wxconfig.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=***)
|
||||||
signType: wxconfig.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
|
signType: wxconfig.signType, // 签名方式,默认为'SHA1',使用新版支付需传入'MD5'
|
||||||
@ -384,6 +384,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
fail: function (res) {
|
fail: function (res) {
|
||||||
|
console.log(res, '===')
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '已取消支付',
|
title: '已取消支付',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user