diff --git a/app.js b/app.js index 1432a24..76ed0a8 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,6 @@ //app.js App({ - evn: 2, // 0: 开发版本;1:测试版本;2:生产版本 + evn: 0, // 0: 开发版本;1:测试版本;2:生产版本 tmplIds: ['AFoM5TOfsgERsfcetNSB0UlmEixnLF1ySXr54Bqno2M', 'lOQ8Gvyy_dTk68bYGpRVnVA0M7DsYYrV81Gd39GUPBA'], version: '2.1.0', xAppId: '503258978847953926', diff --git a/components/dialog/index.js b/components/dialog/index.js index f786e42..10b3b0a 100644 --- a/components/dialog/index.js +++ b/components/dialog/index.js @@ -1,7 +1,7 @@ import { VantComponent } from '../common/component'; import { button } from '../mixins/button'; -import { openType } from '../mixins/open-type'; -import { GRAY, BLUE } from '../common/color'; +import { openType} from '../mixins/open-type'; +import {GRAY,BLUE } from '../common/color'; VantComponent({ mixins: [button, openType], props: { @@ -62,10 +62,7 @@ VantComponent({ } }, data: { - loading: { - confirm: false, - cancel: false - } + loading: { confirm: false, cancel: false } }, methods: { onConfirm() { @@ -79,26 +76,17 @@ VantComponent({ }, handleAction(action) { if (this.data.asyncClose) { - this.setData({ - [`loading.${action}`]: true - }); + this.setData({ [`loading.${action}`]: true }); } - if(!this.data.logined){ + if (!this.data.logined) { this.onClose(action) } }, close() { - this.setData({ - show: false - }); + this.setData({ show: false }); }, stopLoading() { - this.setData({ - loading: { - confirm: false, - cancel: false - } - }); + this.setData({ loading: { confirm: false, cancel: false } }); }, onClose(action) { if (!this.data.asyncClose) { @@ -113,4 +101,4 @@ VantComponent({ } } } -}); +}); \ No newline at end of file diff --git a/pages/agent/appointment/index.js b/pages/agent/appointment/index.js index 9a41fa0..97d35b5 100644 --- a/pages/agent/appointment/index.js +++ b/pages/agent/appointment/index.js @@ -279,16 +279,20 @@ Scene({ onCodeing: function(){ if(util.isEmpty(this.data.code)){ util.showToast('请输入邀请码') - this.setData({ show: true }) + this.dialog = this.dialog || this.selectComponent('#van-dialog') + this.dialog.stopLoading() return } + // this.setData({ requesting: true }) wx.showLoading({ title: '处理中', mask: true }) postRelation(this.data.code).then(result => { wx.hideLoading() + this.setData({ show: false, requesting: false }) }).catch(err => { wx.hideLoading() util.showToast(err) - this.setData({ show: true }) + this.dialog = this.dialog || this.selectComponent('#van-dialog') + this.dialog.stopLoading() }) } }) \ No newline at end of file diff --git a/pages/agent/appointment/index.wxml b/pages/agent/appointment/index.wxml index 8ec7920..7c05452 100644 --- a/pages/agent/appointment/index.wxml +++ b/pages/agent/appointment/index.wxml @@ -94,8 +94,8 @@ - + - + \ No newline at end of file