update
This commit is contained in:
parent
990007f340
commit
5005d00a48
@ -35,7 +35,7 @@ wepy.app({
|
||||
}
|
||||
},
|
||||
globalData: {
|
||||
versions: 'v5.5.87', // 版本号
|
||||
versions: 'v5.5.89', // 版本号
|
||||
navBarHeight: 0, // 导航栏高度
|
||||
navRight: 0, // 胶囊距右方间距(方保持左、右间距一致)
|
||||
navTop: 0, // 胶囊距顶部间距
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="page-user">
|
||||
<web-view src="{{url}}"></web-view>
|
||||
<web-view src="{{url}}" bindmessage="onMessage"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -60,13 +60,42 @@
|
||||
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
console.log(wx, 'wx===')
|
||||
this.url = decodeURIComponent(e.url)
|
||||
console.log(this.url)
|
||||
this.from_openid = wx.getStorageSync('openid')
|
||||
wx.showShareMenu({
|
||||
withShareTicket: true
|
||||
})
|
||||
},
|
||||
// wx.onMessage({
|
||||
// onMessage: (msg) => {
|
||||
// console.log(msg, 'gggg')
|
||||
// if (msg.action === 'pay') {
|
||||
// // 调用支付API
|
||||
// wx.requestPayment({
|
||||
// timeStamp: msg.payInfo.timeStamp,
|
||||
// nonceStr: msg.payInfo.nonceStr,
|
||||
// package: msg.payInfo.package,
|
||||
// signType: msg.payInfo.signType,
|
||||
// paySign: msg.payInfo.paySign,
|
||||
// success(res) {
|
||||
// console.log('支付成功', res)
|
||||
// // 将支付结果返回给H5页面
|
||||
// wx.postMessage({
|
||||
// data: {
|
||||
// action: 'payResult',
|
||||
// data: res
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// fail(err) {
|
||||
// console.log('支付失败', err)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
},
|
||||
|
||||
onPullDownRefresh() {
|
||||
// this.initPageData()
|
||||
@ -100,7 +129,35 @@
|
||||
},
|
||||
goto(url) {
|
||||
wx.navigateTo({url: url})
|
||||
},
|
||||
onMessage(data) {
|
||||
console.log(data.$wx.detail.data[0], 'gggg')
|
||||
let msg = data.$wx.detail.data[0]
|
||||
if (msg.action === 'pay') {
|
||||
// 调用支付API
|
||||
wx.requestPayment({
|
||||
timeStamp: msg.payInfo.timestamp,
|
||||
nonceStr: msg.payInfo.nonceStr,
|
||||
package: msg.payInfo.package,
|
||||
signType: msg.payInfo.signType,
|
||||
paySign: msg.payInfo.paySign,
|
||||
success(res) {
|
||||
console.log('支付成功', res)
|
||||
// 将支付结果返回给H5页面
|
||||
wx.postMessage({
|
||||
data: {
|
||||
action: 'payResult',
|
||||
data: res
|
||||
}
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
console.log('支付失败', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -860,8 +860,12 @@ wepy.page({
|
||||
vm.lastTime = format(msg.time)
|
||||
vm.callbackSend('text')
|
||||
})
|
||||
}
|
||||
},
|
||||
done: sendMsgDone
|
||||
})
|
||||
function sendMsgDone(error, file) {
|
||||
console.log('上传' + (!error ? '成功' : '失败'), file)
|
||||
}
|
||||
// })
|
||||
},
|
||||
// 发送图片消息
|
||||
|
||||
@ -8,6 +8,19 @@ page {
|
||||
padding-bottom: 45rpx;
|
||||
}
|
||||
|
||||
.ui-swiper-box{
|
||||
margin:32rpx 32rpx 0;
|
||||
height: 200rpx;
|
||||
border-radius:32rpx!important;
|
||||
overflow: hidden;
|
||||
}
|
||||
.ui-swiper-list{
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
height: 200rpx;
|
||||
border-radius:32rpx;
|
||||
}
|
||||
|
||||
.ui-top-up{
|
||||
width: 174rpx;
|
||||
height: 36rpx;
|
||||
@ -15,7 +28,7 @@ page {
|
||||
}
|
||||
|
||||
.ui-top-box{
|
||||
display: fiex;
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
margin-left: 6rpx;
|
||||
|
||||
@ -283,10 +296,111 @@ page {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
.ui-adv-box{
|
||||
position: fixed;
|
||||
bottom: 270rpx;
|
||||
right: 0rpx;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
color:#ffffff;
|
||||
z-index: 1000;
|
||||
background: url('https://image.fulllinkai.com/202501/07/92fabd6990d6c166d3352cf95987049f.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.ui-adv-message{
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
background: url('https://image.fulllinkai.com/202501/07/2294cafbfe5261dad430371f0aed9b52.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.ui-adv-close{
|
||||
position: absolute;
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
bottom: -44rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
background: url('https://image.fulllinkai.com/202501/07/3a14b8cc539285e3ba96b0977749bfc5.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.ui--message-fade{
|
||||
animation: adv-message-shake 1s infinite linear;
|
||||
}
|
||||
@keyframes adv-message-shake {
|
||||
0% {
|
||||
transform:rotate(0deg);
|
||||
}
|
||||
25% {
|
||||
transform:rotate(15deg);
|
||||
}
|
||||
50% {
|
||||
transform:rotate(0deg);
|
||||
}
|
||||
75% {
|
||||
transform:rotate(-15deg);
|
||||
}
|
||||
//100% {
|
||||
// transform:rotate(0deg);
|
||||
//}
|
||||
}
|
||||
.ui-fade-in {
|
||||
opacity: 0;
|
||||
animation: enter-x-left 0.4s ease-in-out 0.3s;
|
||||
animation-fill-mode: forwards;
|
||||
transform: translateX(120rpx);
|
||||
}
|
||||
.ui-fade-out {
|
||||
opacity: 1;
|
||||
animation: enter-x-right 0.4s ease-in-out 0.3s;
|
||||
animation-fill-mode: forwards;
|
||||
}
|
||||
@keyframes enter-x-left {
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
@keyframes enter-x-right {
|
||||
to {
|
||||
opacity: 0;
|
||||
transform: translateX(120rpx);
|
||||
}
|
||||
}
|
||||
.login_prompt_box {
|
||||
position: fixed;
|
||||
top:50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
.ui-adv-modal{
|
||||
width: 750rpx;
|
||||
height: auto;
|
||||
}
|
||||
.loginCancelIcon {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
position: absolute;
|
||||
bottom:-60rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 99;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<view class="ui-home" v-if="pageLoading">
|
||||
<!-- <scroll-view scroll-y="true" bindscroll="" class="scroll-content">-->
|
||||
<view class="ui-home" v-if="pageLoading" @scroll="onPageScroll">
|
||||
<cuCustom :searchName="'寻找心仪的Ta'" @tap="jumpPath('/pages/home/searchUsers')"></cuCustom>
|
||||
<swiper class="ui-swiper-box" circular="true" autoplay="true" indicator-dots="true" indicator-color="#c5c5c5" indicator-active-color="#ffffff">
|
||||
<block v-for="(item,index) in swiperList" :key="index">
|
||||
<swiper-item class=" ui-relative ">
|
||||
<image :src="item.img" class="ui-swiper-list" mode="aspectFill" @tap.stop="goToShop(item)"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<view :class="{'ui-fade-out': isScroll,'ui-fade-in': !isScroll}" class="ui-adv-box" v-if="!isClickClose" @tap="goToShop">
|
||||
<view class="ui-adv-message ui--message-fade"></view>
|
||||
<div class="ui-adv-close" @tap.stop="isClickClose = true"></div>
|
||||
</view>
|
||||
<view class="f-fbc ui-pl-30 ui-pt-40 ui-pr-30">
|
||||
<view class="font_34 color333 bold">置顶推荐</view>
|
||||
<image class="ui-top-up" src="https://image.fulllinkai.com/202409/24/9c5a93366fc9e24dec02ba62c87ecf15.png" mode="widthFix" @tap="applyTopUp" v-if="topUpState != 2"></image>
|
||||
@ -445,7 +559,17 @@ page {
|
||||
</view>
|
||||
</view>
|
||||
<loginDialog :loginShow="loginShow" @hiddenLogin="hiddenLogin"></loginDialog>
|
||||
<view :class="{'show':modalName=='showAdv'}" class="cu-modal">
|
||||
<view class="login_prompt_box">
|
||||
<image class="ui-adv-modal" src="https://images.health.ufutx.com/202501/20/74741729fde432c9f29a0012885d1d43.png"
|
||||
mode="widthFix" @tap="goToShop">
|
||||
|
||||
</image><image class="loginCancelIcon" src="https://image.fulllinkai.com/202501/07/3a14b8cc539285e3ba96b0977749bfc5.png"
|
||||
mode="widthFix" @tap="hideModal"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- </scroll-view>-->
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -472,16 +596,42 @@ wepy.page({
|
||||
noMoreSquare: false, // 单身广场更多
|
||||
squarePage: 1,
|
||||
no_more: false,
|
||||
isScroll: false,
|
||||
isClickClose: false, // 是否点击关闭了
|
||||
cardCur: 0, // 为你推荐轮播下标
|
||||
referrals: [], // 为你推荐
|
||||
countdown: {d: '0', h: '00', m: '00', s: '00'},
|
||||
timer: null,
|
||||
swiperList: [
|
||||
// {url: 'https://health.ufutx.com/go_html/store_common#/agentHome', img: 'https://images.health.ufutx.com/202501/10/77128459dc40babf165f8bb2cc44be1d.jpeg'},
|
||||
{url: 'https://health.ufutx.com/go_html/store_common#/agentHome', img: 'https://images.health.ufutx.com/202501/09/cd369bc6aa8ca9cb9626bb75e9d5ab6c.jpeg'},
|
||||
// {url: 'https://health.ufutx.com/go_html/store_common#/agentHome', img: 'https://images.health.ufutx.com/202412/31/81b8f50c7e8a03a5aaf9310f02470660.jpeg'},
|
||||
{url: 'https://health.ufutx.com/go_html/store_common#/agentHome', img: 'https://images.health.ufutx.com/202412/20/68a61ecd8f5255ab557747d95cf2cae6.jpeg'}
|
||||
],
|
||||
modalName: '', //
|
||||
url: 'other/user/square' // 精准推荐
|
||||
|
||||
},
|
||||
methods: {
|
||||
hideModal() {
|
||||
this.modalName = ''
|
||||
},
|
||||
onPageScroll(e) {
|
||||
let vm = this.$wepy
|
||||
// 根据滚动位置来设置按钮的隐藏状态
|
||||
// 这里的scrollTop是滚动条垂直滚动的距离
|
||||
vm.isScroll = true
|
||||
clearTimeout(this.scrollTimeout)
|
||||
this.scrollTimeout = setTimeout(() => {
|
||||
// 定时器时间到后,如果没有新的滚动事件触发,则认为滚动停止
|
||||
vm.isScroll = false
|
||||
// 这里可以执行滚动停止后的逻辑,比如显示某个按钮
|
||||
}, 200) // 200毫秒后判断滚动是否停止,这个时间可以根据需要调整
|
||||
},
|
||||
// 获取置顶推荐用户
|
||||
getTopUser() {
|
||||
let vm = this
|
||||
console.log(this, 'topthis')
|
||||
vm.$get({url: `${service.host}/area/top/users`}).then(({code, data}) => {
|
||||
if (code === 0) {
|
||||
vm.topList = data || []
|
||||
@ -657,6 +807,19 @@ wepy.page({
|
||||
hiddenLogin() {
|
||||
let vm = this
|
||||
vm.loginShow = false
|
||||
},
|
||||
goToShop(item) {
|
||||
let name = wx.getStorageSync('userInfo').name || ''
|
||||
let mobile = wx.getStorageSync('mobile') || ''
|
||||
wx.navigateToMiniProgram({
|
||||
appId: 'wxe486777f4379507e',
|
||||
path: `/pages/sub_page/shopListV2?name=${name}&mobile=${mobile}`
|
||||
})
|
||||
return
|
||||
console.log('111')
|
||||
// wx.navigateTo({url: item.url})
|
||||
// wx.navigateTo({url: '/pages/books/bookDetail?url=' + encodeURIComponent(item.url)})
|
||||
wx.navigateTo({url: '/pages/books/bookDetail?url=' + encodeURIComponent('https://health.ufutx.com/go_html/store_common#/agentHome')})
|
||||
}
|
||||
},
|
||||
// 上拉获取更多数据
|
||||
@ -689,6 +852,7 @@ wepy.page({
|
||||
vm.getEveryday()
|
||||
vm.getSquare()
|
||||
vm.applyTopUpState()
|
||||
// vm.modalName = 'showAdv'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user