diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 03d9549..f358aff 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -2,5 +2,15 @@ \ No newline at end of file diff --git a/src/app.wpy b/src/app.wpy index 49193d9..eb1bbbf 100644 --- a/src/app.wpy +++ b/src/app.wpy @@ -35,7 +35,7 @@ wepy.app({ } }, globalData: { - versions: 'v5.5.94', // 版本号 + versions: 'v5.5.98', // 版本号 navBarHeight: 0, // 导航栏高度 navRight: 0, // 胶囊距右方间距(方保持左、右间距一致) navTop: 0, // 胶囊距顶部间距 @@ -54,9 +54,9 @@ wepy.app({ 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)}` }) - } + // if (e.path === 'pages/home/informationV2') { + // wx.redirectTo({ url: `/pages/home/information?${decodeURIComponent(e.query.scene)}` }) + // } initEid() wx.getSystemInfo({ success: res => { @@ -92,6 +92,9 @@ wepy.app({ if (options.path === 'pages/home/informationV2') { wx.redirectTo({ url: `/pages/home/information?${decodeURIComponent(options.query.scene)}` }) } + if (options.path === 'pages/tabBar/home1') { + wx.switchTab({ url: `/pages/tabBar/home?${decodeURIComponent(options.query.scene)}` }) + } if (options.query.scene) { let sceneList = decodeURIComponent(options.query.scene).split(/[= &]/) sceneList.forEach((item, index) => { @@ -109,7 +112,12 @@ wepy.app({ } } }, - + onPageNotFound(res) { + console.log(res, '错误res') + wx.switchTab({ + url: '/pages/tabBar/home' + }) // 如果是 tabbar 页面,请使用 wx.switchTab + }, onHide() {}, methods: { @@ -145,7 +153,6 @@ pages: [ 'pages/tabBar/home', 'pages/tabBar/news', 'pages/tabBar/user', -'pages/login', 'mp_ecard_sdk/index/index', 'mp_ecard_sdk/protocol/service/index', 'mp_ecard_sdk/protocol/privacy/index', @@ -227,6 +234,8 @@ subPackages: [ 'ImageCropper', 'myDynamicDetail', 'groupMember', + 'blacklistDefault', + 'freeze', ] }, { diff --git a/src/mixins/https.js b/src/mixins/https.js index 3fc41bc..33bb859 100644 --- a/src/mixins/https.js +++ b/src/mixins/https.js @@ -1,5 +1,6 @@ import utils from '../utils/util' import {service} from '../config' +import { IM } from '../utils/im' export default { data: { @@ -103,27 +104,8 @@ export default { wx.removeStorageSync('formId') resolve({statusCode, ...data}) } else if (data.code == 1) { - // resolve({statusCode, ...data}) reject(new Error(`error ${data.message}`)) - if (this.$is == 'pages/service/GroupChatPage' && data.message.includes('已断开连接')) { - let vm = this - wx.showModal({ // 使用模态框提示用户进行操作 - title: `温馨提示`, - content: `UpdatePromptText5`, - showCancel: false, - confirmText: `UpdatePromptText5`, - success: function (res) { - if (res.confirm) { - wx.hideLoading() - wx.navigateBack({ - delta: 1 - }) - // console.log('开始尝试连接WebSocket!readyState=' + vm.$app.$options.globalData.localSocket.readyState) - vm.$app.initSocket('http') - } - } - }) - } else { + vm.errorOne += 1 if (vm.errorOne <= 2) { wx.showModal({ // 使用模态框提示用户进行操作 @@ -144,44 +126,69 @@ export default { } let errorMessage = {message: '错误,请寻找开发人员协助'} throw errorMessage - } wx.hideLoading() } else if (data.code === 2) { console.error(data.message) vm.errorTwo += 1 if (vm.errorTwo <= 2) { - utils.wx_login().then(({code, data}) => { - if (code === 0) { - vm.errorTwo = 1 - if (currentPage.route == 'pages/service/healthMGT') { - wx.redirectTo({url: `/${currentPage.route}?${url}`}) - } else if (data.mobile && data.is_complete_profile) { - if (currentPage.route == 'pages/tabBar/home') { - wx.reLaunch({url: '/pages/tabBar/home'}) - } else { - wx.redirectTo({url: `/${currentPage.route}?${url}`}) - } - } else if (!data.mobile) { - wx.redirectTo({url: `/pages/login`}) - } else if (!data.is_complete_profile) { - wx.redirectTo({url: `/pages/user/registrationMaterial`}) + utils.wx_login().then((data) => { + console.log(data, '444') + let route = `/${currentPage.route}?${url}` + if (!data.data.token) { + wx.removeStorageSync('information') + wx.switchTab({ + url: '/pages/tabBar/home' + }) + } else { + currentPage.onShow() + if (route.includes('tabBar')) { + route = route.split('?')[0] + wx.switchTab({url: route}) + } else { + console.log('222') + wx.redirectTo({url: route}) } } + let {accid, token} = data.data.im_user // wyy_user + vm.$app.$options.globalData.nim = IM(accid, token) + wx.hideLoading() }) } let errorMessage = {message: '错误,需要重新登录'} throw errorMessage } else if (code === 3) { - vm.errorThree += 1 - if (vm.errorThree <= 2) { - utils.wx_login().then(({code, data}) => { - if (code === 0) { - vm.errorThree = 1 - currentPage.onLoad() - currentPage.onShow() + utils.wx_login().then((data) => { + console.log(data, '444') + let route = `/${currentPage.route}?${url}` + if (!data.data.token) { + wx.removeStorageSync('information') + wx.switchTab({ + url: '/pages/tabBar/home' + }) + } else { + currentPage.onShow() + if (route.includes('tabBar')) { + route = route.split('?')[0] + wx.switchTab({url: route}) + } else { + console.log('222') + wx.redirectTo({url: route}) } - }) - } + } + let {accid, token} = data.data.im_user // wyy_user + vm.$app.$options.globalData.nim = IM(accid, token) + wx.hideLoading() + }) + // vm.errorThree += 1 + // if (vm.errorThree <= 2) { + // utils.wx_login().then(({code, data}) => { + // if (code === 0) { + // vm.errorThree = 1 + // currentPage.onLoad() + // currentPage.onShow() + // } + // }) + // } } }, fail: (err) => { @@ -191,7 +198,7 @@ export default { }, complete: (res) => { setTimeout(() => { - wx.hideLoading() // loading只展示一会就被去除了 + wx.hideLoading() // loading只展示一会就被去除了,加1s的时间延迟 }, 1000) if (res.errMsg.indexOf('timeout') > -1) { vm.errorOne += 1 diff --git a/src/pages/dynamic/searchTopic.wpy b/src/pages/dynamic/searchTopic.wpy index f31361b..a328ea4 100644 --- a/src/pages/dynamic/searchTopic.wpy +++ b/src/pages/dynamic/searchTopic.wpy @@ -69,7 +69,7 @@ page { - + @@ -101,16 +101,19 @@ wepy.page({ list: [], // 列表数据 arr: [], loading: false, - show: false + show: false, + search: '' }, methods: { - getList() { + getList(type) { let vm = this vm.$showLoading('加载中...') - vm.$get({url: `${service.host}/moment/topic/list`}).then(({code, data}) => { + vm.$get({url: `${service.host}/moment/topic/list?keyword=${vm.search}`}).then(({code, data}) => { if (code === 0) { vm.list = data.data - vm.arr = data.data + if (type == 'init') { + vm.arr = data.data + } vm.loading = true } wx.hideLoading() @@ -132,19 +135,21 @@ wepy.page({ inputTyping(e) { let vm = this let key = e.$wx.detail.value + vm.search = key if (key == '') { vm.list = vm.arr vm.show = false } else { vm.list = [] - vm.arr.forEach(ele => { - if (ele.name.indexOf(key) >= 0) { - vm.list = vm.list.concat([ele]) - } - }) - if (vm.list && vm.list.length == 0) { - vm.show = true - } + vm.getList() + // vm.arr.forEach(ele => { + // if (ele.name.indexOf(key) >= 0) { + // vm.list = vm.list.concat([ele]) + // } + // }) + // if (vm.list && vm.list.length == 0) { + // vm.show = true + // } } } }, @@ -152,7 +157,7 @@ wepy.page({ }, onLoad() { let vm = this - vm.getList() + vm.getList('init') } }) diff --git a/src/pages/home/information.wpy b/src/pages/home/information.wpy index fa6dbaf..ad9cc52 100644 --- a/src/pages/home/information.wpy +++ b/src/pages/home/information.wpy @@ -643,10 +643,24 @@ page { 期望对方 - - - {{ item }} + + + + {{ userInfo.other_profile.mate_conditon.age }} + {{ userInfo.other_profile.mate_conditon.belief }} + {{ userInfo.other_profile.mate_conditon.degree }} + {{ userInfo.other_profile.mate_conditon.income }} + {{ userInfo.other_profile.mate_conditon.location }} + {{ userInfo.other_profile.mate_conditon.state }} + {{ userInfo.other_profile.mate_conditon.stature }} + + + + {{ item }} + + + {{ userInfo.other_profile.ideal_mate || 'ta什么也没有留下' }} diff --git a/src/pages/home/personalDynamic.wpy b/src/pages/home/personalDynamic.wpy index d0c4a5c..f4ad753 100644 --- a/src/pages/home/personalDynamic.wpy +++ b/src/pages/home/personalDynamic.wpy @@ -581,6 +581,7 @@ wepy.page({ onShow() { }, onLoad(e) { + console.log(e, 'e=') let vm = this let app = vm.$app.$options vm.id = e.id diff --git a/src/pages/login.wpy b/src/pages/login.wpy deleted file mode 100644 index 6327216..0000000 --- a/src/pages/login.wpy +++ /dev/null @@ -1,416 +0,0 @@ - - - - - - -{ -navigationBarTitleText: '友福DMA', - -enablePullDownRefresh: false, -backgroundColorTop: '#F4F7FC', - backgroundColorBottom: '#F4F7FC' -} - diff --git a/src/pages/tabBar/home.wpy b/src/pages/tabBar/home.wpy index 1df3b84..dc4a175 100644 --- a/src/pages/tabBar/home.wpy +++ b/src/pages/tabBar/home.wpy @@ -875,19 +875,33 @@ wepy.page({ if (wx.getStorageSync('logoutCode')) { wx.redirectTo({url: '/pages/users/logoutDefault'}) } + // if (vm.userInfo) { + // console.log('444') + // setTimeout(() => { + // wx.switchTab({url: '/pages/tabBar/home'}) + // }, 3000) + // } }, onLoad() { let vm = this vm.userInfo = wx.getStorageSync('userInfo') - vm.getTopUser() - vm.getArea() - vm.getEveryday() - vm.getSquare() - vm.applyTopUpState() - vm.getBannerList() - vm.advModal = wx.getStorageSync('adv') - if ((vm.advModal.id - 0) > 0) { - vm.modalName = 'showAdv' + console.log(vm.userInfo, 'vm.userInfo') + if (!vm.userInfo) { + console.log('444') + setTimeout(() => { + wx.switchTab({url: '/pages/tabBar/home'}) + }, 3000) + } else { + vm.getTopUser() + vm.getArea() + vm.getEveryday() + vm.getSquare() + vm.applyTopUpState() + vm.getBannerList() + vm.advModal = wx.getStorageSync('adv') + if ((vm.advModal.id - 0) > 0) { + vm.modalName = 'showAdv' + } } } }) diff --git a/src/pages/users/blacklistDefault.wpy b/src/pages/users/blacklistDefault.wpy new file mode 100644 index 0000000..898d640 --- /dev/null +++ b/src/pages/users/blacklistDefault.wpy @@ -0,0 +1,116 @@ + + + + + + + { + navigationBarTitleText: '福恋系统', + navigationStyle: 'custom', + enablePullDownRefresh: false, + backgroundColorTop: '#ffffff', + backgroundColorBottom: '#ffffff', + usingComponents: { + } + } + diff --git a/src/pages/users/degreeCertificate.wpy b/src/pages/users/degreeCertificate.wpy index 7d6dbfd..01ed2c8 100644 --- a/src/pages/users/degreeCertificate.wpy +++ b/src/pages/users/degreeCertificate.wpy @@ -130,7 +130,7 @@ 认证已提交,等待审核 - 审核结果将在1~3个工作日内通知,请耐心等待;如有需要,请直接联系客服18194066804 + 审核结果将在1~3个工作日内通知,请耐心等待;如有需要,请直接联系客服18922809346 我知道了 diff --git a/src/pages/users/freeze.wpy b/src/pages/users/freeze.wpy new file mode 100644 index 0000000..1afce00 --- /dev/null +++ b/src/pages/users/freeze.wpy @@ -0,0 +1,187 @@ + + + + + + + { + navigationBarTitleText: '福恋系统', + navigationStyle: 'custom', + enablePullDownRefresh: false, + backgroundColorTop: '#ffffff', + backgroundColorBottom: '#ffffff', + usingComponents: { + } + } + diff --git a/src/pages/users/myCertification.wpy b/src/pages/users/myCertification.wpy index d017708..0730315 100644 --- a/src/pages/users/myCertification.wpy +++ b/src/pages/users/myCertification.wpy @@ -89,7 +89,7 @@ 资料正在审核中 - 审核结果将在1~3个工作日内通知,请耐心等待;如有需要,请直接联系客服18194066804 + 审核结果将在1~3个工作日内通知,请耐心等待;如有需要,请直接联系客服18922809346 我知道了