u
This commit is contained in:
		
							parent
							
								
									f30142ead6
								
							
						
					
					
						commit
						fa20d06a42
					
				
							
								
								
									
										10
									
								
								usertool.js
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								usertool.js
									
									
									
									
									
								
							@ -1,6 +1,7 @@
 | 
			
		||||
// uniapp people side tools
 | 
			
		||||
 | 
			
		||||
import './ican-H5Api.js' // 对齐H5Api: https://ext.dcloud.net.cn/plugin?id=415 // 注意要取消默认自带的 showToast https://uniapp.dcloud.io/api/system/clipboard?id=%e6%b3%a8%e6%84%8f
 | 
			
		||||
const BASEND_TYPE_DEFAULT = 'SERVER' // 服务器 SERVER 或云服务 UNICLOUD
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  // 用直观的色彩,代替 uview 的命名方式:
 | 
			
		||||
@ -12,9 +13,6 @@ export default {
 | 
			
		||||
  BLACK_TOAST: 'default',
 | 
			
		||||
  WHITE_BUTTON: 'default',
 | 
			
		||||
 | 
			
		||||
  // [todo] 能否把这些默认值放到 export 以外?
 | 
			
		||||
  BASEND_TYPE_DEFAULT: 'SERVER', // 服务器 SERVER 或云服务 UNICLOUD
 | 
			
		||||
 | 
			
		||||
  thisPage () {
 | 
			
		||||
    return this.__page__
 | 
			
		||||
      ? this // 1) constructor.name==='VueComponent' 只在 development 环境有用,在 production 环境会被简化成 'o'。2)对于组件内定义的 i18nText,要使用 this 来获得组建内的 i18nText,而不是 getCurrentPages[...] 去访问全局页面的 i18nText。
 | 
			
		||||
@ -106,7 +104,7 @@ export default {
 | 
			
		||||
          }, 0)
 | 
			
		||||
        }
 | 
			
		||||
      } else {
 | 
			
		||||
        document.getElementsByTagName('uni-top-window')?.[0]?.remove() // hide topWindow
 | 
			
		||||
        document.getElementsByTagName('uni-top-window')?.[0]?.remove() // 强制隐藏 topWindow,否则在手机浏览器里,topWindow 会遮挡掉 navibar。
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    // #endif
 | 
			
		||||
@ -158,7 +156,7 @@ export default {
 | 
			
		||||
   * - CLINET_BASEND_EXCEPTION: 前端发现后台异常
 | 
			
		||||
   **/
 | 
			
		||||
  async callBasend ({
 | 
			
		||||
    basendType = this.envar?.basendTypeDefault || wo?.envar?.basendTypeDefault || this.BASEND_TYPE_DEFAULT,
 | 
			
		||||
    basendType = this.envar?.basendTypeDefault || wo?.envar?.basendTypeDefault || BASEND_TYPE_DEFAULT,
 | 
			
		||||
    httpMethod = 'POST',
 | 
			
		||||
    apiVersion = 'api',
 | 
			
		||||
    apiWho,
 | 
			
		||||
@ -369,7 +367,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  async pickupFile ({
 | 
			
		||||
    basendType = this.envar?.basendTypeDefault || wo?.envar?.basendTypeDefault || this.BASEND_TYPE_DEFAULT,
 | 
			
		||||
    basendType = this.envar?.basendTypeDefault || wo?.envar?.basendTypeDefault || BASEND_TYPE_DEFAULT,
 | 
			
		||||
    mediaType = 'image',
 | 
			
		||||
    count = 1,
 | 
			
		||||
    sizeType = ['original', 'compressed'],
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user