亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

? ?? ??? ?? ???? ?? ?? ????? ? ???? ??????? ???? ??? ?? ??? ??

?? ????? ? ???? ??????? ???? ??? ?? ??? ??

Dec 27, 2021 am 10:23 AM
?? ????

WeChat ???? ?? ???? ??????? ???? ??? ?????? ? ????? ?? ???? ?????? ?? ?? ???? ??? ?????. ??? ?? ????!

?? ????? ? ???? ??????? ???? ??? ?? ??? ??

WeChat ?? ?????? ? ???, ?? ???, ?? ?? ???, ?? ??? ?? ????. ??? ???? ??? ??? ? ????. ?? ???? ?? ???? ? ? ? ???? ???? ????? ??? ??? ??????

?? ???? ??? ???? ???? ???? ?? ????. ??? ??? ???? ?? ??? ??? ???? ??? ????. ? ????? ??? ??? ????. ? ????? ??? ?? ??? ????? ?? ??? ??? ? ??? ?????. ? ?? ??? ??? ?????.

??? ? ?? ??? ? ? ?????. ?? ?? ?? ??? ???? ?? ???? ???? ??? ??? ???(?? ?? ??? ??, ?? ?? ?? ???? ??? ???? ?????). . ? ???? ??????? ?? ?? ??? ???? ???? ????? ?? ??? ?? ????? ?? ?? ??????.

Solution

??, ???? ?? ????? ??? ??? ??????? ?? ??????. ????? ??? ??? ?? ??? ??? ?????? ?? ???. ? ??? ?? ?? ???? ?? ???? ?? ????. ??? ??? ?? ???? ??? ??? ? ????. ??? ??? ?????:

const app = getApp()
Page({
  data: {
    logs: []
  },
  onLoad() {
    app.commonLogin(()=>{
        // 處理頁(yè)頁(yè)面請(qǐng)求
    })
  }
})

??? ?? ??? ???? ? ???, ? ???? ?? onShareAppMessage? ?? ??? ?? ? ?? ??? ???? ??? ?? ?? ??? ?? ??? ???. ??? ? ???? ?? watch? ?? ???? ????.

?? ???

WeChat ???? ? ? ????. ? ???? Page()???. ?? ?? ? ??? ??? ?? ???? MyPage? ???? ? ???? ??? ? ????. ? ??? ??? ??? ????.

tool.js ?? ??

/**
   * 處理合并參數(shù)
   */
  handlePageParamMerge(arg) {
    let numargs = arg.length; // 獲取被傳遞參數(shù)的數(shù)值。
    let data = {}
    let page = {}
    for (let ix in arg) {
      let item = arg[ix]
      if (item.data && typeof (item.data) === 'object') {
        data = Object.assign(data, item.data)
      }
      if (item.methods && typeof (item.methods) === 'object') {
        page = Object.assign(page, item.methods)
      } else {
        page = Object.assign(page, item)
      }
    }
    page.data = data
    return page
  }

  /***
   * 合并頁(yè)面方法以及數(shù)據(jù), 兼容 {data:{}, methods: {}} 或 {data:{}, a:{}, b:{}}
   */
  mergePage() {
    return this.handlePageParamMerge(arguments)
  }

  /**
   * 處理組件參數(shù)合并
   */
  handleCompParamMerge(arg) {
    let numargs = arg.length; // 獲取被傳遞參數(shù)的數(shù)值。
    let data = {}
    let options = {}
    let properties = {}
    let methods = {}
    let comp = {}
    for (let ix in arg) {
      let item = arg[ix]
      // 合并組件的初始數(shù)據(jù)
      if (item.data && typeof (item.data) === 'object') {
        data = Object.assign(data, item.data)
      }
      // 合并組件的屬性列表
      if (item.properties && typeof (item.properties) === 'object') {
        properties = Object.assign(properties, item.properties)
      }
      // 合組件的方法列表
      if (item.methods && typeof (item.methods) === 'object') {
        methods = Object.assign(methods, item.methods)
      }
      if (item.options && typeof (item.options) === 'object') {
        options = Object.assign(options, item.options)
      }
      comp = Object.assign(comp, item)
    }
    comp.data = data
    comp.options = options
    comp.properties = properties
    comp.methods = methods
    return comp
  }

  /**
   * 組件混合 {properties: {}, options: {}, data:{}, methods: {}}
   */
  mergeComponent() {
    return this.handleCompParamMerge(arguments)
  }

  /***
   * 合成帶watch的頁(yè)面
   */
  newPage() {
    let options = this.handlePageParamMerge(arguments)
    let that = this
    let app = getApp()

    //增加全局點(diǎn)擊登錄判斷
    if (!options.publicCheckLogin){
      options.publicCheckLogin = function (e) {
        let pages = getCurrentPages()
        let page = pages[pages.length - 1]
        let dataset = e.currentTarget.dataset
        let callback = null

        //獲取回調(diào)方法
        if (dataset.callback && typeof (page[dataset.callback]) === "function"){
          callback = page[dataset.callback]
        }
        // console.log('callback>>', callback, app.isRegister())
        //判斷是否登錄
        if (callback && app.isRegister()){
          callback(e)
        }
        else{
          wx.navigateTo({
            url: '/pages/login/login'
          })
        }
      }
    }

    const { onLoad } = options
    options.onLoad = function (arg) {
      options.watch && that.setWatcher(this)
      onLoad && onLoad.call(this, arg)
    }

    const { onShow } = options
    options.onShow = function (arg) {
      if (options.data.noAutoLogin || app.isRegister()) {
        onShow && onShow.call(this, arg)
        //頁(yè)面埋點(diǎn)
        app.ga({})
      }
      else {
        wx.navigateTo({
          url: '/pages/login/login'
        })
      }
    }

    return Page(options)
  }

  /**
   * 合成帶watch等的組件
   */
  newComponent() {
    let options = this.handleCompParamMerge(arguments)
    let that = this
    const { ready } = options
    options.ready = function (arg) {
      options.watch && that.setWatcher(this)
      ready && ready.call(this, arg)
    }
    return Component(options)
  }

  /**
    * 設(shè)置監(jiān)聽(tīng)器
    */
  setWatcher(page) {
    let data = page.data;
    let watch = page.watch;
    Object.keys(watch).forEach(v => {
      let key = v.split('.'); // 將watch中的屬性以'.'切分成數(shù)組
      let nowData = data; // 將data賦值給nowData
      for (let i = 0; i < key.length - 1; i++) { // 遍歷key數(shù)組的元素,除了最后一個(gè)!
        nowData = nowData[key[i]]; // 將nowData指向它的key屬性對(duì)象
      }

      let lastKey = key[key.length - 1];
      // 假設(shè)key===&#39;my.name&#39;,此時(shí)nowData===data[&#39;my&#39;]===data.my,lastKey===&#39;name&#39;
      let watchFun = watch[v].handler || watch[v]; // 兼容帶handler和不帶handler的兩種寫法
      let deep = watch[v].deep; // 若未設(shè)置deep,則為undefine
      this.observe(nowData, lastKey, watchFun, deep, page); // 監(jiān)聽(tīng)nowData對(duì)象的lastKey
    })
  }

  /**
   * 監(jiān)聽(tīng)屬性 并執(zhí)行監(jiān)聽(tīng)函數(shù)
   */
  observe(obj, key, watchFun, deep, page) {
    var val = obj[key];
    // 判斷deep是true 且 val不能為空 且 typeof val===&#39;object&#39;(數(shù)組內(nèi)數(shù)值變化也需要深度監(jiān)聽(tīng))
    if (deep && val != null && typeof val === &#39;object&#39;) {
      Object.keys(val).forEach(childKey => { // 遍歷val對(duì)象下的每一個(gè)key
        this.observe(val, childKey, watchFun, deep, page); // 遞歸調(diào)用監(jiān)聽(tīng)函數(shù)
      })
    }
    var that = this;
    Object.defineProperty(obj, key, {
      configurable: true,
      enumerable: true,
      set: function (value) {
        if (val === value) {
          return
        }
        // 用page對(duì)象調(diào)用,改變函數(shù)內(nèi)this指向,以便this.data訪問(wèn)data內(nèi)的屬性值
        watchFun.call(page, value, val); // value是新值,val是舊值
        val = value;
        if (deep) { // 若是深度監(jiān)聽(tīng),重新監(jiān)聽(tīng)該對(duì)象,以便監(jiān)聽(tīng)其屬性。
          that.observe(obj, key, watchFun, deep, page);
        }
      },
      get: function () {
        return val;
      }
    })
  }

??? ??:

app.tool.newPage({
  data: {
    // noAutoLogin: false
  },
  onShow: function () {
    // 在這里寫頁(yè)面請(qǐng)求邏輯
  }
}

???

??? ???? ????? ???????. ???? newPage ???? ??? ? ????. . ??? ?? ??? ??????. ??? ???, ? ?? ????? ??? ??? ??? ????.

【?? ?? ??: ?? ???? ?? ????

? ??? ?? ????? ? ???? ??????? ???? ??? ?? ??? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1597
29
PHP ????
1487
72
NYT ?? ??? ??
129
836
???
Python? ???? WeChat ??? ?? Python? ???? WeChat ??? ?? Jun 17, 2023 pm 06:34 PM

??? ??? ??? ????? ???? ?? WeChat? ???? ?? ???? ?? ??????? ?????. WeChat ?? ????? ???? ???? ??????? ?????? ???? ??? ?? ????? ?? ???? ? ?? ??? ?? ??? ??? ? ????. ? ????? Python? ???? WeChat ???? ???? ??? ?????. 1. ?? Python? ???? WeChat ???? ???? ?? ?? Python ?????? ???? ???. ???? wxpy? itchat ? ?????? ???? ?? ????. wxpy? ?? ?????

WeChat ?? ?????? ?? ??? ?? ?? WeChat ?? ?????? ?? ??? ?? ?? Nov 21, 2023 am 10:55 AM

WeChat ?? ?????? ?? ??? ?? ?? WeChat ?? ?????? ?? ??? ??? ???? ?? ??? ??? ????? ?? ??? ??? ???? ? ?? ???? ????? ?????. ??? WeChat ????? ?? ??? ??? ???? ??? ??? ???? ?? ?? ??? ?????. ??, ?? ????? ??? ???? ??? ? ?? ?? ??? ???? ???. ??? ?? ??? ???? ?? ??? ?? ??? ?? ??? ???? ?? ????. &lt;--index.wxml- -&gt;&l

Alipay, ?? ?? ?????? ???? ???? '?? ??-?? ??' ?? ???? ?? Alipay, ?? ?? ?????? ???? ???? '?? ??-?? ??' ?? ???? ?? Oct 31, 2023 pm 09:25 PM

10? 31? ? ???? ??? ??? ?? 5? 27? Ant Group? '?? ?? ????'? ????? ????? ?? ??? ??? ?????. Alipay? '?? ?? - ??? ?? ??' ?? ????? ??????. ?? ???? ?? ??? ?????? ???? ?? ???? ?? ??? ?? ??? ???? Alipay? ?? ??? ?? ??? ???? ? ??? ???. ?? ???? "????", "????" ?? ???? ???? "????" ???? ??? ? ????. ?? ?????? ???? ????? ?? ? ???? ?? ?? ??? ??? ??? ? ??? ?? ? Alipay ????? ?? ?????? ?? ??? ?????. ? ??????? ?? ??????? ?? ?? ?? ?? ??? ??? ? ??? ?????. ? ?? ??? ??? ???? ?? ??? ?? ???????. ??? ??

?? ????? ??? ? ???? ?? ????? ??? ? ???? Dec 29, 2022 am 11:06 AM

?? ????? ??? ??? ? ????. ?? ??: 1. "react-reconciler"? ???? ???? ???? DSL? ?????. 2. DSL? ?? ???? ????? ?? ?? ???? ?? ??? ????. 3. npm? ???? ???? ?????. ???? npm? ?????. 4. ??? ???? ???? ??? ?? API? ???? ??? ?????.

uniapp? ?? ????? H5 ?? ?? ??? ???? ?? uniapp? ?? ????? H5 ?? ?? ??? ???? ?? Oct 20, 2023 pm 02:12 PM

???? ?? ????? H5 ??? ??? ????? ???? ?? ??? ?????. ?? ??? ???? ??? ????? ???? ?? ?? ????? H5? ?? ?????? ??? ?????. ??? ??? ?? ?????? uniapp? ?? ??? ???? ?? ????? H5 ?? ??? ???? ???? ?? ???? ?? ???? ? ????. ? ????? uniapp? ?? ????? H5 ?? ??? ??? ???? ??? ???? ???? ?? ??? ?????. 1. ??? ??? ??

?? ?????? ?? ?? ??? ???? ???? ??? ?????(?? ???? ??). ?? ?????? ?? ?? ??? ???? ???? ??? ?????(?? ???? ??). Nov 04, 2022 pm 04:53 PM

?? ?? ?? ?? ????? ??? ? ?? ??? ?? ????, ?? ?????? ?? ?? ??? ???? ???? ??? ?? ???????.

Python?? ??? ?? ???? ?? ???? Python?? ??? ?? ???? ?? ???? May 08, 2023 pm 06:37 PM

?? ???? x01 ?? ?? ??, ?? ???? ??? ???? ???? ?????. ?? ??? ??? ??? ? ???? ?? ??? ?? ? ??? ?????. ?? ???? ???? ???? ??? ?? ??? ?????. x02 ?????? ??? ???? ?? ?????. ?????? ??? ???? ??? ?? ???? ?? ??? ???? ?????. ??? ??? ??? ????? ????? ??? ? ?? ???? ???? ???. ??? ??? ?? ???? ?? ??? ??? ?? ?????. ????, ??

PHP? ?? ????? ??? ??? ?? ?? ? ?? ?? PHP? ?? ????? ??? ??? ?? ?? ? ?? ?? Jul 04, 2023 pm 04:01 PM

PHP ? ?? ????? ??? ?? ?? ? ?? ?? ??? ?? ?? ? ?? ??? ?? ???? ??? ?? ? ??? ?????. ??? ??? ??? ?? ?? ?? ? ?? ??? ?? ???? ??? ???? ????. ?? ???? PHP? ???? ? ?? ???? ?? ?????. ? ????? PHP ? ?? ?????? ??? ?? ?? ? ?? ?? ?? ??? ???? ?? ?? ??? ?????. 1. PHP? ???? PHP??? ?? ????? ??? ? ????.

See all articles