diff --git a/src/app.wpy b/src/app.wpy index f872841..56554a3 100644 --- a/src/app.wpy +++ b/src/app.wpy @@ -14,9 +14,6 @@ import wepy from '@wepy/core' import vuex from '@wepy/x' import promisify from '@wepy/use-promisify' -import { wx_login } from './utils/util' -import { IM } from './utils/im' -import {service} from './config' wepy.use(promisify) wepy.use(vuex) @@ -45,7 +42,6 @@ wepy.app({ onLaunch() { let vm = this - vm.appLogin() wx.getSystemInfo({ success: res => { vm.$options.globalData.bottomHeight = res.screenHeight - res.safeArea.bottom @@ -95,29 +91,7 @@ wepy.app({ onHide() {}, - methods: { - appLogin() { - let vm = this - wx_login().then((e) => { - wx.hideLoading() - let {accid, token} = e.data.user.wyy_user - vm.$options.globalData.nim = IM(accid, token) - }).catch((msg) => { - wx.showModal({ // 使用模态框提示用户进行操作 - title: '温馨提示:', - content: `${msg}`, - showCancel: false, - success: function (res) { - if (res.confirm) { - wx.navigateBack({ - delta: 1 - }) - } - } - }) - }) - } - } + methods: {} }) @@ -142,6 +116,7 @@ subPackages: [ 'root': 'pages/home', 'pages': [ 'information', +'otherHalfDemand', 'qualitySingle', 'registration', 'searchCondition', diff --git a/src/components/bothwaySlider.wpy b/src/components/bothwaySlider.wpy new file mode 100644 index 0000000..4eb501c --- /dev/null +++ b/src/components/bothwaySlider.wpy @@ -0,0 +1,162 @@ + + + diff --git a/src/pages/home/otherHalfDemand.wpy b/src/pages/home/otherHalfDemand.wpy new file mode 100644 index 0000000..28eeb7f --- /dev/null +++ b/src/pages/home/otherHalfDemand.wpy @@ -0,0 +1,347 @@ + + + + + +{ +navigationBarTitleText: '对另一半要求', +enablePullDownRefresh: false, +backgroundColorTop: '#ffffff', +backgroundColorBottom: '#ffffff', +usingComponents: { +bothwaySlider: '~@/components/bothwaySlider', +selectCity: '~@/components/selectCity' +} +} + diff --git a/src/pages/tabBar/welcome.wpy b/src/pages/tabBar/welcome.wpy index 7de02d0..957d56b 100644 --- a/src/pages/tabBar/welcome.wpy +++ b/src/pages/tabBar/welcome.wpy @@ -12,6 +12,8 @@ page { import wepy from '@wepy/core' import https from '../../mixins/https' import base from '../../mixins/base' +import {wx_login} from '../../utils/util' +import { IM } from '../../utils/im' wepy.page({ config: {}, @@ -19,13 +21,26 @@ wepy.page({ data: {}, watch: {}, - methods: {}, - onLoad() {}, - onShow() { - setTimeout(() => { - this.$gotoTab('/pages/tabBar/home') - }, 1000) + methods: { + appLogin() { + let vm = this + let app = vm.$app.$options + wx_login().then((e) => { + wx.hideLoading() + let {accid, token} = e.data.user.wyy_user + app.globalData.nim = IM(accid, token) + setTimeout(() => { + wx.switchTab({url: `/pages/tabBar/home`}) + }, 100) + }).catch(() => { + }) + } }, + onLoad() { + let vm = this + vm.appLogin() + }, + onShow() {}, created() { } })