Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
67385de6ba
4 changed files with 17 additions and 25 deletions
  1. 2
      app.js
  2. 28
      components/dialog/index.js
  3. 8
      pages/agent/appointment/index.js
  4. 4
      pages/agent/appointment/index.wxml

2
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',

28
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({
}
}
}
});
});

8
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()
})
}
})

4
pages/agent/appointment/index.wxml

@ -94,8 +94,8 @@
<van-popup position="bottom" show="{{ visible }}" bind:close="onHide" z-index="29">
<van-picker show-toolbar title="{{toolbar}}" columns="{{ columns }}" bind:cancel="onHide" bind:confirm="onConfirm" />
</van-popup>
<van-dialog use-slot title="邀请码" show="{{ show }}" transition="fade" bind:cancel="onClose" bind:confirm="onCodeing">
<van-dialog id="van-dialog" use-slot title="邀请码" show="{{ show }}" transition="fade" async-close bind:cancel="onClose" bind:confirm="onCodeing">
<input class="dialog-input" placeholder-style="color:#aaa;" maxlength="8" placeholder="填写业务人员邀请码(必填)" bindinput="bindInput" />
</van-dialog>
<van-dialog id="van-dialog" />
<!-- <van-dialog id="van-dialog" /> -->
<notification id="qn-notification"/>
Loading…
Cancel
Save