global.js 788 Bytes
import App from '../utils/api'
import util from '../utils/util'
module.exports = {
  getHasEditorFlag() {
    return new Promise(async function (success, fail) {
      let enter_params = util.cache('enter_params');
      let res = await App.Reserve.SellerInfo(enter_params)
      if (res.data.config.is_auth == 1) {
        success()
      } else {
        fail()
      }
    })
  },
  VerificationIsAdmin() {
    //App.Seller.VerificationIsAdmin
    return new Promise(async function (success, fail) {
      let enter_params = util.cache('enter_params');
      let res = await App.Seller.VerificationIsAdmin({openid:enter_params.seller_openid})
      if (res.data && res.data.status==1) {
        getApp().isAdmin=true
        success()
      } else {
        fail()
      }
    })
  }
}