chenlei 7 månader sedan
förälder
incheckning
dcfec3f36a
2 ändrade filer med 34 tillägg och 14 borttagningar
  1. 16 1
      config/interfaces/index.js
  2. 18 13
      directives/index.js

+ 16 - 1
config/interfaces/index.js

@@ -20,6 +20,10 @@ export default {
   },
   /** 用户中心 */
   user: {
+    /** 物流管理者刷新token(完成物流认证后,需要刷新增加org信息) */
+    refresh_carrier_token: {
+      realUrl: 'user/oauth/refresh_carrier_token'
+    },
     /** 新增驾驶员 */
     add_drivers: {
       realUrl: 'user/driver_white_list/add_drivers'
@@ -63,7 +67,18 @@ export default {
     /** 物流认证通联(会员创建+开户认证+营业执照和法人身份证上传) */
     carrier_open_account: {
       realUrl: 'pay/member/carrier_open_account'
+    },
+    /** 转账授权 */
+    sign_balance_protocol: {
+      realUrl: 'pay/member/sign_balance_protocol'
+    },
+    /** 提现授权 */
+    sign_withdraw_protocol: {
+      realUrl: 'pay/member/sign_withdraw_protocol'
+    },
+    /** 企业绑定对公户 */
+    bind_bank: {
+      realUrl: '/pay/member/bind_bank'
     }
-
   }
 }

+ 18 - 13
directives/index.js

@@ -11,21 +11,26 @@ const emptyChange = (el, binding, vnode) => {
     return
   }
   // binding.value为对象{open:true,text:'空文案'} 配合v-model 使用
-  let isEmpty = false
-  if (binding.value.open) {
-    if (!vnode.data.model.value) {
-      isEmpty = true
+  vnode.child.$nextTick(() => {
+    let isEmpty = false
+    if (binding.value.open) {
+      if (!vnode.data.model.value) {
+        isEmpty = true
+      }
     }
-  }
-  if (isEmpty) {
-    el.classList.add('hide-child', 'gray-color')
-    el.appendChild(document.createTextNode(binding.value.text))
-  } else {
-    if (el.classList.contains('hide-child')) {
-      el.classList.remove('hide-child', 'gray-color')
-      el.removeChild(el.lastChild)
+    if (isEmpty) {
+    // console.log('hide-child', el.classList.contains('hide-child'))
+      if (!el.classList.contains('hide-child')) {
+        el.classList.add('hide-child', 'gray-color')
+        el.appendChild(document.createTextNode(binding.value.text))
+      }
+    } else {
+      if (el.classList.contains('hide-child')) {
+        el.classList.remove('hide-child', 'gray-color')
+        el.removeChild(el.lastChild)
+      }
     }
-  }
+  })
 }
 const empty = {
   bind: emptyChange,