diff --git a/src/app.wpy b/src/app.wpy index 7bba58d..182494b 100644 --- a/src/app.wpy +++ b/src/app.wpy @@ -35,7 +35,7 @@ wepy.app({ } }, globalData: { - versions: 'v5.5.89', // 版本号 + versions: 'v5.5.93', // 版本号 navBarHeight: 0, // 导航栏高度 navRight: 0, // 胶囊距右方间距(方保持左、右间距一致) navTop: 0, // 胶囊距顶部间距 @@ -48,9 +48,15 @@ wepy.app({ bottomHeight: 0 // 底部小黑条的高度 }, - onLaunch() { + onLaunch(e) { let vm = this + console.log(e, 'uuu=') vm.appLogin() + console.log(e, 'e=') + console.log(decodeURIComponent(e.query.scene), 'e=') + if (e.path === 'pages/home/informationV2') { + wx.redirectTo({ url: `/pages/home/information?${decodeURIComponent(e.query.scene)}` }) + } initEid() wx.getSystemInfo({ success: res => { diff --git a/src/pages/home/information.wpy b/src/pages/home/information.wpy index 5c65fef..fa6dbaf 100644 --- a/src/pages/home/information.wpy +++ b/src/pages/home/information.wpy @@ -1344,6 +1344,7 @@ wepy.page({ } }, onLoad(e) { + console.log(e, 'e==') let vm = this vm.userData = wx.getStorageSync('userInfo') vm.userId = wx.getStorageSync('user_id') @@ -1365,6 +1366,9 @@ wepy.page({ } } else { vm.id = e.id + if (e.from_user_id) { + wx.setStorageSync('from_user_id', e.from_user_id) + } } vm.getDetail() vm.getDynamic() diff --git a/src/pages/home/registration.wpy b/src/pages/home/registration.wpy index 49c2c0e..c28d147 100644 --- a/src/pages/home/registration.wpy +++ b/src/pages/home/registration.wpy @@ -39,7 +39,7 @@ page { } ._list{ padding: 0 50rpx; - margin-top: 80rpx; + margin-top: 42rpx; .getMobile{ height: 55rpx; padding: 0 16rpx !important; @@ -53,6 +53,49 @@ page { margin-right: 6rpx; } } + .ui-phone-box{ + margin-top: 40rpx; + padding: 8rpx 32rpx; + border-radius: 32rpx; + background: #F8F8F8; + .ui-phone-item{ + display: flex; + align-items: center; + padding:32rpx 0rpx; + border-bottom: 2rpx solid rgba(221, 221, 221, .7); + } + .ui-phone-item:nth-child(2){ + border-bottom: 0; + } + .ui-phone-item-v2{ + justify-content: space-between; + } + .ui-phone-code{ + padding:16rpx 20rpx; + display: flex; + justify-content: center; + align-items: center; + color:#FF5380; + border-radius: 20rpx; + background: #FFE9EF; + white-space: nowrap + } + .ui-phone-code-send{ + color: #ececec; + background: #f8f8f8; + border: 2rpx solid #ececec; + + } + } + .radio-group{ + .radio-left{ + margin-right: 100rpx; + } + .itemRadio{ + transform: scale(.8); + background: #f8f8f8; + } + } ._listItem{ margin-top: 30rpx; position: relative; @@ -106,7 +149,7 @@ page { height: 88rpx; background: rgba(255, 83, 128, 0.6); border-radius: 100rpx; - margin-top: 124rpx; + margin-top: 82rpx; margin-bottom: 20rpx; } .btn-box.sel { @@ -138,57 +181,85 @@ button::after{ - - + + 昵称 + + + - 你的生日 - - - + 你的生日 + + + - - 性别|保存后不可更改 - - - + +
+ +
+
+ + {{time == 0 ? '获取验证码' : btnText}} +
+ + + + + + + + + + + 性别 + + + + + + + + 保存后不可更改 + + + + + + + - 目前居住地 - - + 目前居住地 + + - 情感状况 - - + 情感状况 + + - 信仰 - - + 信仰 + + @@ -226,6 +297,11 @@ wepy.page({ endDate: '', // 出生日期结束时间 mobile: '', + code: '', + time: 0, + timer: null, + loading: false, + btnText: '', sex: '', address: {country: '', province: '', city: ''}, @@ -259,6 +335,11 @@ wepy.page({ vm.endDate = `${Y - 12}-01-01` vm.beginData = `${Y - 120}-01-01` }, + computed: { + btnText() { + return +this.time > 0 ? `${this.time}s` : `获取验证码` + } + }, methods: { hideCut(e) { wx.showTabBar({ @@ -266,6 +347,48 @@ wepy.page({ }) this.chooseShow = e.chooseShow }, + // 获取验证码 + getCode() { + let vm = this + if (!vm.mobile) { + vm.$showToast('请输入手机号') + return + } + // 防抖 + if (vm.loading || vm.time > 0) return + // 开防抖 + vm.loading = true + // 根据业务接口处理:发送验证码 + let data = { + mobile: vm.mobile + } + vm.$showLoading('加载中...') + vm.$post({url: `${service.host}/register/sms/code`, data}).then(res => { + wx.hideLoading() + if (res.code === 1) { + return + } + // 开倒计时 + vm.timing(60) + vm.$showToast(`发送成功`) + }) + }, + timing(time) { + this.time = time + this.timer = setTimeout(() => { + if (time > 0) { + this.timing(time - 1) + } else { + this.loading = false + } + }, 1000) + }, + // 选择性别 + sexChange(e) { + console.log(e, 'e===') + this.sex = e.$wx.detail.value + console.log(this.sex, 'sex==') + }, complete() { let vm = this console.log(this.photo, vm.photo, 'vm.photo==') @@ -292,6 +415,9 @@ wepy.page({ if (!vm.mobile) { return vm.$showToast('请选择绑定手机号') } + if (!vm.code) { + return vm.$showToast('请输入验证码') + } if (!vm.birthday) { return vm.$showToast('请选择你的生日') } @@ -315,7 +441,8 @@ wepy.page({ country: vm.address.country, province: vm.address.province, city: vm.address.city, - birthday: vm.birthday + birthday: vm.birthday, + code: vm.code // userInfo: vm.userInfo, // openid: vm.openid, // unionid: vm.unionid, @@ -327,6 +454,7 @@ wepy.page({ console.log(userInfo, '===') userInfo.is_base_profile = true wx.setStorageSync('userInfo', userInfo) + wx.setStorageSync('mobile', vm.mobile) // 用户手机号 vm.$showToast('注册成功') setTimeout(() => { wx.hideLoading() diff --git a/src/pages/tabBar/home.wpy b/src/pages/tabBar/home.wpy index 4d716d8..1df3b84 100644 --- a/src/pages/tabBar/home.wpy +++ b/src/pages/tabBar/home.wpy @@ -299,12 +299,12 @@ page { .ui-adv-box{ position: fixed; bottom: 270rpx; - right: 0rpx; + right: 8rpx; width: 120rpx; - height: 120rpx; + height: 144rpx; color:#ffffff; z-index: 1000; - background: url('https://image.fulllinkai.com/202501/07/92fabd6990d6c166d3352cf95987049f.png'); + background: url('https://images.health.ufutx.com/202502/21/5f8a2d1d65bec51b00ff04f268b93e16.png'); background-size: cover; } .ui-adv-message{ @@ -372,7 +372,7 @@ page { left: 50%; transform: translate(-50%,-50%); .ui-adv-modal{ - width: 750rpx; + width: 600rpx; height: auto; } .loginCancelIcon { @@ -398,7 +398,7 @@ page { - +
@@ -561,9 +561,8 @@ page { @@ -609,6 +608,11 @@ wepy.page({ {url: 'https://health.ufutx.com/go_html/store_common#/agentHome', img: 'https://images.health.ufutx.com/202412/20/68a61ecd8f5255ab557747d95cf2cae6.jpeg'} ], modalName: '', // + advModal: { + id: 0, + pic: '', + shop_id: null + }, // url: 'other/user/square' // 精准推荐 }, @@ -808,9 +812,37 @@ wepy.page({ let vm = this vm.loginShow = false }, + getBannerList() { + let vm = this + vm.$get({url: `${service.host}/dma/carousel/list`}).then(({code, data}) => { + if (code === 0) { + vm.swiperList = data.map(item => { + return { + img: item.icon, + shop_id: item.shop_id, + program: item.program + } + }).filter((item) => { + return !item.program + }) + } + wx.hideLoading() + }).catch(err => { + wx.hideLoading() + console.log(err) + }) + }, goToShop(item) { let name = wx.getStorageSync('userInfo').name || '' let mobile = wx.getStorageSync('mobile') || '' + console.log(item, 'ite-==') + if (item && item.shop_id) { + wx.navigateToMiniProgram({ + appId: 'wxe486777f4379507e', + path: `/pages/sub_page/shopDetail?id=${item.shop_id}&name=${name}&mobile=${mobile}` + }) + return + } wx.navigateToMiniProgram({ appId: 'wxe486777f4379507e', path: `/pages/sub_page/shopListV2?name=${name}&mobile=${mobile}` @@ -852,7 +884,11 @@ wepy.page({ vm.getEveryday() vm.getSquare() vm.applyTopUpState() - // vm.modalName = 'showAdv' + vm.getBannerList() + vm.advModal = wx.getStorageSync('adv') + if ((vm.advModal.id - 0) > 0) { + vm.modalName = 'showAdv' + } } }) diff --git a/src/pages/users/myCertification.wpy b/src/pages/users/myCertification.wpy index a21e2d3..d017708 100644 --- a/src/pages/users/myCertification.wpy +++ b/src/pages/users/myCertification.wpy @@ -205,7 +205,7 @@ content: '请先绑定手机号后再真人认证', success(res) { if (res.confirm) { - vm.$goto('/pages/users/setTing') + vm.$goto('/pages/home/information') } else if (res.cancel) { console.log('用户点击取消') } diff --git a/src/pages/users/setTing.wpy b/src/pages/users/setTing.wpy index 499e8ee..6404dad 100644 --- a/src/pages/users/setTing.wpy +++ b/src/pages/users/setTing.wpy @@ -5,22 +5,12 @@ - 手机号绑定 + 手机号 {{phoneNumber}} - - - diff --git a/src/utils/util.js b/src/utils/util.js index cf2106a..a38811d 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -52,6 +52,7 @@ const wx_login = () => { wx.setStorageSync('openid', (data.openid)) wx.setStorageSync('user_id', data.user.id) // 用户id wx.setStorageSync('mobile', data.user.mobile) // 用户手机号 + wx.setStorageSync('adv', data.adv) // 首页弹窗广告 if (data.user.hidden_profile == 'ALLSEX') { // 资料是否关闭 wx.setStorageSync('logoutCode', 1) wx.redirectTo({url: '/pages/users/logoutDefault'})